From e03452bdaff4a76f7b07f1795edfe987bde9e8d0 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sun, 09 Oct 2022 21:17:37 +0800
Subject: [PATCH] update cross compiler to gcc-arm-10.3-2021.07
---
bsp/scripts/setup_env.sh | 43 ++++++++++++++++++++++++-------------------
1 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/bsp/scripts/setup_env.sh b/bsp/scripts/setup_env.sh
index aa6ca1d..f95f044 100755
--- a/bsp/scripts/setup_env.sh
+++ b/bsp/scripts/setup_env.sh
@@ -5,17 +5,21 @@
# update by top build.sh
BOARD=igkboard
-CROSS_TOOL=/opt/buildroot/cortexA7/bin/arm-linux-
+CROSS_TOOL=/opt/gcc-arm-10.3-2021.07/bin/arm-none-linux-gnueabihf-
# Source code download address
-SRC_URL=http://weike-iot.com:2211/imx6ull/bsp
-#SRC_URL=http://127.0.0.1:2211/imx6ull/bsp
-BSP_VER=lf-5.10.52-2.1.0
+SRV_URL=http://weike-iot.com:2211
+#SRV_URL=http://127.0.0.1:2211
+BSP_VER=lf-5.15.32-2.0.0
+BSP_URL=${SRV_URL}/imx/bsp/${BSP_VER}
-# SYSTEM should be: yocto, buildroot or debian
-# DISTRO should be: hardknott, 2021.02 or bullseye
+# SYSTEM should be: yocto or debian
+# DISTRO should be: hardknott, buster
+# SYSNAME should be: yocto, buster
SYSTEM=yocto
-DISTRO=hardknott
+DISTRO=kirkstone
+
+TARBALL_DIR=${PRJ_PATH}/../tarballs/
if [ $SYSTEM == "debian" ] ; then
SYSNAME=${DISTRO}
@@ -23,8 +27,7 @@
SYSNAME=${SYSTEM}
fi
-ROOTFS_DIR=rootfs_${SYSNAME}
-
+ROOTFS_DIR=rootfs_${DISTRO}
JSON_CONF=${PRJ_PATH}/${BOARD}.json
JOBS=`cat /proc/cpuinfo | grep processor | wc -l`
@@ -58,8 +61,6 @@
pr_info "decompress $tarball"
- mkdir -p $dstpath
-
case $tarball in
*.tar.gz)
tar -xzf $tarball -C $dstpath
@@ -76,6 +77,10 @@
*.tar)
tar -xf $tarball -C $dstpath
;;
+
+ *.zip)
+ unzip -qo $tarball -d $dstpath
+ ;;
*)
pr_error "decompress Unsupport packet: $tarball"
@@ -95,7 +100,7 @@
mkdir -p $dst
- if [[ $src =~ .tar ]] ; then
+ if [[ "$src" =~ ".tar" ]] || [[ "$src" =~ ".zip" ]] ; then
do_unpack $src ${dst}
else
rm -rf ${dst}/`basename ${src}`
@@ -143,14 +148,14 @@
dirname=$2
tarfile=`basename $url`
- if [ ! -f $tarfile ] ; then
- pr_info "wget $url"
- wget $url > /dev/null 2>&1
- fi
+ mkdir -p ${TARBALL_DIR}
- if [ ! -d $dirname ] ; then
- do_unpack $tarfile
+ if [ ! -f ${TARBALL_DIR}/$tarfile ] ; then
+ pr_info "wget $url"
+
+ wget $url -P ${TARBALL_DIR} > /dev/null 2>&1
fi
+ do_unpack ${TARBALL_DIR}/$tarfile $dirname
}
# fetch source code by copy
@@ -161,7 +166,7 @@
cp -rf $url $tarfile
- if [[ "$tarfile" =~ ".tar" ]] ; then
+ if [[ "$tarfile" =~ ".tar" ]] || [[ "$tarfile" =~ ".zip" ]] ; then
do_unpack $tarfile $dirname
fi
}
--
Gitblit v1.9.1