Merge commit 'c9952b51550cd45959a5ead741e99bb40ef61f03' into dora

This commit is contained in:
Holger Hans Peter Freyther 2014-10-07 17:00:32 +02:00
commit 91ca9d8230
34 changed files with 1200 additions and 31 deletions

View File

@ -8,8 +8,8 @@ BBFILES += "${LAYERDIR}/yocto-shared/*.bbappend"
# Now we will need to include the matching fixes for a yocto version
BBFILES += "${BBFILES_SYSMOCOM_BSP}"
# selects specific distro or master when DISTRO_VERSION contains SNAPSHOT
BBFILES_SYSMOCOM_BSP = "${LAYERDIR}/yocto-${@ [dict([('1.5', 'dora'), ('1.1','edison')])[d.getVar('DISTRO_VERSION', True)[0:3]], 'master']['SNAPSHOT' in d.getVar('DISTRO_VERSION', True)]}/*.bbappend"
# selects specific distro or master when DISTRO_VERSION contains snapshot
BBFILES_SYSMOCOM_BSP = "${LAYERDIR}/yocto-${@ [dict([('1.5', 'dora'), ('1.1','edison'), ('1.7', 'dizzy')])[d.getVar('DISTRO_VERSION', True)[0:3]], 'master']['snapshot' in d.getVar('DISTRO_VERSION', True)]}/*.bbappend"
BBFILE_COLLECTIONS += "sysmocom-bsp"
BBFILE_PATTERN_sysmocom-bsp := "^${LAYERDIR}/"

View File

@ -1,7 +1,7 @@
TARGET_ARCH = "arm"
PREFERRED_PROVIDER_virtual/kernel = "linux-sysmocom"
PREFERRED_VERSION_linux-sysmocom = "${@ dict([('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.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_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
PREFERRED_VERSION_u-boot = "git"

View File

@ -0,0 +1,16 @@
DEPENDS += "openssl-native"
rootpasswd = "${@d.getVar('ROOT_PASS', True) or ""}"
ROOTFS_POSTPROCESS_COMMAND += "set_root_passwd;"
set_root_passwd() {
if [ -n "${rootpasswd}" ]; then
HASHED_PASS=`openssl passwd -1 ${rootpasswd}`
if [ -n "${HASHED_PASS}" ]; then
sed -e "s%^root:[^:]*:%root:${HASHED_PASS}:%" \
-i ${IMAGE_ROOTFS}/etc/shadow
echo "Generated new root-passwd"
fi
fi
}

View File

@ -0,0 +1,18 @@
hostsshkeysfile = "${@d.getVar('SSH_KEYS_FILE', True) or ''}"
ROOTFS_POSTPROCESS_COMMAND += "copy_ssh_keys;"
copy_ssh_keys() {
if [ -n "${hostsshkeysfile}" ]; then
if [ -r "${hostsshkeysfile}" ]; then
echo "Installing sshkeys from ${hostsshkeysfile}"
mkdir -p ${IMAGE_ROOTFS}/home/root/.ssh/
cat ${hostsshkeysfile} >> ${IMAGE_ROOTFS}/home/root/.ssh/authorized_keys
chown root:root ${IMAGE_ROOTFS}/home/root/.ssh/authorized_keys
chmod 0600 ${IMAGE_ROOTFS}/home/root/.ssh/authorized_keys
else
echo "Could not install sshkeys from ${hostsshkeysfile}"
fi
fi
}

View File

@ -3,11 +3,11 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
ALLOW_EMPTY_${PN} = "1"
PR = "r10"
PR = "r11"
RDEPENDS_${PN} = "\
task-sysmocom-tools \
task-sysmocom-debug \
minicom vlan patch procps psmisc \
ppp rsync sed usbutils openvpn iperf \
lcr"
lcr cronie"

View File

@ -11,6 +11,8 @@ module_autoload_mISDN_l1loop = "mISDN_l1loop"
module_autoload_mISDN_dsp = "mISDN_dsp"
module_conf_mISDN_l1loop = "options mISDN_l1loop pri=1 nchannel=20"
KERNEL_MODULE_PROBECONF_append = "mISDN_l1loop mISDN_dsp"
FILES_${PN} = ""
# Remove when using a Poky/OE-Core with that includes e0bf758982843ec1981b74410616b3492c599d06

View File

