diff options
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index 43426b2..779a9e2 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass | |||
@@ -59,6 +59,7 @@ do_image_rpi_sdimg[depends] = " \ | |||
59 | ${@bb.utils.contains('MACHINE_FEATURES', 'armstub', 'armstubs:do_deploy', '' ,d)} \ | 59 | ${@bb.utils.contains('MACHINE_FEATURES', 'armstub', 'armstubs:do_deploy', '' ,d)} \ |
60 | ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ | 60 | ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ |
61 | ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot-default-script:do_deploy', '',d)} \ | 61 | ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot-default-script:do_deploy', '',d)} \ |
62 | ${RPI_SDIMG_EXTRA_DEPENDS} \ | ||
62 | " | 63 | " |
63 | 64 | ||
64 | do_image_rpi_sdimg[recrdeps] = "do_build" | 65 | do_image_rpi_sdimg[recrdeps] = "do_build" |
@@ -148,6 +149,22 @@ IMAGE_CMD_rpi-sdimg () { | |||
148 | fi | 149 | fi |
149 | fi | 150 | fi |
150 | 151 | ||
152 | # Add files (eg. hypervisor binaries) from the deploy dir | ||
153 | if [ -n "${DEPLOYPAYLOAD}" ] ; then | ||
154 | echo "Copying deploy file payload into VFAT" | ||
155 | for entry in ${DEPLOYPAYLOAD} ; do | ||
156 | # Split entry at optional ':' to enable file renaming for the destination | ||
157 | if [ $(echo "$entry" | grep -c :) = "0" ] ; then | ||
158 | DEPLOY_FILE="$entry" | ||
159 | DEST_FILENAME="$entry" | ||
160 | else | ||
161 | DEPLOY_FILE="$(echo "$entry" | cut -f1 -d:)" | ||
162 | DEST_FILENAME="$(echo "$entry" | cut -f2- -d:)" | ||
163 | fi | ||
164 | mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${DEPLOY_FILE} ::${DEST_FILENAME} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${DEPLOY_FILE} into boot.img" | ||
165 | done | ||
166 | fi | ||
167 | |||
151 | if [ -n "${FATPAYLOAD}" ] ; then | 168 | if [ -n "${FATPAYLOAD}" ] ; then |
152 | echo "Copying payload into VFAT" | 169 | echo "Copying payload into VFAT" |
153 | for entry in ${FATPAYLOAD} ; do | 170 | for entry in ${FATPAYLOAD} ; do |