diff options
Diffstat (limited to 'conf/machine/include')
| -rw-r--r-- | conf/machine/include/rpi-base.inc | 32 |
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 |
| 52 | SPLASH = "psplash-raspberrypi" | 52 | SPLASH = "psplash-raspberrypi" |
| 53 | 53 | ||
| 54 | IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}" | 54 | def 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 | |||
| 81 | IMAGE_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. |
