mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-23 23:31:28 +00:00
Removed GPIO/1-Wire modules from H3 default modules, cleaned up firstrun, activated H3 autodetection
This commit is contained in:
parent
20d327549b
commit
ab8ab1cd20
3 changed files with 59 additions and 54 deletions
|
@ -1,5 +1,5 @@
|
|||
# Wired adapter #1
|
||||
auto eth0
|
||||
allow-hotplug eth0
|
||||
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
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
#build 3wip
|
||||
LINUXFAMILY="sun8i"
|
||||
BOOTCONFIG="orangepi_plus_defconfig"
|
||||
MODULES="8189es gpio_sunxi w1-sunxi w1-gpio w1-therm"
|
||||
MODULES="8189es"
|
||||
MODULES_NEXT=""
|
||||
CPUMIN="480000"
|
||||
CPUMAX="1296000"
|
||||
|
@ -229,7 +229,7 @@
|
|||
#build 3wip
|
||||
LINUXFAMILY="sun8i"
|
||||
BOOTCONFIG="orangepi_pc_defconfig"
|
||||
MODULES="8189es gpio_sunxi w1-sunxi w1-gpio w1-therm"
|
||||
MODULES="8189es"
|
||||
MODULES_NEXT=""
|
||||
CPUMIN="480000"
|
||||
CPUMAX="1296000"
|
||||
|
@ -241,7 +241,7 @@
|
|||
#build 3wip
|
||||
LINUXFAMILY="sun8i"
|
||||
BOOTCONFIG="orangepi_pc_defconfig"
|
||||
MODULES="gpio_sunxi w1-sunxi w1-gpio w1-therm"
|
||||
MODULES=""
|
||||
MODULES_NEXT=""
|
||||
CPUMIN="480000"
|
||||
CPUMAX="1296000"
|
||||
|
@ -253,7 +253,7 @@
|
|||
#build 3wip
|
||||
LINUXFAMILY="sun8i"
|
||||
BOOTCONFIG="orangepi_one_defconfig"
|
||||
MODULES="gpio_sunxi w1-sunxi w1-gpio w1-therm"
|
||||
MODULES=""
|
||||
MODULES_NEXT=""
|
||||
CPUMIN="648000"
|
||||
CPUMAX="1200000"
|
||||
|
@ -265,7 +265,7 @@
|
|||
#build 3wip
|
||||
LINUXFAMILY="sun8i"
|
||||
BOOTCONFIG="orangepi_pc_defconfig"
|
||||
MODULES="8189es gpio_sunxi w1-sunxi w1-gpio w1-therm"
|
||||
MODULES="8189es"
|
||||
MODULES_NEXT=""
|
||||
CPUMIN="648000"
|
||||
CPUMAX="1200000"
|
||||
|
|
|
@ -15,6 +15,15 @@
|
|||
#
|
||||
# Create this file to speed up boot process
|
||||
#
|
||||
|
||||
# Immediately exit if not called correctly
|
||||
if [ "X$1" != "Xstart" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
# create helper script to set swap settings
|
||||
cat > /tmp/create_swap.sh <<EOT
|
||||
#!/bin/bash
|
||||
#
|
||||
|
@ -56,13 +65,8 @@ if [ -f "/var/run/reboot" ]; then reboot; fi
|
|||
rm -f /tmp/create_swap.sh
|
||||
EOT
|
||||
chmod +x /tmp/create_swap.sh
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
collect_informations() {
|
||||
# get some info about the board
|
||||
CURKERNE=$(uname -r | sed 's/\([0-9]\+\.[0-9]\+\)\..*/\1/')
|
||||
DISTRIBUTION=$(lsb_release -cs)
|
||||
|
@ -78,6 +82,7 @@ fi
|
|||
done
|
||||
rootfstype=$(blkid -s TYPE -o value $root_partition)
|
||||
set -e
|
||||
} # collect_informations
|
||||
|
||||
display_alert() {
|
||||
if [ "$DISTRIBUTION" == "wheezy" ]; then
|
||||
|
@ -88,8 +93,9 @@ display_alert() {
|
|||
}
|
||||
|
||||
autodetect_h3() {
|
||||
# This function adjusts script.bin and cpufreq settings based on /run/machine.id so
|
||||
# that a single OS image built for Orange Pi PC can be shipped.
|
||||
# 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.
|
||||
|
||||
# wait for armhwinfo
|
||||
sleep 3
|
||||
|
@ -120,10 +126,6 @@ autodetect_h3() {
|
|||
touch /var/run/reboot
|
||||
} # autodetect_h3
|
||||
|
||||
#if [ "X${HARDWARE}" = "Xsun8i" ]; then
|
||||
# autodetect_h3
|
||||
#fi
|
||||
|
||||
do_expand_rootfs() {
|
||||
device="/dev/"$(lsblk -idn -o NAME | grep mmcblk0)
|
||||
PARTITIONS=$(($(fdisk -l $device | grep $device | wc -l)-1))
|
||||
|
@ -145,8 +147,8 @@ do_expand_rootfs() {
|
|||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
main() {
|
||||
collect_informations
|
||||
display_alert "Force password change upon first login"
|
||||
chage -d 0 root
|
||||
|
||||
|
@ -154,17 +156,20 @@ case "$1" in
|
|||
display_alert "Expand ext4 root filesystem"
|
||||
do_expand_rootfs
|
||||
fi
|
||||
|
||||
display_alert "Creating 128Mb emergency swap area"
|
||||
display_alert "SSH keys recreation. One moment please"
|
||||
display_alert "Updating packages"
|
||||
#resize2fs $root_partition
|
||||
/tmp/create_swap.sh &
|
||||
update-rc.d -f firstrun remove >/dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "X${HARDWARE}" = "Xsun8i" ]; then
|
||||
autodetect_h3
|
||||
fi
|
||||
|
||||
update-rc.d -f firstrun remove >/dev/null 2>&1
|
||||
sed -i 's/allow-hotplug\ eth0/auto eth0/' /etc/network/interfaces.default
|
||||
} # main
|
||||
|
||||
main
|
||||
exit 0
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue