diff --git a/meta-sysmocom-bsp/recipes-fixes/dropbear/dropbear_sysmocom.inc b/meta-sysmocom-bsp/recipes-fixes/dropbear/dropbear_sysmocom.inc new file mode 100644 index 0000000000..53c41f4601 --- /dev/null +++ b/meta-sysmocom-bsp/recipes-fixes/dropbear/dropbear_sysmocom.inc @@ -0,0 +1,4 @@ +THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESPATH =. "${@base_set_filespath(["${THISDIR}/files"], d)}:" + +PRINC="2" diff --git a/meta-sysmocom-bsp/recipes-fixes/dropbear/files/init b/meta-sysmocom-bsp/recipes-fixes/dropbear/files/init new file mode 100644 index 0000000000..8b99ecb4a3 --- /dev/null +++ b/meta-sysmocom-bsp/recipes-fixes/dropbear/files/init @@ -0,0 +1,112 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: sshd +# Required-Start: $remote_fs $syslog $networking +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +# Short-Description: Dropbear Secure Shell server +### END INIT INFO +# +# Do not configure this file. Edit /etc/default/dropbear instead! +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/dropbear +NAME=dropbear +DESC="Dropbear SSH server" + +DROPBEAR_PORT=22 +DROPBEAR_EXTRA_ARGS= +NO_START=0 + +set -e + +test ! -r /etc/default/dropbear || . /etc/default/dropbear +test "$NO_START" = "0" || exit 0 +test -x "$DAEMON" || exit 0 +test ! -h /var/service/dropbear || exit 0 + +readonly_rootfs=0 +for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }' &2 + exit 1 + ;; +esac + +exit 0 diff --git a/meta-sysmocom-bsp/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb b/meta-sysmocom-bsp/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb deleted file mode 100644 index 718002492e..0000000000 --- a/meta-sysmocom-bsp/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb +++ /dev/null @@ -1,14 +0,0 @@ -COMPATIBLE_MACHINE = "sysmobts-v2" -FIRMWARE-VERSION = "superfemto_v${PV}" -PR = "r2.${INC_PR}" - -require ${PN}.inc - -do_install() { - install -d ${D}/lib/firmware/ - - install -m 0666 ${S}/Image/Dsp/superfemto.out ${D}/lib/firmware/sysmobts-v2.out - install -m 0666 ${S}/Image/Fpga/superfemto.bit ${D}/lib/firmware/sysmobts-v2.bit -} - -FILES_${PN} = "/lib/firmware/sysmobts-v2*" diff --git a/meta-sysmocom-bsp/recipes-sysmobts/firmware/sysmobts-firmware_3.1.bb b/meta-sysmocom-bsp/recipes-sysmobts/firmware/sysmobts-firmware_3.1.bb new file mode 100644 index 0000000000..7afe5f47f3 --- /dev/null +++ b/meta-sysmocom-bsp/recipes-sysmobts/firmware/sysmobts-firmware_3.1.bb @@ -0,0 +1,48 @@ +COMPATIBLE_MACHINE = "sysmobts-v2" +FIRMWARE-VERSION = "superfemto_v${PV}" +PR = "r6.${INC_PR}" + +require ${PN}.inc + +S2 = "${WORKDIR}/sysmobts-firmware-superfemto_v3.0.1pre" + +# Currently there is no common Firmware for RevC and RevD Hardware and we +# need to handle this differently for now. + +SRC_URI = "file://sysmobts-firmware-${FIRMWARE-VERSION}.tar.bz2 \ + file://sysmobts-firmware-superfemto_v3.0.1pre.tar.bz2" + + +do_install() { + install -d ${D}/lib/firmware/ + + # Install the firmware for revD + install -m 0666 ${S}/Image/Dsp/superfemto.out ${D}/lib/firmware/sysmobts-v2-revd.out + install -m 0666 ${S}/Image/Fpga/superfemto.bit ${D}/lib/firmware/sysmobts-v2-revd.bit + + # Install the firmware for revC + install -m 0666 ${S2}/Image/Dsp/superfemto.out ${D}/lib/firmware/sysmobts-v2-revc.out + install -m 0666 ${S2}/Image/Fpga/superfemto.bit ${D}/lib/firmware/sysmobts-v2-revc.bit +} + +# Change a symlink depending on revC or revD. We are using the EEPROM size +# as an indicator for revC and revD +pkg_postinst_${PN} () { +# Building the rootfs? +if [ "x$D" != "x" ]; then + exit 1 +fi + +EEPROM_SIZE=`stat -c '%s' /sys/bus/i2c/devices/1-0050/eeprom` +if [ $EEPROM_SIZE -eq 256 ]; then + cd /lib/firmware + ln -fs sysmobts-v2-revc.out sysmobts-v2.out + ln -fs sysmobts-v2-revc.bit sysmobts-v2.bit +else + cd /lib/firmware + ln -fs sysmobts-v2-revd.out sysmobts-v2.out + ln -fs sysmobts-v2-revd.bit sysmobts-v2.bit +fi +} + +FILES_${PN} = "/lib/firmware/sysmobts-v2*" diff --git a/meta-sysmocom-bsp/recipes-sysmobts/osmo-bts/osmo-bts_git.bb b/meta-sysmocom-bsp/recipes-sysmobts/osmo-bts/osmo-bts_git.bb index a0f0f0393b..9969df4255 100644 --- a/meta-sysmocom-bsp/recipes-sysmobts/osmo-bts/osmo-bts_git.bb +++ b/meta-sysmocom-bsp/recipes-sysmobts/osmo-bts/osmo-bts_git.bb @@ -7,7 +7,7 @@ SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=master;name=os SRCREV_osmobts = "0d30b5d81863fb70c6270fe1ffefe4fd426b0cd3" SRCREV_openbsc = "25b70cea9d9521b081ea0cc524f5d157a1b89baf" PV = "0.1.0+git${SRCPV}" -PR = "r4.${META_TELEPHONY_OSMO_INC}" +PR = "r6.${META_TELEPHONY_OSMO_INC}" S = "${WORKDIR}/git" SRCREV_FORMAT = "openbsc-rosmobts" diff --git a/meta-sysmocom-bsp/yocto-shared/dropbear_0.52.bbappend b/meta-sysmocom-bsp/yocto-shared/dropbear_0.52.bbappend new file mode 100644 index 0000000000..a3a97a3fa8 --- /dev/null +++ b/meta-sysmocom-bsp/yocto-shared/dropbear_0.52.bbappend @@ -0,0 +1 @@ +require recipes-fixes/dropbear/${PN}_sysmocom.inc