From e44dab9caa8a3499b42e6455974209469ef11ab9 Mon Sep 17 00:00:00 2001 From: Baikal Electronics Date: Mon, 6 Feb 2023 17:42:34 +0300 Subject: [PATCH] externalsrc: fetch source files for kernel and u-boot from git-repositories Source files fetch from repositories, not from local host. u-boot_2022.10.bbappend: add SRC_URI, SRC_URI, LIC_FILES_CHKSUM for u-boot repository. linux-baikal_5.15.bb: add SRC_URI, SRC_URI, LIC_FILES_CHKSUM for kernel repository. --- .../recipes-bsp/u-boot/u-boot-environment.inc | 5 ++++- .../recipes-bsp/u-boot/u-boot_2022.10.bbappend | 16 ++++++---------- .../recipes-kernel/linux/linux-baikal.inc | 17 ----------------- .../recipes-kernel/linux/linux-baikal_5.15.bb | 5 ++--- .../recipes-kernel/linux/linux-umulti.inc | 2 +- 5 files changed, 13 insertions(+), 32 deletions(-) diff --git a/meta-baikal/recipes-bsp/u-boot/u-boot-environment.inc b/meta-baikal/recipes-bsp/u-boot/u-boot-environment.inc index 9116dcc..ad76977 100644 --- a/meta-baikal/recipes-bsp/u-boot/u-boot-environment.inc +++ b/meta-baikal/recipes-bsp/u-boot/u-boot-environment.inc @@ -7,9 +7,12 @@ FILES:${PN}-baikal-env = "${WORKDIR}/${MACHINE}.bin ${WORKDIR}/${MACHINE}.env" ENV_SIZE = "0x10000" UBOOT_DEF_ENV = "${MACHINE}.def-2022" +BOOTROM_DIR = "sdk_bt/baikal/src/bootrom" + + do_build_baikal_environment () { sed -e "s/build_date=.*$/build_date=${DATETME}/; s/build_target=.*$/build_target=${MACHINE}/; s/^\s*#.*$//; /^$/d; " \ - ${BOOTROM_DIR}/${UBOOT_DEF_ENV} > ${WORKDIR}/${MACHINE}.env + ${S}/${BOOTROM_DIR}/${UBOOT_DEF_ENV} > ${WORKDIR}/${MACHINE}.env uboot-mkenvimage -s ${ENV_SIZE} -o ${WORKDIR}/${MACHINE}.bin ${WORKDIR}/${MACHINE}.env } addtask build_baikal_environment before do_install after do_compile diff --git a/meta-baikal/recipes-bsp/u-boot/u-boot_2022.10.bbappend b/meta-baikal/recipes-bsp/u-boot/u-boot_2022.10.bbappend index f9dcef3..c163c7f 100644 --- a/meta-baikal/recipes-bsp/u-boot/u-boot_2022.10.bbappend +++ b/meta-baikal/recipes-bsp/u-boot/u-boot_2022.10.bbappend @@ -1,17 +1,13 @@ -inherit externalsrc +LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1" -EXTERNALSRC = "${UBOOT_DIR}" +SRC_URI = "git://git@swgit/uboot.git;protocol=ssh;branch=baikal_mips;name=uboot \ +git://git@swgit/sdk_bt.git/;protocol=ssh;destsuffix=git/sdk_bt;branch=testing;name=sdk_bt" -do_extsrc_clean () { - if [ -d ${BAIKAL_IMAGES} ]; then - rm -f ${BAIKAL_IMAGES}/*u-boot* - fi +SRCREV_uboot = "0769e6fc0854541fe5982e0323823250758cd2d0" +SRCREV_sdk_bt = "e1e52862e947017ef3b5988632bac2726eb105e2" - oe_runmake -C ${S} mrproper -} -addtask do_extsrc_clean -do_cleanall[prefuncs] += "do_extsrc_clean" +S = "${WORKDIR}/git" include u-boot-environment.inc diff --git a/meta-baikal/recipes-kernel/linux/linux-baikal.inc b/meta-baikal/recipes-kernel/linux/linux-baikal.inc index 37fa718..d747989 100644 --- a/meta-baikal/recipes-kernel/linux/linux-baikal.inc +++ b/meta-baikal/recipes-kernel/linux/linux-baikal.inc @@ -41,20 +41,3 @@ do_devshell:prepend() { d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1") d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR") } - -do_extsrc_clean () { - if [ -d ${BAIKAL_IMAGES} ]; then - cd ${BAIKAL_IMAGES} - rm -rf ${UBOOT_SIGN_KEYDIR} - rm -f *vmlinux* *System.map u* *.dtb - for imageType in ${KERNEL_IMAGETYPES} ; do - rm -f ${MACHINE}.$imageType - done - cd - - fi - - oe_runmake -C ${S} mrproper -} -addtask do_extsrc_clean - -do_cleanall[prefuncs] = "do_extsrc_clean" 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 50ebb39..1d327ab 100644 --- a/meta-baikal/recipes-kernel/linux/linux-baikal_5.15.bb +++ b/meta-baikal/recipes-kernel/linux/linux-baikal_5.15.bb @@ -1,12 +1,13 @@ require recipes-kernel/linux/linux-baikal.inc require recipes-kernel/linux/linux-umulti.inc -inherit externalsrc inherit kernel-uimage KERNEL_IMAGETYPE = "uImage" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" +SRC_URI = "git://git@swgit/kernel_t1_mainline.git;protocol=ssh;branch=baikal-5.15.y-sdk5.9" +SRCREV = "849fadc2c93a6822c819397e754ab4ffe14f22b8" LINUX_VERSION ?= "5.15.61" DEPENDS += "openssl-native util-linux-native" @@ -16,8 +17,6 @@ KCONF_BSP_AUDIT_LEVEL = "1" COMPATIBLE_MACHINE = "^(bfk3)$" -EXTERNALSRC="${KERNEL_DIR}" - deltask package_qa baikal_deploy () { diff --git a/meta-baikal/recipes-kernel/linux/linux-umulti.inc b/meta-baikal/recipes-kernel/linux/linux-umulti.inc index c71f7ea..096c8d2 100644 --- a/meta-baikal/recipes-kernel/linux/linux-umulti.inc +++ b/meta-baikal/recipes-kernel/linux/linux-umulti.inc @@ -37,7 +37,7 @@ EOF } python baikal_entrysymbol () { - sys_map = d.getVar('B') + 'System.map' + sys_map = d.getVar('B') + '/System.map' with open(sys_map) as smap: ln = smap.readline() d.setVar('UBOOT_LOADADDRESS', '0x' + ln[8:16]) -- 2.39.5