From 587be67fbad8a09c2ba82ae6ee0a252e18b1c1f8 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Tue, 16 Nov 2021 19:59:10 +0800 Subject: [PATCH] update setup_tools.sh to add install kpartx --- tools/lintools/setup_tools.sh | 46 +++++++++++++++++++++++++++++++++------------- 1 files changed, 33 insertions(+), 13 deletions(-) diff --git a/tools/lintools/setup_tools.sh b/tools/lintools/setup_tools.sh index cd52abc..c5068bd 100755 --- a/tools/lintools/setup_tools.sh +++ b/tools/lintools/setup_tools.sh @@ -38,36 +38,54 @@ 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 \ + kpartx " - 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() { BUILDROOT_PATH=/opt/buildroot - BUILDROOT_NAME=cortex-a7 + BUILDROOT_NAME=cortexA7 - BUILDROOT_VER=buildroot-2021.02.5-gcc9.4.0-cortexA7-x86_64_arm-linux-gnueabihf - BUILDROOT_TAR=${BUILDROOT_VER}.tar.xz + 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 - msg_banner "$BUILDROOT_VER already installed to $BUILDROOT_PATH/$BUILDROOT_NAME" + msg_banner "Buildroot already installed to $BUILDROOT_PATH/$BUILDROOT_NAME" return 0; fi @@ -79,7 +97,7 @@ fi msg_banner "install $BUILDROOT_VER to $BUILDROOT_PATH/$BUILDROOT_NAME now..." - tar -xJf ${BUILDROOT_TAR} -C ${BUILDROOT_PATH} -C ${BUILDROOT_PATH} + tar -xjf ${BUILDROOT_TAR} -C ${BUILDROOT_PATH} $BUILDROOT_PATH/$BUILDROOT_NAME/bin/arm-linux-gcc -v @@ -93,5 +111,7 @@ install_systools +install_crosstool + install_buildroot -- Gitblit v1.9.1