Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | DESCRIPTION = "Firmware Image for Juno to be copied to the Configuration \ |
| 2 | microSD card" |
| 3 | |
| 4 | LICENSE = "BSD-3-Clause" |
| 5 | SECTION = "firmware" |
| 6 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" |
| 7 | |
| 8 | INHIBIT_DEFAULT_DEPS = "1" |
| 9 | DEPENDS = "trusted-firmware-a virtual/kernel virtual/control-processor-firmware" |
| 10 | |
| 11 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 12 | |
| 13 | COMPATIBLE_MACHINE = "juno" |
| 14 | |
| 15 | LINARO_RELEASE = "19.06" |
| 16 | |
| 17 | SRC_URI = "http://releases.linaro.org/members/arm/platforms/${LINARO_RELEASE}/juno-latest-oe-uboot.zip;subdir=${UNPACK_DIR} \ |
| 18 | file://images-r0.txt \ |
| 19 | file://images-r1.txt \ |
| 20 | file://images-r2.txt \ |
| 21 | file://uEnv.txt \ |
| 22 | " |
| 23 | SRC_URI[md5sum] = "01b662b81fa409d55ff298238ad24003" |
| 24 | SRC_URI[sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82" |
| 25 | |
| 26 | UNPACK_DIR = "juno-firmware-${LINARO_RELEASE}" |
| 27 | |
| 28 | inherit deploy nopackages |
| 29 | |
| 30 | do_configure[noexec] = "1" |
| 31 | do_compile[noexec] = "1" |
| 32 | |
| 33 | # The ${D} is used as a temporary directory and we don't generate any |
| 34 | # packages for this recipe. |
| 35 | do_install() { |
| 36 | cp -a ${WORKDIR}/${UNPACK_DIR} ${D} |
| 37 | cp -f ${RECIPE_SYSROOT}/firmware/bl1-juno.bin \ |
| 38 | ${D}/${UNPACK_DIR}/SOFTWARE/bl1.bin |
| 39 | |
| 40 | cp -f ${RECIPE_SYSROOT}/firmware/fip-juno.bin \ |
| 41 | ${D}/${UNPACK_DIR}/SOFTWARE/fip.bin |
| 42 | |
| 43 | cp -f ${RECIPE_SYSROOT}/firmware/scp_romfw_bypass.bin \ |
| 44 | ${D}/${UNPACK_DIR}/SOFTWARE/scp_bl1.bin |
| 45 | |
| 46 | # u-boot environment file |
| 47 | cp -f ${WORKDIR}/uEnv.txt ${D}/${UNPACK_DIR}/SOFTWARE/ |
| 48 | |
| 49 | # Juno images list file |
| 50 | cp -f ${WORKDIR}/images-r0.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262B/images.txt |
| 51 | cp -f ${WORKDIR}/images-r1.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262C/images.txt |
| 52 | cp -f ${WORKDIR}/images-r2.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262D/images.txt |
| 53 | } |
| 54 | |
| 55 | do_deploy() { |
| 56 | # To avoid dependency loop between firmware-image-juno:do_install |
| 57 | # and virtual/kernel:do_deploy when INITRAMFS_IMAGE_BUNDLE = "1", |
| 58 | # we need to handle the kernel binaries copying in the do_deploy |
| 59 | # task. |
| 60 | for f in ${KERNEL_DEVICETREE}; do |
| 61 | install -m 755 -c ${DEPLOY_DIR_IMAGE}/$(basename $f) \ |
| 62 | ${D}/${UNPACK_DIR}/SOFTWARE/. |
| 63 | done |
| 64 | |
| 65 | if [ "${INITRAMFS_IMAGE_BUNDLE}" -eq 1 ]; then |
Andrew Geissler | ea144b03 | 2023-01-27 16:03:57 -0600 | [diff] [blame] | 66 | cp -L -f ${DEPLOY_DIR_IMAGE}/Image.gz-initramfs-juno.bin \ |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 67 | ${D}/${UNPACK_DIR}/SOFTWARE/Image |
| 68 | else |
Andrew Geissler | ea144b03 | 2023-01-27 16:03:57 -0600 | [diff] [blame] | 69 | cp -L -f ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ${D}/${UNPACK_DIR}/SOFTWARE/ |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 70 | fi |
| 71 | |
| 72 | # Compress the files |
| 73 | tar -C ${D}/${UNPACK_DIR} -zcvf ${WORKDIR}/${PN}.tar.gz ./ |
| 74 | |
| 75 | # Deploy the compressed archive to the deploy folder |
| 76 | install -D -p -m0644 ${WORKDIR}/${PN}.tar.gz ${DEPLOYDIR}/${PN}.tar.gz |
| 77 | } |
| 78 | do_deploy[depends] += "virtual/kernel:do_deploy" |
| 79 | addtask deploy after do_install |