mirror of
https://github.com/Fishwaldo/build.git
synced 2025-04-01 11:41:42 +00:00
Prepare Pine64 addition and Ubuntu Xenial changes
This commit is contained in:
parent
fd685d4c6a
commit
33eec55dd4
2 changed files with 19 additions and 4 deletions
|
@ -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##*/}"
|
create_motd_warning "It seems the image is running on ${ID} but you're using wrong settings: ${ScriptBinUsed##*/}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
elif [ "$ARCH" = "aarch64" ]; then
|
||||||
|
if [ $HARDWARE = "sun50iw1p1" ]; then
|
||||||
|
if [ $MEMTOTAL -gt 600 ]; then
|
||||||
|
ID="Pine64+"
|
||||||
|
else
|
||||||
|
ID="Pine64"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f /proc/device-tree/model ] && read MACHINE </proc/device-tree/model
|
[ -f /proc/device-tree/model ] && read MACHINE </proc/device-tree/model
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# Create this file to speed up boot process
|
# 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
|
if [ "X$1" != "Xstart" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -96,8 +96,9 @@ display_alert() {
|
||||||
|
|
||||||
autodetect_h3() {
|
autodetect_h3() {
|
||||||
# This function adjusts script.bin, hostname and cpufreq settings based on
|
# 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
|
# /run/machine.id so that two OS images (one built for GbE H3 devices like
|
||||||
# for the other H3 devices using the internal Ethernet PHY) can be shipped.
|
# 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
|
# 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
|
# the right one instead of trying to relink script.bin if detecting mainline
|
||||||
|
@ -160,7 +161,14 @@ do_expand_rootfs() {
|
||||||
return 0
|
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() {
|
main() {
|
||||||
|
check_prerequisits
|
||||||
collect_informations
|
collect_informations
|
||||||
display_alert "Force password change upon first login"
|
display_alert "Force password change upon first login"
|
||||||
chage -d 0 root
|
chage -d 0 root
|
||||||
|
@ -185,4 +193,3 @@ main() {
|
||||||
|
|
||||||
main
|
main
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue