blob: 45f2ec726ada5e502b8849c177f0c4e9b2e4ea7b [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001DESCRIPTION = "Firmware Image for Juno to be copied to the Configuration \
2microSD card"
3
4LICENSE = "BSD-3-Clause"
5SECTION = "firmware"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
7
8INHIBIT_DEFAULT_DEPS = "1"
9DEPENDS = "trusted-firmware-a virtual/kernel virtual/control-processor-firmware"
10
11PACKAGE_ARCH = "${MACHINE_ARCH}"
12
13COMPATIBLE_MACHINE = "juno"
14
15LINARO_RELEASE = "19.06"
16
17SRC_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"
23SRC_URI[md5sum] = "01b662b81fa409d55ff298238ad24003"
24SRC_URI[sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82"
25
26UNPACK_DIR = "juno-firmware-${LINARO_RELEASE}"
27
28inherit deploy nopackages
29
30do_configure[noexec] = "1"
31do_compile[noexec] = "1"
32
33# The ${D} is used as a temporary directory and we don't generate any
34# packages for this recipe.
35do_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
55do_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 Geisslerea144b02023-01-27 16:03:57 -060066 cp -L -f ${DEPLOY_DIR_IMAGE}/Image.gz-initramfs-juno.bin \
Brad Bishopbec4ebc2022-08-03 09:55:16 -040067 ${D}/${UNPACK_DIR}/SOFTWARE/Image
68 else
Andrew Geisslerea144b02023-01-27 16:03:57 -060069 cp -L -f ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ${D}/${UNPACK_DIR}/SOFTWARE/
Brad Bishopbec4ebc2022-08-03 09:55:16 -040070 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}
78do_deploy[depends] += "virtual/kernel:do_deploy"
79addtask deploy after do_install