]> git.baikalelectronics.ru Git - openembedded-baikal.git/commitdiff
externalsrc: fetch source files for kernel and u-boot from git-repositories
authorBaikal Electronics <support@baikalelectronics.ru>
Mon, 6 Feb 2023 14:42:34 +0000 (17:42 +0300)
committerBaikal Electronics <support@baikalelectronics.ru>
Mon, 6 Feb 2023 14:42:34 +0000 (17:42 +0300)
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.

meta-baikal/recipes-bsp/u-boot/u-boot-environment.inc
meta-baikal/recipes-bsp/u-boot/u-boot_2022.10.bbappend
meta-baikal/recipes-kernel/linux/linux-baikal.inc
meta-baikal/recipes-kernel/linux/linux-baikal_5.15.bb
meta-baikal/recipes-kernel/linux/linux-umulti.inc

index 9116dcc7f0d8b4f14ddef24ccde23a824517a2aa..ad769778eec3fa0392d6acf32520830fc034aa89 100644 (file)
@@ -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
index f9dcef364b72827b9df62cf502d5f56dda05cac0..c163c7f1680d4c427780396bcb69b23bbca57f98 100644 (file)
@@ -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
 
index 37fa718cf362822ad4cab8c982679e1e59336877..d747989f775df75b39e7be670a148737b3551a9a 100644 (file)
@@ -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"
index 50ebb39d8e15ce8744afd64a8ea79a3a7a6f1ed8..1d327abc16380eba1c19d9802f5aef150f7a77a0 100644 (file)
@@ -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 () {
index c71f7eac415eb484106ef692dc24c4ace45ac598..096c8d25d8b94738d5e7d1a2af89384f18a475ec 100644 (file)
@@ -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])