From 29294fa7d16835dfa04e105b19e5ea63ee66f372 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 20 Nov 2014 17:40:13 +0100 Subject: [PATCH 01/22] linux-sysmocom: Build the watchdog into the kernel We want to enable the watchdog in the bootloader already and for this to be failsafe we need to have a kernel that can boot and get ethernet without any additional modules. Now systemd would not be able to trigger the watchdog and the system would reboot within 60 seconds. I am not sure how the kernel upgrade will go and we need to try this. Related: SYS#374 --- conf/machine/include/sysmobts.inc | 1 - recipes-bsp/linux/files/sysmobts-v1/defconfig | 2 +- recipes-bsp/linux/files/sysmobts-v2/defconfig | 2 +- recipes-bsp/linux/linux-sysmocom_3.2.bb | 3 +-- recipes-bsp/linux/linux-sysmocom_git.bb | 5 ++--- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/conf/machine/include/sysmobts.inc b/conf/machine/include/sysmobts.inc index 4de200d05d..ba7261db07 100644 --- a/conf/machine/include/sysmobts.inc +++ b/conf/machine/include/sysmobts.inc @@ -22,7 +22,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\ busybox-ifplugd \ ${@['watchdog', ''][d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd']} \ kernel \ - kernel-module-davinci-wdt \ kernel-module-dspdl \ kernel-module-dspdl-dm644x \ kernel-module-fpgadl \ diff --git a/recipes-bsp/linux/files/sysmobts-v1/defconfig b/recipes-bsp/linux/files/sysmobts-v1/defconfig index d37e61785b..4fc8450418 100644 --- a/recipes-bsp/linux/files/sysmobts-v1/defconfig +++ b/recipes-bsp/linux/files/sysmobts-v1/defconfig @@ -1287,7 +1287,7 @@ CONFIG_WATCHDOG=y # # CONFIG_SOFT_WATCHDOG is not set # CONFIG_DW_WATCHDOG is not set -CONFIG_DAVINCI_WATCHDOG=m +CONFIG_DAVINCI_WATCHDOG=y # CONFIG_MAX63XX_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y diff --git a/recipes-bsp/linux/files/sysmobts-v2/defconfig b/recipes-bsp/linux/files/sysmobts-v2/defconfig index 0e0412bd51..bbe942c131 100644 --- a/recipes-bsp/linux/files/sysmobts-v2/defconfig +++ b/recipes-bsp/linux/files/sysmobts-v2/defconfig @@ -1300,7 +1300,7 @@ CONFIG_WATCHDOG=y # # CONFIG_SOFT_WATCHDOG is not set # CONFIG_DW_WATCHDOG is not set -CONFIG_DAVINCI_WATCHDOG=m +CONFIG_DAVINCI_WATCHDOG=y # CONFIG_MAX63XX_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y diff --git a/recipes-bsp/linux/linux-sysmocom_3.2.bb b/recipes-bsp/linux/linux-sysmocom_3.2.bb index 4dd41f07f3..80776a7c42 100644 --- a/recipes-bsp/linux/linux-sysmocom_3.2.bb +++ b/recipes-bsp/linux/linux-sysmocom_3.2.bb @@ -19,7 +19,7 @@ SRCREV_sysmocom-odu = "aadf22be50ac2abb2a9437b9ad3bba4ccdca540b" BRANCH_sysmocom-odu = "sob-odu/linux-3.2.63" LINUX_VERSION_sysmocom-odu = "3.2.63" -PR = "r37" +PR = "r38" PV = "${LINUX_VERSION}+git${SRCPV}" SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=${BRANCH} \ @@ -42,7 +42,6 @@ do_configure() { # autoload defaults (alphabetically sorted) module_autoload_davinci_mmc = "davinci_mmc" -module_autoload_davinci_wdt = "davinci_wdt" module_autoload_dspdl_dm644x = "dspdl_dm644x" module_autoload_fpgadl_par = "fpgadl_par" module_autoload_leds-gpio = "leds-gpio" diff --git a/recipes-bsp/linux/linux-sysmocom_git.bb b/recipes-bsp/linux/linux-sysmocom_git.bb index 77ce7f8bc3..3101ecb46e 100644 --- a/recipes-bsp/linux/linux-sysmocom_git.bb +++ b/recipes-bsp/linux/linux-sysmocom_git.bb @@ -15,7 +15,7 @@ BTS_FIRMWARE_NAME_sysmobts-v2 = "sysmobts-v2" SRCREV = "9610e792ffde7fb2599d19ca6d2a03230f2043c6" -PR = "r37" +PR = "r38" PV = "${LINUX_VERSION}+git${SRCPV}" SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=linux-3.10.50 \ @@ -41,7 +41,6 @@ do_configure() { # autoload defaults (alphabetically sorted) module_autoload_davinci_mmc = "davinci_mmc" -module_autoload_davinci_wdt = "davinci_wdt" module_autoload_dspdl_dm644x = "dspdl_dm644x" module_autoload_fpgadl_par = "fpgadl_par" module_autoload_leds-gpio = "leds-gpio" @@ -49,7 +48,7 @@ module_autoload_mmc_block = "mmc_block" module_autoload_msgqueue = "msgqueue" module_autoload_rtfifo = "rtfifo" -KERNEL_MODULE_PROBECONF_append = "davinci_mmc davinci_wdt dspdl_dm644x fpgadl_par leds-gpio mmc_block msgqueue rtfifo" +KERNEL_MODULE_PROBECONF_append = "davinci_mmc dspdl_dm644x fpgadl_par leds-gpio mmc_block msgqueue rtfifo" # module configs (alphabetically sorted) module_conf_dspdl_dm644x = "options dspdl_dm644x fw_name=${BTS_FIRMWARE_NAME}.out debug=0" From 164cd1af2b796aa2bae0184691f6e4879c04838e Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Tue, 18 Nov 2014 19:37:05 +0100 Subject: [PATCH 02/22] static-devicenames-odu: add stable device names for the gsm-modems on the odu Fixes: SYS#732 [hfreyther: I removed the MACHINE_ESSENTIAL_EXTRA_RDEPENDS as applications that use the symlinks should rdepend on the package] [hfreyther: Changed mismatch of tabs/spaces] --- .../files/persistens-serial-odu.rules | 23 +++++++++++++++++++ .../static-devicenames-odu_1.bb | 14 +++++++++++ 2 files changed, 37 insertions(+) create mode 100644 recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules create mode 100644 recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb diff --git a/recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules b/recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules new file mode 100644 index 0000000000..d942af923f --- /dev/null +++ b/recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules @@ -0,0 +1,23 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="persistent_serial_odu_end" +SUBSYSTEM!="tty", GOTO="persistent_serial_odu_end" +KERNEL!="ttyACM[0-9]*", GOTO="persistent_serial_odu_end" + +KERNELS=="1-1.2:1.0", SYMLINK+="ttyModemScan0" +KERNELS=="1-1.2:1.2", SYMLINK+="ttyModemScan1" +KERNELS=="1-1.2:1.4", SYMLINK+="ttyModemScan2" +KERNELS=="1-1.2:1.6", SYMLINK+="ttyModemScan3" +KERNELS=="1-1.2:1.8", SYMLINK+="ttyModemScan4" +KERNELS=="1-1.2:1.10", SYMLINK+="ttyModemScan5" +KERNELS=="1-1.2:1.12", SYMLINK+="ttyModemScan6" + +KERNELS=="1-1.3:1.0", SYMLINK+="ttyModemUplink0" +KERNELS=="1-1.3:1.2", SYMLINK+="ttyModemUplink1" +KERNELS=="1-1.3:1.4", SYMLINK+="ttyModemUplink2" +KERNELS=="1-1.3:1.6", SYMLINK+="ttyModemUplink3" +KERNELS=="1-1.3:1.8", SYMLINK+="ttyModemUplink4" +KERNELS=="1-1.3:1.10", SYMLINK+="ttyModemUplink5" +KERNELS=="1-1.3:1.12", SYMLINK+="ttyModemUplink6" + +LABEL="persistent_serial_odu_end" diff --git a/recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb b/recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb new file mode 100644 index 0000000000..a6d235940c --- /dev/null +++ b/recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Udev helper script for static device names on the sysmocom odu" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://persistens-serial-odu.rules" + +PACKAGES = "${PN}" +FILES_${PN} = "${BASELIB}/udev/rules.d/*" +RDPEPENDS_${PN} = "udev" + +do_install() { + install -d ${D}/${BASELIB}/udev/rules.d + install -m 0644 ${WORKDIR}/persistens-serial-odu.rules ${D}/${BASELIB}/udev/rules.d/70-persistens-serial-odu.rules +} From 7ff5c445d1e9e8a8a64b2756c022b1b5ecbf51b4 Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Tue, 28 Oct 2014 19:39:53 +0100 Subject: [PATCH 03/22] apu: add networking support the new apu * split out rtl-nic firmware from the big linux-firmware package [hfreyther: For whatever reasons the NIC works without additional firmware as well. I couldn't see in the driver source when that is the case and which features are missing] --- conf/machine/sysmocom-bsc.conf | 2 +- recipes-bsp/linux/linux-sysmocom/sysmocom-bsc/defconfig | 5 +++-- yocto-shared/linux-firmware_git.bbappend | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 yocto-shared/linux-firmware_git.bbappend diff --git a/conf/machine/sysmocom-bsc.conf b/conf/machine/sysmocom-bsc.conf index 49b5d30a58..c7d81b7dd6 100644 --- a/conf/machine/sysmocom-bsc.conf +++ b/conf/machine/sysmocom-bsc.conf @@ -34,4 +34,4 @@ GLIBC_EXTRA_OECONF = "--with-tls" #MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d" MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\ - busybox-ifplugd " + busybox-ifplugd linux-firmware-rtl-nic " diff --git a/recipes-bsp/linux/linux-sysmocom/sysmocom-bsc/defconfig b/recipes-bsp/linux/linux-sysmocom/sysmocom-bsc/defconfig index 4f4ed4cc93..4b69fb7a3d 100644 --- a/recipes-bsp/linux/linux-sysmocom/sysmocom-bsc/defconfig +++ b/recipes-bsp/linux/linux-sysmocom/sysmocom-bsc/defconfig @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 3.10.40 Kernel Configuration +# Linux/x86 3.10.50 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -270,6 +270,7 @@ CONFIG_DEFAULT_CFQ=y # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="cfq" CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_FREEZER=y @@ -1433,7 +1434,7 @@ CONFIG_NET_VENDOR_QLOGIC=y CONFIG_NET_VENDOR_REALTEK=y # CONFIG_8139CP is not set # CONFIG_8139TOO is not set -# CONFIG_R8169 is not set +CONFIG_R8169=y CONFIG_NET_VENDOR_RDC=y # CONFIG_R6040 is not set CONFIG_NET_VENDOR_SEEQ=y diff --git a/yocto-shared/linux-firmware_git.bbappend b/yocto-shared/linux-firmware_git.bbappend new file mode 100644 index 0000000000..6e6cee5790 --- /dev/null +++ b/yocto-shared/linux-firmware_git.bbappend @@ -0,0 +1,5 @@ +PACKAGES_prepend = "${PN}-rtl-nic " + +RDEPENDS_${PN}-rtl-nic += "${PN}-rtl-license" + +FILES_${PN}-rtl-nic = "/lib/firmware/rtl_nic/*.fw" From e7ed2b458e78b8a63f0f2661a21b0ddfa1de730d Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 20 Nov 2014 20:04:32 +0100 Subject: [PATCH 04/22] barebox-sysmocom: Update with password propmpt Change the name of the config, bump the SRCREV. The new default password is "odu-stop". Fixes: SYS#487 --- recipes-sysmobts/barebox/barebox-sysmocom_201407.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-sysmobts/barebox/barebox-sysmocom_201407.bb b/recipes-sysmobts/barebox/barebox-sysmocom_201407.bb index 0a50f4419c..5281a78487 100644 --- a/recipes-sysmobts/barebox/barebox-sysmocom_201407.bb +++ b/recipes-sysmobts/barebox/barebox-sysmocom_201407.bb @@ -1,5 +1,5 @@ SRC_URI = "git://git.sysmocom.de/barebox;protocol=git;branch=master" -SRCREV = "de2b004a2511c4aaeed64d0a9f5bf14d184d1560" +SRCREV = "1a06d18910d94e77590838bcc6ad34acd11fd588" PR = "r2" DEPENDS = "${PN}-mlo" @@ -13,8 +13,8 @@ BAREBOX_IMAGE_SYMLINK ?= "barebox-${MACHINE}.img" require barebox.inc do_pre_configure() { - cp ${S}/arch/arm/configs/am335x_defconfig_odu ${S}/.config - oe_runmake oldconfig + cp ${S}/arch/arm/configs/am335x_odu_defconfig ${S}/.config + oe_runmake oldconfig } do_deploy_append() { From dbb3fa65cd85ac5ebd4340ed1e9509753528a399 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 20 Nov 2014 21:51:33 +0100 Subject: [PATCH 05/22] barebox-sysmocom: Upgrade to send LLDP frame during boot One might need to erase the environment but with a default environment barebox will now send a LLDP during boot up. This way we can see if a device is on a local link or not. Fixes: SYS#488 --- recipes-sysmobts/barebox/barebox-sysmocom_201407.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sysmobts/barebox/barebox-sysmocom_201407.bb b/recipes-sysmobts/barebox/barebox-sysmocom_201407.bb index 5281a78487..cd394931b9 100644 --- a/recipes-sysmobts/barebox/barebox-sysmocom_201407.bb +++ b/recipes-sysmobts/barebox/barebox-sysmocom_201407.bb @@ -1,5 +1,5 @@ SRC_URI = "git://git.sysmocom.de/barebox;protocol=git;branch=master" -SRCREV = "1a06d18910d94e77590838bcc6ad34acd11fd588" +SRCREV = "03773b872987fb16725f2eba6536cc87f000eb4d" PR = "r2" DEPENDS = "${PN}-mlo" From 812eceaea35c9f0ca6d85dbc6147a74a9834ab7a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 21 Nov 2014 23:42:42 +0100 Subject: [PATCH 06/22] openvpn: Add OpenVPN 2.3.4 recipe from upstream OpenEmbedded We should use a more recent version of the OpenVPN client. Import it from the meta-networking layer like we did before. The sysvinit script has just minor whitespace differences and wasn't imported. We need to test opkg upgrades of OpenVPN through the VPN. We don't want to kill the tunnel on such upgrade. --- recipes-extra/openvpn/openvpn_2.3.4.bb | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 recipes-extra/openvpn/openvpn_2.3.4.bb diff --git a/recipes-extra/openvpn/openvpn_2.3.4.bb b/recipes-extra/openvpn/openvpn_2.3.4.bb new file mode 100644 index 0000000000..3e52c81606 --- /dev/null +++ b/recipes-extra/openvpn/openvpn_2.3.4.bb @@ -0,0 +1,37 @@ +SUMMARY = "A full-featured SSL VPN solution via tun device." +HOMEPAGE = "http://openvpn.sourceforge.net" +SECTION = "console/network" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=5aac200199fde47501876cba7263cb0c" +DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" + +inherit autotools + +SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \ + file://openvpn" + +SRC_URI[md5sum] = "04d47237907faabe9d046970ffe44b2e" +SRC_URI[sha256sum] = "af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a" + +CFLAGS += "-fno-inline" + +# I want openvpn to be able to read password from file (hrw) +EXTRA_OECONF += "--enable-password-save --enable-iproute2" +EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}" + +# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host. +EXTRA_OECONF += "IPROUTE=/sbin/ip" + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -d ${D}/${sysconfdir}/openvpn + install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d +} + +RRECOMMENDS_${PN} = "kernel-module-tun" + +FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug" + + +# We need to test opkg upgrade of OpenVPN through the OpenVPN first +DEFAULT_PREFERENCE = "-1" From 6909960948127bc1f344e62039bd6795543b5b9e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 21 Nov 2014 23:54:02 +0100 Subject: [PATCH 07/22] openvpn: Use the debian generator and service files for OpenVPN We want to use systemd for managing the lifetime of OpenVPN. Take the debian generator (which should work with busybox ash) and the openvpn.service (to inhibit the sysvinit script) and the target file and install it. On systems that have ran "update-rc.d openvpn defaults" one need to manually execute a systemctl enable openvpn.service. This is not done through a post-inst script and I am not sure if we should do it. This means there is a danger of ending with a unit that doesn't start OpenVPN automatically after upgrade! The scripts/packages have not been tested on a device yet. --- .../openvpn/openvpn/openvpn-generator | 40 +++++++++++++++++++ recipes-extra/openvpn/openvpn/openvpn.service | 18 +++++++++ .../openvpn/openvpn/openvpn@.service | 15 +++++++ recipes-extra/openvpn/openvpn_2.3.4.bb | 16 +++++++- 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100755 recipes-extra/openvpn/openvpn/openvpn-generator create mode 100644 recipes-extra/openvpn/openvpn/openvpn.service create mode 100644 recipes-extra/openvpn/openvpn/openvpn@.service diff --git a/recipes-extra/openvpn/openvpn/openvpn-generator b/recipes-extra/openvpn/openvpn/openvpn-generator new file mode 100755 index 0000000000..d6ac1aafb1 --- /dev/null +++ b/recipes-extra/openvpn/openvpn/openvpn-generator @@ -0,0 +1,40 @@ +#!/bin/sh + +# This systemd generator creates dependency symlinks that make all OpenVPN +# tunnels listed in /etc/default/openvpn's AUTOSTART be started/stopped/reloaded +# when openvpn.service is started/stopped/reloaded. + +set -eu + +GENDIR="$1" +WANTDIR="$1/openvpn.service.wants" +SERVICEFILE="/lib/systemd/system/openvpn@.service" +AUTOSTART="all" +CONFIG_DIR=/etc/openvpn + +mkdir -p "$WANTDIR" + +if test -e /etc/default/openvpn ; then + . /etc/default/openvpn +fi + +# No VPNs automatically started +if test "x$AUTOSTART" = "xnone" ; then + exit 0 +fi + +if test "x$AUTOSTART" = "xall" -o -z "$AUTOSTART" ; then + for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do + NAME=${CONFIG%%.conf} + ln -s "$SERVICEFILE" "$WANTDIR/openvpn@$NAME.service" + done +else + for NAME in $AUTOSTART ; do + if test -e $CONFIG_DIR/$NAME.conf ; then + ln -s "$SERVICEFILE" "$WANTDIR/openvpn@$NAME.service" + fi + done +fi + +exit 0 + diff --git a/recipes-extra/openvpn/openvpn/openvpn.service b/recipes-extra/openvpn/openvpn/openvpn.service new file mode 100644 index 0000000000..0075cc4434 --- /dev/null +++ b/recipes-extra/openvpn/openvpn/openvpn.service @@ -0,0 +1,18 @@ +# This service is actually a systemd target, +# but we are using a service since targets cannot be reloaded. + +[Unit] +Description=OpenVPN service +After=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/bin/true +ExecReload=/bin/true +WorkingDirectory=/etc/openvpn + +[Install] +WantedBy=multi-user.target + + diff --git a/recipes-extra/openvpn/openvpn/openvpn@.service b/recipes-extra/openvpn/openvpn/openvpn@.service new file mode 100644 index 0000000000..be47429467 --- /dev/null +++ b/recipes-extra/openvpn/openvpn/openvpn@.service @@ -0,0 +1,15 @@ +[Unit] +Description=OpenVPN connection to %i +PartOf=openvpn.service +ReloadPropagatedFrom=openvpn.service + +[Service] +Type=forking +ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf +ExecReload=/bin/kill -HUP $MAINPID +WorkingDirectory=/etc/openvpn + +[Install] +WantedBy=multi-user.target + + diff --git a/recipes-extra/openvpn/openvpn_2.3.4.bb b/recipes-extra/openvpn/openvpn_2.3.4.bb index 3e52c81606..e83c244699 100644 --- a/recipes-extra/openvpn/openvpn_2.3.4.bb +++ b/recipes-extra/openvpn/openvpn_2.3.4.bb @@ -8,7 +8,10 @@ DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libp inherit autotools SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \ - file://openvpn" + file://openvpn \ + file://openvpn-generator \ + file://openvpn@.service \ + file://openvpn.service" SRC_URI[md5sum] = "04d47237907faabe9d046970ffe44b2e" SRC_URI[sha256sum] = "af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a" @@ -26,12 +29,23 @@ do_install_append() { install -d ${D}/${sysconfdir}/init.d install -d ${D}/${sysconfdir}/openvpn install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d + + # systemd files + install -d ${D}${systemd_unitdir}/system + install -d ${D}${systemd_unitdir}/system-generators + install -m 0644 ${WORKDIR}/openvpn.service ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/openvpn@.service ${D}${systemd_unitdir}/system + install -m 0755 ${WORKDIR}/openvpn-generator ${D}${systemd_unitdir}/system-generators } RRECOMMENDS_${PN} = "kernel-module-tun" FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug" +# Don't go through the systemd.bbclass as we do not want magic to happen +# during install and upgrade. Simply ship the files. +FILES_${PN} += "${systemd_unitdir}" + # We need to test opkg upgrade of OpenVPN through the OpenVPN first DEFAULT_PREFERENCE = "-1" From f7004f33151e2151933eac610672e770019b4d8e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 22 Nov 2014 00:05:29 +0100 Subject: [PATCH 08/22] openvpn: Always restart the OpenVPN service We want the OpenVPN service to be always restarted. I am not sure how "forking" and restart will work together but we will need to give it a try. --- recipes-extra/openvpn/openvpn/openvpn@.service | 2 ++ recipes-extra/openvpn/openvpn_2.3.4.bb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/recipes-extra/openvpn/openvpn/openvpn@.service b/recipes-extra/openvpn/openvpn/openvpn@.service index be47429467..e25199389b 100644 --- a/recipes-extra/openvpn/openvpn/openvpn@.service +++ b/recipes-extra/openvpn/openvpn/openvpn@.service @@ -8,6 +8,8 @@ Type=forking ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf ExecReload=/bin/kill -HUP $MAINPID WorkingDirectory=/etc/openvpn +Restart=always +RestartSec=2 [Install] WantedBy=multi-user.target diff --git a/recipes-extra/openvpn/openvpn_2.3.4.bb b/recipes-extra/openvpn/openvpn_2.3.4.bb index e83c244699..b6465382da 100644 --- a/recipes-extra/openvpn/openvpn_2.3.4.bb +++ b/recipes-extra/openvpn/openvpn_2.3.4.bb @@ -7,6 +7,8 @@ DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libp inherit autotools +PR = "r1" + SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \ file://openvpn \ file://openvpn-generator \ From 188f5fc60c450215a442b9c6b38ed321add27d52 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 22 Nov 2014 13:54:17 +0100 Subject: [PATCH 09/22] Import from meta-oe to have a spatial enabled sqlite --- .../geos-config-Add-includedir-variable.patch | 39 ++++ recipes-extra/geos/geos.inc | 21 ++ recipes-extra/geos/geos_3.4.2.bb | 6 + recipes-extra/libspatialite/libspatialite.inc | 16 ++ .../fix-the-configure-script-and-freexl.patch | 200 ++++++++++++++++++ .../libspatialite/libspatialite_3.0.1.bb | 9 + recipes-extra/proj/proj_4.8.0.bb | 14 ++ 7 files changed, 305 insertions(+) create mode 100644 recipes-extra/geos/files/geos-config-Add-includedir-variable.patch create mode 100644 recipes-extra/geos/geos.inc create mode 100644 recipes-extra/geos/geos_3.4.2.bb create mode 100644 recipes-extra/libspatialite/libspatialite.inc create mode 100644 recipes-extra/libspatialite/libspatialite/fix-the-configure-script-and-freexl.patch create mode 100644 recipes-extra/libspatialite/libspatialite_3.0.1.bb create mode 100644 recipes-extra/proj/proj_4.8.0.bb diff --git a/recipes-extra/geos/files/geos-config-Add-includedir-variable.patch b/recipes-extra/geos/files/geos-config-Add-includedir-variable.patch new file mode 100644 index 0000000000..645e6f62a5 --- /dev/null +++ b/recipes-extra/geos/files/geos-config-Add-includedir-variable.patch @@ -0,0 +1,39 @@ +From 9d51027c228dafd7db2d0cffca1f0fc695e950fd Mon Sep 17 00:00:00 2001 +From: Otavio Salvador +Date: Mon, 2 Dec 2013 11:33:26 -0200 +Subject: [PATCH] geos-config: Add includedir variable + +This fixes cross-compile as it is easier to mangle the includedir +during sysroot generation. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador +--- + tools/geos-config.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tools/geos-config.in b/tools/geos-config.in +index 9b45b5f..1749892 100644 +--- a/tools/geos-config.in ++++ b/tools/geos-config.in +@@ -1,6 +1,7 @@ + #!/bin/sh + prefix=@prefix@ + exec_prefix=@exec_prefix@ ++includedir=@includedir@ + libdir=@libdir@ + + usage() +@@ -38,7 +39,7 @@ case $1 in + echo @VERSION@ + ;; + --cflags) +- echo -I${prefix}/include ++ echo -I${includedir} + ;; + --libs) + # TODO: make an alias for --clibs +-- +1.7.10.4 + diff --git a/recipes-extra/geos/geos.inc b/recipes-extra/geos/geos.inc new file mode 100644 index 0000000000..2e308b4882 --- /dev/null +++ b/recipes-extra/geos/geos.inc @@ -0,0 +1,21 @@ +DESCRIPTION = "GEOS - Geometry Engine, Open Source" +HOMEPAGE = "http://trac.osgeo.org/geos/" +SECTION = "libs" + +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" + +SRC_URI = "http://download.osgeo.org/geos/geos-${PV}.tar.bz2" + +inherit autotools pkgconfig binconfig + +PACKAGES =+ "geoslib ${PN}-c1" + +DESCRIPTION_${PN}lib = "Geometry engine for Geographic Information Systems - C++ Library" +FILES_${PN}lib += "${libdir}/libgeos-${PV}.so" + +DESCRIPTION_${PN}-c1 = "Geometry engine for Geographic Information Systems - C Library" +FILES_${PN}-c1 += "${libdir}/libgeos_c.so.*" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} += "geoslib ${PN}-c1" diff --git a/recipes-extra/geos/geos_3.4.2.bb b/recipes-extra/geos/geos_3.4.2.bb new file mode 100644 index 0000000000..3a9a028e8f --- /dev/null +++ b/recipes-extra/geos/geos_3.4.2.bb @@ -0,0 +1,6 @@ +require geos.inc + +SRC_URI += "file://geos-config-Add-includedir-variable.patch" + +SRC_URI[md5sum] = "fc5df2d926eb7e67f988a43a92683bae" +SRC_URI[sha256sum] = "15e8bfdf7e29087a957b56ac543ea9a80321481cef4d4f63a7b268953ad26c53" diff --git a/recipes-extra/libspatialite/libspatialite.inc b/recipes-extra/libspatialite/libspatialite.inc new file mode 100644 index 0000000000..c8d7ec1e97 --- /dev/null +++ b/recipes-extra/libspatialite/libspatialite.inc @@ -0,0 +1,16 @@ +DESCRIPTION = "Library extending the SQLite core to support fully fledged Spatial SQL capabilities" +HOMEPAGE = "https://www.gaia-gis.it/fossil/libspatialite/" +SECTION = "libs" +DEPENDS = "proj geos sqlite3" + +INC_PR = "r0" + +LICENSE = "MPLv1.1 GPLv2+ LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0e92e1a36cc384b60f5b31dde0bdd39e" + +SRC_URI = "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${PV}.tar.gz" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-freexl=no" + diff --git a/recipes-extra/libspatialite/libspatialite/fix-the-configure-script-and-freexl.patch b/recipes-extra/libspatialite/libspatialite/fix-the-configure-script-and-freexl.patch new file mode 100644 index 0000000000..0cd0c3f6ac --- /dev/null +++ b/recipes-extra/libspatialite/libspatialite/fix-the-configure-script-and-freexl.patch @@ -0,0 +1,200 @@ +From upstream fossil repo, extracted via git, dropping configure.ac for amalgamation + +From: sandro +Date: Sat, 21 Jan 2012 16:53:28 +0000 +Subject: [PATCH] fixing the ./configure script: --enable-geocallbacks=no is + the new default and fixing some flaws for + --enable-freexl=no + +--- + configure | 20 ++++++++++---------- + configure.ac | 20 ++++++++++---------- + src/shapefiles/shapefiles.c | 2 ++ + 4 files changed, 32 insertions(+), 30 deletions(-) + +diff --git a/configure b/configure +index e8cf620..917bfca 100755 +--- a/configure ++++ b/configure +@@ -1410,7 +1410,7 @@ Optional Features: + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-mathsql enables SQL math functions [default=yes] +- --enable-geocallbacks enables geometry callbacks [default=yes] ++ --enable-geocallbacks enables geometry callbacks [default=no] + --enable-proj enables PROJ.4 inclusion [default=yes] + --enable-geos enables GEOS inclusion [default=yes] + --enable-geosadvanced enables GEOS advanced features [default=yes] +@@ -16980,7 +16980,7 @@ ac_config_files="$ac_config_files Makefile src/Makefile src/headers/Makefile src + if test "${enable_mathsql+set}" = set; then : + enableval=$enable_mathsql; + else +- mathsql=yes ++ enable_mathsql=yes + fi + + if test x"$enable_mathsql" != "xno"; then +@@ -16998,10 +16998,10 @@ fi + if test "${enable_geocallbacks+set}" = set; then : + enableval=$enable_geocallbacks; + else +- geocallbacks=yes ++ enable_geocallbacks=no + fi + +-if test x"$enable_geocallbacks" != "xno"; then ++if test x"$enable_geocallbacks" == "xyes"; then + OMIT_GEOCALLBACKS_FLAGS= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_rtree_geometry_callback in -lsqlite3" >&5 + $as_echo_n "checking for sqlite3_rtree_geometry_callback in -lsqlite3... " >&6; } +@@ -17063,7 +17063,7 @@ fi + if test "${enable_proj+set}" = set; then : + enableval=$enable_proj; + else +- proj=yes ++ enable_proj=yes + fi + + if test x"$enable_proj" != "xno"; then +@@ -17153,7 +17153,7 @@ fi + if test "${enable_geos+set}" = set; then : + enableval=$enable_geos; + else +- geos=yes ++ enable_geos=yes + fi + + if test x"$enable_geos" != "xno"; then +@@ -17237,7 +17237,7 @@ fi + if test "${enable_geosadvanced+set}" = set; then : + enableval=$enable_geosadvanced; + else +- geosadvanced=yes ++ enable_geosadvanced=yes + fi + + if test x"$enable_geosadvanced" != "xno"; then +@@ -17316,7 +17316,7 @@ fi + if test "${enable_iconv+set}" = set; then : + enableval=$enable_iconv; + else +- geos=yes ++ enable_iconv=yes + fi + + if test x"$enable_iconv" != "xno"; then +@@ -17579,7 +17579,7 @@ fi + if test "${enable_freexl+set}" = set; then : + enableval=$enable_freexl; + else +- proj=yes ++ enable_freexl=yes + fi + + if test x"$enable_freexl" != "xno"; then +@@ -17669,7 +17669,7 @@ fi + if test "${enable_epsg+set}" = set; then : + enableval=$enable_epsg; + else +- epsg=yes ++ enable_epsg=yes + fi + + if test x"$enable_epsg" != "xno"; then +diff --git a/configure.ac b/configure.ac +index 216cc9f..69cb6c5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -79,7 +79,7 @@ AC_CONFIG_FILES([Makefile \ + # + AC_ARG_ENABLE(mathsql, [AS_HELP_STRING( + [--enable-mathsql], [enables SQL math functions [default=yes]])], +- [], [mathsql=yes]) ++ [], [enable_mathsql=yes]) + if test x"$enable_mathsql" != "xno"; then + OMIT_MATHSQL_FLAGS= + else +@@ -92,9 +92,9 @@ AC_SUBST(OMIT_MATHSQL_FLAGS) + # --enable-geocallbacks + # + AC_ARG_ENABLE(geocallbacks, [AS_HELP_STRING( +- [--enable-geocallbacks], [enables geometry callbacks [default=yes]])], +- [], [geocallbacks=yes]) +-if test x"$enable_geocallbacks" != "xno"; then ++ [--enable-geocallbacks], [enables geometry callbacks [default=no]])], ++ [], [enable_geocallbacks=no]) ++if test x"$enable_geocallbacks" == "xyes"; then + OMIT_GEOCALLBACKS_FLAGS= + AC_CHECK_LIB(sqlite3,sqlite3_rtree_geometry_callback,,AC_MSG_ERROR([obsolete 'libsqlite3' (< v.3.7.3). please retry specifying: --disable-geocallbacks]),-lm) + else +@@ -108,7 +108,7 @@ AC_SUBST(OMIT_GEOCALLBACKS_FLAGS) + # + AC_ARG_ENABLE(proj, [AS_HELP_STRING( + [--enable-proj], [enables PROJ.4 inclusion [default=yes]])], +- [], [proj=yes]) ++ [], [enable_proj=yes]) + if test x"$enable_proj" != "xno"; then + OMIT_PROJ_FLAGS= + AC_CHECK_HEADERS(proj_api.h,, [AC_MSG_ERROR([cannot find proj_api.h, bailing out])]) +@@ -124,7 +124,7 @@ AC_SUBST(OMIT_PROJ_FLAGS) + # + AC_ARG_ENABLE(geos, [AS_HELP_STRING( + [--enable-geos], [enables GEOS inclusion [default=yes]])], +- [], [geos=yes]) ++ [], [enable_geos=yes]) + if test x"$enable_geos" != "xno"; then + OMIT_GEOS_FLAGS= + AC_CHECK_HEADERS(geos_c.h,, [AC_MSG_ERROR([cannot find geos_c.h, bailing out])]) +@@ -134,7 +134,7 @@ if test x"$enable_geos" != "xno"; then + # + AC_ARG_ENABLE(geosadvanced, [AS_HELP_STRING( + [--enable-geosadvanced], [enables GEOS advanced features [default=yes]])], +- [], [geosadvanced=yes]) ++ [], [enable_geosadvanced=yes]) + if test x"$enable_geosadvanced" != "xno"; then + GEOSADVANCED_FLAGS=-DGEOS_ADVANCED + AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([obsolete 'libgeos_c' (< v.3.3.0). please retry specifying: --disable-geosadvanced.]),-lm -lgeos) +@@ -152,7 +152,7 @@ AC_SUBST(OMIT_GEOS_FLAGS) + # + AC_ARG_ENABLE(iconv, [AS_HELP_STRING( + [--enable-iconv], [enables ICONV inclusion [default=yes]])], +- [], [geos=yes]) ++ [], [enable_iconv=yes]) + if test x"$enable_iconv" != "xno"; then + OMIT_ICONV_FLAGS= + AC_CHECK_HEADERS(iconv.h,, [AC_MSG_ERROR([cannot find iconv.h, bailing out])]) +@@ -172,7 +172,7 @@ AC_SUBST(OMIT_ICONV_FLAGS) + # + AC_ARG_ENABLE(freexl, [AS_HELP_STRING( + [--enable-freexl], [enables FreeXL inclusion [default=yes]])], +- [], [proj=yes]) ++ [], [enable_freexl=yes]) + if test x"$enable_freexl" != "xno"; then + OMIT_FREEXL_FLAGS= + AC_CHECK_HEADERS(freexl.h,, [AC_MSG_ERROR([cannot find freexl.h, bailing out])]) +@@ -188,7 +188,7 @@ AC_SUBST(OMIT_FREEXL_FLAGS) + # + AC_ARG_ENABLE(epsg, [AS_HELP_STRING( + [--enable-epsg], [enables full EPSG dataset support [default=yes]])], +- [], [epsg=yes]) ++ [], [enable_epsg=yes]) + if test x"$enable_epsg" != "xno"; then + OMIT_EPSG_FLAGS= + else +diff --git a/src/shapefiles/shapefiles.c b/src/shapefiles/shapefiles.c +index 4bf5fd0..09e3cd3 100644 +--- a/src/shapefiles/shapefiles.c ++++ b/src/shapefiles/shapefiles.c +@@ -62,7 +62,9 @@ the terms of any one of the MPL, the GPL or the LGPL. + #include + #include + ++#ifndef OMIT_FREEXL + #include ++#endif + + #if defined(_WIN32) && !defined(__MINGW32__) + #define strcasecmp _stricmp +-- +1.7.9.1 + diff --git a/recipes-extra/libspatialite/libspatialite_3.0.1.bb b/recipes-extra/libspatialite/libspatialite_3.0.1.bb new file mode 100644 index 0000000000..1cb72e8283 --- /dev/null +++ b/recipes-extra/libspatialite/libspatialite_3.0.1.bb @@ -0,0 +1,9 @@ +require libspatialite.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "450d1a0d9da1bd9f770b7db3f2509f69" +SRC_URI[sha256sum] = "4983d6584069fd5ff0cfcccccee1015088dab2db177c0dc7050ce8306b68f8e6" + +SRC_URI =+ "file://fix-the-configure-script-and-freexl.patch" + diff --git a/recipes-extra/proj/proj_4.8.0.bb b/recipes-extra/proj/proj_4.8.0.bb new file mode 100644 index 0000000000..b4bfaf4f39 --- /dev/null +++ b/recipes-extra/proj/proj_4.8.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "PROJ.4 - Cartographic Projections library" +HOMEPAGE = "http://trac.osgeo.org/proj/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=74d9aaec5fa0cd734341e8c4dc91b608" + +SRC_URI = "http://download.osgeo.org/proj/proj-${PV}.tar.gz" +SRC_URI[md5sum] = "d815838c92a29179298c126effbb1537" +SRC_URI[sha256sum] = "2db2dbf0fece8d9880679154e0d6d1ce7c694dd8e08b4d091028093d87a9d1b5" + +inherit autotools pkgconfig lib_package + +FILES_${PN} += "${datadir}/proj" From 37deb6091c8c50d0f1b7402774a30cd6965d2aa9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 22 Nov 2014 15:12:43 +0100 Subject: [PATCH 10/22] libspatialite: Upgrade to version 4.2.0 Package the new sqlite3 plugin into a new package and skip the dev-so qa issue. Add some extra depends that are now used by the library. --- .../libspatialite-4.2.0/geos-config.patch | 13 ++ recipes-extra/libspatialite/libspatialite.inc | 7 +- .../fix-the-configure-script-and-freexl.patch | 200 ------------------ .../libspatialite/libspatialite_3.0.1.bb | 9 - .../libspatialite/libspatialite_4.2.0.bb | 8 + 5 files changed, 27 insertions(+), 210 deletions(-) create mode 100644 recipes-extra/libspatialite/libspatialite-4.2.0/geos-config.patch delete mode 100644 recipes-extra/libspatialite/libspatialite/fix-the-configure-script-and-freexl.patch delete mode 100644 recipes-extra/libspatialite/libspatialite_3.0.1.bb create mode 100644 recipes-extra/libspatialite/libspatialite_4.2.0.bb diff --git a/recipes-extra/libspatialite/libspatialite-4.2.0/geos-config.patch b/recipes-extra/libspatialite/libspatialite-4.2.0/geos-config.patch new file mode 100644 index 0000000000..4e330686da --- /dev/null +++ b/recipes-extra/libspatialite/libspatialite-4.2.0/geos-config.patch @@ -0,0 +1,13 @@ +Index: libspatialite-4.2.0/configure.ac +=================================================================== +--- libspatialite-4.2.0.orig/configure.ac ++++ libspatialite-4.2.0/configure.ac +@@ -260,7 +260,7 @@ if test x"$enable_geos" != "xno"; then + fi + # Extract the linker and include flags + GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` +- GEOS_CFLAGS=-I`$GEOSCONFIG --includes` ++ GEOS_CFLAGS=`$GEOSCONFIG --cflags` + AC_SUBST([GEOS_LDFLAGS]) + AC_SUBST([GEOS_CFLAGS]) + # Ensure that we can parse geos_c.h diff --git a/recipes-extra/libspatialite/libspatialite.inc b/recipes-extra/libspatialite/libspatialite.inc index c8d7ec1e97..fd553e82c6 100644 --- a/recipes-extra/libspatialite/libspatialite.inc +++ b/recipes-extra/libspatialite/libspatialite.inc @@ -1,7 +1,7 @@ DESCRIPTION = "Library extending the SQLite core to support fully fledged Spatial SQL capabilities" HOMEPAGE = "https://www.gaia-gis.it/fossil/libspatialite/" SECTION = "libs" -DEPENDS = "proj geos sqlite3" +DEPENDS = "proj geos sqlite3 libxml2 zlib" INC_PR = "r0" @@ -14,3 +14,8 @@ inherit autotools pkgconfig EXTRA_OECONF = "--enable-freexl=no" + +# A plugins for SQLite3 +PACKAGES += "${PN}-plugin" +INSANE_SKIP_${PN}-plugin = "dev-so" +FILES_${PN}-plugin += "${libdir}/mod_*" diff --git a/recipes-extra/libspatialite/libspatialite/fix-the-configure-script-and-freexl.patch b/recipes-extra/libspatialite/libspatialite/fix-the-configure-script-and-freexl.patch deleted file mode 100644 index 0cd0c3f6ac..0000000000 --- a/recipes-extra/libspatialite/libspatialite/fix-the-configure-script-and-freexl.patch +++ /dev/null @@ -1,200 +0,0 @@ -From upstream fossil repo, extracted via git, dropping configure.ac for amalgamation - -From: sandro -Date: Sat, 21 Jan 2012 16:53:28 +0000 -Subject: [PATCH] fixing the ./configure script: --enable-geocallbacks=no is - the new default and fixing some flaws for - --enable-freexl=no - ---- - configure | 20 ++++++++++---------- - configure.ac | 20 ++++++++++---------- - src/shapefiles/shapefiles.c | 2 ++ - 4 files changed, 32 insertions(+), 30 deletions(-) - -diff --git a/configure b/configure -index e8cf620..917bfca 100755 ---- a/configure -+++ b/configure -@@ -1410,7 +1410,7 @@ Optional Features: - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-mathsql enables SQL math functions [default=yes] -- --enable-geocallbacks enables geometry callbacks [default=yes] -+ --enable-geocallbacks enables geometry callbacks [default=no] - --enable-proj enables PROJ.4 inclusion [default=yes] - --enable-geos enables GEOS inclusion [default=yes] - --enable-geosadvanced enables GEOS advanced features [default=yes] -@@ -16980,7 +16980,7 @@ ac_config_files="$ac_config_files Makefile src/Makefile src/headers/Makefile src - if test "${enable_mathsql+set}" = set; then : - enableval=$enable_mathsql; - else -- mathsql=yes -+ enable_mathsql=yes - fi - - if test x"$enable_mathsql" != "xno"; then -@@ -16998,10 +16998,10 @@ fi - if test "${enable_geocallbacks+set}" = set; then : - enableval=$enable_geocallbacks; - else -- geocallbacks=yes -+ enable_geocallbacks=no - fi - --if test x"$enable_geocallbacks" != "xno"; then -+if test x"$enable_geocallbacks" == "xyes"; then - OMIT_GEOCALLBACKS_FLAGS= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_rtree_geometry_callback in -lsqlite3" >&5 - $as_echo_n "checking for sqlite3_rtree_geometry_callback in -lsqlite3... " >&6; } -@@ -17063,7 +17063,7 @@ fi - if test "${enable_proj+set}" = set; then : - enableval=$enable_proj; - else -- proj=yes -+ enable_proj=yes - fi - - if test x"$enable_proj" != "xno"; then -@@ -17153,7 +17153,7 @@ fi - if test "${enable_geos+set}" = set; then : - enableval=$enable_geos; - else -- geos=yes -+ enable_geos=yes - fi - - if test x"$enable_geos" != "xno"; then -@@ -17237,7 +17237,7 @@ fi - if test "${enable_geosadvanced+set}" = set; then : - enableval=$enable_geosadvanced; - else -- geosadvanced=yes -+ enable_geosadvanced=yes - fi - - if test x"$enable_geosadvanced" != "xno"; then -@@ -17316,7 +17316,7 @@ fi - if test "${enable_iconv+set}" = set; then : - enableval=$enable_iconv; - else -- geos=yes -+ enable_iconv=yes - fi - - if test x"$enable_iconv" != "xno"; then -@@ -17579,7 +17579,7 @@ fi - if test "${enable_freexl+set}" = set; then : - enableval=$enable_freexl; - else -- proj=yes -+ enable_freexl=yes - fi - - if test x"$enable_freexl" != "xno"; then -@@ -17669,7 +17669,7 @@ fi - if test "${enable_epsg+set}" = set; then : - enableval=$enable_epsg; - else -- epsg=yes -+ enable_epsg=yes - fi - - if test x"$enable_epsg" != "xno"; then -diff --git a/configure.ac b/configure.ac -index 216cc9f..69cb6c5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -79,7 +79,7 @@ AC_CONFIG_FILES([Makefile \ - # - AC_ARG_ENABLE(mathsql, [AS_HELP_STRING( - [--enable-mathsql], [enables SQL math functions [default=yes]])], -- [], [mathsql=yes]) -+ [], [enable_mathsql=yes]) - if test x"$enable_mathsql" != "xno"; then - OMIT_MATHSQL_FLAGS= - else -@@ -92,9 +92,9 @@ AC_SUBST(OMIT_MATHSQL_FLAGS) - # --enable-geocallbacks - # - AC_ARG_ENABLE(geocallbacks, [AS_HELP_STRING( -- [--enable-geocallbacks], [enables geometry callbacks [default=yes]])], -- [], [geocallbacks=yes]) --if test x"$enable_geocallbacks" != "xno"; then -+ [--enable-geocallbacks], [enables geometry callbacks [default=no]])], -+ [], [enable_geocallbacks=no]) -+if test x"$enable_geocallbacks" == "xyes"; then - OMIT_GEOCALLBACKS_FLAGS= - AC_CHECK_LIB(sqlite3,sqlite3_rtree_geometry_callback,,AC_MSG_ERROR([obsolete 'libsqlite3' (< v.3.7.3). please retry specifying: --disable-geocallbacks]),-lm) - else -@@ -108,7 +108,7 @@ AC_SUBST(OMIT_GEOCALLBACKS_FLAGS) - # - AC_ARG_ENABLE(proj, [AS_HELP_STRING( - [--enable-proj], [enables PROJ.4 inclusion [default=yes]])], -- [], [proj=yes]) -+ [], [enable_proj=yes]) - if test x"$enable_proj" != "xno"; then - OMIT_PROJ_FLAGS= - AC_CHECK_HEADERS(proj_api.h,, [AC_MSG_ERROR([cannot find proj_api.h, bailing out])]) -@@ -124,7 +124,7 @@ AC_SUBST(OMIT_PROJ_FLAGS) - # - AC_ARG_ENABLE(geos, [AS_HELP_STRING( - [--enable-geos], [enables GEOS inclusion [default=yes]])], -- [], [geos=yes]) -+ [], [enable_geos=yes]) - if test x"$enable_geos" != "xno"; then - OMIT_GEOS_FLAGS= - AC_CHECK_HEADERS(geos_c.h,, [AC_MSG_ERROR([cannot find geos_c.h, bailing out])]) -@@ -134,7 +134,7 @@ if test x"$enable_geos" != "xno"; then - # - AC_ARG_ENABLE(geosadvanced, [AS_HELP_STRING( - [--enable-geosadvanced], [enables GEOS advanced features [default=yes]])], -- [], [geosadvanced=yes]) -+ [], [enable_geosadvanced=yes]) - if test x"$enable_geosadvanced" != "xno"; then - GEOSADVANCED_FLAGS=-DGEOS_ADVANCED - AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([obsolete 'libgeos_c' (< v.3.3.0). please retry specifying: --disable-geosadvanced.]),-lm -lgeos) -@@ -152,7 +152,7 @@ AC_SUBST(OMIT_GEOS_FLAGS) - # - AC_ARG_ENABLE(iconv, [AS_HELP_STRING( - [--enable-iconv], [enables ICONV inclusion [default=yes]])], -- [], [geos=yes]) -+ [], [enable_iconv=yes]) - if test x"$enable_iconv" != "xno"; then - OMIT_ICONV_FLAGS= - AC_CHECK_HEADERS(iconv.h,, [AC_MSG_ERROR([cannot find iconv.h, bailing out])]) -@@ -172,7 +172,7 @@ AC_SUBST(OMIT_ICONV_FLAGS) - # - AC_ARG_ENABLE(freexl, [AS_HELP_STRING( - [--enable-freexl], [enables FreeXL inclusion [default=yes]])], -- [], [proj=yes]) -+ [], [enable_freexl=yes]) - if test x"$enable_freexl" != "xno"; then - OMIT_FREEXL_FLAGS= - AC_CHECK_HEADERS(freexl.h,, [AC_MSG_ERROR([cannot find freexl.h, bailing out])]) -@@ -188,7 +188,7 @@ AC_SUBST(OMIT_FREEXL_FLAGS) - # - AC_ARG_ENABLE(epsg, [AS_HELP_STRING( - [--enable-epsg], [enables full EPSG dataset support [default=yes]])], -- [], [epsg=yes]) -+ [], [enable_epsg=yes]) - if test x"$enable_epsg" != "xno"; then - OMIT_EPSG_FLAGS= - else -diff --git a/src/shapefiles/shapefiles.c b/src/shapefiles/shapefiles.c -index 4bf5fd0..09e3cd3 100644 ---- a/src/shapefiles/shapefiles.c -+++ b/src/shapefiles/shapefiles.c -@@ -62,7 +62,9 @@ the terms of any one of the MPL, the GPL or the LGPL. - #include - #include - -+#ifndef OMIT_FREEXL - #include -+#endif - - #if defined(_WIN32) && !defined(__MINGW32__) - #define strcasecmp _stricmp --- -1.7.9.1 - diff --git a/recipes-extra/libspatialite/libspatialite_3.0.1.bb b/recipes-extra/libspatialite/libspatialite_3.0.1.bb deleted file mode 100644 index 1cb72e8283..0000000000 --- a/recipes-extra/libspatialite/libspatialite_3.0.1.bb +++ /dev/null @@ -1,9 +0,0 @@ -require libspatialite.inc - -PR = "${INC_PR}.0" - -SRC_URI[md5sum] = "450d1a0d9da1bd9f770b7db3f2509f69" -SRC_URI[sha256sum] = "4983d6584069fd5ff0cfcccccee1015088dab2db177c0dc7050ce8306b68f8e6" - -SRC_URI =+ "file://fix-the-configure-script-and-freexl.patch" - diff --git a/recipes-extra/libspatialite/libspatialite_4.2.0.bb b/recipes-extra/libspatialite/libspatialite_4.2.0.bb new file mode 100644 index 0000000000..74a77e89a6 --- /dev/null +++ b/recipes-extra/libspatialite/libspatialite_4.2.0.bb @@ -0,0 +1,8 @@ +require libspatialite.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "83305ed694a77152120d1f74c5151779" +SRC_URI[sha256sum] = "9f138a6854740c7827fdee53845eb1485fce3e805a7aa9fc9151f8046ebd312d" + +SRC_URI += "file://geos-config.patch" From d43fa5e76f28a56e35e6b5b5de1298411c8940b6 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 22 Nov 2014 21:50:24 +0100 Subject: [PATCH 11/22] openvpn: I have no idea who creates the /run/openvpn directory I have no idea who creates the /run/openvpn directory on Debian. The path is not in a tmpfiles.d and I don't see the generator creating it or the service file indicating that it needs to be created. Place the file with openvpn.NAME.status into the /run directory which appears to work on the device. --- recipes-extra/openvpn/openvpn/openvpn@.service | 2 +- recipes-extra/openvpn/openvpn_2.3.4.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-extra/openvpn/openvpn/openvpn@.service b/recipes-extra/openvpn/openvpn/openvpn@.service index e25199389b..75b02986dc 100644 --- a/recipes-extra/openvpn/openvpn/openvpn@.service +++ b/recipes-extra/openvpn/openvpn/openvpn@.service @@ -5,7 +5,7 @@ ReloadPropagatedFrom=openvpn.service [Service] Type=forking -ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf +ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn.%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf ExecReload=/bin/kill -HUP $MAINPID WorkingDirectory=/etc/openvpn Restart=always diff --git a/recipes-extra/openvpn/openvpn_2.3.4.bb b/recipes-extra/openvpn/openvpn_2.3.4.bb index b6465382da..8d42e0c8e2 100644 --- a/recipes-extra/openvpn/openvpn_2.3.4.bb +++ b/recipes-extra/openvpn/openvpn_2.3.4.bb @@ -7,7 +7,7 @@ DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libp inherit autotools -PR = "r1" +PR = "r2" SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \ file://openvpn \ From 52f8db743cdca36310e82e3a7d894dffe7ad3d8c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 26 Nov 2014 20:57:58 +0100 Subject: [PATCH 12/22] sysmobts: Simplify and work with all versions of 1.5 Similiae to the layer code we simplify the machine include to work for all versions of a 1.5 release. Poky 1.5.4 has been released and we don't want to continue to play this game. --- conf/machine/include/sysmobts.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/machine/include/sysmobts.inc b/conf/machine/include/sysmobts.inc index ba7261db07..49bd228034 100644 --- a/conf/machine/include/sysmobts.inc +++ b/conf/machine/include/sysmobts.inc @@ -1,7 +1,7 @@ TARGET_ARCH = "arm" PREFERRED_PROVIDER_virtual/kernel = "linux-sysmocom" -PREFERRED_VERSION_linux-sysmocom = "${@ dict([('1.7', '3.10.50+git%'), ('1.5','3.10.50+git%'), ('1.5.1','3.10.50+git%'), ('1.5.2','3.10.50+git%'), ('1.5.3','3.10.50+git%'), ('1.1.2','')])[d.getVar('DISTRO_VERSION', True)]}" +PREFERRED_VERSION_linux-sysmocom = "${@ dict([('1.7', '3.10.50+git%'), ('1.5','3.10.50+git%'), ('1.1.2','')])[d.getVar('DISTRO_VERSION', True)[0:3]]}" PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross" PREFERRED_VERSION_u-boot = "git" From 74c9120eeb51e6277e1ef3f95bd13ae26beaf627 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 26 Nov 2014 21:00:24 +0100 Subject: [PATCH 13/22] master/dizzy: Catch up with upstream renames Latest upstream has moved to newer version of netbase and opkg. Catch up with these renames. --- yocto-dizzy/{netbase_5.2.bbappend => netbase_5.3.bbappend} | 0 yocto-dizzy/{opkg_0.2.2.bbappend => opkg_0.2.4.bbappend} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename yocto-dizzy/{netbase_5.2.bbappend => netbase_5.3.bbappend} (100%) rename yocto-dizzy/{opkg_0.2.2.bbappend => opkg_0.2.4.bbappend} (100%) diff --git a/yocto-dizzy/netbase_5.2.bbappend b/yocto-dizzy/netbase_5.3.bbappend similarity index 100% rename from yocto-dizzy/netbase_5.2.bbappend rename to yocto-dizzy/netbase_5.3.bbappend diff --git a/yocto-dizzy/opkg_0.2.2.bbappend b/yocto-dizzy/opkg_0.2.4.bbappend similarity index 100% rename from yocto-dizzy/opkg_0.2.2.bbappend rename to yocto-dizzy/opkg_0.2.4.bbappend From 1c59f2af080b2b3d5c781342b4561715e0057bce Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 4 Dec 2014 19:46:38 +0100 Subject: [PATCH 14/22] dbus: Catch up with master changes of Poky tonight --- yocto-dizzy/{dbus_1.8.2.bbappend => dbus_1.8.10.bbappend} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename yocto-dizzy/{dbus_1.8.2.bbappend => dbus_1.8.10.bbappend} (100%) diff --git a/yocto-dizzy/dbus_1.8.2.bbappend b/yocto-dizzy/dbus_1.8.10.bbappend similarity index 100% rename from yocto-dizzy/dbus_1.8.2.bbappend rename to yocto-dizzy/dbus_1.8.10.bbappend From 036d66a47c9f638871b8cb2b6170c7a3a17ad12e Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Fri, 12 Dec 2014 16:44:30 +0100 Subject: [PATCH 15/22] odu-static-devicenames: rename static-devicenames-odu to odu-static-devicenames [hfreyther: I asked to follow machine-name pattern] Related: SYS#732 --- .../files/odu-persistens-serial.rules} | 8 ++++---- .../odu-static-devicenames_1.bb} | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) rename recipes-bsp/{static-devicenames-odu/files/persistens-serial-odu.rules => odu-static-devicenames/files/odu-persistens-serial.rules} (79%) rename recipes-bsp/{static-devicenames-odu/static-devicenames-odu_1.bb => odu-static-devicenames/odu-static-devicenames_1.bb} (67%) diff --git a/recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules b/recipes-bsp/odu-static-devicenames/files/odu-persistens-serial.rules similarity index 79% rename from recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules rename to recipes-bsp/odu-static-devicenames/files/odu-persistens-serial.rules index d942af923f..007075d62f 100644 --- a/recipes-bsp/static-devicenames-odu/files/persistens-serial-odu.rules +++ b/recipes-bsp/odu-static-devicenames/files/odu-persistens-serial.rules @@ -1,8 +1,8 @@ # do not edit this file, it will be overwritten on update -ACTION=="remove", GOTO="persistent_serial_odu_end" -SUBSYSTEM!="tty", GOTO="persistent_serial_odu_end" -KERNEL!="ttyACM[0-9]*", GOTO="persistent_serial_odu_end" +ACTION=="remove", GOTO="odu_persistent_serial_end" +SUBSYSTEM!="tty", GOTO="odu_persistent_serial_end" +KERNEL!="ttyACM[0-9]*", GOTO="odu_persistent_serial_end" KERNELS=="1-1.2:1.0", SYMLINK+="ttyModemScan0" KERNELS=="1-1.2:1.2", SYMLINK+="ttyModemScan1" @@ -20,4 +20,4 @@ KERNELS=="1-1.3:1.8", SYMLINK+="ttyModemUplink4" KERNELS=="1-1.3:1.10", SYMLINK+="ttyModemUplink5" KERNELS=="1-1.3:1.12", SYMLINK+="ttyModemUplink6" -LABEL="persistent_serial_odu_end" +LABEL="odu_persistent_serial_end" diff --git a/recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb b/recipes-bsp/odu-static-devicenames/odu-static-devicenames_1.bb similarity index 67% rename from recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb rename to recipes-bsp/odu-static-devicenames/odu-static-devicenames_1.bb index a6d235940c..781e4b20d8 100644 --- a/recipes-bsp/static-devicenames-odu/static-devicenames-odu_1.bb +++ b/recipes-bsp/odu-static-devicenames/odu-static-devicenames_1.bb @@ -2,7 +2,7 @@ DESCRIPTION = "Udev helper script for static device names on the sysmocom odu" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -SRC_URI = "file://persistens-serial-odu.rules" +SRC_URI = "file://odu-persistens-serial.rules" PACKAGES = "${PN}" FILES_${PN} = "${BASELIB}/udev/rules.d/*" @@ -10,5 +10,5 @@ RDPEPENDS_${PN} = "udev" do_install() { install -d ${D}/${BASELIB}/udev/rules.d - install -m 0644 ${WORKDIR}/persistens-serial-odu.rules ${D}/${BASELIB}/udev/rules.d/70-persistens-serial-odu.rules + install -m 0644 ${WORKDIR}/odu-persistens-serial.rules ${D}/${BASELIB}/udev/rules.d/70-odu-persistens-serial.rules } From 1ed9350964d1ca448aec0fcb9aa737b137fb3b7a Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Fri, 12 Dec 2014 17:40:05 +0100 Subject: [PATCH 16/22] sysmocom-udhcpd-config: start the udhcpd on the sysmocom-bsc only when eth1 is present * the change affects the config file, so the package number is bumped Related: SYS#735 --- .../sysmocom-udhcpd-config/files/sysmocom-bsc/udhcpd.service | 2 ++ ...{sysmocom-udhcpd-config_1.bb => sysmocom-udhcpd-config_2.bb} | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) rename recipes-apps/sysmocom-udhcpd-config/{sysmocom-udhcpd-config_1.bb => sysmocom-udhcpd-config_2.bb} (98%) diff --git a/recipes-apps/sysmocom-udhcpd-config/files/sysmocom-bsc/udhcpd.service b/recipes-apps/sysmocom-udhcpd-config/files/sysmocom-bsc/udhcpd.service index 6b92866e96..745b78af8a 100644 --- a/recipes-apps/sysmocom-udhcpd-config/files/sysmocom-bsc/udhcpd.service +++ b/recipes-apps/sysmocom-udhcpd-config/files/sysmocom-bsc/udhcpd.service @@ -1,5 +1,7 @@ [Unit] Description=UDHCPD +Requires=sys-subsystem-net-devices-eth1.device +After=sys-subsystem-net-devices-eth1.device [Service] Type=simple diff --git a/recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_1.bb b/recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_2.bb similarity index 98% rename from recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_1.bb rename to recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_2.bb index 3e787feb43..1b4feab7ae 100644 --- a/recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_1.bb +++ b/recipes-apps/sysmocom-udhcpd-config/sysmocom-udhcpd-config_2.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = " \ SRC_URI = "file://udhcpd.conf \ file://udhcpd.service \ " -PR = "r5" +PR = "r0" CONFFILES_${PN} = "${sysconfdir}/udhcpd.conf" FILES_${PN} += "${systemd_unitdir}" From 078c48f8f13b6b79ca6b7a8aa9282546d844f019 Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Fri, 12 Dec 2014 19:19:29 +0100 Subject: [PATCH 17/22] openvpn: update 2.3.4 to 2.3.6 Fixes: SYS#836 --- .../openvpn/{openvpn_2.3.4.bb => openvpn_2.3.6.bb} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename recipes-extra/openvpn/{openvpn_2.3.4.bb => openvpn_2.3.6.bb} (92%) diff --git a/recipes-extra/openvpn/openvpn_2.3.4.bb b/recipes-extra/openvpn/openvpn_2.3.6.bb similarity index 92% rename from recipes-extra/openvpn/openvpn_2.3.4.bb rename to recipes-extra/openvpn/openvpn_2.3.6.bb index 8d42e0c8e2..bb00043ea5 100644 --- a/recipes-extra/openvpn/openvpn_2.3.4.bb +++ b/recipes-extra/openvpn/openvpn_2.3.6.bb @@ -7,7 +7,7 @@ DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libp inherit autotools -PR = "r2" +PR = "r3" SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \ file://openvpn \ @@ -15,8 +15,8 @@ SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \ file://openvpn@.service \ file://openvpn.service" -SRC_URI[md5sum] = "04d47237907faabe9d046970ffe44b2e" -SRC_URI[sha256sum] = "af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a" +SRC_URI[md5sum] = "6ca03fe0fd093e0d01601abee808835c" +SRC_URI[sha256sum] = "7baed2ff39c12e1a1a289ec0b46fcc49ff094ca58b8d8d5f29b36ac649ee5b26" CFLAGS += "-fno-inline" From 5c189003c59177ee5353dd8b5035c10e86a0357b Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Fri, 12 Dec 2014 20:56:23 +0100 Subject: [PATCH 18/22] openvpn: clean update from sysv-rc to systemd for the startup files [hfreyther: We assume that the user might install OpenVPN with a different priority but that it will always be available in the runlevel two (e.g. even if the user changed the default runlevel)] Related: SYS#517 --- recipes-extra/openvpn/openvpn_2.3.6.bb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/recipes-extra/openvpn/openvpn_2.3.6.bb b/recipes-extra/openvpn/openvpn_2.3.6.bb index bb00043ea5..ed3376dc01 100644 --- a/recipes-extra/openvpn/openvpn_2.3.6.bb +++ b/recipes-extra/openvpn/openvpn_2.3.6.bb @@ -40,6 +40,7 @@ do_install_append() { install -m 0755 ${WORKDIR}/openvpn-generator ${D}${systemd_unitdir}/system-generators } +RDEPENDS_${PN} += "update-rc.d" RRECOMMENDS_${PN} = "kernel-module-tun" FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug" @@ -48,6 +49,18 @@ FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug" # during install and upgrade. Simply ship the files. FILES_${PN} += "${systemd_unitdir}" +pkg_postinst_${PN} () { + if [ "x$D" != "x" ]; then + exit 1 + fi + + if [ -L /etc/rc2.d/S*openvpn ]; then + update-rc.d -f openvpn remove + if [ ! -L /etc/systemd/system/multi-user.target.wants/openvpn.service ]; then + ln -s '/lib/systemd/system/openvpn.service' '/etc/systemd/system/multi-user.target.wants/openvpn.service' + fi + fi +} # We need to test opkg upgrade of OpenVPN through the OpenVPN first DEFAULT_PREFERENCE = "-1" From eefee096cd9dc29e2fe2d5fa41cc89789d5737e2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 18 Dec 2014 23:22:57 +0100 Subject: [PATCH 19/22] usb2514: Support for board v3+ We use the new sysfs file to obtain the board version number and configure the port swapping accordingly. If the board_version sysfs attribute is not present, we default to v2. We also integrate resetting the hub chip from within this tool right befeore writing the new register values via I2C. --- recipes-bsp/sob-odu/files/usb2514.c | 81 ++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/recipes-bsp/sob-odu/files/usb2514.c b/recipes-bsp/sob-odu/files/usb2514.c index acc75408dc..2669a2066c 100644 --- a/recipes-bsp/sob-odu/files/usb2514.c +++ b/recipes-bsp/sob-odu/files/usb2514.c @@ -33,6 +33,10 @@ #define USB2514_SLAVE_ADDR 0x2C +#define BOARD_VER_PATH "/sys/devices/platform/sob-odu.0/board_version" +#define RESET_PATH "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value" +#define RESET_PATH_OLD "/sys/class/gpio/gpio62/value" + /* Default configuration as per data sheet */ static const uint8_t usb2514_default[256] = { 0x24, 0x04, 0x14, 0x25, 0xB3, 0x0B, 0x9B, 0x20, /* 0x00 */ @@ -70,7 +74,7 @@ static const uint8_t usb2514_default[256] = { }; /* Default configuration as per data sheet */ -static const uint8_t usb2514_odu[256] = { +static uint8_t usb2514_odu[256] = { 0x24, 0x04, 0x14, 0x25, 0xB3, 0x0B, 0x9B, 0x20, /* 0x00 */ 0x02, 0x00, 0x00, 0x00, 0x01, 0x32, 0x01, 0x32, /* 0x08 */ 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10 */ @@ -140,9 +144,61 @@ static int write_regs(const uint8_t *regs) return rc; } +/* attempt to obtain the board version from sysfs */ +static int get_board_version(void) +{ + FILE *f; + unsigned int ver; + + f = fopen(BOARD_VER_PATH, "r"); + if (!f) + return -1; + + if (fscanf(f, "%u", &ver) != 1) { + fclose(f); + return -2; + } + + fclose(f); + + return ver; +} + +/* attempt to reset the hub via sysfs */ +static int reset_hub(void) +{ + FILE *f; + int invert_logic = 0; + + f = fopen(RESET_PATH, "w"); + if (!f) { + f = fopen(RESET_PATH_OLD, "w"); + if (!f) + return -1; + invert_logic = 1; + } + + if (invert_logic) + fputs("0", f); + else + fputs("1", f); + + usleep(10000); + rewind(f); + + if (invert_logic) + fputs("1", f); + else + fputs("0", f); + + fclose(f); + return 0; +} + int main(int argc, char **argv) { int rc; + int board_version; int adapter_nr; long slave_addr = USB2514_SLAVE_ADDR; char filename[PATH_MAX]; @@ -164,12 +220,35 @@ int main(int argc, char **argv) get_support(); + board_version = get_board_version(); + if (board_version >= 3) { + /* on board version 3 and later we don't need to swap + * USB downlink port 1 */ + printf("Detected board >= v3, not swapping DN1\n"); + usb2514_odu[0xFA] = 0x0C; + } else if (board_version == 1) { + /* ports are still swapped in hardware */ + printf("Detected board v1, not swapping any ports\n"); + usb2514_odu[0xFA] = 0x00; + } else if (board_version == 2) { + printf("Detected board v2, swapping DN1, DN2 and DN3\n"); + /* default */ + } else { + printf("Assuming board v2, swapping DN1, DN2 and DN3\n"); + /* default */ + } + rc = ioctl(g_fd, I2C_SLAVE, slave_addr); if (rc < 0) { fprintf(stderr, "Error setting slave addr: %d\n", rc); exit(1); } + /* First reset the USB hub before loading data into it */ + if (reset_hub() < 0) { + fprintf(stderr, "Couldn't reset the USB hub!\n"); + } + rc = write_regs(usb2514_odu); if (rc < 0) { fprintf(stderr, "Error writing default regs: %d\n", rc); From 53f89ad74d8dc382d50e9901fed5f720449e4a2c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 18 Dec 2014 23:29:06 +0100 Subject: [PATCH 20/22] usb2514: skip gpio script on kernels that export GPIOs themselves --- recipes-bsp/sob-odu/files/gpio_usb2514 | 7 +++++++ recipes-bsp/sob-odu/usb2514_1.bb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/recipes-bsp/sob-odu/files/gpio_usb2514 b/recipes-bsp/sob-odu/files/gpio_usb2514 index baa245b411..befde708b3 100644 --- a/recipes-bsp/sob-odu/files/gpio_usb2514 +++ b/recipes-bsp/sob-odu/files/gpio_usb2514 @@ -1,5 +1,12 @@ #!/bin/sh +# in more recent kernels the kernel is itself taking care of exporting +# the right GPIOs and setting their direction and level. We can detect +# this by checking for the below sysfs path +if [ -d /sys/devices/platform/sob-odu.0 ]; then + exit 0 +fi + cd /sys/class/gpio # !mdm1_pwr_ind diff --git a/recipes-bsp/sob-odu/usb2514_1.bb b/recipes-bsp/sob-odu/usb2514_1.bb index b06858beca..e73366e23c 100644 --- a/recipes-bsp/sob-odu/usb2514_1.bb +++ b/recipes-bsp/sob-odu/usb2514_1.bb @@ -4,7 +4,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://${WORKDIR}/usb2514.c;beginline=1;endline=18;md5=3b8421a1c05d21add65cc20fccfa29cd" DEPENDS += "lmsensors-apps" -PR = "r1" +PR = "r2" SRC_URI = "file://usb2514.c \ file://gpio_usb2514 \ From 45ed0caa7982490b01a7674a116c12083fde4687 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 18 Dec 2014 23:55:37 +0100 Subject: [PATCH 21/22] update to recent sob-odu kernel, including v3 hardware support --- recipes-bsp/linux/linux-sysmocom_3.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/linux/linux-sysmocom_3.2.bb b/recipes-bsp/linux/linux-sysmocom_3.2.bb index 80776a7c42..cc81563a0e 100644 --- a/recipes-bsp/linux/linux-sysmocom_3.2.bb +++ b/recipes-bsp/linux/linux-sysmocom_3.2.bb @@ -15,7 +15,7 @@ SRCREV = "bcc4fa827be7f59486ff305d664b42a142025f9b" # odu handling. BRANCH="v3.2" -SRCREV_sysmocom-odu = "aadf22be50ac2abb2a9437b9ad3bba4ccdca540b" +SRCREV_sysmocom-odu = "20547dac08c962e43a64ef5d4f182b20b2edd172" BRANCH_sysmocom-odu = "sob-odu/linux-3.2.63" LINUX_VERSION_sysmocom-odu = "3.2.63" From 121196bbd418e173ddc0c2a220d1efc0ba919990 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 19 Dec 2014 18:09:39 +0100 Subject: [PATCH 22/22] ODU: add new odu-gpiotool script The odu-gpiotool is a small script created by roh to selectively reset individual peripherals of the system by the administrator. It originates from ticket https://projects.sysmocom.de/ortelius/issues/655 --- recipes-bsp/sob-odu/files/odu-gpiotool | 113 +++++++++++++++++++++++++ recipes-bsp/sob-odu/usb2514_1.bb | 4 +- 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 recipes-bsp/sob-odu/files/odu-gpiotool diff --git a/recipes-bsp/sob-odu/files/odu-gpiotool b/recipes-bsp/sob-odu/files/odu-gpiotool new file mode 100644 index 0000000000..5ac8c0376f --- /dev/null +++ b/recipes-bsp/sob-odu/files/odu-gpiotool @@ -0,0 +1,113 @@ +#!/bin/sh + +USB2514=/usr/bin/usb2514 +GPIODIR=/sys/devices/platform/sob-odu.0 + +DEBUG=0 +DRYRUN=0 + +test -x ${USB2514} +if [ $? -ne 0 ]; +then + echo "ERROR - ${USB2514} does not exist or is not exeutable" + echo +fi + +if [ $DRYRUN -ne 0 ] || [ $DEBUG -ne 0 ]; then + echo "DEBUG=$DEBUG\nDRYRUN=$DRYRUN\n" +fi; + +### helper +echodeb() { + if [ $DEBUG -ne 0 ]; then + echo "DEBUG - $*" + fi; +} + +gpioecho() { + echodeb "echo ${1} > ${2}" + if [ $DRYRUN -eq 0 ]; then + echo ${1} > ${2} + fi; +} + +# $1 gpio $2 direction +init_pin() { + echodeb init_pin $1 $2 + gpioecho ${1} "${GPIODIR}/export" + gpioecho ${2} "${GPIODIR}/gpio$_{1}/direction" +} + +# $1 gpio $2 value +set_pin() { + echodeb set_pin $1 $2 + gpioecho ${2} "${GPIODIR}/gpio_${1}/value" +} + +# $1 pin $2 tempvalue $3 endvalue +toggle_pin() { + set_pin ${1} ${2} + sleep 1 + set_pin ${1} ${3} +} + +### +reset_modem1() { + toggle_pin mdm1_rst 1 0 +} + +reset_modem2() { + toggle_pin mdm2_rst 1 0 +} + +reset_gnss() { + toggle_pin gnss_rst 1 0 +} + +reset_adsb() { + toggle_pin adsb_rst 1 0 +} + +reset_ais() { + toggle_pin ais_off 1 0 +} + +reset_usb() { + # usb2514 now has internal code to assert/de-assert !hub_reset + ${USB2514} 1 +} + +reset_all() { + reset_modem1 + reset_modem2 + reset_gnss + reset_adsb + reset_ais + reset_usb +} + +print_help() { + echo $0 v0.2 + echo + echo "help - this text" + echo "reset [device] - reset all/one device(s)" + echo +} +case "$1" in +start) + ;; +reset) + if [ -n "$2" ]; then + reset_${2} + else + reset_all + fi + ;; +restart) + ${0} reset + ;; +*) + print_help + ;; +esac + diff --git a/recipes-bsp/sob-odu/usb2514_1.bb b/recipes-bsp/sob-odu/usb2514_1.bb index e73366e23c..1b25e6506b 100644 --- a/recipes-bsp/sob-odu/usb2514_1.bb +++ b/recipes-bsp/sob-odu/usb2514_1.bb @@ -4,10 +4,11 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://${WORKDIR}/usb2514.c;beginline=1;endline=18;md5=3b8421a1c05d21add65cc20fccfa29cd" DEPENDS += "lmsensors-apps" -PR = "r2" +PR = "r3" SRC_URI = "file://usb2514.c \ file://gpio_usb2514 \ + file://odu-gpiotool \ file://i2c-dev.h \ file://usb2514.service \ " @@ -23,6 +24,7 @@ do_install() { install -d ${D}${bindir}/ install -m 0755 ${WORKDIR}/usb2514 ${D}${bindir}/ install -m 0755 ${WORKDIR}/gpio_usb2514 ${D}${bindir}/ + install -m 0755 ${WORKDIR}/odu-gpiotool ${D}${bindir}/ install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ install -m 0644 /${WORKDIR}/usb2514.service ${D}${systemd_unitdir}/system/ ln -sf ../usb2514.service ${D}${systemd_unitdir}/system/multi-user.target.wants/