mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-06-04 14:10:01 +00:00
meta-arm: Support firmware building under a multiconfig
To enable building rescue or bootstrap images that can be included into firmware a "firmware" multiconfig option is required to allow the building with different options to any mass storage image they may also be built. As this multiconfig build will occur under a different TMPDIR, we also provide a deployment image to allow easy copying of the firmware into another deploy dir. Signed-off-by: Drew Reed <Drew.Reed@arm.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Config that can be used to build firmware in a seperate tmp area
|
||||
# and with a smaller libc enabled by default
|
||||
|
||||
DISTROOVERRIDES = "firmware"
|
||||
|
||||
TMPDIR:append = "_${MACHINE}"
|
||||
TCLIBC="musl"
|
||||
|
||||
# Ignore the testimage flags to include ssh-server-dropbear
|
||||
IMAGE_CLASSES:remove = "testimage"
|
||||
IMAGE_FEATURES:remove = "ssh-server-dropbear"
|
||||
CORE_IMAGE_EXTRA_INSTALL:remove = "ssh-pregen-hostkeys"
|
||||
TESTIMAGE_AUTO = "0"
|
||||
@@ -0,0 +1,31 @@
|
||||
SUMMARY = "Firmware image deploying multi-config firmware"
|
||||
DESCRIPTION = "Image for deploying a firmware set on platforms using multi-config"
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit deploy nopackages
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE ?= "invalid"
|
||||
do_configure[noexec] = "1"
|
||||
do_compile[noexec] = "1"
|
||||
do_install[noexec] = "1"
|
||||
|
||||
# Users of this recipe are expected to provide the list of firmware images
|
||||
# that need to be deployed by setting this variable.
|
||||
FIRMWARE_BINARIES ?= ""
|
||||
|
||||
do_deploy() {
|
||||
firmware_loc="${TMPDIR}_${MACHINE}/deploy/images/${MACHINE}"
|
||||
for firmware in ${FIRMWARE_BINARIES}; do
|
||||
echo "cp -av ${firmware_loc}/${firmware} ${DEPLOYDIR}/"
|
||||
cp -av "${firmware_loc}/${firmware}" ${DEPLOYDIR}/
|
||||
if [ -L "${firmware_loc}/${firmware}" ]; then
|
||||
echo "cp -av ${firmware_loc}/$(readlink ${firmware_loc}/${firmware}) ${DEPLOYDIR}/"
|
||||
cp -av "${firmware_loc}/$(readlink ${firmware_loc}/${firmware})" ${DEPLOYDIR}/
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
do_deploy[umask] = "022"
|
||||
|
||||
addtask deploy after do_prepare_recipe_sysroot
|
||||
Reference in New Issue
Block a user