@ -12,14 +12,13 @@ BTS_FIRMWARE_NAME_sysmobts-v1 = "sysmobts-v1"
# Overrides for the sysmocom bts v2
BTS_FIRMWARE_NAME_sysmobts-v2 = "sysmobts-v2"
BTS_FIRMWARE_NAME_sysmobts-2050 = "sysmobts-v2"
SRCREV = "9610e792ffde7fb2599d19ca6d2a03230f2043c6"
PR = "r35"
PR = "r36"
PV = "${LINUX_VERSION}+git${SRCPV}"
SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=v3.10 \
SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=linux-3.10.50 \
file://defconfig"
# tmp disabled.. patch needs to be rebased for 3.10
@ -27,7 +26,7 @@ SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=v3.10 \
S = "${WORKDIR}/git"
COMPATIBLE_MACHINE = "(sysmobts-v1|sysmobts-v2|sysmobts-2050|sysmocom-bsc)"
COMPATIBLE_MACHINE = "(sysmobts-v1|sysmobts-v2|sysmocom-bsc)"
EXTRA_OEMAKE += "KALLSYMS_EXTRA_PASS=1"
# we do not want to have the kernel image inside the kernel
@ -50,6 +49,8 @@ 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"
# module configs (alphabetically sorted)
module_conf_dspdl_dm644x = "options dspdl_dm644x fw_name=${BTS_FIRMWARE_NAME}.out debug=0"
module_conf_fpgadl_par = "options fpgadl_par fw_name=${BTS_FIRMWARE_NAME}.bit"

View File

@ -1,5 +1,5 @@
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/${PN}-${PV}:${SYSMOCOM}/${PN}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/${PN}-${PV}:${SYSMOCOM}/${PN}:"
PRINC = "9"
inherit update-rc.d

View File

@ -0,0 +1,36 @@
#!/bin/sh
DAEMON=/usr/sbin/ifplugd
NAME=ifplugd
DESC="Busybox ifplugd Server"
ARGS=" -i eth0 -M -I -r /etc/ifplugd.sh"
test -f $DAEMON || exit 1
set -e
case "$1" in
start)
echo -n "starting $DESC: $NAME... "
/sbin/start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
echo "done."
;;
stop)
echo -n "stopping $DESC: $NAME... "
/sbin/start-stop-daemon -K -n $NAME
echo "done."
;;
restart)
echo "Not restarting $DESC: $NAME... "
;;
reload)
echo -n "reloading $DESC: $NAME... "
killall -HUP $(basename ${DAEMON})
echo "done."
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
;;
esac
exit 0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
Upstream-Status: Backport
Signed-off-by: Henning Heinold <henning@itconsulting-heinold.de>
From da331d779c19d7d5d4ef05152ee467d617913a01 Mon Sep 17 00:00:00 2001
From: Tito Ragusa <farmatito@tiscali.it>
Date: Sun, 4 Aug 2013 18:08:40 +0200
Subject: [PATCH 001/104] ifplugd: use a larger netlink buffer
function old new delta
check_existence_through_netlink 310 321 +11
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
networking/ifplugd.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/networking/ifplugd.c b/networking/ifplugd.c
index 3cdc2c9..b578f4c 100644
--- a/networking/ifplugd.c
+++ b/networking/ifplugd.c
@@ -451,20 +451,24 @@ static smallint detect_link(void)
static NOINLINE int check_existence_through_netlink(void)
{
int iface_len;
- char replybuf[1024];
+ /* Buffer was 1K, but on linux-3.9.9 it was reported to be too small.
+ * netlink.h: "limit to 8K to avoid MSG_TRUNC when PAGE_SIZE is very large".
+ * Note: on error returns (-1) we exit, no need to free replybuf.
+ */
+ enum { BUF_SIZE = 8 * 1024 };
+ char *replybuf = xmalloc(BUF_SIZE);
iface_len = strlen(G.iface);
while (1) {
struct nlmsghdr *mhdr;
ssize_t bytes;
- bytes = recv(netlink_fd, &replybuf, sizeof(replybuf), MSG_DONTWAIT);
+ bytes = recv(netlink_fd, replybuf, BUF_SIZE, MSG_DONTWAIT);
if (bytes < 0) {
if (errno == EAGAIN)
- return G.iface_exists;
+ goto ret;
if (errno == EINTR)
continue;
-
bb_perror_msg("netlink: recv");
return -1;
}
@@ -507,6 +511,8 @@ static NOINLINE int check_existence_through_netlink(void)
}
}
+ ret:
+ free(replybuf);
return G.iface_exists;
}
--
1.7.10.4

View File

