diff options
author | Paul Barker <paul@paulbarker.me.uk> | 2016-06-18 12:07:06 +0100 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2016-07-08 12:17:47 +0100 |
commit | 43ecd9ac992216974316f954683547e5867c5612 (patch) | |
tree | ceeb135e84e1067a7c858c89df66f76893e3ccff /classes | |
parent | fe92cc7e1428ba7f982c371101150851c621532a (diff) | |
download | meta-raspberrypi-43ecd9ac992216974316f954683547e5867c5612.tar.gz |
sdcard_image-rpi: Always install dtb files
We now need dtb files when booting via u-boot.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index 20bd314..3b4f13f 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass | |||
@@ -103,32 +103,32 @@ IMAGE_CMD_rpi-sdimg () { | |||
103 | rm -f ${WORKDIR}/boot.img | 103 | rm -f ${WORKDIR}/boot.img |
104 | mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS | 104 | mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS |
105 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ | 105 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ |
106 | if test -n "${DTS}"; then | ||
107 | # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' string and will be put in a dedicated folder | ||
108 | DT_OVERLAYS="${@split_overlays(d, 0)}" | ||
109 | DT_ROOT="${@split_overlays(d, 1)}" | ||
110 | |||
111 | # Copy board device trees to root folder | ||
112 | for DTB in ${DT_ROOT}; do | ||
113 | DTB_BASE_NAME=`basename ${DTB} .dtb` | ||
114 | |||
115 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb | ||
116 | done | ||
117 | |||
118 | # Copy device tree overlays to dedicated folder | ||
119 | mmd -i ${WORKDIR}/boot.img overlays | ||
120 | for DTB in ${DT_OVERLAYS}; do | ||
121 | DTB_BASE_NAME=`basename ${DTB} .dtb` | ||
122 | |||
123 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::overlays/${DTB_BASE_NAME}.dtb | ||
124 | done | ||
125 | fi | ||
106 | case "${KERNEL_IMAGETYPE}" in | 126 | case "${KERNEL_IMAGETYPE}" in |
107 | "uImage") | 127 | "uImage") |
108 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} | 128 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} |
109 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage | 129 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage |
110 | ;; | 130 | ;; |
111 | *) | 131 | *) |
112 | if test -n "${DTS}"; then | ||
113 | # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' string and will be put in a dedicated folder | ||
114 | DT_OVERLAYS="${@split_overlays(d, 0)}" | ||
115 | DT_ROOT="${@split_overlays(d, 1)}" | ||
116 | |||
117 | # Copy board device trees to root folder | ||
118 | for DTB in ${DT_ROOT}; do | ||
119 | DTB_BASE_NAME=`basename ${DTB} .dtb` | ||
120 | |||
121 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb | ||
122 | done | ||
123 | |||
124 | # Copy device tree overlays to dedicated folder | ||
125 | mmd -i ${WORKDIR}/boot.img overlays | ||
126 | for DTB in ${DT_OVERLAYS}; do | ||
127 | DTB_BASE_NAME=`basename ${DTB} .dtb` | ||
128 | |||
129 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::overlays/${DTB_BASE_NAME}.dtb | ||
130 | done | ||
131 | fi | ||
132 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE} | 132 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE} |
133 | ;; | 133 | ;; |
134 | esac | 134 | esac |