From 9c222f3844cd06ce2d59511a01dcbfca8ad8e762 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Thu, 30 Mar 2023 14:20:43 +0800 Subject: [PATCH] update bsp to lf-5.15.71-2.2.0, rename system image to distro, update download url --- bsp/scripts/setup_env.sh | 43 ++++++++++++++++++++----------------------- 1 files changed, 20 insertions(+), 23 deletions(-) diff --git a/bsp/scripts/setup_env.sh b/bsp/scripts/setup_env.sh index 701935d..893ba46 100755 --- a/bsp/scripts/setup_env.sh +++ b/bsp/scripts/setup_env.sh @@ -5,28 +5,25 @@ # 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/ -#SRC_URL=http://127.0.0.1:2211/imx6ull/ -BSP_VER=lf-5.10.52-2.1.0 +SRV_URL=http://master.iot-yun.club:2211 +#SRV_URL=http://127.0.0.1:2211 +BSP_VER=lf-5.15.71-2.2.0 +BSP_URL=${SRV_URL}/imx/bsp/${BSP_VER} -# SYSTEM should be: yocto, buildroot or debian -# DISTRO should be: hardknott/honister, 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 == "buildroot" ] ; then - SYSNAME=${SYSTEM} -else - SYSNAME=${DISTRO} -fi +SYSNAME=${DISTRO} -ROOTFS_DIR=rootfs_${SYSNAME} - +ROOTFS_DIR=rootfs_${DISTRO} JSON_CONF=${PRJ_PATH}/${BOARD}.json JOBS=`cat /proc/cpuinfo | grep processor | wc -l` @@ -60,8 +57,6 @@ pr_info "decompress $tarball" - mkdir -p $dstpath - case $tarball in *.tar.gz) tar -xzf $tarball -C $dstpath @@ -78,6 +73,10 @@ *.tar) tar -xf $tarball -C $dstpath ;; + + *.zip) + unzip -qo $tarball -d $dstpath + ;; *) pr_error "decompress Unsupport packet: $tarball" @@ -97,7 +96,7 @@ mkdir -p $dst - if [[ $src =~ .tar ]] ; then + if [[ "$src" =~ ".tar" ]] || [[ "$src" =~ ".zip" ]] ; then do_unpack $src ${dst} else rm -rf ${dst}/`basename ${src}` @@ -145,16 +144,14 @@ dirname=$2 tarfile=`basename $url` - mkdir -p ${TARBALL_DIR} + mkdir -p ${TARBALL_DIR} if [ ! -f ${TARBALL_DIR}/$tarfile ] ; then pr_info "wget $url" - wget $url -P ${TARBALL_DIR} > /dev/null 2>&1 - fi - if [ ! -d $dirname ] ; then - do_unpack ${TARBALL_DIR}/$tarfile + wget $url -P ${TARBALL_DIR} > /dev/null 2>&1 fi + do_unpack ${TARBALL_DIR}/$tarfile $dirname } # fetch source code by copy @@ -165,7 +162,7 @@ cp -rf $url $tarfile - if [[ "$tarfile" =~ ".tar" ]] ; then + if [[ "$tarfile" =~ ".tar" ]] || [[ "$tarfile" =~ ".zip" ]] ; then do_unpack $tarfile $dirname fi } -- Gitblit v1.9.1