[yocto] [meta-raspberrypi][PATCH 6/6] sdcard_image-rpi: Always install dtb files
Paul Barker
paul at paulbarker.me.uk
Sun May 29 08:59:13 PDT 2016
We now need dtb files when booting via u-boot.
Signed-off-by: Paul Barker <paul at paulbarker.me.uk>
---
classes/sdcard_image-rpi.bbclass | 40 ++++++++++++++++++++--------------------
1 file 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 () {
rm -f ${WORKDIR}/boot.img
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
+ if test -n "${DTS}"; then
+ # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' string and will be put in a dedicated folder
+ DT_OVERLAYS="${@split_overlays(d, 0)}"
+ DT_ROOT="${@split_overlays(d, 1)}"
+
+ # Copy board device trees to root folder
+ for DTB in ${DT_ROOT}; do
+ DTB_BASE_NAME=`basename ${DTB} .dtb`
+
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb
+ done
+
+ # Copy device tree overlays to dedicated folder
+ mmd -i ${WORKDIR}/boot.img overlays
+ for DTB in ${DT_OVERLAYS}; do
+ DTB_BASE_NAME=`basename ${DTB} .dtb`
+
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::overlays/${DTB_BASE_NAME}.dtb
+ done
+ fi
case "${KERNEL_IMAGETYPE}" in
"uImage")
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE}
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
;;
*)
- if test -n "${DTS}"; then
- # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' string and will be put in a dedicated folder
- DT_OVERLAYS="${@split_overlays(d, 0)}"
- DT_ROOT="${@split_overlays(d, 1)}"
-
- # Copy board device trees to root folder
- for DTB in ${DT_ROOT}; do
- DTB_BASE_NAME=`basename ${DTB} .dtb`
-
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb
- done
-
- # Copy device tree overlays to dedicated folder
- mmd -i ${WORKDIR}/boot.img overlays
- for DTB in ${DT_OVERLAYS}; do
- DTB_BASE_NAME=`basename ${DTB} .dtb`
-
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::overlays/${DTB_BASE_NAME}.dtb
- done
- fi
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE}
;;
esac
--
2.1.4
More information about the yocto
mailing list