From 08d1155752355e36443d15316650881e84ad187e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 14 Feb 2015 21:56:35 +0100 Subject: [PATCH 1/4] systemd: Enable the hardware watchdog for the IDU as well The built-in watchdog even allows setting the watchdog interval --- .../systemd/systemd/sysmocom-idu/system.conf | 43 +++++++++++++++++++ recipes-fixes/systemd/systemd_sysmocom.inc | 1 + 2 files changed, 44 insertions(+) create mode 100644 recipes-fixes/systemd/systemd/sysmocom-idu/system.conf diff --git a/recipes-fixes/systemd/systemd/sysmocom-idu/system.conf b/recipes-fixes/systemd/systemd/sysmocom-idu/system.conf new file mode 100644 index 0000000000..ff9ecb874e --- /dev/null +++ b/recipes-fixes/systemd/systemd/sysmocom-idu/system.conf @@ -0,0 +1,43 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# See systemd.conf(5) for details + +[Manager] +#LogLevel=info +#LogTarget=journal-or-kmsg +#LogColor=yes +#LogLocation=no +#DumpCore=yes +#CrashShell=no +#ShowStatus=yes +#CrashChVT=1 +#CPUAffinity=1 2 +#DefaultControllers=cpu +#DefaultStandardOutput=journal +#DefaultStandardError=inherit +#JoinControllers=cpu,cpuacct,cpuset net_cls,net_prio +RuntimeWatchdogSec=60 +ShutdownWatchdogSec=60 +#CapabilityBoundingSet= +#TimerSlackNSec= +#DefaultLimitCPU= +#DefaultLimitFSIZE= +#DefaultLimitDATA= +#DefaultLimitSTACK= +#DefaultLimitCORE= +#DefaultLimitRSS= +#DefaultLimitNOFILE= +#DefaultLimitAS= +#DefaultLimitNPROC= +#DefaultLimitMEMLOCK= +#DefaultLimitLOCKS= +#DefaultLimitSIGPENDING= +#DefaultLimitMSGQUEUE= +#DefaultLimitNICE= +#DefaultLimitRTPRIO= +#DefaultLimitRTTIME= diff --git a/recipes-fixes/systemd/systemd_sysmocom.inc b/recipes-fixes/systemd/systemd_sysmocom.inc index ba573c7839..89720e92e3 100644 --- a/recipes-fixes/systemd/systemd_sysmocom.inc +++ b/recipes-fixes/systemd/systemd_sysmocom.inc @@ -10,6 +10,7 @@ SRC_URI += "file://journald.conf \ SRC_URI_append_sysmobts-v1 = " file://system.conf" SRC_URI_append_sysmobts-v2 = " file://system.conf" SRC_URI_append_sysmocom-odu = " file://system.conf" +SRC_URI_append_sysmocom-idu = " file://system.conf" # Disable depedency on dbus RDEPENDS_${PN}_remove = "dbus" From a15ce6544e9a018913fb94bc71c9876c603644d5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 14 Feb 2015 22:00:08 +0100 Subject: [PATCH 2/4] initramfs-live-install: Reboot on panic after 60 seconds Reboot the machine after a panic. Related: SYS#1151 --- recipes-core/initrdscripts/files/init-install.sh | 2 +- recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes-core/initrdscripts/files/init-install.sh b/recipes-core/initrdscripts/files/init-install.sh index 4b8919b869..6c22174d30 100644 --- a/recipes-core/initrdscripts/files/init-install.sh +++ b/recipes-core/initrdscripts/files/init-install.sh @@ -183,7 +183,7 @@ if [ -f /etc/grub.d/40_custom ] ; then sed -i "s/__VIDEO_MODE__/$kernel_cmdline_video_mode/g" $GRUBCFG sed -i "s/__VGA_MODE__/$kernel_cmdline_vga_mode/g" $GRUBCFG sed -i "s/__CONSOLE__/$kernel_cmdline_console/g" $GRUBCFG - sed -i "s/quiet/net.ifnames=0 quiet/g" $GRUBCFG + sed -i "s/quiet/net.ifnames=0 panic=60 quiet/g" $GRUBCFG sed -i "s/rw/ro/g" $GRUBCFG sed -i "/#/d" $GRUBCFG sed -i "/exec tail/d" $GRUBCFG diff --git a/recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc b/recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc index 9ce47b14f6..107dfd3430 100644 --- a/recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc +++ b/recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc @@ -1,4 +1,6 @@ SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" FILESEXTRAPATHS_prepend := "${SYSMOCOM}/files:" +PRINC = "1" + RDEPENDS_${PN} += "e2fsprogs-e2fsck" From 846cc6b9ab58c3c6b9f1650b9c055a04d5a7792c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 14 Feb 2015 23:33:47 +0100 Subject: [PATCH 3/4] gpsdate: Add an option to not fork and use it Fixes: SYS#1152 --- recipes-extra/gpsdate/gpsdate_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-extra/gpsdate/gpsdate_git.bb b/recipes-extra/gpsdate/gpsdate_git.bb index 8eadb94dec..9e3f7df81c 100644 --- a/recipes-extra/gpsdate/gpsdate_git.bb +++ b/recipes-extra/gpsdate/gpsdate_git.bb @@ -12,7 +12,7 @@ PV = "0.2+git${SRCPV}" SRC_URI = "git://git.sysmocom.de/gpsdate.git;branch=master \ file://gpsdate.default \ " -SRCREV = "2326eee7898f9a8484d92d31cb16fca14db4a874" +SRCREV = "cb50b4bb9fd30ed64a8ea5791126f8ce7518ba3a" S = "${WORKDIR}/git" INITSCRIPT_NAME = "gpsdate" From ba75c10df7fa49e8acae27df8ee7cdaf761f725a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 15 Feb 2015 00:41:02 +0100 Subject: [PATCH 4/4] sispmctl: Add utility to control the power outlet strip Fixes: SYS#1134 --- recipes-extra/sispmctl/files/modernize.patch | 47 ++++++++++++++++++++ recipes-extra/sispmctl/sispmctl_3.1.bb | 15 +++++++ 2 files changed, 62 insertions(+) create mode 100644 recipes-extra/sispmctl/files/modernize.patch create mode 100644 recipes-extra/sispmctl/sispmctl_3.1.bb diff --git a/recipes-extra/sispmctl/files/modernize.patch b/recipes-extra/sispmctl/files/modernize.patch new file mode 100644 index 0000000000..5e258ccb00 --- /dev/null +++ b/recipes-extra/sispmctl/files/modernize.patch @@ -0,0 +1,47 @@ +Index: sispmctl-3.1/configure.in +=================================================================== +--- sispmctl-3.1.orig/configure.in ++++ sispmctl-3.1/configure.in +@@ -25,29 +25,7 @@ AC_SUBST(BINDADDR) + + + # Checks for libraries. +-dnl check for libusb-config +-AC_PATH_PROG(HAVELIBUSB, libusb-config, $PATH) +- +-if test -e "$HAVELIBUSB"; then +- dnl LIBUSB_CFLAGS=`$HAVELIBUSB --cflags` +- LIBUSB_LIBS=`$HAVELIBUSB --libs` +- CFLAGS="$CFLAGS $LIBUSB_CFLAGS" +- LIBS="$LIBS $LIBUSB_LIBS" +-else +- AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation. Version >=0.1.7]) +-fi +- +-dnl check for version of libusb +-AC_MSG_CHECKING([if libusb version is >= 0.1.9]) +-libusb_version_needed="1009" +-libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'` +- +-if test $libusb_version -lt $libusb_version_needed; then +- AC_MSG_RESULT(no) +- AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.9.]) +-else +- AC_MSG_RESULT(yes) +-fi ++PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.9) + + # Checks for header files. + AC_HEADER_STDC +Index: sispmctl-3.1/src/Makefile.am +=================================================================== +--- sispmctl-3.1.orig/src/Makefile.am ++++ sispmctl-3.1/src/Makefile.am +@@ -4,6 +4,7 @@ EXTRA_DIST = web1/index.html web1/off1. + web2/index.html web2/off1.html web2/off3.html web2/on1.html web2/on3.html web2/style.css web2/logo.png web2/off2.html web2/off4.html web2/on2.html web2/on4.html web2/off.gif web2/on.gif web2/onoff.gif\ + sispmctl.1 + ++sispmctl_LDADD = $(LIBUSB_LIBS) + if WEBLESSCOND + AM_CFLAGS=-Wall -DWEBLESS=@WEBLESS@ + diff --git a/recipes-extra/sispmctl/sispmctl_3.1.bb b/recipes-extra/sispmctl/sispmctl_3.1.bb new file mode 100644 index 0000000000..9e734b580f --- /dev/null +++ b/recipes-extra/sispmctl/sispmctl_3.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "Control power outlet strip using USB" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://LICENCE;md5=393a5ca445f6965873eca0259a17f833" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}.tar.gz \ + file://modernize.patch" + +SRC_URI[md5sum] = "24693cae30d77c957f34cfb2c8159661" +SRC_URI[sha256sum] = "e9a99cc81ef0a93f3484e5093efd14d93cc967221fcd22c151f0bea32eb91da7" + + +EXTRA_OECONF = "--enable-webless" +DEPENDS = "libusb pkgconfig" + +inherit autotools