diff options
author | Andrei Gherzan <andrei@gherzan.ro> | 2014-01-20 01:00:52 +0200 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2014-02-09 03:05:13 +0200 |
commit | d9ce376660c787e7944732de02a327c6d49ad031 (patch) | |
tree | e167bcbab08f97a20f5a8bf06f6fc4b5b7d0551b /classes | |
parent | 7b1791f45fc87a706aff13c0b0a18dda36be2648 (diff) | |
download | meta-raspberrypi-d9ce376660c787e7944732de02a327c6d49ad031.tar.gz |
sdcard_image-rpi: Add support for u-boot and uImage
If KERNEL_IMAGETYPE is uImage, use u-boot image as kernel.img and copy uImage
too. Otherwise, use kernel image as kernel.img (as we did until now
unconditionally).
Change-Id: Iac46a57e4266299f2fe5746cb6957dcfc0e90443
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index 3ee4e94..179b7b7 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass | |||
@@ -45,6 +45,7 @@ IMAGE_DEPENDS_rpi-sdimg = " \ | |||
45 | dosfstools-native \ | 45 | dosfstools-native \ |
46 | virtual/kernel \ | 46 | virtual/kernel \ |
47 | ${IMAGE_BOOTLOADER} \ | 47 | ${IMAGE_BOOTLOADER} \ |
48 | ${@base_contains("KERNEL_IMAGETYPE", "uImage", "u-boot", "",d)} \ | ||
48 | " | 49 | " |
49 | 50 | ||
50 | # SD card image name | 51 | # SD card image name |
@@ -91,7 +92,15 @@ IMAGE_CMD_rpi-sdimg () { | |||
91 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') | 92 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') |
92 | mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS | 93 | mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS |
93 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ | 94 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ |
94 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img | 95 | case "${KERNEL_IMAGETYPE}" in |
96 | "uImage") | ||
97 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img | ||
98 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::uImage | ||
99 | ;; | ||
100 | *) | ||
101 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img | ||
102 | ;; | ||
103 | esac | ||
95 | 104 | ||
96 | if [ -n ${FATPAYLOAD} ] ; then | 105 | if [ -n ${FATPAYLOAD} ] ; then |
97 | echo "Copying payload into VFAT" | 106 | echo "Copying payload into VFAT" |