From 57da8798363ffca687848983868806dda05d7fa9 Mon Sep 17 00:00:00 2001 From: Baikal Electronics Date: Tue, 20 Sep 2022 17:28:36 +0300 Subject: [PATCH] Deploy binaries required to build rom image to a separate dir --- .../recipes-bsp/u-boot/u-boot_2022.07.bbappend | 8 ++++++-- .../recipes-kernel/linux/linux-baikal_5.15.bb | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/meta-baikal/recipes-bsp/u-boot/u-boot_2022.07.bbappend b/meta-baikal/recipes-bsp/u-boot/u-boot_2022.07.bbappend index 5c2759d..f9dcef3 100644 --- a/meta-baikal/recipes-bsp/u-boot/u-boot_2022.07.bbappend +++ b/meta-baikal/recipes-bsp/u-boot/u-boot_2022.07.bbappend @@ -15,7 +15,7 @@ do_cleanall[prefuncs] += "do_extsrc_clean" include u-boot-environment.inc -do_deploy_baikal () { +baikal_deploy () { if [ ! -d ${BAIKAL_IMAGES} ]; then mkdir -p ${BAIKAL_IMAGES} fi @@ -36,5 +36,9 @@ do_deploy_baikal () { else install -D -m 644 ${B}/${UBOOT_BINARY} ${BAIKAL_IMAGES}/${MACHINE}.${UBOOT_BINARY} fi + if [ -f ${WORKDIR}/${MACHINE}.bin ]; then + cp -f ${WORKDIR}/${MACHINE}.bin ${BAIKAL_IMAGES}/${MACHINE}.bin + fi } -addtask deploy_baikal after do_deploy + +do_deploy[postfuncs] += "baikal_deploy" diff --git a/meta-baikal/recipes-kernel/linux/linux-baikal_5.15.bb b/meta-baikal/recipes-kernel/linux/linux-baikal_5.15.bb index d7e6e64..3059a62 100644 --- a/meta-baikal/recipes-kernel/linux/linux-baikal_5.15.bb +++ b/meta-baikal/recipes-kernel/linux/linux-baikal_5.15.bb @@ -19,7 +19,7 @@ EXTERNALSRC="${KERNEL_DIR}" deltask package_qa -do_deploy_baikal () { +baikal_deploy () { if [ ! -d ${BAIKAL_IMAGES} ]; then mkdir -p ${BAIKAL_IMAGES} fi @@ -27,4 +27,16 @@ do_deploy_baikal () { install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/$imageType ${BAIKAL_IMAGES}/${MACHINE}.$imageType done } -addtask deploy_baikal after do_deploy + +baikal_deploy_vmlinux () { + if [ ! -d ${BAIKAL_IMAGES} ]; then + mkdir -p ${BAIKAL_IMAGES} + fi + cp -f ${B}/System.map ${BAIKAL_IMAGES}/${MACHINE}.System.map + cp -f ${B}/${KERNEL_OUTPUT_DIR}/vmlinux.bin ${BAIKAL_IMAGES}/${MACHINE}.vmlinux.bin + cp -f ${B}/${KERNEL_OUTPUT_DIR}/vmlinux.bin.gz ${BAIKAL_IMAGES}/${MACHINE}.vmlinux.bin.gz + cat ${BAIKAL_IMAGES}/${MACHINE}.vmlinux.bin | lzma -f -9 > ${BAIKAL_IMAGES}/${MACHINE}.vmlinux.bin.lzma +} + +do_deploy[postfuncs] += "baikal_deploy" +do_deploy[postfuncs] += "baikal_deploy_vmlinux" -- 2.39.5