From 7b876190c21a5f947a049b03058601db87acccae Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Thu, 16 Jun 2016 14:34:45 +0300 Subject: [PATCH 1/7] Remove old build log files --- main.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.sh b/main.sh index 5e64f036c2..9f462d03c9 100644 --- a/main.sh +++ b/main.sh @@ -39,6 +39,8 @@ source $SRC/lib/general.sh # General functions mkdir -p $DEST/debug (cd $DEST/debug && tar -czf logs-$(date +"%d_%m_%Y-%H_%M_%S").tgz *.log) > /dev/null 2>&1 rm -f $DEST/debug/*.log > /dev/null 2>&1 +# delete compressed logs older than 7 days +(cd $DEST/debug && find . -name '*.tgz' -atime +7 -delete) > /dev/null # compile.sh version checking ver1=$(awk -F"=" '/^# VERSION/ {print $2}' <"$SRC/compile.sh") From 2b888dfe36804eb2658806495e6ce5546e13b958 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Thu, 16 Jun 2016 14:40:43 +0300 Subject: [PATCH 2/7] Add extra hostapd dependencies --- extras/hostapd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/extras/hostapd.sh b/extras/hostapd.sh index d04b9034b3..3854b60aeb 100644 --- a/extras/hostapd.sh +++ b/extras/hostapd.sh @@ -44,6 +44,7 @@ compile_hostapd() Maintainer: $MAINTAINER <$MAINTAINERMAIL> Installed-Size: 1 Section: net + Depends: libc6, libnl-3-200, libnl-genl-3-200, libssl1.0.0 Provides: armbian-hostapd Conflicts: armbian-hostapd, hostapd Priority: optional From fa49f8bd531730656c5be3aa93e47daa5c474faa Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Thu, 16 Jun 2016 14:41:02 +0300 Subject: [PATCH 3/7] Rework armbian-tools packaging script --- extras/tools.sh | 164 +++++++++++++++++++++++------------------------- 1 file changed, 77 insertions(+), 87 deletions(-) diff --git a/extras/tools.sh b/extras/tools.sh index f61b08fe68..d27602ffbb 100644 --- a/extras/tools.sh +++ b/extras/tools.sh @@ -9,109 +9,99 @@ # This file is a part of tool chain https://github.com/igorpecovnik/lib # - -compile_tools () +compile_tools() { - - sync - echo "Building sunxi-tools" > $DEST/debug/sunxi-tools-build.log 2>&1 + local tmpdir=$CACHEDIR/sdcard/root/tools + display_alert "Building deb" "sunxi-tools" "info" - - local tmpdir1="sdcard/tmp/sunxi-tools" - display_alert "... downloading sources" "sunxi-tools" "info" - git clone https://github.com/linux-sunxi/sunxi-tools $CACHEDIR/$tmpdir1 >> $DEST/debug/sunxi-tools-build.log 2>&1 - - local tmpdir2="sdcard/tmp/temper" - display_alert "... downloading sources" "temper" "info" - git clone -q https://github.com/padelt/pcsensor-temper $CACHEDIR/$tmpdir2 >> $DEST/debug/temper-build.log 2>&1 - - local tmpdir3="sdcard/tmp/brcm" - display_alert "... downloading sources" "BT utils" "info" - git clone -q https://github.com/phelum/CT_Bluetooth $CACHEDIR/$tmpdir3 >> $DEST/debug/brcm-build.log 2>&1 - rm -f $CACHEDIR/$tmpdir3/brcm_patchram_plus $CACHEDIR/$tmpdir3/brcm_bt_reset $CACHEDIR/$tmpdir3/*.o - - pack_to_deb () + + display_alert "... downloading sources" "sunxi-tools" "info" + git clone -q https://github.com/linux-sunxi/sunxi-tools $tmpdir/sunxi-tools >> $DEST/debug/sunxi-tools-build.log 2>&1 + + display_alert "... downloading sources" "temper" "info" + git clone -q https://github.com/padelt/pcsensor-temper $tmpdir/temper >> $DEST/debug/temper-build.log 2>&1 + + display_alert "... downloading sources" "BT utils" "info" + git clone -q https://github.com/phelum/CT_Bluetooth $tmpdir/brcm >> $DEST/debug/brcm-build.log 2>&1 + + rm -f $tmpdir/brcm/{brcm_patchram_plus,brcm_bt_reset} $tmpdir/brcm/*.o + + pack_to_deb() { - cd $CACHEDIR/sdcard/tmp - mkdir -p armbian-tools${TARGET}"_"${REVISION}_${ARCH}/DEBIAN armbian-tools${TARGET}"_"${REVISION}_${ARCH}/usr/bin armbian-tools${TARGET}"_"${REVISION}_${ARCH}/lib/udev/rules.d + mkdir -p $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/{DEBIAN,usr/bin,lib/udev/rules.d} # set up control file -cat < armbian-tools${TARGET}_${REVISION}_${ARCH}/DEBIAN/control -Package: armbian-tools$TARGET -Version: $REVISION -Architecture: $ARCH -Maintainer: $MAINTAINER <$MAINTAINERMAIL> -Installed-Size: 1 -Depends: libc6 (>= 2.10), libusb-1.0-0 (>= 2:1.0.8) -Section: utils -Priority: optional -Description: Armbian tools, sunxi, temper -END -# - echo 'SUBSYSTEMS=="usb", ATTR{idVendor}=="1f3a", ATTR{idProduct}=="efe8", GROUP="sunxi-fel"' > armbian-tools${TARGET}_${REVISION}_${ARCH}/lib/udev/rules.d/60-sunxi-tools.rules - cp "$CACHEDIR/$tmpdir1/sunxi-bootinfo" armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin - cp "$CACHEDIR/$tmpdir1/sunxi-fel" armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin - cp "$CACHEDIR/$tmpdir1/sunxi-fexc" armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin - ln -s sunxi-fexc armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin/fex2bin - ln -s sunxi-fexc armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin/bin2fex - cp "$CACHEDIR/$tmpdir1/sunxi-nand-part" armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin - cp "$CACHEDIR/$tmpdir1/sunxi-pio" armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin + cat <<-END > $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/DEBIAN/control + Package: armbian-tools-$RELEASE + Version: $REVISION + Architecture: $ARCH + Maintainer: $MAINTAINER <$MAINTAINERMAIL> + Installed-Size: 1 + Provides: armbian-tools + Conflicts: armbian-tools, sunxi-tools + Depends: libc6 (>= 2.10), libusb-1.0-0 (>= 2:1.0.8), libusb-0.1-4, libudev1 + Section: utils + Priority: optional + Description: Armbian tools, sunxi, temper + END + + echo 'SUBSYSTEMS=="usb", ATTR{idVendor}=="1f3a", ATTR{idProduct}=="efe8", GROUP="sunxi-fel"' > $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/lib/udev/rules.d/60-sunxi-tools.rules + + cp $tmpdir/sunxi-tools/{sunxi-bootinfo,sunxi-fel,sunxi-fexc,sunxi-nand-part,sunxi-pio} $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin + + ln -s sunxi-fexc $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin/fex2bin + ln -s sunxi-fexc $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin/bin2fex + # temper - cp "$CACHEDIR/$tmpdir2/src/pcsensor" armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin/temper + cp $tmpdir/temper/src/pcsensor $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin/temper # brcm - cp "$CACHEDIR/$tmpdir3/brcm_bt_reset" armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin - cp "$CACHEDIR/$tmpdir3/brcm_patchram_plus" armbian-tools${TARGET}_${REVISION}_${ARCH}/usr/bin - - cd armbian-tools${TARGET}_${REVISION}_${ARCH} + cp $tmpdir/brcm/{brcm_bt_reset,brcm_patchram_plus} $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}/usr/bin + + cd $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH} find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums - cd .. - dpkg -b armbian-tools${TARGET}_${REVISION}_${ARCH} >/dev/null 2>&1 - rm -rf armbian-tools${TARGET}_${REVISION}_${ARCH} + cd $tmpdir + dpkg -b armbian-tools-${RELEASE}_${REVISION}_${ARCH} >/dev/null + mv $tmpdir/armbian-tools-${RELEASE}_${REVISION}_${ARCH}.deb $DEST/debs + cd $CACHEDIR + rm -rf $tmpdir } - - - compiling () - { - display_alert "... compiling" "sunxitools" "info" - cd $CACHEDIR/$tmpdir1 + + compiling() + { + display_alert "... compiling" "sunxitools" "info" + cd $tmpdir/sunxi-tools git checkout -f -q ce9cf33606492076b81e1157ba9fc54b56379335 >> $DEST/debug/tools-build.log 2>&1 - chroot $CACHEDIR/sdcard /bin/bash -c "cd /tmp/sunxi-tools; make clean" >> $DEST/debug/tools-build.log 2>&1 - chroot $CACHEDIR/sdcard /bin/bash -c "cd /tmp/sunxi-tools; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 - if [ $? -ne 0 ] || [ ! -f $CACHEDIR/$tmpdir1/sunxi-fexc ]; then - display_alert "Not built" "tools" "err" - exit 1 + chroot $CACHEDIR/sdcard /bin/bash -c "cd /root/tools/sunxi-tools; make clean" >> $DEST/debug/tools-build.log 2>&1 + chroot $CACHEDIR/sdcard /bin/bash -c "cd /root/tools/sunxi-tools; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 + if [[ $? -ne 0 || ! -f $tmpdir/sunxi-tools/sunxi-fexc ]]; then + cd $CACHEDIR + rm -rf $tmpdir + exit_with_error "Error building" "sunxi-tools" fi - display_alert "... compiling" "temper" "info" - chroot $CACHEDIR/sdcard /bin/bash -c "cd /tmp/temper/src; make clean" >> $DEST/debug/tools-build.log 2>&1 - chroot $CACHEDIR/sdcard /bin/bash -c "cd /tmp/temper/src; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 - if [ $? -ne 0 ] || [ ! -f $CACHEDIR/$tmpdir2/src/pcsensor ]; then - display_alert "Not built" "tools" "err" - exit 1 + display_alert "... compiling" "temper" "info" + chroot $CACHEDIR/sdcard /bin/bash -c "cd /root/tools/temper/src; make clean" >> $DEST/debug/tools-build.log 2>&1 + chroot $CACHEDIR/sdcard /bin/bash -c "cd /root/tools/temper/src; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 + if [[ $? -ne 0 || ! -f $tmpdir/temper/src/pcsensor ]]; then + cd $CACHEDIR + rm -rf $tmpdir + exit_with_error "Error building" "temper" fi - display_alert "... compiling" "bluetooth utils" "info" - chroot $CACHEDIR/sdcard /bin/bash -c "cd /tmp/brcm; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 - if [ $? -ne 0 ] || [ ! -f $CACHEDIR/$tmpdir3/brcm_bt_reset ]; then - display_alert "Not built" "tools" "err" - exit 1 + display_alert "... compiling" "bluetooth utils" "info" + chroot $CACHEDIR/sdcard /bin/bash -c "cd /root/tools/brcm; make $CTHREADS" >> $DEST/debug/tools-build.log 2>&1 + if [[ $? -ne 0 || ! -f $tmpdir/brcm/brcm_bt_reset ]]; then + cd $CACHEDIR + rm -rf $tmpdir + exit_with_error "Error building" "BT utils" fi } - + compiling pack_to_deb - - display_alert "Installing" "armbian-tools${TARGET}_${REVISION}_${ARCH}.deb" "info" - chroot $CACHEDIR/sdcard /bin/bash -c "dpkg -i /tmp/armbian-tools${TARGET}_${REVISION}_${ARCH}.deb" >> $DEST/debug/tools-build.log 2>&1 - mv $CACHEDIR/sdcard/tmp/armbian-tools${TARGET}_${REVISION}_${ARCH}.deb $DEST/debs } - -if [[ -f "$DEST/debs/armbian-tools${TARGET}_${REVISION}_${ARCH}.deb" ]]; then - # install - echo "Installing tools" > $DEST/debug/tools-build.log 2>&1 - display_alert "Installing" "armbian-tools${TARGET}_${REVISION}_${ARCH}.deb" "info" - cp $DEST/debs/armbian-tools${TARGET}_${REVISION}_${ARCH}.deb $CACHEDIR/sdcard/tmp - chroot $CACHEDIR/sdcard /bin/bash -c "dpkg -i /tmp/armbian-tools${TARGET}_${REVISION}_${ARCH}.deb" >> $DEST/debug/tools-build.log 2>&1 -else - # compile +if [[ ! -f $DEST/debs/armbian-tools-${RELEASE}_${REVISION}_${ARCH}.deb ]]; then compile_tools -fi \ No newline at end of file +fi + +display_alert "Installing" "armbian-tools-${RELEASE}_${REVISION}_${ARCH}.deb" "info" +chroot $CACHEDIR/sdcard /bin/bash -c "dpkg -i /tmp/armbian-tools-${RELEASE}_${REVISION}_${ARCH}.deb" >> $DEST/debug/tools-build.log From ce9bb08dfe6804cede911bdfa4488baf675f3e95 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Thu, 16 Jun 2016 20:02:13 +0300 Subject: [PATCH 4/7] Move more configuration files to board support package --- boards.sh | 4 ---- distributions.sh | 20 +++----------------- makeboarddeb.sh | 22 +++++++++++++++++----- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/boards.sh b/boards.sh index 46d88a9822..ff8fe6f11c 100644 --- a/boards.sh +++ b/boards.sh @@ -73,10 +73,6 @@ install_board_specific (){ else tr ' ' '\n' <<< "$MODULES" >> $CACHEDIR/sdcard/etc/modules fi - - # copy and create symlink to default interfaces configuration - cp $SRC/lib/config/network/interfaces.* $CACHEDIR/sdcard/etc/network/ - ln -sf interfaces.default $CACHEDIR/sdcard/etc/network/interfaces } diff --git a/distributions.sh b/distributions.sh index 13c1479e5c..6f440e6a46 100644 --- a/distributions.sh +++ b/distributions.sh @@ -19,12 +19,6 @@ display_alert "Applying distribution specific tweaks for" "$RELEASE" "info" # Common -# set up apt -cat < $CACHEDIR/sdcard/etc/apt/apt.conf.d/71-no-recommends -APT::Install-Recommends "0"; -APT::Install-Suggests "0"; -END - # configure the system for unattended upgrades cp $SRC/lib/scripts/50unattended-upgrades $CACHEDIR/sdcard/etc/apt/apt.conf.d/50unattended-upgrades cp $SRC/lib/scripts/02periodic $CACHEDIR/sdcard/etc/apt/apt.conf.d/02periodic @@ -182,16 +176,12 @@ xenial) esac # copy hostapd configurations -install -m 755 $SRC/lib/config/hostapd/hostapd.conf $CACHEDIR/sdcard/etc/hostapd.conf -install -m 755 $SRC/lib/config/hostapd/hostapd.realtek.conf $CACHEDIR/sdcard/etc/hostapd.conf-rt +install $SRC/lib/config/hostapd/hostapd.conf $CACHEDIR/sdcard/etc/hostapd.conf +install $SRC/lib/config/hostapd/hostapd.realtek.conf $CACHEDIR/sdcard/etc/hostapd.conf-rt # console fix due to Debian bug sed -e 's/CHARMAP=".*"/CHARMAP="'$CONSOLE_CHAR'"/g' -i $CACHEDIR/sdcard/etc/default/console-setup -# root-fs modifications -rm -f $CACHEDIR/sdcard/etc/motd -touch $CACHEDIR/sdcard/etc/motd - # change time zone data echo $TZDATA > $CACHEDIR/sdcard/etc/timezone chroot $CACHEDIR/sdcard /bin/bash -c "dpkg-reconfigure -f noninteractive tzdata >/dev/null 2>&1" @@ -207,7 +197,7 @@ else fi echo "$device 0 0" >> $CACHEDIR/sdcard/etc/fstab -# flash media tunning +# flash media tuning if [[ -f $CACHEDIR/sdcard/etc/default/tmpfs ]]; then sed -e 's/#RAMTMP=no/RAMTMP=yes/g' -i $CACHEDIR/sdcard/etc/default/tmpfs sed -e 's/#RUN_SIZE=10%/RUN_SIZE=128M/g' -i $CACHEDIR/sdcard/etc/default/tmpfs @@ -228,8 +218,4 @@ touch $CACHEDIR/sdcard/root/.not_logged_in_yet # force change root password at first login chroot $CACHEDIR/sdcard /bin/bash -c "chage -d 0 root" - -# remove hostapd because it's replaced with ours -chroot $CACHEDIR/sdcard /bin/bash -c "apt-get -y -qq remove hostapd >/dev/null 2>&1" - } diff --git a/makeboarddeb.sh b/makeboarddeb.sh index 0ee9af3829..fef3d493fd 100644 --- a/makeboarddeb.sh +++ b/makeboarddeb.sh @@ -52,6 +52,7 @@ create_board_package() #!/bin/sh 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 ln -sf /var/run/motd /etc/motd @@ -106,7 +107,7 @@ create_board_package() mkdir -p $destination/usr/local/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/local/bin # armbianmonitor (currently only to toggle boot verbosity and log upload) install -m 755 $SRC/lib/scripts/armbianmonitor/armbianmonitor $destination/usr/local/bin @@ -120,6 +121,17 @@ create_board_package() EOF chmod +x $destination/etc/initramfs/post-update.d/99-uboot + # network interfaces configuration + mkdir -p $destination/etc/network/ + cp $SRC/lib/config/network/interfaces.* $destination/etc/network/ + + # apt configuration + mkdir -p $destination/etc/apt/apt.conf.d/ + cat <<-EOF > $destination/etc/apt/apt.conf.d/71-no-recommends + APT::Install-Recommends "0"; + APT::Install-Suggests "0"; + EOF + # script to install to SATA mkdir -p $destination/usr/sbin/ cp -R $SRC/lib/scripts/nand-sata-install/usr $destination/ @@ -153,6 +165,7 @@ create_board_package() fi # lamobo R1 router switch config + # TODO: compile from sources in sunxi-tools tar xfz $SRC/lib/bin/swconfig.tgz -C $destination/usr/local/bin # convert and add fex files @@ -162,10 +175,9 @@ create_board_package() done # bluetooth device enabler - for cubietruck - install -m 755 $SRC/lib/bin/brcm_bt_reset $destination/usr/local/bin - install -m 755 $SRC/lib/bin/brcm_patchram_plus $destination/usr/local/bin - install $SRC/lib/scripts/brcm40183 $destination/etc/default - install -m 755 $SRC/lib/scripts/brcm40183-patch $destination/etc/init.d + # TODO: move to tools or sunxi-common.inc + install $SRC/lib/scripts/brcm40183 $destination/etc/default + install -m 755 $SRC/lib/scripts/brcm40183-patch $destination/etc/init.d fi From ec9e9e8f7b46b4f3772c35813699add60c10bbe8 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Thu, 16 Jun 2016 20:10:37 +0300 Subject: [PATCH 5/7] Use allow-hotplug in interfaces templates by default Improve interfaces files update logic --- config/network/interfaces.default | 20 ++++++++++---------- makeboarddeb.sh | 6 ++++++ scripts/firstrun | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/config/network/interfaces.default b/config/network/interfaces.default index e9afc1daa5..92a36e9b89 100644 --- a/config/network/interfaces.default +++ b/config/network/interfaces.default @@ -1,22 +1,22 @@ # Wired adapter #1 allow-hotplug eth0 - iface eth0 inet dhcp +iface eth0 inet dhcp # hwaddress ether # if you want to set MAC manually # pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838 -# + # Wired adapter #2 -#auto eth1 -# iface eth1 inet dhcp +#allow-hotplug eth1 +#iface eth1 inet dhcp # hwaddress ether # if you want to set MAC manually # pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838 -# + # Wireless adapter #1 -#auto wlan0 -# iface wlan0 inet dhcp -# wpa-ssid SSID +#allow-hotplug wlan0 +#iface wlan0 inet dhcp +# wpa-ssid SSID # wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # to generate proper encrypted key: wpa_passphrase yourSSID yourpassword -# + # Local loopback auto lo - iface lo inet loopback +iface lo inet loopback diff --git a/makeboarddeb.sh b/makeboarddeb.sh index fef3d493fd..d2de6127cf 100644 --- a/makeboarddeb.sh +++ b/makeboarddeb.sh @@ -52,6 +52,11 @@ create_board_package() #!/bin/sh update-rc.d armhwinfo defaults >/dev/null 2>&1 update-rc.d -f motd remove >/dev/null 2>&1 + if [ -L "/etc/network/interfaces" ]; then + cp /etc/network/interfaces /etc/network/interfaces.tmp + rm /etc/network/interfaces + mv /etc/network/interfaces.tmp /etc/network/interfaces + fi [ ! -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 @@ -124,6 +129,7 @@ create_board_package() # network interfaces configuration mkdir -p $destination/etc/network/ cp $SRC/lib/config/network/interfaces.* $destination/etc/network/ + [[ $RELEASE = wheezy ]] && sed -i 's/allow-hotplug/auto/g' $destination/etc/network/interfaces.default # apt configuration mkdir -p $destination/etc/apt/apt.conf.d/ diff --git a/scripts/firstrun b/scripts/firstrun index b997cfb844..760cf0daf0 100644 --- a/scripts/firstrun +++ b/scripts/firstrun @@ -268,7 +268,7 @@ main() { fi update-rc.d -f firstrun remove >/dev/null 2>&1 - sed -i 's/allow-hotplug\ eth0/auto eth0/' /etc/network/interfaces.default + #sed -i 's/allow-hotplug\ eth0/auto eth0/' /etc/network/interfaces.default rm /tmp/firstrun_running } # main From bc2e880c3a59e3a1b19bddf705617578613319db Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Thu, 16 Jun 2016 20:50:29 +0300 Subject: [PATCH 6/7] Remove default hostapd before installing customized one Remove default interfaces file after debootstrap process --- distributions.sh | 3 +++ extras/hostapd.sh | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/distributions.sh b/distributions.sh index 6f440e6a46..7e4d19ee61 100644 --- a/distributions.sh +++ b/distributions.sh @@ -19,6 +19,9 @@ display_alert "Applying distribution specific tweaks for" "$RELEASE" "info" # Common +# remove default interfaces file if present +rm $CACHEDIR/sdcard/etc/network/interfaces + # configure the system for unattended upgrades cp $SRC/lib/scripts/50unattended-upgrades $CACHEDIR/sdcard/etc/apt/apt.conf.d/50unattended-upgrades cp $SRC/lib/scripts/02periodic $CACHEDIR/sdcard/etc/apt/apt.conf.d/02periodic diff --git a/extras/hostapd.sh b/extras/hostapd.sh index 3854b60aeb..84feef5f14 100644 --- a/extras/hostapd.sh +++ b/extras/hostapd.sh @@ -128,4 +128,5 @@ compile_hostapd() [[ ! -f $DEST/debs/armbian-hostapd-${RELEASE}_${REVISION}_${ARCH}.deb ]] && compile_hostapd display_alert "Installing" "armbian-hostapd-${RELEASE}_${REVISION}_${ARCH}.deb" "info" -chroot $CACHEDIR/sdcard /bin/bash -c "dpkg -i /tmp/armbian-hostapd-${RELEASE}_${REVISION}_${ARCH}.deb" >> $DEST/debug/hostapd-build.log +chroot $CACHEDIR/sdcard /bin/bash -c "dpkg -r hostapd" >> $DEST/debug/output.log +chroot $CACHEDIR/sdcard /bin/bash -c "dpkg -i /tmp/armbian-hostapd-${RELEASE}_${REVISION}_${ARCH}.deb" >> $DEST/debug/output.log From 20f6afa15ee86b2945ea51059a5dc05cfc193c77 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Fri, 17 Jun 2016 15:06:41 +0300 Subject: [PATCH 7/7] Fix for building desktop images with external software --- debootstrap-ng.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debootstrap-ng.sh b/debootstrap-ng.sh index cfb5d42eaf..9a380e36b1 100644 --- a/debootstrap-ng.sh +++ b/debootstrap-ng.sh @@ -73,12 +73,12 @@ debootstrap_ng() install_kernel install_board_specific - # install desktop files - [[ $BUILD_DESKTOP == yes ]] && install_desktop - # install additional applications [[ $EXTERNAL == yes ]] && install_external_applications + # install desktop files + [[ $BUILD_DESKTOP == yes ]] && install_desktop + # cleanup for install_kernel and install_board_specific umount $CACHEDIR/sdcard/tmp