Move more configuration files to board support package
This commit is contained in:
parent
fa49f8bd53
commit
ce9bb08dfe
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -19,12 +19,6 @@ display_alert "Applying distribution specific tweaks for" "$RELEASE" "info"
|
||||
|
||||
# Common
|
||||
|
||||
# set up apt
|
||||
cat <<END > $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"
|
||||
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user