From 079915e14668a49495c20df0926f11523445d43d Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Wed, 16 Dec 2015 20:37:11 +0300 Subject: [PATCH] [Testing needed] fake-hwclock as boot clock source --- boards.sh | 3 +++ config/linux-cubox-default.config | 4 ++-- config/linux-cubox-next.config | 4 ++-- config/linux-guitar-default.config | 4 ++-- config/linux-odroid-default.config | 4 ++-- config/linux-odroid-next.config | 4 ++-- config/linux-s500-default.config | 4 ++-- config/linux-sun4i-default.config | 4 ++-- config/linux-sun7i-default.config | 4 ++-- config/linux-sunxi-dac.config | 4 ++-- config/linux-sunxi-default.config | 4 ++-- config/linux-sunxi-dev.config | 4 ++-- config/linux-sunxi-next.config | 4 ++-- config/linux-udoo-default.config | 4 ++-- config/linux-udoo-neo.config | 4 ++-- config/linux-udoo-next.config | 4 ++-- debootstrap.sh | 10 ++-------- scripts/armhwinfo | 10 ---------- 18 files changed, 35 insertions(+), 48 deletions(-) diff --git a/boards.sh b/boards.sh index 63a37cb75..ca841f3e5 100644 --- a/boards.sh +++ b/boards.sh @@ -167,6 +167,9 @@ install_board_specific (){ # convert to uboot compatible script [[ -f "$DEST/cache/sdcard/boot/boot.cmd" ]] && \ mkimage -C none -A arm -T script -d $DEST/cache/sdcard/boot/boot.cmd $DEST/cache/sdcard/boot/boot.scr >> /dev/null + + # initial date for fake-hwclock + date -u '+%Y-%m-%d %H:%M:%S' > $DEST/cache/sdcard/etc/fake-hwclock.data } diff --git a/config/linux-cubox-default.config b/config/linux-cubox-default.config index f3232e2ea..fc0087810 100644 --- a/config/linux-cubox-default.config +++ b/config/linux-cubox-default.config @@ -4826,9 +4826,9 @@ CONFIG_INFINIBAND_ISERT=m # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS=n # CONFIG_RTC_SYSTOHC is not set -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-cubox-next.config b/config/linux-cubox-next.config index 90322be21..421419438 100644 --- a/config/linux-cubox-next.config +++ b/config/linux-cubox-next.config @@ -3533,9 +3533,9 @@ CONFIG_LEDS_TRIGGER_GPIO=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS=n CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-guitar-default.config b/config/linux-guitar-default.config index f77b0cdda..ba27a471d 100644 --- a/config/linux-guitar-default.config +++ b/config/linux-guitar-default.config @@ -2834,9 +2834,9 @@ CONFIG_SWITCH_GPIO=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS=n CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-odroid-default.config b/config/linux-odroid-default.config index 60c1e576c..ef6c74646 100644 --- a/config/linux-odroid-default.config +++ b/config/linux-odroid-default.config @@ -3306,9 +3306,9 @@ CONFIG_SWITCH=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS=n CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-odroid-next.config b/config/linux-odroid-next.config index 379164d61..8cdea53af 100644 --- a/config/linux-odroid-next.config +++ b/config/linux-odroid-next.config @@ -2847,8 +2847,8 @@ CONFIG_EDAC_SUPPORT=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_HCTOSYS=n +# CONFIG_RTC_HCTOSYS_DEVICE is not set CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" # CONFIG_RTC_DEBUG is not set diff --git a/config/linux-s500-default.config b/config/linux-s500-default.config index f77b0cdda..ba27a471d 100644 --- a/config/linux-s500-default.config +++ b/config/linux-s500-default.config @@ -2834,9 +2834,9 @@ CONFIG_SWITCH_GPIO=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS=n CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-sun4i-default.config b/config/linux-sun4i-default.config index 6b40f0e5d..dbce782bb 100644 --- a/config/linux-sun4i-default.config +++ b/config/linux-sun4i-default.config @@ -3181,8 +3181,8 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # CONFIG_ACCESSIBILITY is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_HCTOSYS=n +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-sun7i-default.config b/config/linux-sun7i-default.config index 712e2ebd0..df6c2d026 100644 --- a/config/linux-sun7i-default.config +++ b/config/linux-sun7i-default.config @@ -3227,8 +3227,8 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # CONFIG_ACCESSIBILITY is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_HCTOSYS=n +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-sunxi-dac.config b/config/linux-sunxi-dac.config index c6ff66cfb..1ade3fe30 100644 --- a/config/linux-sunxi-dac.config +++ b/config/linux-sunxi-dac.config @@ -3890,8 +3890,8 @@ CONFIG_EDAC_SUPPORT=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_HCTOSYS=n +# CONFIG_RTC_HCTOSYS_DEVICE is not set CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" # CONFIG_RTC_DEBUG is not set diff --git a/config/linux-sunxi-default.config b/config/linux-sunxi-default.config index e8c7dba82..8fb0b3ddf 100644 --- a/config/linux-sunxi-default.config +++ b/config/linux-sunxi-default.config @@ -3224,8 +3224,8 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # CONFIG_ACCESSIBILITY is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_HCTOSYS=n +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-sunxi-dev.config b/config/linux-sunxi-dev.config index 2446a4c9f..dfe38bb81 100644 --- a/config/linux-sunxi-dev.config +++ b/config/linux-sunxi-dev.config @@ -3920,8 +3920,8 @@ CONFIG_EDAC_SUPPORT=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_HCTOSYS=n +# CONFIG_RTC_HCTOSYS_DEVICE is not set CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" # CONFIG_RTC_DEBUG is not set diff --git a/config/linux-sunxi-next.config b/config/linux-sunxi-next.config index 26e022422..23ac9f821 100644 --- a/config/linux-sunxi-next.config +++ b/config/linux-sunxi-next.config @@ -4073,8 +4073,8 @@ CONFIG_EDAC_SUPPORT=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_HCTOSYS=n +# CONFIG_RTC_HCTOSYS_DEVICE is not set CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" # CONFIG_RTC_DEBUG is not set diff --git a/config/linux-udoo-default.config b/config/linux-udoo-default.config index dc246b627..4de5cead7 100644 --- a/config/linux-udoo-default.config +++ b/config/linux-udoo-default.config @@ -2933,9 +2933,9 @@ CONFIG_LEDS_TRIGGER_GPIO=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS=n CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-udoo-neo.config b/config/linux-udoo-neo.config index e9d880a81..47773652d 100644 --- a/config/linux-udoo-neo.config +++ b/config/linux-udoo-neo.config @@ -3142,9 +3142,9 @@ CONFIG_LEDS_TRIGGER_GPIO=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS=n CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_HCTOSYS_DEVICE is not set # CONFIG_RTC_DEBUG is not set # diff --git a/config/linux-udoo-next.config b/config/linux-udoo-next.config index eff8b53f6..e268035fe 100644 --- a/config/linux-udoo-next.config +++ b/config/linux-udoo-next.config @@ -3876,8 +3876,8 @@ CONFIG_EDAC_SUPPORT=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_HCTOSYS=n +# CONFIG_RTC_HCTOSYS_DEVICE is not set CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" # CONFIG_RTC_DEBUG is not set diff --git a/debootstrap.sh b/debootstrap.sh index 0fcc6b26d..ece8e9975 100644 --- a/debootstrap.sh +++ b/debootstrap.sh @@ -92,13 +92,7 @@ fi if [ ! -f "$DEST/cache/rootfs/$RELEASE.tgz" ]; then # debootstrap base system -if [[ $RELEASE == "jessie" && $SYSTEMD == "no" ]]; then sysvinit=",sysvinit-core"; fi -debootstrap --include=openssh-server,debconf-utils$sysvinit --arch=armhf --foreign $RELEASE $DEST/cache/sdcard/ | dialog --backtitle "$backtitle" --title "Debootstrap $DISTRIBUTION $RELEASE base system to image template ..." --progressbox 20 70 - -# remove systemd default load. It's installed and can be used with kernel parameter -if [[ $RELEASE == "jessie" && $SYSTEMD == "no" ]]; then -sed -i -e 's/systemd-sysv //g' $DEST/cache/sdcard/debootstrap/required -fi +debootstrap --include=openssh-server,debconf-utils --arch=armhf --foreign $RELEASE $DEST/cache/sdcard/ | dialog --backtitle "$backtitle" --title "Debootstrap $DISTRIBUTION $RELEASE base system to image template ..." --progressbox 20 70 # we need emulator for second stage cp /usr/bin/qemu-arm-static $DEST/cache/sdcard/usr/bin/ @@ -137,7 +131,7 @@ device-tree-compiler dosfstools evtest figlet fbset fping git haveged hddtemp hd iperf ir-keytable iotop iozone3 iw less libbluetooth-dev libbluetooth3 libtool libwrap0-dev libfuse2 libssl-dev lirc lsof makedev \ module-init-tools mtp-tools nano ntfs-3g ntp parted pkg-config pciutils pv python-smbus rfkill rsync screen stress sudo subversion \ sysfsutils toilet u-boot-tools unattended-upgrades unzip usbutils vlan wireless-tools weather-util weather-util-data wget \ -wpasupplicant iptables dvb-apps libdigest-sha-perl libproc-processtable-perl w-scan apt-transport-https sysbench libusb-dev dialog" +wpasupplicant iptables dvb-apps libdigest-sha-perl libproc-processtable-perl w-scan apt-transport-https sysbench libusb-dev dialog fake-hwclock" # generate locales and install packets display_alert "Install locales" "$DEST_LANG" "info" diff --git a/scripts/armhwinfo b/scripts/armhwinfo index 6e0363660..8ab08156a 100644 --- a/scripts/armhwinfo +++ b/scripts/armhwinfo @@ -29,16 +29,6 @@ case "$1" in start) # ARM -# fix for eth0 no brought up -if [ "$SERVER_IP" == "" ]; then -echo -e "[\e[0;32m ok \x1B[0m] Fixing RTC and reloading eth0" -date -s "2015-01-01 10:00:00" > /dev/null 2>&1 -hwclock -w -ifdown eth0 > /dev/null 2>&1 -ifup eth0 > /dev/null 2>&1 -fi - - for i in $( lsblk -idn -o NAME ); do ROTATE=$(cat /sys/block/$i/queue/rotational)