From 09b313f8602b0129c16689df7371b2a52cb8db40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Sun, 17 Jun 2018 08:23:40 +0000 Subject: [PATCH] Added timeouts for our new services, bugfix for packaging --- .../bsp/common/etc/default/armbian-zram-config.dpkg-dist | 3 ++- .../lib/systemd/system/armbian-firstrun-config.service | 1 + .../bsp/common/lib/systemd/system/armbian-firstrun.service | 5 +++-- .../bsp/common/lib/systemd/system/armbian-ramlog.service | 1 + .../common/lib/systemd/system/armbian-zram-config.service | 2 ++ .../bsp/common/usr/lib/armbian/armbian-hardware-optimization | 0 patch/kernel/s5p6818-next/packaging-4.x-next.patch | 4 ++-- 7 files changed, 11 insertions(+), 5 deletions(-) mode change 100644 => 100755 packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization diff --git a/packages/bsp/common/etc/default/armbian-zram-config.dpkg-dist b/packages/bsp/common/etc/default/armbian-zram-config.dpkg-dist index 0460005295..2ebcbe9224 100644 --- a/packages/bsp/common/etc/default/armbian-zram-config.dpkg-dist +++ b/packages/bsp/common/etc/default/armbian-zram-config.dpkg-dist @@ -4,4 +4,5 @@ ENABLED=true # # size of the partition for ramlog in megabytes -SIZE=40 +# 50 is minimum allowed size for BTRFS partition +SIZE=50 diff --git a/packages/bsp/common/lib/systemd/system/armbian-firstrun-config.service b/packages/bsp/common/lib/systemd/system/armbian-firstrun-config.service index fb1ae612d0..1ab7895ece 100644 --- a/packages/bsp/common/lib/systemd/system/armbian-firstrun-config.service +++ b/packages/bsp/common/lib/systemd/system/armbian-firstrun-config.service @@ -12,6 +12,7 @@ ConditionPathExists=/root/.not_logged_in_yet Type=oneshot RemainAfterExit=yes ExecStart=/usr/lib/armbian/armbian-firstrun-config +TimeoutStartSec=2min [Install] WantedBy=multi-user.target diff --git a/packages/bsp/common/lib/systemd/system/armbian-firstrun.service b/packages/bsp/common/lib/systemd/system/armbian-firstrun.service index b2200bc153..64a390950b 100644 --- a/packages/bsp/common/lib/systemd/system/armbian-firstrun.service +++ b/packages/bsp/common/lib/systemd/system/armbian-firstrun.service @@ -1,6 +1,5 @@ # Armbian firstrun service -# Creates the swap file, regenerates the SSH keys, -# performs additional first run tweaks +# Regenerates the SSH keys and performs additional first run tweaks # This service will run in parallel with other services [Unit] @@ -11,6 +10,8 @@ Before=getty.target system-getty.slice Type=simple RemainAfterExit=yes ExecStart=/usr/lib/armbian/armbian-firstrun start +TimeoutStartSec=2min [Install] WantedBy=multi-user.target + diff --git a/packages/bsp/common/lib/systemd/system/armbian-ramlog.service b/packages/bsp/common/lib/systemd/system/armbian-ramlog.service index 214ceed831..a5b50fecb9 100644 --- a/packages/bsp/common/lib/systemd/system/armbian-ramlog.service +++ b/packages/bsp/common/lib/systemd/system/armbian-ramlog.service @@ -15,6 +15,7 @@ ExecStart=/usr/lib/armbian/armbian-ramlog start ExecStop=/usr/lib/armbian/armbian-ramlog stop ExecReload=/usr/lib/armbian/armbian-ramlog write RemainAfterExit=yes +TimeoutStartSec=2min [Install] WantedBy=sysinit.target diff --git a/packages/bsp/common/lib/systemd/system/armbian-zram-config.service b/packages/bsp/common/lib/systemd/system/armbian-zram-config.service index 15be62e2c0..97e6d7446f 100644 --- a/packages/bsp/common/lib/systemd/system/armbian-zram-config.service +++ b/packages/bsp/common/lib/systemd/system/armbian-zram-config.service @@ -1,5 +1,6 @@ # Armbian ZRAM configuration service # Create 5 compressed block devices +# This service may block the boot process for up to 2 minutes [Unit] Description=Armbian ZRAM config @@ -15,6 +16,7 @@ Type=oneshot ExecStart=/usr/lib/armbian/armbian-zram-config start ExecStop=/usr/lib/armbian/armbian-zram-config stop RemainAfterExit=yes +TimeoutStartSec=2min [Install] WantedBy=sysinit.target diff --git a/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization b/packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization old mode 100644 new mode 100755 diff --git a/patch/kernel/s5p6818-next/packaging-4.x-next.patch b/patch/kernel/s5p6818-next/packaging-4.x-next.patch index 3034a040a0..c0adf56963 100644 --- a/patch/kernel/s5p6818-next/packaging-4.x-next.patch +++ b/patch/kernel/s5p6818-next/packaging-4.x-next.patch @@ -147,10 +147,10 @@ index 0bc87473..cf26d2c7 100755 # Try to determine maintainer and email values if [ -n "$DEBEMAIL" ]; then email=$DEBEMAIL -@@ -314,6 +397,7 @@ fi +@@ -397,6 +397,7 @@ fi # Build kernel header package (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles" - (cd $srctree; find arch/*/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles" + (cd $srctree; find arch/*/include include scripts -type f -o -type l) >> "$objtree/debian/hdrsrcfiles" +(cd $srctree; find security/*/include -type f) >> "$objtree/debian/hdrsrcfiles" (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles" (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"