From aee3a65e2aa748e6cc78a08d9bbb14003fb86f93 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 15 Feb 2015 18:20:41 +0100 Subject: [PATCH 01/11] simple.script/udhcpc: Do not remove someone's else default route A lease bound/renewal could lead to the removal of a default route set by pppd. Apply the same "dev $interface" filter that would be used when using the "route" command. Fixes: SYS#1163 --- recipes-core/busybox/files/sysmocom-idu/simple.script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/busybox/files/sysmocom-idu/simple.script b/recipes-core/busybox/files/sysmocom-idu/simple.script index 3e304b9b39..cb9d3d4f0c 100644 --- a/recipes-core/busybox/files/sysmocom-idu/simple.script +++ b/recipes-core/busybox/files/sysmocom-idu/simple.script @@ -44,7 +44,7 @@ case "$1" in if [ -n "$router" ] ; then if ! root_is_nfs ; then if [ $have_bin_ip -eq 1 ]; then - while ip route del default 2>/dev/null ; do + while ip route del default dev $interface 2>/dev/null ; do : done else From 5ba3282e451fd5e83892e2ef2b662bbcbb2458cd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Feb 2015 08:30:02 +0100 Subject: [PATCH 02/11] ca-certificates: Fix build and lower default preference This is a late fall-out of the priority changes done by Henning. This recipe is not using autotools and doesn't support src != build dir builds. So let's not use the autotools class but simply invoke install ourselves. Let's lower the default preference so the recipe from yocto master is picked as well. ERROR: Function failed: do_install (log file is located at /home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/all-poky-linux/ca-certificates/20120623-r0/temp/log.do_install.16890) ERROR: Logfile of failure stored in: /home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/all-poky-linux/ca-certificates/20120623-r0/temp/log.do_install.16890 Log data follows: | DEBUG: SITE files ['endian-little', 'bit-32', 'common-linux', 'common-glibc', 'allarch-linux', 'common'] | DEBUG: Executing shell function do_install | NOTE: make -j 2 DESTDIR=/home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/all-poky-linux/ca-certificates/20120623-r0/image install | make: *** No rule to make target `install'. Stop. | ERROR: oe_runmake failed | WARNING: /home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/all-poky-linux/ca-certificates/20120623-r0/temp/run.do_install.16890:1 exit 1 from | exit 1 | ERROR: Function failed: do_install (log file is located at /home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/all-poky-linux/ca-certificates/20120623-r0/temp/log.do_install.16890) NOTE: recipe ca-certificates-20120623-r0: task do_install: Failed ERROR: Task 3639 (/home/builder/jenkins/workspace/Yocto-Master/label/OE/meta-sysmocom-bsp/recipes-extra/ca-certificates/ca-certificates_20120623.bb, do_install) failed with exit code '1' --- recipes-extra/ca-certificates/ca-certificates_20120623.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes-extra/ca-certificates/ca-certificates_20120623.bb b/recipes-extra/ca-certificates/ca-certificates_20120623.bb index 66150f07b9..63fd8cb58b 100644 --- a/recipes-extra/ca-certificates/ca-certificates_20120623.bb +++ b/recipes-extra/ca-certificates/ca-certificates_20120623.bb @@ -10,13 +10,15 @@ SRC_URI = "${DEBIAN_MIRROR}/main/c/ca-certificates/ca-certificates_${PV}.tar.gz SRC_URI[md5sum] = "5105d4cc086f0d4ecf7bf2e4c4667289" SRC_URI[sha256sum] = "878cd1130ba056fe5f96decde7e5fc1b71d35eb8565a1515744912e100731ee9" -inherit autotools allarch +inherit allarch do_install_prepend() { mkdir -p ${D}/usr/share/ca-certificates mkdir -p ${D}/usr/sbin mkdir -p ${D}/etc/ssl/certs mkdir -p ${D}/etc/ca-certificates/update.d + + oe_runmake 'DESTDIR=${D}' install } do_install_append() { @@ -40,3 +42,5 @@ ${sbindir}/update-ca-certificates } CONFFILES_${PN} = "/etc/ca-certificates.conf" + +DEFAULT_PREFERENCE = "-1" From a561f17dac73382d024cb68cb32f2b74fa3dc1b5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Feb 2015 23:15:54 +0100 Subject: [PATCH 03/11] osmo-bts: Ignore failures on symlinking In yocto versions before dizzy/master the build was done in the source directory and when configure was executed twice in the same directory we would have a build failure due the symlink already existing. Simply assume that if the ln fails the link is already there. Out of disk space situations are handled more early by OE and missing files will be found by configure. In dizzy/master OE will clean the build directory before calling configure so the issue does not apply there. Fixes: SYS#1170 --- recipes-sysmobts/osmo-bts/osmo-bts_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sysmobts/osmo-bts/osmo-bts_git.bb b/recipes-sysmobts/osmo-bts/osmo-bts_git.bb index 9a2eafedde..eb0473bb41 100644 --- a/recipes-sysmobts/osmo-bts/osmo-bts_git.bb +++ b/recipes-sysmobts/osmo-bts/osmo-bts_git.bb @@ -25,7 +25,7 @@ inherit femtobts_api CPPFLAGS += " ${BTS_HW_VERSION} " do_configure_prepend() { - ln -sf ../openbsc openbsc + ln -sf ../openbsc openbsc || true } do_compile_append_sysmobts-v2() { From 191503323b56bb3055ba5e85a34178b28d72f4d5 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Feb 2015 23:26:19 +0100 Subject: [PATCH 04/11] libmnl: Import from meta-networking We need this for nfacct --- recipes-extra/libmnl/libmnl_1.0.3.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 recipes-extra/libmnl/libmnl_1.0.3.bb diff --git a/recipes-extra/libmnl/libmnl_1.0.3.bb b/recipes-extra/libmnl/libmnl_1.0.3.bb new file mode 100644 index 0000000000..74f9096603 --- /dev/null +++ b/recipes-extra/libmnl/libmnl_1.0.3.bb @@ -0,0 +1,12 @@ +SUMMARY = "Minimalistic user-space Netlink utility library" +DESCRIPTION = "Minimalistic user-space library oriented to Netlink developers, providing \ + functions for common tasks in parsing, validating, and constructing both the Netlink header and TLVs." +HOMEPAGE = "http://www.netfilter.org/projects/libmnl/index.html" +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "http://www.netfilter.org/projects/libmnl/files/libmnl-${PV}.tar.bz2;name=tar" +SRC_URI[tar.md5sum] = "7d95fc3bea3365bc03c48e484224f65f" +SRC_URI[tar.sha256sum] = "6f14336e9acdbc62c2dc71bbb59ce162e54e9af5c80153e92476c5443fe784de" + +inherit autotools pkgconfig From 77b2c49b65361934580794d25a937767af2c158d Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Feb 2015 23:34:23 +0100 Subject: [PATCH 05/11] libnetfilter-acct: Add recipe needed for nfacct This is the second dependency of nfacct. Create a simple recipe for it. --- .../libnetfilter-acct/libnetfilter-acct_1.0.2.bb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 recipes-extra/libnetfilter-acct/libnetfilter-acct_1.0.2.bb diff --git a/recipes-extra/libnetfilter-acct/libnetfilter-acct_1.0.2.bb b/recipes-extra/libnetfilter-acct/libnetfilter-acct_1.0.2.bb new file mode 100644 index 0000000000..72eddb04b8 --- /dev/null +++ b/recipes-extra/libnetfilter-acct/libnetfilter-acct_1.0.2.bb @@ -0,0 +1,13 @@ +SUMMARY = "libnetfilter_acct is the userspace library providing interface to extended accounting infrastructure." +HOMEPAGE = "http://www.netfilter.org/projects/libnetfilter_acct/index.html" +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "libmnl" + +S = "${WORKDIR}/libnetfilter_acct-${PV}" +SRC_URI = "http://www.netfilter.org/projects/libnetfilter_acct/files/libnetfilter_acct-${PV}.tar.bz2;name=tar" +SRC_URI[tar.md5sum] = "2118d9514c079839ebd9cb3144ad2ad7" +SRC_URI[tar.sha256sum] = "0128f19c3419fbd84f7e6d46b13a33ef7bda9b9f5e493bc5ae1882d087514b71" + +inherit autotools pkgconfig From 137b6b0d6a1d553f5ae58eb16cd373efa691a039 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Feb 2015 23:40:12 +0100 Subject: [PATCH 06/11] nfacct: Add recipe for nfacct as well Related: ORT#650 --- recipes-extra/nfacct/nfacct_1.0.1.bb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 recipes-extra/nfacct/nfacct_1.0.1.bb diff --git a/recipes-extra/nfacct/nfacct_1.0.1.bb b/recipes-extra/nfacct/nfacct_1.0.1.bb new file mode 100644 index 0000000000..f56e49be2c --- /dev/null +++ b/recipes-extra/nfacct/nfacct_1.0.1.bb @@ -0,0 +1,12 @@ +SUMMARY = "nfacct is the command line tool to create/retrieve/delete accounting objects" +HOMEPAGE = "http://www.netfilter.org/projects/nfacct/downloads.html" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" + +DEPENDS = "libmnl libnetfilter-acct" + +SRC_URI = "http://www.netfilter.org/projects/${PN}/files/${PN}-${PV}.tar.bz2;name=tar" +SRC_URI[tar.md5sum] = "992e863409d144350dbc8f0554a0f478" +SRC_URI[tar.sha256sum] = "81ef261616f313372a957431d17c5a0334984f06ceea190cf390479bf043e7c4" + +inherit autotools pkgconfig From 5d56fdb07eae36f7d05f7c7505940ae457dac282 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Feb 2015 23:41:02 +0100 Subject: [PATCH 07/11] task-sysmocom-feed: Make sure nfacct is in our feed as well We want to use nfacct for better monitoring/matching. Put it into the feed to be able to experiment with it. --- recipes-apps/tasks/task-sysmocom-feed.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes-apps/tasks/task-sysmocom-feed.bb b/recipes-apps/tasks/task-sysmocom-feed.bb index d659bc6b95..c7e825fee6 100644 --- a/recipes-apps/tasks/task-sysmocom-feed.bb +++ b/recipes-apps/tasks/task-sysmocom-feed.bb @@ -3,7 +3,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = " \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" ALLOW_EMPTY_${PN} = "1" -PR = "r16" +PR = "r17" RDEPENDS_${PN} = "\ task-sysmocom-tools \ @@ -11,4 +11,5 @@ RDEPENDS_${PN} = "\ minicom vlan patch procps psmisc \ ppp rsync sed usbutils openvpn iperf \ lcr cronie iproute2 i2c-tools cu \ - python-pyserial python-pexpect bridge-utils" + python-pyserial python-pexpect bridge-utils \ + nfacct" From 703e99dee6c831efba55d2d30da7d90b2fd65cc9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 17 Feb 2015 18:40:33 +0100 Subject: [PATCH 08/11] linux-sysmocom: Backport nfacct patches and enable the module I have no idea if that works or not. The integration work should have been done by someone else. Related: ORT#650 --- recipes-bsp/linux/files/sysmocom-odu/defconfig | 1 + recipes-bsp/linux/linux-sysmocom_3.2.bb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-bsp/linux/files/sysmocom-odu/defconfig b/recipes-bsp/linux/files/sysmocom-odu/defconfig index f06028a3de..90a5b3daa0 100644 --- a/recipes-bsp/linux/files/sysmocom-odu/defconfig +++ b/recipes-bsp/linux/files/sysmocom-odu/defconfig @@ -122,6 +122,7 @@ CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m CONFIG_NETFILTER_XT_MATCH_OSF=m CONFIG_NETFILTER_XT_MATCH_OWNER=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m diff --git a/recipes-bsp/linux/linux-sysmocom_3.2.bb b/recipes-bsp/linux/linux-sysmocom_3.2.bb index fd7ccbf991..6ae731cfc8 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 = "20547dac08c962e43a64ef5d4f182b20b2edd172" +SRCREV_sysmocom-odu = "dcaeb640fca7524f70f155fd573b72a245a9161e" BRANCH_sysmocom-odu = "sob-odu/linux-3.2.63" LINUX_VERSION_sysmocom-odu = "3.2.63" From 5de4108c112a1bd12a67503b97febf521195632f Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 17 Feb 2015 19:00:17 +0100 Subject: [PATCH 09/11] i2c-tools: Do not use autotootls as bbclass The sources are not using autotools and the build breaks. ERROR: Function failed: do_install (log file is located at /home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/armv5te-poky-linux-gnueabi/i2c-tools/3.1.1-r0/temp/log.do_install.10782) ERROR: Logfile of failure stored in: /home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/armv5te-poky-linux-gnueabi/i2c-tools/3.1.1-r0/temp/log.do_install.10782 Log data follows: | DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'arm-32', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common'] | DEBUG: Executing shell function do_install | NOTE: make -j 2 DESTDIR=/home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/armv5te-poky-linux-gnueabi/i2c-tools/3.1.1-r0/image install | make: *** No rule to make target `install'. Stop. | ERROR: oe_runmake failed | WARNING: /home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/armv5te-poky-linux-gnueabi/i2c-tools/3.1.1-r0/temp/run.do_install.10782:1 exit 1 from | exit 1 | ERROR: Function failed: do_install (log file is located at /home/builder/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/armv5te-poky-linux-gnueabi/i2c-tools/3.1.1-r0/temp/log.do_install.10782) NOTE: recipe i2c-tools-3.1.1-r0: task do_install: Failed --- recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb b/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb index 3a87534203..5bac6796eb 100644 --- a/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb +++ b/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb @@ -9,15 +9,14 @@ SRC_URI = "http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2 \ SRC_URI[md5sum] = "0fdbff53ebd0b8d9249256d6c56480b1" SRC_URI[sha256sum] = "14d4d7d60d1c12e43f2befe239c682a5c44c27682f153d4b58c1e392d2db1700" -inherit autotools - do_compile_prepend() { cp ${WORKDIR}/Module.mk ${S}/eepromer/ sed -i 's#/usr/local#${exec_prefix}#' ${S}/Makefile echo "include eepromer/Module.mk" >> ${S}/Makefile } -do_install_append() { +do_install() { + oe_runmake 'DESTDIR=${D}' install install -d ${D}${includedir}/linux install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h rm -f ${D}${includedir}/linux/i2c-dev.h From d7e88c935630b9e3bbbf1a2420ae6049e9baf1be Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 20 Feb 2015 11:29:49 +0100 Subject: [PATCH 10/11] ntp: Add systemd service files + ODU specific configuration On the ODU, we have a local GPS/GNSS receiver as prefision time source. --- recipes-bsp/ntp/files/sob-odu/ntp.conf | 19 +++++++++++++ recipes-bsp/ntp/ntp_4.2.6p3.bb | 37 +++++++++++++++----------- 2 files changed, 40 insertions(+), 16 deletions(-) create mode 100644 recipes-bsp/ntp/files/sob-odu/ntp.conf diff --git a/recipes-bsp/ntp/files/sob-odu/ntp.conf b/recipes-bsp/ntp/files/sob-odu/ntp.conf new file mode 100644 index 0000000000..e344078c9d --- /dev/null +++ b/recipes-bsp/ntp/files/sob-odu/ntp.conf @@ -0,0 +1,19 @@ +# This is the most basic ntp configuration file +# The driftfile must remain in a place specific to this +# machine - it records the machine specific clock error +driftfile /etc/ntp.drift +# This obtains a random server which will be close +# (in IP terms) to the machine. Add other servers +# as required, or change this. +server pool.ntp.org +# Using local hardware clock as fallback +# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself +server 127.127.1.0 +fudge 127.127.1.0 stratum 14 + +server 127.127.28.0 +fudge 127.127.28.0 refid GPS + +# Defining a default security setting, allowing queries but declining +# pretty much everything else +restrict default limited kod nomodify notrap nopeer diff --git a/recipes-bsp/ntp/ntp_4.2.6p3.bb b/recipes-bsp/ntp/ntp_4.2.6p3.bb index 487a28c475..fd2fab578d 100644 --- a/recipes-bsp/ntp/ntp_4.2.6p3.bb +++ b/recipes-bsp/ntp/ntp_4.2.6p3.bb @@ -1,11 +1,6 @@ require ntp.inc -PR = "r5" - -#inherit systemd - -#SYSTEMD_PACKAGES = "${PN}-systemd" -#SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service" +PR = "r6" SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ file://tickadj.c.patch \ @@ -29,21 +24,32 @@ do_install_append() { install -d ${D}/${sysconfdir}/network/if-up.d install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d - #install -d ${D}${systemd_unitdir}/system - #install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ - #install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ + + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ + ln -sf ../ntpd.service ${D}${systemd_unitdir}/system/multi-user.target.wants/ } -#PACKAGES =+ "${PN}-systemd" +FILES_${PN}-bin = "${bindir}/ntp-wait \ + ${bindir}/ntpdc \ + ${bindir}/ntpq \ + ${bindir}/ntptime \ + ${bindir}/ntptrace" -#FILES_${PN}-systemd = "${systemd_unitdir}/system/" -#RDEPENDS_${PN}-systemd = "${PN}" +FILES_${PN} = "${bindir}/ntpd \ + ${sysconfdir}/ntp.conf \ + ${sysconfdir}/init.d/ntpd \ + ${systemd_unitdir}/system/ntpd.service \ + ${systemd_unitdir}/system/multi-user.target.wants/ntpd.service" -FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" -FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" FILES_${PN}-tickadj = "${bindir}/tickadj" FILES_ntp-utils = "${bindir}/*" -FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate" +FILES_ntpdate = "${bindir}/ntpdate \ + ${sysconfdir}/network/if-up.d/ntpdate \ + ${systemd_unitdir}/system/ntpdate.service \ + ${systemd_unitdir}/system/multi-user.target.wants/ntpdate.service" # ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms # with wonky clocks (e.g. OpenSlug) @@ -60,4 +66,3 @@ else fi fi } - From 38d1587db55d0bad2a6cf32a7939998738a899a2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 20 Feb 2015 11:32:56 +0100 Subject: [PATCH 11/11] add pciutils to task-sysmocom-feed It is handy to have it on the APU/BSC/NITB/IDU --- recipes-apps/tasks/task-sysmocom-feed.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-apps/tasks/task-sysmocom-feed.bb b/recipes-apps/tasks/task-sysmocom-feed.bb index c7e825fee6..6edc6024c5 100644 --- a/recipes-apps/tasks/task-sysmocom-feed.bb +++ b/recipes-apps/tasks/task-sysmocom-feed.bb @@ -12,4 +12,4 @@ RDEPENDS_${PN} = "\ ppp rsync sed usbutils openvpn iperf \ lcr cronie iproute2 i2c-tools cu \ python-pyserial python-pexpect bridge-utils \ - nfacct" + pciutils nfacct"