@ -1,7 +1,7 @@
S_THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
FILESPATH =. "${@base_set_filespath(["${S_THISDIR}/${PN}"], d)}:"
PRINC="22"
PRINC="23"
SRC_URI += "file://journald.conf \
file://0001-Feature-switch-ListenDatagram-from-run-systemd-journ.patch \
@ -10,7 +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_sysmobts-2050 = " file://system.conf"
SRC_URI_append_sysmocom-odu = " file://system.conf"
# Disable depedency on dbus
RDEPENDS_${PN}_remove = "dbus"
@ -44,20 +44,6 @@ pkg_postinst_${PN}_append () {
systemctl ${OPTS} mask systemd-journal-flush.service
}
pkg_postinst_${PN}_append_sysmobts-2050 () {
cd $D${sysconfdir}/init.d
echo "Disabling ttyS0 for sysmobts-2050:"
OPTS=""
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
systemctl ${OPTS} mask serial-getty@ttyS0.service
}
do_install_append() {
install -m 0644 ${WORKDIR}/journald.conf ${D}${sysconfdir}/systemd/

View File

@ -1,4 +1,4 @@
FILESEXTRAPATHS := "${THISDIR}/files"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://0001-update-rc.d-make-s-a-noop-when-systemd-is-present.patch"

View File

@ -2,7 +2,7 @@ DESCRIPTION = "sysmocom OsmoBTS"
LICENSE = "AGPLv3"
LIC_FILES_CHKSUM="file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=sysmocom/features/handover;name=osmobts;destsuffix=git \
SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=master;name=osmobts;destsuffix=git \
git://git.osmocom.org/openbsc;protocol=git;branch=master;name=openbsc;destsuffix=openbsc"
SRCREV_osmobts = "04585dd90a1439e256d54affe4ccea113455cbe7"
SRCREV_openbsc = "a4faeb1a79eac3c8d333ded27600228cc5e3a71b"
@ -17,7 +17,8 @@ RCONFLICTS_${PN} = "sysmobts-firmware (< 3.11)"
EXTRA_OECONF += "--enable-sysmocom-bts"
inherit autotools update-rc.d
inherit autotools update-rc.d pkgconfig
# Select the API version
inherit femtobts_api

View File

@ -2,7 +2,7 @@ DESCRIPTION = "Osmocom PCU for sysmoBTS"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://git.osmocom.org/osmo-pcu.git;protocol=git;branch=sysmocom/master"
SRC_URI = "git://git.osmocom.org/osmo-pcu.git;protocol=git;branch=master"
SRCREV = "f3405e5b0342362d5d592f013014847a4dc135d8"
PV = "0.4+git${SRCPV}"
PR = "r2.${META_TELEPHONY_OSMO_INC}"
@ -15,7 +15,7 @@ RDEPENDS_${PN} = "osmo-bts (>= 0.4.0)"
EXTRA_OECONF_sysmobts-v2 += "--enable-sysmocom-bts --enable-sysmocom-dsp"
inherit autotools_stage
inherit autotools pkgconfig
# Select the API version
inherit femtobts_api

View File

@ -0,0 +1,4 @@
# PN/PV are wrong inside the .inc file with 1.19.1
SYSMOCOM_ORIG_PV := "${PV}"
require recipes-core/busybox/${PN}_sysmocom.inc
require recipes-core/busybox/${PN}_sysmocom_systemd.inc

View File

@ -0,0 +1,2 @@
# add e2fsprogs for resize2fs need for bts installation
IMAGE_INSTALL_append = " e2fsprogs "

View File

@ -0,0 +1 @@
require recipes-fixes/${PN}/${PN}_sysmocom_systemd.inc

View File

@ -0,0 +1 @@
require recipes-fixes/dropbear/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-bsp/netbase/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-core/initrdscripts/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-bsp/netbase/${PN}_sysmocom.inc

View File

@ -0,0 +1,5 @@
# For backwards compatibility after rename
RPROVIDES_${PN} = "task-core-boot"
RREPLACES_${PN} = "task-core-boot"
RCONFLICTS_${PN} = "task-core-boot"

View File

@ -0,0 +1 @@
require recipes-fixes/${PN}/${PN}_sysmocom.inc

View File

@ -0,0 +1,2 @@
require recipes-fixes/systemd/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-fixes/${PN}/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-sysmobts/uboot/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-fixes/${PN}/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-fixes/${PN}/${PN}_angstrom.inc

View File

@ -0,0 +1 @@
require recipes-bsp/watchdog/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-fixes/wireless-tools/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-fixes/${PN}/${PN}_sysmocom.inc

View File

@ -0,0 +1 @@
require recipes-fixes/${PN}/${PN}_sysmocom.inc