diff --git a/meta-sysmocom-bsp/conf/machine/sysmobts-2050.conf b/meta-sysmocom-bsp/conf/machine/sysmobts-2050.conf index 92261517dd..a58dcd03d6 100644 --- a/meta-sysmocom-bsp/conf/machine/sysmobts-2050.conf +++ b/meta-sysmocom-bsp/conf/machine/sysmobts-2050.conf @@ -6,6 +6,8 @@ require sysmobts-v2.conf MACHINEOVERRIDES = "${MACHINE}:sysmobts-v2" +# TODO: Remove this file once edison support is dropped from this layer + # we are disabling the serial console for now, as it may interfere with # the MSP430 service processor communication until proper filtering/splitting # of the serial stream is implemented in the kernel diff --git a/meta-sysmocom-bsp/recipes-apps/sysmocom-backup/files/sysmocom-restore b/meta-sysmocom-bsp/recipes-apps/sysmocom-backup/files/sysmocom-restore index 59f865374d..08dafe8ae3 100755 --- a/meta-sysmocom-bsp/recipes-apps/sysmocom-backup/files/sysmocom-restore +++ b/meta-sysmocom-bsp/recipes-apps/sysmocom-backup/files/sysmocom-restore @@ -5,7 +5,7 @@ do_extract() { SEARCH=`tar -tvf $1 | grep $2` RES=$? if [ $RES = 0 ]; then - tar -C / -xvf $1 --strip=1 $2 + tar --transform='s,^content/,,' -C / -xvf $1 $2 else echo "Directory '$2' is not in backup '$1'." fi diff --git a/meta-sysmocom-bsp/recipes-apps/sysmocom-backup/sysmocom-backup_1.0.bb b/meta-sysmocom-bsp/recipes-apps/sysmocom-backup/sysmocom-backup_1.0.bb index deb21bc9b5..5d58031a1c 100644 --- a/meta-sysmocom-bsp/recipes-apps/sysmocom-backup/sysmocom-backup_1.0.bb +++ b/meta-sysmocom-bsp/recipes-apps/sysmocom-backup/sysmocom-backup_1.0.bb @@ -1,7 +1,7 @@ DESCRIPTION = "sysmocom config backup and restore scripts" LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" -PR = "r10" +PR = "r11" SRC_URI = "file://sysmocom-backup file://sysmocom-restore" RDEPENDS_${PN} = "tar" diff --git a/meta-sysmocom-bsp/recipes-apps/tasks/task-sysmocom-bts.bb b/meta-sysmocom-bsp/recipes-apps/tasks/task-sysmocom-bts.bb index 79093a8c8a..a3095639a6 100644 --- a/meta-sysmocom-bsp/recipes-apps/tasks/task-sysmocom-bts.bb +++ b/meta-sysmocom-bsp/recipes-apps/tasks/task-sysmocom-bts.bb @@ -4,13 +4,13 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" DEPENDS = "virtual/kernel" ALLOW_EMPTY_${PN} = "1" -PR = "r21" +PR = "r23" CALIB = "" CALIB_sysmobts-v2 = "sysmobts-calib sysmobts-util" UTIL = "" -UTIL_sysmobts-2050 = "sbts2050-util gpsd gps-utils" +UTIL_sysmobts-v2 = "sbts2050-util gpsd gps-utils" # TODO: re-add femtobts-calib after it went through the API migration RDEPENDS_${PN} = "\ @@ -18,6 +18,7 @@ RDEPENDS_${PN} = "\ osmo-bts-remote \ osmo-pcu \ lmsensors-scripts \ + sysmobts-config \ ${CALIB} \ ${UTIL} \ " diff --git a/meta-sysmocom-bsp/recipes-apps/tasks/task-sysmocom-feed.bb b/meta-sysmocom-bsp/recipes-apps/tasks/task-sysmocom-feed.bb index 9d81911a60..2ce678cd14 100644 --- a/meta-sysmocom-bsp/recipes-apps/tasks/task-sysmocom-feed.bb +++ b/meta-sysmocom-bsp/recipes-apps/tasks/task-sysmocom-feed.bb @@ -3,10 +3,11 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" ALLOW_EMPTY_${PN} = "1" -PR = "r9" +PR = "r10" RDEPENDS_${PN} = "\ task-sysmocom-tools \ task-sysmocom-debug \ minicom vlan patch procps psmisc \ - ppp rsync sed usbutils openvpn iperf" + ppp rsync sed usbutils openvpn iperf \ + lcr" diff --git a/meta-sysmocom-bsp/recipes-bsp/linux/files/sysmocom-odu/defconfig b/meta-sysmocom-bsp/recipes-bsp/linux/files/sysmocom-odu/defconfig index fe94ee6d0a..ec141c2660 100644 --- a/meta-sysmocom-bsp/recipes-bsp/linux/files/sysmocom-odu/defconfig +++ b/meta-sysmocom-bsp/recipes-bsp/linux/files/sysmocom-odu/defconfig @@ -154,6 +154,16 @@ CONFIG_USB_USBNET=y # CONFIG_USB_BELKIN is not set # CONFIG_USB_ARMLINUX is not set # CONFIG_USB_NET_ZAURUS is not set +CONFIG_WLAN=y +CONFIG_RT2X00=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT33XX=y +CONFIG_RT2800USB_RT35XX=y +CONFIG_RT2800_LIB=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_WL12XX_MENU=y CONFIG_WL12XX=m CONFIG_WL12XX_SDIO=m diff --git a/meta-sysmocom-bsp/recipes-bsp/linux/linux-sysmocom_3.2.bb b/meta-sysmocom-bsp/recipes-bsp/linux/linux-sysmocom_3.2.bb index 523e070a26..f51aeca868 100644 --- a/meta-sysmocom-bsp/recipes-bsp/linux/linux-sysmocom_3.2.bb +++ b/meta-sysmocom-bsp/recipes-bsp/linux/linux-sysmocom_3.2.bb @@ -14,10 +14,10 @@ BTS_FIRMWARE_NAME_sysmobts-2050 = "sysmobts-v2" SRCREV = "bcc4fa827be7f59486ff305d664b42a142025f9b" # odu handling. -SRCREV_sysmocom-odu = "f11945e1d688bef5d2a81cc0255b19ed416cab42" -LINUX_VERSION_sysmocom-odu = "3.2.0" +SRCREV_sysmocom-odu = "6e6273dd4e6c29f9ed23e898393a3ab89647ef15" +LINUX_VERSION_sysmocom-odu = "3.2.63" -PR = "r34" +PR = "r35" PV = "${LINUX_VERSION}+git${SRCPV}" SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=v3.2 \ diff --git a/meta-sysmocom-bsp/recipes-bsp/watchdog/watchdog/sysmobts-2050/watchdog.conf b/meta-sysmocom-bsp/recipes-bsp/watchdog/watchdog/sysmobts-2050/watchdog.conf deleted file mode 100644 index 2209e90a5e..0000000000 --- a/meta-sysmocom-bsp/recipes-bsp/watchdog/watchdog/sysmobts-2050/watchdog.conf +++ /dev/null @@ -1,41 +0,0 @@ -#ping = 172.31.14.1 -#ping = 172.26.1.255 -#interface = eth0 -#file = /var/log/messages -#change = 1407 - -# Uncomment to enable test. Setting one of these values to '0' disables it. -# These values will hopefully never reboot your machine during normal use -# (if your machine is really hung, the loadavg will go much higher than 25) -#max-load-1 = 24 -#max-load-5 = 18 -#max-load-15 = 12 - -# Note that this is the number of pages! -# To get the real size, check how large the pagesize is on your machine. -#min-memory = 1 - -#repair-binary = /usr/sbin/repair -#repair-timeout = -#test-binary = -#test-timeout = - -watchdog-device = /dev/watchdog - -# Defaults compiled into the binary -#temperature-device = -#max-temperature = 120 - -# Defaults compiled into the binary -#admin = root -#interval = 1 -#logtick = 1 -#log-dir = /var/log/watchdog - -# This greatly decreases the chance that watchdog won't be scheduled before -# your machine is really loaded -realtime = yes -priority = 1 - -# Check if syslogd is still running by enabling the following line -#pidfile diff --git a/meta-sysmocom-bsp/recipes-core/images/core-image-minimal-initramfs.bbappend b/meta-sysmocom-bsp/recipes-core/images/core-image-minimal-initramfs.bbappend new file mode 100644 index 0000000000..26fd5b0491 --- /dev/null +++ b/meta-sysmocom-bsp/recipes-core/images/core-image-minimal-initramfs.bbappend @@ -0,0 +1,7 @@ +# we sed the udev automounter so it mounts all partions on the stick/sdcard readonly + +change_udev_automounter_ro() { + sed -i -e 's/\-t auto/\-t auto \-o ro/' ${IMAGE_ROOTFS}/etc/udev/scripts/mount.sh +} + +ROOTFS_POSTPROCESS_COMMAND += "change_udev_automounter_ro ; " diff --git a/meta-sysmocom-bsp/recipes-core/initrdscripts/files/init-install.sh b/meta-sysmocom-bsp/recipes-core/initrdscripts/files/init-install.sh index 18275486dc..4b8919b869 100644 --- a/meta-sysmocom-bsp/recipes-core/initrdscripts/files/init-install.sh +++ b/meta-sysmocom-bsp/recipes-core/initrdscripts/files/init-install.sh @@ -9,9 +9,32 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin # We want a 1 Gig partition on the cf partition_size=1000 +# Parse original arguments coming from the kernel cmdline. +# Then shift the first two arguments which contains +# partition information. +dev_name=$1 +shift +image_name=$1 +shift + +kernel_cmdline_console="" +kernel_cmdline_video_mode="" +kernel_cmdline_vga_mode="" + +while [ "$1" != "" ]; do + + echo "$1" | grep -q "console=" + success_console=$? + if [ $success_console -eq 0 ]; then + kernel_cmdline_console=$1 + fi + shift + +done + # Get a list of hard drives hdnamelist="" -live_dev_name=${1%%/*} +live_dev_name=${dev_name%%/*} echo "Searching for hard drives ..." @@ -120,7 +143,7 @@ mkdir /tgt_root mkdir -p /boot echo "Copying rootfs files..." -dd if=/media/$1/$2 of=$rootfs bs=1024 +dd if=/media/$dev_name/$image_name of=$rootfs bs=1024 # Handling of the target root partition mount $rootfs /tgt_root @@ -139,11 +162,13 @@ echo "Preparing boot partition..." GRUBCFG="/boot/grub/grub.cfg" mkdir -p $(dirname $GRUBCFG) +baudrate=`echo $kernel_cmdline_console | cut -f 2 -d ',' | cut -f 1 -d 'n'` + cat > $GRUBCFG << EOF default=0 timeout=1 -serial --unit=0 --speed=38400 +serial --unit=0 --speed=$baudrate terminal --timeout=2 serial terminal_input --append serial @@ -155,10 +180,11 @@ if [ -f /etc/grub.d/40_custom ] ; then cat /etc/grub.d/40_custom >> $GRUBCFG sed -i "s@__ROOTFS__@$rootfs $rootwait@g" $GRUBCFG - sed -i "s/__VIDEO_MODE__/$3/g" $GRUBCFG - sed -i "s/__VGA_MODE__/$4/g" $GRUBCFG - sed -i "s/__CONSOLE__/$5/g" $GRUBCFG + sed -i "s/__VIDEO_MODE__/$kernel_cmdline_video_mode/g" $GRUBCFG + sed -i "s/__VGA_MODE__/$kernel_cmdline_vga_mode/g" $GRUBCFG + sed -i "s/__CONSOLE__/$kernel_cmdline_console/g" $GRUBCFG sed -i "s/quiet/net.ifnames=0 quiet/g" $GRUBCFG + sed -i "s/rw/ro/g" $GRUBCFG sed -i "/#/d" $GRUBCFG sed -i "/exec tail/d" $GRUBCFG chmod 0444 $GRUBCFG @@ -172,10 +198,31 @@ umount /boot umount /tgt_root echo "Resizing partition" +e2fsck -f $rootfs || true resize2fs $rootfs - sync +echo "Re-mounting the root and trying to apply backup." +mount $rootfs /tgt_root + +echo "Finding backupfiles" +backupfile=`find /media/$dev_name/ -name "sysmocom-backup*.tar" | head -n1` +if [ -n "$backupfile" ]; then + if [ ! -r "$backupfile" ]; then + echo "configurations-file $backupfile it is not readable" + else + echo "restoring $backupfile" + backupfile_basename=`basename $backupfile` + cp $backupfile /tgt_root + chroot /tgt_root /usr/sbin/sysmocom-restore $backupfile_basename + rm /tgt_root/$backupfile_basename + fi +else + echo "No configurations-file found" +fi + +umount /tgt_root +sync echo "Remove your installation media, and press ENTER" diff --git a/meta-sysmocom-bsp/recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc b/meta-sysmocom-bsp/recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc index 0fca764c27..9ce47b14f6 100644 --- a/meta-sysmocom-bsp/recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc +++ b/meta-sysmocom-bsp/recipes-core/initrdscripts/initramfs-live-install_sysmocom.inc @@ -1,2 +1,4 @@ SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" FILESEXTRAPATHS_prepend := "${SYSMOCOM}/files:" + +RDEPENDS_${PN} += "e2fsprogs-e2fsck" diff --git a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/sysmobts-2050/gpsd-default b/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/sysmobts-2050/gpsd-default deleted file mode 100644 index ad4d32a7dd..0000000000 --- a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/sysmobts-2050/gpsd-default +++ /dev/null @@ -1,5 +0,0 @@ -# If you must specify a non-NMEA driver, uncomment and modify the next line -GPSD_SOCKET="/var/run/gpsd.sock" -GPSD_OPTIONS="" -GPS_DEVICES="/dev/ttyS2" - diff --git a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/sysmobts-v2/gpsd-default b/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/sysmobts-v2/gpsd-default index e37c3b56dd..ad4d32a7dd 100644 --- a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/sysmobts-v2/gpsd-default +++ b/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd/sysmobts-v2/gpsd-default @@ -1,5 +1,5 @@ # If you must specify a non-NMEA driver, uncomment and modify the next line GPSD_SOCKET="/var/run/gpsd.sock" -GPSD_OPTIONS="" -GPS_DEVICES="udp://127.0.0.1:12345 udp://127.0.0.1:12346" +GPSD_OPTIONS="" +GPS_DEVICES="/dev/ttyS2" diff --git a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.10.bb b/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.10.bb index c680ae164f..74c5e73ddf 100644 --- a/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.10.bb +++ b/meta-sysmocom-bsp/recipes-extra/gpsd/gpsd_3.10.bb @@ -6,7 +6,7 @@ DEPENDS = "ncurses python" #DEPENDS = "ncurses libusb1 python" PROVIDES = "virtual/gpsd" -PR = "r3.15" +PR = "r3.16" SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \ file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \ diff --git a/meta-sysmocom-bsp/recipes-fixes/wireless-tools/files/0001-Add-wifi2udp-program.patch b/meta-sysmocom-bsp/recipes-fixes/wireless-tools/files/0001-Add-wifi2udp-program.patch new file mode 100644 index 0000000000..231960b63f --- /dev/null +++ b/meta-sysmocom-bsp/recipes-fixes/wireless-tools/files/0001-Add-wifi2udp-program.patch @@ -0,0 +1,185 @@ +From 987960ea03c59a2ef9164e4f7309031ef4e0242d Mon Sep 17 00:00:00 2001 +Message-Id: <987960ea03c59a2ef9164e4f7309031ef4e0242d.1410189314.git.daniel@totalueberwachung.de> +From: Daniel Willmann +Date: Mon, 8 Sep 2014 15:53:54 +0200 +Subject: [PATCH 1/1] Add wifi2udp program + +--- + Makefile | 4 +- + wifi2udp.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 149 insertions(+), 1 deletion(-) + create mode 100644 wifi2udp.c + +Index: wireless_tools.29/Makefile +=================================================================== +--- wireless_tools.29.orig/Makefile 2014-09-08 17:27:45.000000000 +0200 ++++ wireless_tools.29/Makefile 2014-09-08 17:32:52.065211007 +0200 +@@ -48,7 +48,7 @@ + # Targets to build + STATIC=libiw.a + DYNAMIC=libiw.so.$(WT_VERSION) +-PROGS= iwconfig iwlist iwpriv iwspy iwgetid iwevent ifrename ++PROGS= iwconfig iwlist iwpriv iwspy iwgetid iwevent ifrename wifi2udp + MANPAGES8=iwconfig.8 iwlist.8 iwpriv.8 iwspy.8 iwgetid.8 iwevent.8 ifrename.8 + MANPAGES7=wireless.7 + MANPAGES5=iftab.5 +@@ -135,6 +135,8 @@ + + macaddr: macaddr.o $(IWLIB) + ++wifi2udp: wifi2udp.o $(IWLIB) ++ + iwmulticall: iwmulticall.o + $(CC) $(LDFLAGS) $(STRIPFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS) + +Index: wireless_tools.29/wifi2udp.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ wireless_tools.29/wifi2udp.c 2014-09-08 17:30:08.217211001 +0200 +@@ -0,0 +1,146 @@ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++static int verbose = 0; ++static int delay = 10; ++ ++static void escape_essid(const char *src, char *dst, ssize_t len) ++{ ++ int i, j; ++ ++ for (i = 0, j = 0; j < len; i++, j++) { ++ if (src[i] == '"') { ++ dst[j] = '\\'; ++ j++; ++ if (j == len) ++ break; ++ } ++ ++ dst[j] = src[i]; ++ ++ if (!src[i]) ++ return; ++ } ++} ++ ++static void scan_wifi(char *iface, const char *oduiface, const char *server, int port) ++{ ++ int sock, rc; ++ iwrange range; ++ struct ifreq buf; ++ char mac[20]; ++ ++ struct sockaddr_in remote; ++ struct hostent *hp; ++ ++ hp = gethostbyname(server); ++ if (!hp) { ++ printf("Could not resolve %s\n", server); ++ exit(-1); ++ } ++ ++ remote.sin_family = AF_INET; ++ memcpy(&remote.sin_addr, hp->h_addr, hp->h_length); ++ remote.sin_port = htons(port); ++ ++ /* Retrieve MAC address of Wifi card */ ++ sock = socket(PF_INET, SOCK_DGRAM, 0); ++ memset(&buf, 0, sizeof(buf)); ++ ++ strcpy(buf.ifr_name, oduiface); ++ ioctl(sock, SIOCGIFHWADDR, &buf); ++ iw_sawap_ntop(&buf.ifr_hwaddr, mac); ++ ++ sock = iw_sockets_open(); ++ ++ rc = iw_get_range_info(sock, iface, &range); ++ if (rc < 0) { ++ printf("iw_get_range_info() returned %i\n", rc); ++ exit(2); ++ } ++ ++ while (1) { ++ time_t now; ++ wireless_scan_head head; ++ wireless_scan *result; ++ /* Scan for wireless networks */ ++ rc = iw_scan(sock, iface, range.we_version_compiled, &head); ++ if (rc < 0) { ++ printf("iw_scan() returned %i\n", rc); ++ exit(2); ++ } ++ ++ now = time(NULL); ++ ++ /* Print the results */ ++ result = head.result; ++ while (NULL != result) { ++ char bssid[20]; ++ char line[1024]; ++ char essid_escaped[50]; ++ iw_sawap_ntop(&result->ap_addr, bssid); ++ ++ escape_essid(result->b.essid, essid_escaped, 50); ++ snprintf(line, 1024, "WIFI,%li,%s,\"%s\",%s,%0.0f,%i\r\n", now, mac, essid_escaped, bssid, result->b.freq/1000000, (int8_t)result->stats.qual.level); ++ if (verbose) ++ printf("%s", line); ++ rc = sendto(sock, line, strlen(line), 0, (struct sockaddr*)&remote, sizeof(remote)); ++ if (rc == -1) ++ printf("Failed to send message: %s\n", strerror(errno)); ++ result = result->next; ++ } ++ sleep(delay); ++ } ++} ++ ++static void usage(void) ++{ ++ printf("Usage: prog [options] host [port]\n"); ++} ++ ++int main(int argc, char *argv[]) ++{ ++ int option; ++ char *wifiiface = NULL, *ifacename = NULL, *server; ++ int port = 20001; ++ ++ while ((option = getopt(argc, argv, "?hvw:i:d:")) != -1) { ++ switch (option) { ++ case 'v': ++ verbose = 1; ++ break; ++ case 'w': ++ wifiiface = optarg; ++ break; ++ case 'i': ++ ifacename = optarg; ++ break; ++ case 'd': ++ delay = atoi(optarg); ++ break; ++ case '?': ++ case 'h': ++ usage(); ++ exit(1); ++ } ++ } ++ ++ if (optind < argc) { ++ server = argv[optind]; ++ optind++; ++ } else { ++ usage(); ++ exit(-1); ++ } ++ if (optind < argc) ++ port = atoi(argv[optind]); ++ ++ scan_wifi(wifiiface, ifacename, server, port); ++ ++ return 0; ++} diff --git a/meta-sysmocom-bsp/recipes-fixes/wireless-tools/files/wifi2udp.service b/meta-sysmocom-bsp/recipes-fixes/wireless-tools/files/wifi2udp.service new file mode 100644 index 0000000000..67dba6c87e --- /dev/null +++ b/meta-sysmocom-bsp/recipes-fixes/wireless-tools/files/wifi2udp.service @@ -0,0 +1,8 @@ +[Unit] +Description=WIFI scan service + +[Service] +ExecStartPre=/sbin/ifconfig wlan0 up +ExecStart=/usr/sbin/wifi2udp -w wlan0 -i eth0 10.3.0.1 +Restart=always +RestartSec=2 diff --git a/meta-sysmocom-bsp/recipes-fixes/wireless-tools/wireless-tools_sysmocom.inc b/meta-sysmocom-bsp/recipes-fixes/wireless-tools/wireless-tools_sysmocom.inc new file mode 100644 index 0000000000..7eea7f3dd0 --- /dev/null +++ b/meta-sysmocom-bsp/recipes-fixes/wireless-tools/wireless-tools_sysmocom.inc @@ -0,0 +1,21 @@ +THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESPATH =. "${@base_set_filespath(["${THISDIR}/files"], d)}:" + +PRINC="6" + +SRC_URI += "file://0001-Add-wifi2udp-program.patch \ + file://wifi2udp.service" + +PACKAGES =+ "wireless-tools-wifi2udp" + +FILES_wireless-tools-wifi2udp = "${sbindir}/wifi2udp \ + ${systemd_unitdir}/system/wifi2udp.service \ + ${systemd_unitdir}/system/multi-user.target.wants/wifi2udp.service" + +do_install_append() { + install -m 0755 wifi2udp ${D}${sbindir}/wifi2udp + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/wifi2udp.service ${D}${systemd_unitdir}/system/ + install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/ + ln -sf ../wifi2udp.service ${D}${systemd_unitdir}/system/multi-user.target.wants/ +} diff --git a/meta-sysmocom-bsp/recipes-sysmobts/sbts2050-util/sbts2050-util.inc b/meta-sysmocom-bsp/recipes-sysmobts/sbts2050-util/sbts2050-util.inc index 01e71ad2ba..a52ae6ebe6 100644 --- a/meta-sysmocom-bsp/recipes-sysmobts/sbts2050-util/sbts2050-util.inc +++ b/meta-sysmocom-bsp/recipes-sysmobts/sbts2050-util/sbts2050-util.inc @@ -11,7 +11,7 @@ do_compile() { : } -COMPATIBLE_MACHINE = "sysmobts-2050" +COMPATIBLE_MACHINE = "sysmobts-v2" PACKAGE_ARCH = "${MACHINE_ARCH}" INSANE_SKIP_${PN} += "already-stripped ldflags" diff --git a/meta-sysmocom-bsp/recipes-sysmobts/sysmobts-config/files/sysmobts-post-install-config b/meta-sysmocom-bsp/recipes-sysmobts/sysmobts-config/files/sysmobts-post-install-config new file mode 100644 index 0000000000..e2e0575113 --- /dev/null +++ b/meta-sysmocom-bsp/recipes-sysmobts/sysmobts-config/files/sysmobts-post-install-config @@ -0,0 +1,24 @@ +#!/bin/bash + + +prepare_sysmobts_2050() { + # Disable getty and mangle the config + /bin/systemctl mask serial-getty@ttyS0.service + + # We need to mange the systemd config file + sed -i s,#LogTarget=journal-or-kmsg,LogTarget=null, /etc/systemd/system.conf + sed -i s,#ShowStatus=yes,ShowStatus=no, /etc/systemd/system.conf + sed -i s,#DefaultStandardOutput=journal,DefaultStandardOutput=syslog, /etc/systemd/system.conf + sed -i s,#DefaultStandardError=inherit,DefaultStandardError=syslog, /etc/systemd/system.conf + sync +} + + +# +MODEL=`/usr/bin/sysmobts-util -r model-nr` + +if [ $MODEL -eq "2050" ]; +then + echo "Going to fix the configuration for sysmobts-2050" + prepare_sysmobts_2050 +fi diff --git a/meta-sysmocom-bsp/recipes-sysmobts/sysmobts-config/sysmobts-config_1.bb b/meta-sysmocom-bsp/recipes-sysmobts/sysmobts-config/sysmobts-config_1.bb new file mode 100644 index 0000000000..c6fd818952 --- /dev/null +++ b/meta-sysmocom-bsp/recipes-sysmobts/sysmobts-config/sysmobts-config_1.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Script to mangle the configuration" +SECTION = "core" +LICENSE = "CLOSED" + +SRC_URI = "file://sysmobts-post-install-config" +PR = "r1" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/sysmobts-post-install-config ${D}${bindir}/ +} + +pkg_postinst_${PN} () { +if test "x$D" != "x"; then + exit 1 +else + echo "Going to run device specific post configuration" + /usr/bin/sysmobts-post-install-config +fi +} + +PACKAGE_ARCH = "all" diff --git a/meta-sysmocom-bsp/yocto-dora/wireless-tools_29.bbappend b/meta-sysmocom-bsp/yocto-dora/wireless-tools_29.bbappend new file mode 100644 index 0000000000..ddc8865d5c --- /dev/null +++ b/meta-sysmocom-bsp/yocto-dora/wireless-tools_29.bbappend @@ -0,0 +1 @@ +require recipes-fixes/wireless-tools/${PN}_sysmocom.inc