Prepare Pine64 addition and Ubuntu Xenial changes

This commit is contained in:
Thomas Kaiser 2016-02-29 16:13:15 +01:00
parent fd685d4c6a
commit 33eec55dd4
2 changed files with 19 additions and 4 deletions

View file

@ -173,6 +173,14 @@ if [ "$ARCH" = "armv7l" ]; then
create_motd_warning "It seems the image is running on ${ID} but you're using wrong settings: ${ScriptBinUsed##*/}"
fi
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ $HARDWARE = "sun50iw1p1" ]; then
if [ $MEMTOTAL -gt 600 ]; then
ID="Pine64+"
else
ID="Pine64"
fi
fi
fi
[ -f /proc/device-tree/model ] && read MACHINE </proc/device-tree/model

View file

@ -16,7 +16,7 @@
# Create this file to speed up boot process
#
# Immediately exit if not called correctly
# Immediately exit if not called by init system
if [ "X$1" != "Xstart" ]; then
exit 1
fi
@ -96,8 +96,9 @@ display_alert() {
autodetect_h3() {
# This function adjusts script.bin, hostname and cpufreq settings based on
# /run/machine.id so that two OS images (one built for Orange Pi Plus and one
# for the other H3 devices using the internal Ethernet PHY) can be shipped.
# /run/machine.id so that two OS images (one built for GbE H3 devices like
# Orange Pi Plus or Banana Pi M2+ and one for the other H3 devices using
# the internal Ethernet PHY) can be shipped.
#
# TODO for mainline kernel: Ship with u-boot debs for all Oranges and install
# the right one instead of trying to relink script.bin if detecting mainline
@ -160,7 +161,14 @@ do_expand_rootfs() {
return 0
}
check_prerequisits() {
for needed_tool in fdisk parted partprobe resize2fs ; do
which ${needed_tool} >/dev/null 2>&1 || exit 1
done
} # check_prerequisits
main() {
check_prerequisits
collect_informations
display_alert "Force password change upon first login"
chage -d 0 root
@ -185,4 +193,3 @@ main() {
main
exit 0