summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Borzecki <maciej.borzecki@rndity.com>2017-02-27 12:46:06 +0100
committerKhem Raj <raj.khem@gmail.com>2017-03-11 04:39:15 -0800
commitc01466aabb9bda5b34fbcb3802bfe586ae7fdc53 (patch)
treed7ec05d8308451480fb4683811ab9f5abfa7ea7e
parent6bafea4f37fc50d0905edcc49699326d6158aaa3 (diff)
downloadmeta-raspberrypi-c01466aabb9bda5b34fbcb3802bfe586ae7fdc53.tar.gz
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>
-rw-r--r--conf/machine/include/rpi-base.inc32
1 files changed, 31 insertions, 1 deletions
diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
index e069e70..092cbeb 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -51,7 +51,37 @@ MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
51# Set Raspberrypi splash image 51# Set Raspberrypi splash image
52SPLASH = "psplash-raspberrypi" 52SPLASH = "psplash-raspberrypi"
53 53
54IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}" 54def make_dtb_boot_files(d):
55 # Generate IMAGE_BOOT_FILES entries for device tree files listed in
56 # KERNEL_DEVICETREE.
57 alldtbs = d.getVar('KERNEL_DEVICETREE')
58 imgtyp = d.getVar('KERNEL_IMAGETYPE')
59
60 def transform(dtb):
61 if dtb.endswith('dtb'):
62 # eg: bcm2708-rpi-b.dtb has:
63 # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb
64 # destination: bcm2708-rpi-b.dtb
65 src = '{}-{}'.format(imgtyp, dtb)
66 dst = dtb
67 return '{};{}'.format(src, dst)
68 elif dtb.endswith('dtbo'):
69 # overlay dtb:
70 # eg: overlays/hifiberry-amp.dtbo has:
71 # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbp
72 # destination: overlays/hifiberry-amp.dtbo
73 base = os.path.basename(dtb)
74 src = '{}-{}'.format(imgtyp, base)
75 dst = dtb
76 return '{};{}'.format(src, dtb)
77
78 return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
79
80
81IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \
82 ${@make_dtb_boot_files(d)} \
83 ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE} \
84 "
55 85
56# The kernel image is installed into the FAT32 boot partition and does not need 86# The kernel image is installed into the FAT32 boot partition and does not need
57# to also be installed into the rootfs. 87# to also be installed into the rootfs.