From db87e702ec9e6d5b70515bb67b2a349488854987 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Thu, 29 Sep 2016 18:52:15 +0300 Subject: [PATCH] Move h3 tools to board support package, update path --- common.sh | 16 ---------------- makeboarddeb.sh | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/common.sh b/common.sh index fd6345ad34..985177a22b 100644 --- a/common.sh +++ b/common.sh @@ -351,22 +351,6 @@ install_external_applications() make ARCH=$ARCHITECTURE CC="${KERNEL_COMPILER}gcc" KSRC="$SOURCES/$LINUXSOURCEDIR/" >> $DEST/debug/compilation.log 2>&1 install -m 755 a10disp "$CACHEDIR/sdcard/usr/local/bin" fi - - # sunxi display changer - # compile it for sun8i just in case sun7i stuff gets ported to sun8i and we're able to use it - #if [[ $BRANCH != next && $LINUXSOURCEDIR == *sun8i* ]]; then - # cd "$SOURCES/sunxi-display-changer" - # wget -q "https://raw.githubusercontent.com/linux-sunxi/linux-sunxi/sunxi-3.4/include/video/sunxi_disp_ioctl.h" - # make clean >/dev/null 2>&1 - # make ARCH=$ARCHITECTURE CC="${KERNEL_COMPILER}gcc" KSRC="$SOURCES/$LINUXSOURCEDIR/" >> $DEST/debug/compilation.log 2>&1 - # install -m 755 a10disp "$CACHEDIR/sdcard/usr/local/bin" - #fi - - # h3disp for sun8i/3.4.x - if [[ $LINUXFAMILY == sun8i && $BRANCH == default ]]; then - install -m 755 "$SRC/lib/scripts/h3disp" "$CACHEDIR/sdcard/usr/local/bin" - install -m 755 "$SRC/lib/scripts/h3consumption" "$CACHEDIR/sdcard/usr/local/bin" - fi } # write_uboot diff --git a/makeboarddeb.sh b/makeboarddeb.sh index dd014a5f6d..313cd5c034 100644 --- a/makeboarddeb.sh +++ b/makeboarddeb.sh @@ -63,13 +63,12 @@ create_board_package() update-rc.d armhwinfo defaults >/dev/null 2>&1 update-rc.d -f motd remove >/dev/null 2>&1 [ ! -f "/etc/network/interfaces" ] && cp /etc/network/interfaces.default /etc/network/interfaces - [ -f "/root/.nand1-allwinner.tgz" ] && rm /root/.nand1-allwinner.tgz - [ -f "/root/nand-sata-install" ] && rm /root/nand-sata-install + rm -f /root/.nand1-allwinner.tgz /root/nand-sata-install ln -sf /var/run/motd /etc/motd [ -f "/etc/bash.bashrc.custom" ] && mv /etc/bash.bashrc.custom /etc/bash.bashrc.custom.old - [ -f "/etc/update-motd.d/00-header" ] && rm /etc/update-motd.d/00-header - [ -f "/etc/update-motd.d/10-help-text" ] && rm /etc/update-motd.d/10-help-text + rm -f /etc/update-motd.d/00-header /etc/update-motd.d/10-help-text if [ -f "/boot/bin/$BOARD.bin" ] && [ ! -f "/boot/script.bin" ]; then ln -sf bin/$BOARD.bin /boot/script.bin >/dev/null 2>&1 || cp /boot/bin/$BOARD.bin /boot/script.bin; fi + rm -f /usr/local/bin/h3disp /usr/local/bin/h3consumption exit 0 EOF @@ -116,13 +115,13 @@ create_board_package() EOF # temper binary for USB temp meter - mkdir -p $destination/usr/local/bin + mkdir -p $destination/usr/bin # add USB OTG port mode switcher - install -m 755 $SRC/lib/scripts/sunxi-musb $destination/usr/local/bin + install -m 755 $SRC/lib/scripts/sunxi-musb $destination/usr/bin # armbianmonitor (currently only to toggle boot verbosity and log upload) - install -m 755 $SRC/lib/scripts/armbianmonitor/armbianmonitor $destination/usr/local/bin + install -m 755 $SRC/lib/scripts/armbianmonitor/armbianmonitor $destination/usr/bin # updating uInitrd image in update-initramfs trigger mkdir -p $destination/etc/initramfs/post-update.d/ @@ -212,14 +211,20 @@ create_board_package() # setting window title for remote sessions install -m 755 $SRC/lib/scripts/ssh-title.sh $destination/etc/profile.d/ssh-title.sh + # h3disp for sun8i/3.4.x + if [[ $LINUXFAMILY == sun8i && $BRANCH == default ]]; then + install -m 755 $SRC/lib/scripts/h3disp $destination/usr/bin + install -m 755 $SRC/lib/scripts/h3consumption $destination/usr/bin + fi + if [[ $LINUXCONFIG == *sun* ]]; then if [[ $BRANCH != next ]]; then # add soc temperature app local codename=$(lsb_release -sc) if [[ -z $codename || "sid" == *"$codename"* ]]; then - arm-linux-gnueabihf-gcc-5 $SRC/lib/scripts/sunxi-temp/sunxi_tp_temp.c -o $destination/usr/local/bin/sunxi_tp_temp + arm-linux-gnueabihf-gcc-5 $SRC/lib/scripts/sunxi-temp/sunxi_tp_temp.c -o $destination/usr/bin/sunxi_tp_temp else - arm-linux-gnueabihf-gcc $SRC/lib/scripts/sunxi-temp/sunxi_tp_temp.c -o $destination/usr/local/bin/sunxi_tp_temp + arm-linux-gnueabihf-gcc $SRC/lib/scripts/sunxi-temp/sunxi_tp_temp.c -o $destination/usr/bin/sunxi_tp_temp fi fi