diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index 71b6477..63cd62a 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass | |||
@@ -50,7 +50,7 @@ IMAGE_DEPENDS_rpi-sdimg = " \ | |||
50 | dosfstools-native \ | 50 | dosfstools-native \ |
51 | virtual/kernel \ | 51 | virtual/kernel \ |
52 | ${IMAGE_BOOTLOADER} \ | 52 | ${IMAGE_BOOTLOADER} \ |
53 | ${@base_contains("KERNEL_IMAGETYPE", "uImage", "u-boot", "",d)} \ | 53 | ${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', 'u-boot', '',d)} \ |
54 | " | 54 | " |
55 | 55 | ||
56 | # SD card image name | 56 | # SD card image name |
@@ -99,12 +99,23 @@ IMAGE_CMD_rpi-sdimg () { | |||
99 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ | 99 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ |
100 | case "${KERNEL_IMAGETYPE}" in | 100 | case "${KERNEL_IMAGETYPE}" in |
101 | "uImage") | 101 | "uImage") |
102 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img | 102 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img |
103 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage | 103 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage |
104 | ;; | 104 | ;; |
105 | *) | 105 | *) |
106 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::kernel.img | 106 | if test -n "${KERNEL_DEVICETREE}"; then |
107 | ;; | 107 | for DTB in ${KERNEL_DEVICETREE}; do |
108 | if echo ${DTB} | grep -q '/dts/'; then | ||
109 | bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." | ||
110 | DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` | ||
111 | fi | ||
112 | DTB_BASE_NAME=`basename ${DTB} .dtb` | ||
113 | |||
114 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb | ||
115 | done | ||
116 | fi | ||
117 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::kernel.img | ||
118 | ;; | ||
108 | esac | 119 | esac |
109 | 120 | ||
110 | if [ -n ${FATPAYLOAD} ] ; then | 121 | if [ -n ${FATPAYLOAD} ] ; then |