mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 21:09:03 +02:00
rpi-base: wic: generate entries for device tree files
Augment IMAGE_BOOT_FILES with entries picking up proper dtb[o]s. This allows for building usable wic images once again. Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
This commit is contained in:
parent
6bafea4f37
commit
c01466aabb
|
@ -51,7 +51,37 @@ MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
|
||||||
# Set Raspberrypi splash image
|
# Set Raspberrypi splash image
|
||||||
SPLASH = "psplash-raspberrypi"
|
SPLASH = "psplash-raspberrypi"
|
||||||
|
|
||||||
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}"
|
def make_dtb_boot_files(d):
|
||||||
|
# Generate IMAGE_BOOT_FILES entries for device tree files listed in
|
||||||
|
# KERNEL_DEVICETREE.
|
||||||
|
alldtbs = d.getVar('KERNEL_DEVICETREE')
|
||||||
|
imgtyp = d.getVar('KERNEL_IMAGETYPE')
|
||||||
|
|
||||||
|
def transform(dtb):
|
||||||
|
if dtb.endswith('dtb'):
|
||||||
|
# eg: bcm2708-rpi-b.dtb has:
|
||||||
|
# DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb
|
||||||
|
# destination: bcm2708-rpi-b.dtb
|
||||||
|
src = '{}-{}'.format(imgtyp, dtb)
|
||||||
|
dst = dtb
|
||||||
|
return '{};{}'.format(src, dst)
|
||||||
|
elif dtb.endswith('dtbo'):
|
||||||
|
# overlay dtb:
|
||||||
|
# eg: overlays/hifiberry-amp.dtbo has:
|
||||||
|
# DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbp
|
||||||
|
# destination: overlays/hifiberry-amp.dtbo
|
||||||
|
base = os.path.basename(dtb)
|
||||||
|
src = '{}-{}'.format(imgtyp, base)
|
||||||
|
dst = dtb
|
||||||
|
return '{};{}'.format(src, dtb)
|
||||||
|
|
||||||
|
return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
|
||||||
|
|
||||||
|
|
||||||
|
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \
|
||||||
|
${@make_dtb_boot_files(d)} \
|
||||||
|
${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE} \
|
||||||
|
"
|
||||||
|
|
||||||
# The kernel image is installed into the FAT32 boot partition and does not need
|
# The kernel image is installed into the FAT32 boot partition and does not need
|
||||||
# to also be installed into the rootfs.
|
# to also be installed into the rootfs.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user