From 2161762ebc50914fe51a7923945c64e6ce4ee25f Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Tue, 28 Dec 2021 21:46:06 +0800
Subject: [PATCH] update build shell script, add system and distro
---
bsp/build.sh | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/bsp/build.sh b/bsp/build.sh
index 8682796..7fd2e92 100755
--- a/bsp/build.sh
+++ b/bsp/build.sh
@@ -3,16 +3,15 @@
PRJ_PATH=`pwd`
BOARD=igkboard
-
-#CROSS_TOOL=arm-linux-gnueabihf-
+BSP_BRANCH="lf-5.10.52-2.1.0"
CROSS_TOOL=/opt/buildroot/cortexA7/bin/arm-linux-
-# bootloader, linux kernel tarball path and branch
-TAR_PATH=${PRJ_PATH}/tarball
-BSP_BRANCH="lf-5.10.52-2.1.0"
-
-# rootfs should be buildroot/yocto or bullseye for debian system
-ROOTFS=buildroot
+# $SYSTEM should be buildroot, yocto or debian
+# Buildroot distro should be: buildroot-2021.02
+# Yocto distro should be : hardknott
+# Debian distro should be : buster or bullseye
+SYSTEM=buildroot
+DISTRO=v2021.02
set -u
set -e
@@ -24,13 +23,11 @@
cd $PRJ_PATH
sed -i "s|^BOARD.*|BOARD=${BOARD}|g" ${DIR}/build.sh
+ sed -i "s|^BSP_BRANCH.*|BSP_BRANCH=${BSP_BRANCH}|g" ${DIR}/build.sh
+ sed -i "s|^CROSS_TOOL.*|CROSS_TOOL=${CROSS_TOOL}|g" ${DIR}/build.sh
- if [ $DIR = bootloader -o $DIR == kernel ] ; then
- sed -i "s|^CROSS_TOOL.*|CROSS_TOOL=${CROSS_TOOL}|g" ${DIR}/build.sh
- sed -i "s|^BSP_BRANCH.*|BSP_BRANCH=${BSP_BRANCH}|g" ${DIR}/build.sh
- elif [ $DIR = rootfs -o $DIR == images -o $DIR = tarball ] ; then
- sed -i "s|^ROOTFS=.*|ROOTFS=${ROOTFS}|g" ${DIR}/build.sh
- fi
+ sed -i "s|^SYSTEM=.*|SYSTEM=${SYSTEM}|g" ${DIR}/build.sh
+ sed -i "s|^DISTRO=.*|DISTRO=${DISTRO}|g" ${DIR}/build.sh
}
function do_modify()
@@ -38,6 +35,7 @@
do_modify_build tarball
do_modify_build bootloader
do_modify_build kernel
+ do_modify_build drivers
do_modify_build rootfs
do_modify_build images
}
@@ -126,6 +124,7 @@
fi
do_action bootloader $action
do_action kernel $action
+ do_action drivers $action
elif [ $1 == "image" ] ; then
do_root "yes"
do_action rootfs $action
--
Gitblit v1.9.1