From 9d7e0aa351ef830384ea15f50f9ed0a9cf5ededd Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Fri, 21 Aug 2020 15:56:44 -0500 Subject: meta-raspberrypi: subtree update:e2c1992955..cc6074c660 Andrei Gherzan (1): sdcard_image-rpi.bbclass: Fix when RPI_SDIMG_EXTRA_DEPENDS not defined Christopher Clark (2): sdcard_image-rpi.bbclass: enable extensible inclusion into boot docs/extra-build-config.md: document vars to add to boot partition Fabio Berton (1): u-boot: Move fw_env.config to u-boot append Jakub Luzny (2): rpi-config: Add CAN_OSCILLATOR variable to set mcp2515 crystal frequency docs/extra-build-config.md: Document CAN_OSCILLATOR variable Jeff Ithier (1): Generalize the naming of the bootfiles deploy directory Martin Jansa (1): linux-raspberrypi-5.4: bump SRCREV to latest to fix perf build Pierre-Jean Texier (3): rpi-default-versions: Switch defaults to 5.4 raspberrypi-firmware: update to current HEAD linux-raspberrypi: bump to revision 4b945d5 Signed-off-by: Andrew Geissler Change-Id: I50eca26a801bfe014d3cea271f0cb91e7b653445 --- meta-raspberrypi/classes/sdcard_image-rpi.bbclass | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'meta-raspberrypi/classes/sdcard_image-rpi.bbclass') diff --git a/meta-raspberrypi/classes/sdcard_image-rpi.bbclass b/meta-raspberrypi/classes/sdcard_image-rpi.bbclass index 43426b275..8197978a3 100644 --- a/meta-raspberrypi/classes/sdcard_image-rpi.bbclass +++ b/meta-raspberrypi/classes/sdcard_image-rpi.bbclass @@ -26,7 +26,7 @@ inherit image_types IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" # Set kernel and boot loader -IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" +IMAGE_BOOTLOADER ?= "bootfiles" # Kernel image name SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" @@ -49,6 +49,8 @@ SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${SDIMG_ROOTFS_TYPE}" # For the names of kernel artifacts inherit kernel-artifact-names +RPI_SDIMG_EXTRA_DEPENDS ?= "" + do_image_rpi_sdimg[depends] = " \ parted-native:do_populate_sysroot \ mtools-native:do_populate_sysroot \ @@ -59,6 +61,7 @@ do_image_rpi_sdimg[depends] = " \ ${@bb.utils.contains('MACHINE_FEATURES', 'armstub', 'armstubs:do_deploy', '' ,d)} \ ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot-default-script:do_deploy', '',d)} \ + ${RPI_SDIMG_EXTRA_DEPENDS} \ " do_image_rpi_sdimg[recrdeps] = "do_build" @@ -114,7 +117,7 @@ IMAGE_CMD_rpi-sdimg () { BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') rm -f ${WORKDIR}/boot.img mkfs.vfat -F32 -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS - mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* into boot.img" + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* into boot.img" if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} into boot.img" fi @@ -148,6 +151,22 @@ IMAGE_CMD_rpi-sdimg () { fi fi + # Add files (eg. hypervisor binaries) from the deploy dir + if [ -n "${DEPLOYPAYLOAD}" ] ; then + echo "Copying deploy file payload into VFAT" + for entry in ${DEPLOYPAYLOAD} ; do + # Split entry at optional ':' to enable file renaming for the destination + if [ $(echo "$entry" | grep -c :) = "0" ] ; then + DEPLOY_FILE="$entry" + DEST_FILENAME="$entry" + else + DEPLOY_FILE="$(echo "$entry" | cut -f1 -d:)" + DEST_FILENAME="$(echo "$entry" | cut -f2- -d:)" + fi + 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" + done + fi + if [ -n "${FATPAYLOAD}" ] ; then echo "Copying payload into VFAT" for entry in ${FATPAYLOAD} ; do -- cgit v1.2.3