Initial commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
SUMARY = "Corstone1000 platform Image"
|
||||
DESCRIPTION = "This is the main image which is the container of all the binaries \
|
||||
generated for the Corstone1000 platform."
|
||||
LICENSE = "MIT"
|
||||
|
||||
COMPATIBLE_MACHINE = "corstone1000"
|
||||
|
||||
inherit image
|
||||
inherit tfm_sign_image
|
||||
inherit uefi_capsule
|
||||
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
IMAGE_FSTYPES += "wic uefi_capsule"
|
||||
|
||||
UEFI_FIRMWARE_BINARY = "${PN}-${MACHINE}.${CAPSULE_IMGTYPE}"
|
||||
UEFI_CAPSULE_CONFIG = "${THISDIR}/files/${PN}-capsule-update-image.json"
|
||||
CAPSULE_IMGTYPE = "wic"
|
||||
|
||||
do_sign_images() {
|
||||
# Sign TF-A BL2
|
||||
sign_host_image ${RECIPE_SYSROOT}/firmware/${TFA_BL2_BINARY} \
|
||||
${TFA_BL2_RE_IMAGE_LOAD_ADDRESS} ${TFA_BL2_RE_SIGN_BIN_SIZE}
|
||||
|
||||
# Update BL2 in the FIP image
|
||||
cp ${RECIPE_SYSROOT}/firmware/${TFA_FIP_BINARY} .
|
||||
fiptool update --tb-fw \
|
||||
${TFM_IMAGE_SIGN_DEPLOY_DIR}/signed_${TFA_BL2_BINARY} \
|
||||
${TFM_IMAGE_SIGN_DIR}/${TFA_FIP_BINARY}
|
||||
|
||||
# Sign the FIP image
|
||||
sign_host_image ${TFM_IMAGE_SIGN_DIR}/${TFA_FIP_BINARY} \
|
||||
${TFA_FIP_RE_IMAGE_LOAD_ADDRESS} ${TFA_FIP_RE_SIGN_BIN_SIZE}
|
||||
}
|
||||
do_sign_images[depends] = "\
|
||||
trusted-firmware-a:do_populate_sysroot \
|
||||
fiptool-native:do_populate_sysroot \
|
||||
"
|
||||
@@ -0,0 +1,28 @@
|
||||
SUMARY = "Corstone1000 platform Initramfs Image"
|
||||
DESCRIPTION = "This is the main Linux image which includes an initramfs kernel/rootfs bundle."
|
||||
|
||||
LICENSE = "MIT"
|
||||
|
||||
COMPATIBLE_MACHINE = "corstone1000"
|
||||
|
||||
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
|
||||
|
||||
inherit core-image
|
||||
|
||||
# By default all basic packages required for a bootable system are installed
|
||||
# by core-image . These packages are: packagegroup-core-boot and
|
||||
# packagegroup-base-extended
|
||||
|
||||
inherit image-buildinfo
|
||||
|
||||
#package management is not supported in corstone1000
|
||||
IMAGE_FEATURES:remove = "package-management"
|
||||
|
||||
# all optee packages
|
||||
IMAGE_INSTALL += "optee-client"
|
||||
|
||||
# external system linux userspace test application
|
||||
IMAGE_INSTALL += "corstone1000-external-sys-tests"
|
||||
|
||||
# TS PSA API tests commands for crypto, its, ps and iat
|
||||
IMAGE_INSTALL += "packagegroup-ts-tests-psa"
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"Payloads": [
|
||||
{
|
||||
"FwVersion": "5",
|
||||
"Guid": "e2bb9c06-70e9-4b14-97a3-5a7913176e3f",
|
||||
"LowestSupportedVersion": "1",
|
||||
"Payload": "$UEFI_FIRMWARE_BINARY",
|
||||
"UpdateImageIndex": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
DESCRIPTION = "Firmware Image for Juno to be copied to the Configuration \
|
||||
microSD card"
|
||||
|
||||
LICENSE = "BSD-3-Clause"
|
||||
SECTION = "firmware"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
DEPENDS = "trusted-firmware-a virtual/kernel virtual/control-processor-firmware"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
COMPATIBLE_MACHINE = "juno"
|
||||
|
||||
LINARO_RELEASE = "19.06"
|
||||
|
||||
SRC_URI = "http://releases.linaro.org/members/arm/platforms/${LINARO_RELEASE}/juno-latest-oe-uboot.zip;subdir=${UNPACK_DIR} \
|
||||
file://images-r0.txt \
|
||||
file://images-r1.txt \
|
||||
file://images-r2.txt \
|
||||
file://uEnv.txt \
|
||||
"
|
||||
SRC_URI[md5sum] = "01b662b81fa409d55ff298238ad24003"
|
||||
SRC_URI[sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82"
|
||||
|
||||
UNPACK_DIR = "juno-firmware-${LINARO_RELEASE}"
|
||||
|
||||
inherit deploy nopackages
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
do_compile[noexec] = "1"
|
||||
|
||||
# The ${D} is used as a temporary directory and we don't generate any
|
||||
# packages for this recipe.
|
||||
do_install() {
|
||||
cp -a ${WORKDIR}/${UNPACK_DIR} ${D}
|
||||
cp -f ${RECIPE_SYSROOT}/firmware/bl1-juno.bin \
|
||||
${D}/${UNPACK_DIR}/SOFTWARE/bl1.bin
|
||||
|
||||
cp -f ${RECIPE_SYSROOT}/firmware/fip-juno.bin \
|
||||
${D}/${UNPACK_DIR}/SOFTWARE/fip.bin
|
||||
|
||||
cp -f ${RECIPE_SYSROOT}/firmware/scp_romfw_bypass.bin \
|
||||
${D}/${UNPACK_DIR}/SOFTWARE/scp_bl1.bin
|
||||
|
||||
# u-boot environment file
|
||||
cp -f ${WORKDIR}/uEnv.txt ${D}/${UNPACK_DIR}/SOFTWARE/
|
||||
|
||||
# Juno images list file
|
||||
cp -f ${WORKDIR}/images-r0.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262B/images.txt
|
||||
cp -f ${WORKDIR}/images-r1.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262C/images.txt
|
||||
cp -f ${WORKDIR}/images-r2.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262D/images.txt
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
# To avoid dependency loop between firmware-image-juno:do_install
|
||||
# and virtual/kernel:do_deploy when INITRAMFS_IMAGE_BUNDLE = "1",
|
||||
# we need to handle the kernel binaries copying in the do_deploy
|
||||
# task.
|
||||
for f in ${KERNEL_DEVICETREE}; do
|
||||
install -m 755 -c ${DEPLOY_DIR_IMAGE}/$(basename $f) \
|
||||
${D}/${UNPACK_DIR}/SOFTWARE/.
|
||||
done
|
||||
|
||||
if [ "${INITRAMFS_IMAGE_BUNDLE}" -eq 1 ]; then
|
||||
cp -L -f ${DEPLOY_DIR_IMAGE}/Image.gz-initramfs-juno.bin \
|
||||
${D}/${UNPACK_DIR}/SOFTWARE/Image
|
||||
else
|
||||
cp -L -f ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ${D}/${UNPACK_DIR}/SOFTWARE/
|
||||
fi
|
||||
|
||||
# Compress the files
|
||||
tar -C ${D}/${UNPACK_DIR} -zcvf ${WORKDIR}/${PN}.tar.gz ./
|
||||
|
||||
# Deploy the compressed archive to the deploy folder
|
||||
install -D -p -m0644 ${WORKDIR}/${PN}.tar.gz ${DEPLOYDIR}/${PN}.tar.gz
|
||||
}
|
||||
do_deploy[depends] += "virtual/kernel:do_deploy"
|
||||
addtask deploy after do_install
|
||||
@@ -0,0 +1,71 @@
|
||||
TITLE: Versatile Express Images Configuration File
|
||||
|
||||
[IMAGES]
|
||||
TOTALIMAGES: 10 ;Number of Images (Max: 32)
|
||||
|
||||
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
||||
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
|
||||
NOR0LOAD: 00000000 ;Image Load Address
|
||||
NOR0ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
|
||||
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
|
||||
NOR1LOAD: 00000000 ;Image Load Address
|
||||
NOR1ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
||||
NOR2FILE: \SOFTWARE\Image ;Image File Name
|
||||
NOR2NAME: norkern ;Rename kernel to norkern
|
||||
NOR2LOAD: 00000000 ;Image Load Address
|
||||
NOR2ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR3ADDRESS: 0x03000000 ;Image Flash Address
|
||||
NOR3FILE: \SOFTWARE\juno.dtb ;Image File Name
|
||||
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
||||
NOR3LOAD: 00000000 ;Image Load Address
|
||||
NOR3ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR4ADDRESS: 0x030C0000 ;Image Flash Address
|
||||
NOR4FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
|
||||
NOR4LOAD: 00000000 ;Image Load Address
|
||||
NOR4ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR5ADDRESS: 0x03E40000 ;Image Flash Address
|
||||
NOR5FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
|
||||
NOR5LOAD: 00000000 ;Image Load Address
|
||||
NOR5ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR6ADDRESS: 0x0BF00000 ;Image Flash Address
|
||||
NOR6FILE: \SOFTWARE\startup.nsh ;Image File Name
|
||||
NOR6NAME: startup.nsh
|
||||
NOR6LOAD: 00000000 ;Image Load Address
|
||||
NOR6ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR7ADDRESS: 0x0BFC0000 ;Image Flash Address
|
||||
NOR7FILE: \SOFTWARE\blank.img ;Image File Name
|
||||
NOR7NAME: BOOTENV
|
||||
NOR7LOAD: 00000000 ;Image Load Address
|
||||
NOR7ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR8ADDRESS: 0x03100000 ;Image Flash Address
|
||||
NOR8FILE: \SOFTWARE\selftest ;Image File Name
|
||||
NOR8LOAD: 00000000 ;Image Load Address
|
||||
NOR8ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR9ADDRESS: 0x03180000 ;Image Flash Address
|
||||
NOR9NAME: uEnv.txt
|
||||
NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
||||
NOR9LOAD: 00000000 ;Image Load Address
|
||||
NOR9ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
TITLE: Versatile Express Images Configuration File
|
||||
|
||||
[IMAGES]
|
||||
TOTALIMAGES: 10 ;Number of Images (Max: 32)
|
||||
|
||||
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
||||
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
|
||||
NOR0LOAD: 00000000 ;Image Load Address
|
||||
NOR0ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
|
||||
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
|
||||
NOR1LOAD: 00000000 ;Image Load Address
|
||||
NOR1ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
||||
NOR2FILE: \SOFTWARE\Image ;Image File Name
|
||||
NOR2NAME: norkern ;Rename kernel to norkern
|
||||
NOR2LOAD: 00000000 ;Image Load Address
|
||||
NOR2ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR3ADDRESS: 0x03000000 ;Image Flash Address
|
||||
NOR3FILE: \SOFTWARE\juno-r1.dtb ;Image File Name
|
||||
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
||||
NOR3LOAD: 00000000 ;Image Load Address
|
||||
NOR3ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR4ADDRESS: 0x030C0000 ;Image Flash Address
|
||||
NOR4FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
|
||||
NOR4LOAD: 00000000 ;Image Load Address
|
||||
NOR4ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR5ADDRESS: 0x03E40000 ;Image Flash Address
|
||||
NOR5FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
|
||||
NOR5LOAD: 00000000 ;Image Load Address
|
||||
NOR5ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR6ADDRESS: 0x0BF00000 ;Image Flash Address
|
||||
NOR6FILE: \SOFTWARE\startup.nsh ;Image File Name
|
||||
NOR6NAME: startup.nsh
|
||||
NOR6LOAD: 00000000 ;Image Load Address
|
||||
NOR6ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR7ADDRESS: 0x0BFC0000 ;Image Flash Address
|
||||
NOR7FILE: \SOFTWARE\blank.img ;Image File Name
|
||||
NOR7NAME: BOOTENV
|
||||
NOR7LOAD: 00000000 ;Image Load Address
|
||||
NOR7ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR8ADDRESS: 0x03100000 ;Image Flash Address
|
||||
NOR8FILE: \SOFTWARE\selftest ;Image File Name
|
||||
NOR8LOAD: 00000000 ;Image Load Address
|
||||
NOR8ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR9ADDRESS: 0x03180000 ;Image Flash Address
|
||||
NOR9NAME: uEnv.txt
|
||||
NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
||||
NOR9LOAD: 00000000 ;Image Load Address
|
||||
NOR9ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
TITLE: Versatile Express Images Configuration File
|
||||
|
||||
[IMAGES]
|
||||
TOTALIMAGES: 10 ;Number of Images (Max: 32)
|
||||
|
||||
NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR0ADDRESS: 0x00000000 ;Image Flash Address
|
||||
NOR0FILE: \SOFTWARE\fip.bin ;Image File Name
|
||||
NOR0LOAD: 00000000 ;Image Load Address
|
||||
NOR0ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR1ADDRESS: 0x03EC0000 ;Image Flash Address
|
||||
NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name
|
||||
NOR1LOAD: 00000000 ;Image Load Address
|
||||
NOR1ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR2ADDRESS: 0x00500000 ;Image Flash Address
|
||||
NOR2FILE: \SOFTWARE\Image ;Image File Name
|
||||
NOR2NAME: norkern ;Rename kernel to norkern
|
||||
NOR2LOAD: 00000000 ;Image Load Address
|
||||
NOR2ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR3ADDRESS: 0x03000000 ;Image Flash Address
|
||||
NOR3FILE: \SOFTWARE\juno-r2.dtb ;Image File Name
|
||||
NOR3NAME: board.dtb ;Specify target filename to preserve file extension
|
||||
NOR3LOAD: 00000000 ;Image Load Address
|
||||
NOR3ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR4ADDRESS: 0x030C0000 ;Image Flash Address
|
||||
NOR4FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
|
||||
NOR4LOAD: 00000000 ;Image Load Address
|
||||
NOR4ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR5ADDRESS: 0x03E40000 ;Image Flash Address
|
||||
NOR5FILE: \SOFTWARE\scp_bl1.bin ;Image File Name
|
||||
NOR5LOAD: 00000000 ;Image Load Address
|
||||
NOR5ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR6ADDRESS: 0x0BF00000 ;Image Flash Address
|
||||
NOR6FILE: \SOFTWARE\startup.nsh ;Image File Name
|
||||
NOR6NAME: startup.nsh
|
||||
NOR6LOAD: 00000000 ;Image Load Address
|
||||
NOR6ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR7ADDRESS: 0x0BFC0000 ;Image Flash Address
|
||||
NOR7FILE: \SOFTWARE\blank.img ;Image File Name
|
||||
NOR7NAME: BOOTENV
|
||||
NOR7LOAD: 00000000 ;Image Load Address
|
||||
NOR7ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR8ADDRESS: 0x03100000 ;Image Flash Address
|
||||
NOR8FILE: \SOFTWARE\selftest ;Image File Name
|
||||
NOR8LOAD: 00000000 ;Image Load Address
|
||||
NOR8ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE
|
||||
NOR9ADDRESS: 0x03180000 ;Image Flash Address
|
||||
NOR9NAME: uEnv.txt
|
||||
NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name
|
||||
NOR9LOAD: 00000000 ;Image Load Address
|
||||
NOR9ENTRY: 00000000 ;Image Entry Point
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
uenvcmd=run mybootcmd
|
||||
mybootcmd=echo Loading custom boot command; \
|
||||
echo Loading kernel; \
|
||||
afs load ${kernel_name} ${kernel_addr_r} ; \
|
||||
if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr_r}; fi; \
|
||||
echo Loading device tree; \
|
||||
afs load ${fdtfile} ${fdt_addr_r}; \
|
||||
if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \
|
||||
afs load ${fdt_alt_name} ${fdt_addr_r}; fi; fdt addr ${fdt_addr_r}; fdt resize; \
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r};
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
SUMMARY = "Board Firmware binaries for N1SDP"
|
||||
SECTION = "firmware"
|
||||
|
||||
LICENSE = "STM-SLA0044-Rev5"
|
||||
LIC_FILES_CHKSUM = "file://LICENSES/MB/STM.TXT;md5=1b74d8c842307d03c116f2d71cbf868a"
|
||||
|
||||
inherit deploy
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE = "n1sdp"
|
||||
|
||||
SRC_URI = "git://git.gitlab.arm.com/arm-reference-solutions/board-firmware.git;protocol=https;branch=n1sdp"
|
||||
|
||||
SRCREV = "70ba494265eee76747faff38264860c19e214540"
|
||||
PV .= "+git${SRCPV}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
INSTALL_DIR = "/n1sdp-board-firmware_source"
|
||||
|
||||
do_install() {
|
||||
rm -rf ${S}/SOFTWARE
|
||||
install -d ${D}${INSTALL_DIR}
|
||||
cp -Rp --no-preserve=ownership ${S}/* ${D}${INSTALL_DIR}
|
||||
}
|
||||
|
||||
FILES:${PN}-staticdev += " ${INSTALL_DIR}/LIB/sensor.a"
|
||||
FILES:${PN} = "${INSTALL_DIR}"
|
||||
SYSROOT_DIRS += "${INSTALL_DIR}"
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}${INSTALL_DIR}
|
||||
cp -Rp --no-preserve=ownership ${S}/* ${DEPLOYDIR}${INSTALL_DIR}
|
||||
}
|
||||
addtask deploy after do_install before do_build
|
||||
@@ -0,0 +1,85 @@
|
||||
SUMMARY = "Firmware image recipe for generating SD-Card artifacts."
|
||||
|
||||
inherit deploy nopackages
|
||||
|
||||
DEPENDS = "trusted-firmware-a \
|
||||
virtual/control-processor-firmware \
|
||||
n1sdp-board-firmware"
|
||||
|
||||
LICENSE = "MIT"
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE = "n1sdp"
|
||||
RM_WORK_EXCLUDE += "${PN}"
|
||||
do_configure[noexec] = "1"
|
||||
do_compile[noexec] = "1"
|
||||
do_install[noexec] = "1"
|
||||
|
||||
FIRMWARE_DIR = "n1sdp-board-firmware_source"
|
||||
PRIMARY_DIR = "${WORKDIR}/n1sdp-board-firmware_primary"
|
||||
SECONDARY_DIR = "${WORKDIR}/n1sdp-board-firmware_secondary"
|
||||
|
||||
SOC_BINARIES = "mcp_fw.bin scp_fw.bin mcp_rom.bin scp_rom.bin"
|
||||
|
||||
prepare_package() {
|
||||
cd ${WORKDIR}
|
||||
|
||||
# Master/Primary
|
||||
cp -av ${RECIPE_SYSROOT}/${FIRMWARE_DIR}/* ${PRIMARY_DIR}
|
||||
mkdir -p ${PRIMARY_DIR}/SOFTWARE/
|
||||
|
||||
# Copy FIP binary
|
||||
cp -v ${RECIPE_SYSROOT}/firmware/fip.bin ${PRIMARY_DIR}/SOFTWARE/
|
||||
|
||||
# Copy SOC binaries
|
||||
for f in ${SOC_BINARIES}; do
|
||||
cp -v ${RECIPE_SYSROOT}/firmware/${f} ${PRIMARY_DIR}/SOFTWARE/
|
||||
done
|
||||
|
||||
sed -i -e 's|^C2C_ENABLE.*|C2C_ENABLE: TRUE ;C2C enable TRUE/FALSE|' \
|
||||
${PRIMARY_DIR}/MB/HBI0316A/io_v123f.txt
|
||||
sed -i -e 's|^C2C_SIDE.*|C2C_SIDE: MASTER ;C2C side SLAVE/MASTER|' \
|
||||
${PRIMARY_DIR}/MB/HBI0316A/io_v123f.txt
|
||||
sed -i -e 's|.*SOCCON: 0x1170.*PLATFORM_CTRL.*|SOCCON: 0x1170 0x00000100 ;SoC SCC PLATFORM_CTRL|' \
|
||||
${PRIMARY_DIR}/MB/HBI0316A/io_v123f.txt
|
||||
|
||||
# Update load address for trusted boot
|
||||
sed -i -e '/^IMAGE4ADDRESS:/ s|0x60200000|0x64200000|' ${PRIMARY_DIR}/MB/HBI0316A/images.txt
|
||||
sed -i -e '/^IMAGE4UPDATE:/ s|FORCE |SCP_AUTO|' ${PRIMARY_DIR}/MB/HBI0316A/images.txt
|
||||
sed -i -e '/^IMAGE4FILE: \\SOFTWARE\\/s|uefi.bin|fip.bin |' ${PRIMARY_DIR}/MB/HBI0316A/images.txt
|
||||
|
||||
# Slave/Secondary
|
||||
cp -av ${RECIPE_SYSROOT}/${FIRMWARE_DIR}/* ${SECONDARY_DIR}
|
||||
mkdir -p ${SECONDARY_DIR}/SOFTWARE/
|
||||
|
||||
# Copy SOC binaries
|
||||
for f in ${SOC_BINARIES}; do
|
||||
cp -v ${RECIPE_SYSROOT}/firmware/${f} ${SECONDARY_DIR}/SOFTWARE/
|
||||
done
|
||||
|
||||
sed -i -e 's|^C2C_ENABLE.*|C2C_ENABLE: TRUE ;C2C enable TRUE/FALSE|' \
|
||||
${SECONDARY_DIR}/MB/HBI0316A/io_v123f.txt
|
||||
sed -i -e 's|^C2C_SIDE.*|C2C_SIDE: SLAVE ;C2C side SLAVE/MASTER|' \
|
||||
${SECONDARY_DIR}/MB/HBI0316A/io_v123f.txt
|
||||
sed -i -e 's|.*SOCCON: 0x1170.*PLATFORM_CTRL.*|SOCCON: 0x1170 0x00000101 ;SoC SCC PLATFORM_CTRL|' \
|
||||
${SECONDARY_DIR}/MB/HBI0316A/io_v123f.txt
|
||||
sed -i -e '/^TOTALIMAGES:/ s|5|4|' ${SECONDARY_DIR}/MB/HBI0316A/images.txt
|
||||
sed -i -e 's|^IMAGE4|;&|' ${SECONDARY_DIR}/MB/HBI0316A/images.txt
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
# prepare Master & Slave packages
|
||||
prepare_package
|
||||
|
||||
for dir in ${PRIMARY_DIR} ${SECONDARY_DIR}; do
|
||||
dir_name=$(basename ${dir})
|
||||
mkdir -p ${D}/${dir_name}
|
||||
cp -av ${dir} ${D}
|
||||
|
||||
# Compress the files
|
||||
tar -C ${D}/${dir_name} -zcvf ${DEPLOYDIR}/${dir_name}.tar.gz ./
|
||||
done
|
||||
}
|
||||
do_deploy[dirs] += "${PRIMARY_DIR} ${SECONDARY_DIR}"
|
||||
do_deploy[cleandirs] += "${PRIMARY_DIR} ${SECONDARY_DIR}"
|
||||
do_deploy[umask] = "022"
|
||||
addtask deploy after do_prepare_recipe_sysroot
|
||||
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Copyright (c) 2020 Arm Limited
|
||||
#
|
||||
SUMMARY = "Total Compute Images"
|
||||
DESCRIPTION = "Build all the images required for Total Compute platform"
|
||||
LICENSE = "Apache-2.0"
|
||||
|
||||
COMPATIBLE_MACHINE = "(tc?)"
|
||||
|
||||
inherit nopackages
|
||||
|
||||
# The last image to be built is trusted-firmware-a
|
||||
DEPENDS += " trusted-firmware-a"
|
||||
Reference in New Issue
Block a user