From bc4268bbb3a0163c1865ebcffe5e78569eec19d5 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Sat, 06 Nov 2021 21:51:36 +0800 Subject: [PATCH] update setup_tools.sh for bootstrap --- tools/lintools/setup_tools.sh | 37 ++++++++++++++++++++++++++++--------- 1 files changed, 28 insertions(+), 9 deletions(-) diff --git a/tools/lintools/setup_tools.sh b/tools/lintools/setup_tools.sh index cd52abc..2102fb9 100755 --- a/tools/lintools/setup_tools.sh +++ b/tools/lintools/setup_tools.sh @@ -38,23 +38,40 @@ function install_systools() { - arm-linux-gnueabihf-gcc -V > /dev/null 2>&1 + curl -V > /dev/null 2>&1 if [ $? == 0 ] ; then - msg_banner "All development system tools already installed, skip it" + msg_banner "All system tools already installed, skip it" return 0; fi - msg_banner "start apt-get install system devlopment tools(commands)" + msg_banner "start apt install system tools(commands)" - systools="gawk wget git diffstat unzip texinfo build-essential chrpath socat libncurses-dev \ + systools="gawk wget git diffstat unzip texinfo build-essential chrpath socat libncurses-dev flex \ libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 tree \ help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf \ - automake groff curl lzop asciidoc lib32z1 lib32ncurses5-dev libssl-dev autoconf-archive bison flex lzop" + automake groff curl lzop asciidoc lib32z1 lib32ncurses5-dev libssl-dev autoconf-archive bison " - devtools="u-boot-tools mtd-utils device-tree-compiler gcc-9-arm-linux-gnueabihf " - apt-get update > /dev/null 2>&1 - apt-get install -y $systools $devtools + apt update > /dev/null 2>&1 + apt install -y $systools +} + +function install_crosstool() +{ + arm-linux-gnueabihf-gcc -v > /dev/null 2>&1 + if [ $? == 0 ] ; then + msg_banner "All development tools already installed, skip it" + return 0; + fi + + msg_banner "start apt install devlopment tools(commands)" + + devtools="u-boot-tools mtd-utils device-tree-compiler gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \ + 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() @@ -67,7 +84,7 @@ BUILDROOT_DLADDR=${LYFTP_PUB}/$BUILDROOT_TAR if [ -d ${BUILDROOT_PATH}/${BUILDROOT_NAME} ] ; then - msg_banner "$BUILDROOT_VER already installed to $BUILDROOT_PATH/$BUILDROOT_NAME" + msg_banner "Buildroot already installed to $BUILDROOT_PATH/$BUILDROOT_NAME" return 0; fi @@ -93,5 +110,7 @@ install_systools +install_crosstool + install_buildroot -- Gitblit v1.9.1