凌云实验室推出的ARM Linux物联网网关开发板IGKBoard(IoT Gateway Kit Board)项目源码
guowenxue
2022-10-29 c26aa2450821ba2c315dafa879e07b2f16c48263
update setup_tools.sh
1 files modified
39 ■■■■■ changed files
tools/setup_tools.sh 39 ●●●●● patch | view | raw | blame | history
tools/setup_tools.sh
@@ -2,6 +2,8 @@
# This shell script used to setup imx6ull build envrionment
#
LYFTP_PUB=http://wekei-iot.com:2211/imx/igkboard/tools/lintools
# display in yellow
function pr_warn() {
    echo -e "\033[40;33m --W-- $1 \033[0m\n"
@@ -45,7 +47,7 @@
    systools="coreutils jq wget curl tree gawk sed unzip cpio lz4 lzop zstd rsync kmod kpartx tmux \
        desktop-file-utils iputils-ping xterm diffstat chrpath asciidoc docbook-utils help2man \
        build-essential gcc g++ make cmake automake groff socat flex texinfo bison texi2html \
        bc git cvs subversion mercurial autoconf autoconf-archive \
        git cvs subversion mercurial autoconf autoconf-archive \
        python2 python3 python3-pip python3-pexpect python3-git python3-jinja2 libsdl1.2-dev \
        lib32z1 libssl-dev libncurses-dev lib32ncurses-dev libgl1-mesa-dev libglu1-mesa-dev \
        "
@@ -67,6 +69,39 @@
        binfmt-support qemu qemu-user-static debootstrap debian-archive-keyring "
    apt install -y $devtools
    #sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-9 10
}
function install_buildroot()
{
    BUILDROOT_PATH=/opt/buildroot
    BUILDROOT_NAME=cortexA7
    BUILDROOT_VER=buildroot-2021.02.7-cortexA7
    BUILDROOT_TAR=${BUILDROOT_VER}.tar.bz2
    BUILDROOT_DLADDR=${LYFTP_PUB}/$BUILDROOT_TAR
    if [ -d ${BUILDROOT_PATH}/${BUILDROOT_NAME} ] ; then
        pr_warn "Buildroot already installed to $BUILDROOT_PATH/$BUILDROOT_NAME"
        return 0;
    fi
    mkdir -p ${BUILDROOT_PATH}
    if [ ! -f $BUILDROOT_TAR ] ; then
        pr_info "download $BUILDROOT_VER now..."
        wget -c $BUILDROOT_DLADDR
    fi
    pr_info "install $BUILDROOT_VER to $BUILDROOT_PATH/$BUILDROOT_NAME now..."
    tar -xjf ${BUILDROOT_TAR} -C ${BUILDROOT_PATH}
    $BUILDROOT_PATH/$BUILDROOT_NAME/bin/arm-linux-gcc -v
    pr_info "Cross compiler: $BUILDROOT_PATH/$BUILDROOT_NAME/bin/arm-linux-"
    rm -f ${BUILDROOT_TAR}
}
# NXP document suggest cross compiler from ARM Developer:
@@ -108,3 +143,5 @@
install_crosstool
#install_buildroot