summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2022-05-24 12:36:48 -0500
committerJeff Hatch <jhatch@multitech.com>2022-05-24 12:36:48 -0500
commit6f469742726c76af64736215ed34e1349be233fe (patch)
tree33dcc332265c0966b87d094bac85e40228b15f18
parentb2214bae4b5bb177642eeb9f4a27f8b9bcf9c36f (diff)
parent92044fca6a009f99af1fb9df1eb86d3992d7c7eb (diff)
downloadmeta-mlinux-6f469742726c76af64736215ed34e1349be233fe.tar.gz
meta-mlinux-6f469742726c76af64736215ed34e1349be233fe.tar.bz2
meta-mlinux-6f469742726c76af64736215ed34e1349be233fe.zip
Merge branch 'mpower-dev-nxp' into 6
-rw-r--r--recipes-connectivity/lora/lora-gateway-sx1303/LICENSE.TXT80
-rw-r--r--recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU8683
-rw-r--r--recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US9153
-rw-r--r--recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU8683
-rw-r--r--recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US9153
-rw-r--r--recipes-connectivity/lora/lora-network-server_2.6.2.bb2
-rw-r--r--recipes-core/base-files/fstab-ubifs/fstab4
-rw-r--r--recipes-core/base-files/fstab-ubifs_1.0.bb2
-rw-r--r--recipes-core/multitech/overlayfs-init-ubi/overlayfs.init27
-rw-r--r--recipes-core/multitech/overlayfs-init-ubi_0.1.bb2
-rw-r--r--recipes-core/sysvinit/sysvinit/bootlogd-support-more-console-names.patch66
-rw-r--r--recipes-core/sysvinit/sysvinit_2.96.bbappend10
-rw-r--r--recipes-core/udev/eudev/ubi.rules7
-rw-r--r--recipes-core/udev/eudev_%.bbappend4
14 files changed, 185 insertions, 31 deletions
diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/LICENSE.TXT b/recipes-connectivity/lora/lora-gateway-sx1303/LICENSE.TXT
new file mode 100644
index 0000000..a59e967
--- /dev/null
+++ b/recipes-connectivity/lora/lora-gateway-sx1303/LICENSE.TXT
@@ -0,0 +1,80 @@
+Copyright (c) 2019, SEMTECH S.A.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Semtech corporation nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL SEMTECH S.A. BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+--- For the parson library used by the packet forwarder ---
+
+Parson ( http://kgabis.github.com/parson/ )
+Copyright (c) 2012 Krzysztof Gabis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+--- For the tinyMT32 library used by the HAL ---
+
+Copyright (c) 2011 Mutsuo Saito, Makoto Matsumoto, Hiroshima
+University and The University of Tokyo. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of the Hiroshima University nor the names of
+ its contributors may be used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868
index 8ef311d..593813b 100644
--- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868
+++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.EU868
@@ -103,7 +103,8 @@
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
- "gps_tty_path": "/dev/ttyS0",
+ "gps" : true,
+ "gps_tty_path": "/dev/gps0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915
index 0611c72..3be6a33 100644
--- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915
+++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTAC_003_0_0.US915
@@ -90,7 +90,8 @@
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
- "gps_tty_path": "/dev/ttyS0",
+ "gps" : true,
+ "gps_tty_path": "/dev/gps0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868
index c692a53..3ce12b9 100644
--- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868
+++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.EU868
@@ -103,7 +103,8 @@
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
- "gps_tty_path": "/dev/ttyS0",
+ "gps" : false,
+ "gps_tty_path": "/dev/gps0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
diff --git a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915 b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915
index ad550a2..463c8f0 100644
--- a/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915
+++ b/recipes-connectivity/lora/lora-gateway-sx1303/global_conf.json.MTCAP3.US915
@@ -90,7 +90,8 @@
"forward_crc_error": false,
"forward_crc_disabled": false,
/* GPS configuration */
- "gps_tty_path": "/dev/ttyS0",
+ "gps" : false,
+ "gps_tty_path": "/dev/gps0",
/* GPS reference coordinates */
"ref_latitude": 0.0,
"ref_longitude": 0.0,
diff --git a/recipes-connectivity/lora/lora-network-server_2.6.2.bb b/recipes-connectivity/lora/lora-network-server_2.6.2.bb
index f94678c..de3b950 100644
--- a/recipes-connectivity/lora/lora-network-server_2.6.2.bb
+++ b/recipes-connectivity/lora/lora-network-server_2.6.2.bb
@@ -4,7 +4,7 @@ SECTION = "console/utils"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2b9a30a3082ddccd2c695a4dbeeab80d"
DEPENDS = "jsoncpp libmts mosquitto sqlite3 curl gnutls"
-RDEPENDS_${PN} += "lora-packet-forwarder logrotate bash lora-logging jsoncpp"
+RDEPENDS_${PN} += "logrotate bash lora-logging jsoncpp"
PR = "r0"
CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server"
diff --git a/recipes-core/base-files/fstab-ubifs/fstab b/recipes-core/base-files/fstab-ubifs/fstab
index 8cca798..4560bb3 100644
--- a/recipes-core/base-files/fstab-ubifs/fstab
+++ b/recipes-core/base-files/fstab-ubifs/fstab
@@ -6,5 +6,5 @@ tmpfs /run tmpfs mode=0755,nodev,nosuid,stri
tmpfs /var/volatile tmpfs defaults 0 0
configfs /sys/kernel/config configfs defaults 0 0
-ubi0:config /var/config ubifs defaults 0 0
-ubi0:oem /var/oem ubifs defaults,ro 0 0
+ubi0:config1 /var/config ubifs defaults 0 0
+ubi0:oem1 /var/oem ubifs defaults,ro 0 0
diff --git a/recipes-core/base-files/fstab-ubifs_1.0.bb b/recipes-core/base-files/fstab-ubifs_1.0.bb
index cd2102a..533293a 100644
--- a/recipes-core/base-files/fstab-ubifs_1.0.bb
+++ b/recipes-core/base-files/fstab-ubifs_1.0.bb
@@ -1,7 +1,7 @@
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit allarch
-PR = "r1"
+PR = "r2"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PROVIDES = "fstab"
DEPENDS = "base-files"
diff --git a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init
index 7fc7f7e..f19abef 100644
--- a/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init
+++ b/recipes-core/multitech/overlayfs-init-ubi/overlayfs.init
@@ -12,7 +12,7 @@ USER_PARTITION="ubi0:user-data"
# Erase the file system
DO_ERASE_PERSISTENT="/mnt/user/.persistent/mts_do_erase_persistent"
# Remove files not hidden
-DO_CLEAR_PERSISTENT="/mnt/user/.persistent/mts_do_clear_persistent"
+DO_CLEAR_PERSISTENT=$(fw_printenv default_reset_f | cut -d '"' -f2 | grep -Eo '[0-9]+$' || true)
pid=$$
prefix="<3>overlayrootfs-generator[${pid}]: "
@@ -31,7 +31,7 @@ mnt_user() {
mount -t ubifs $USER_PARTITION $MNT_USER
}
-fs="/run /dev /proc /sys /sys/kernel/security /dev/shm /dev/pts /run /sys/fs/cgroup /sys/fs/cgroup/unified
+fs="/run /dev /proc /sys /sys/kernel/security /dev/shm /dev/pts /sys/fs/cgroup /sys/fs/cgroup/unified
/sys/fs/cgroup/systemd /sys/fs/cgroup/devices /sys/fs/cgroup/freezer /sys/fs/cgroup/pids /sys/fs/cgroup/memory
/dev/mqueue /sys/kernel/debug /tmp /sys/fs/fuse/connections /sys/kernel/config /var/volatile"
@@ -69,7 +69,7 @@ do_clear_old() {
mv "$FILE_PATH" "$MNT_USER/$FILE_NAME.old" 2>&1 | logpipe
done
do_remove_old
- rm -f $DO_CLEAR_PERSISTENT
+ fw_setenv default_reset_f 0
}
# Most efficient way to clear UBIFS file system
@@ -99,7 +99,7 @@ do_rw_mount() {
if [[ -f $DO_ERASE_PERSISTENT ]] ; then
do_erase_old
- elif [[ -f $DO_CLEAR_PERSISTENT ]] ; then
+ elif [[ "$DO_CLEAR_PERSISTENT" -eq 1 ]] ; then
do_clear_old
fi
@@ -122,31 +122,14 @@ do_rw_mount() {
umount -l /var/volatile >/dev/null 2>&1
cgroupmnts=$(sed -r -e 's/[^[:space:]]*[[:space:]]//' -e 's/[[:space:]]+.*//g' /proc/mounts | grep '^/orig')
for mp in ${cgroupmnts} ; do
- if [[ $mp != /orig ]] && [[ -d $mp ]] ; then
+ if [[ $mp != /orig ]] && [[ $mp != /orig/mnt* ]] && [[ -d $mp ]] ; then
umount -l $mp >/dev/null 2>&1
fi
done
}
-
-TMP=/var/volatile
-# Set the suffix number in /var/oem and /var/config to match root
-fix_volume_names() {
- if ! [[ $(cat /proc/cmdline) =~ root=ubi0:rootfs([0-9]+) ]] ; then
- loginfo "Cannot find root=ubi0:rootfs in /proc/cmdline"
- fi
- vol_suffix=${BASH_REMATCH[1]}
- echo $vol_suffix
- sed -r "s/(ubi0:(oem|config))([0-9]*)/\1${vol_suffix}/" /etc/fstab >${TMP}/fstab
- if ! cmp ${TMP}/fstab /etc/fstab ; then
- loginfo "Updating fstab with new volume names"
- cp ${TMP}/fstab /etc/fstab
- fi
-}
-
do_start() {
do_rw_mount
- fix_volume_names
}
case $1 in
diff --git a/recipes-core/multitech/overlayfs-init-ubi_0.1.bb b/recipes-core/multitech/overlayfs-init-ubi_0.1.bb
index a14ed2e..b2d98af 100644
--- a/recipes-core/multitech/overlayfs-init-ubi_0.1.bb
+++ b/recipes-core/multitech/overlayfs-init-ubi_0.1.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.multitech.com/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PACKAGE_ARCH = "all"
-PR = "r5"
+PR = "7"
RDEPENDS_${PN} += "bash"
SRC_URI = " \
diff --git a/recipes-core/sysvinit/sysvinit/bootlogd-support-more-console-names.patch b/recipes-core/sysvinit/sysvinit/bootlogd-support-more-console-names.patch
new file mode 100644
index 0000000..2286750
--- /dev/null
+++ b/recipes-core/sysvinit/sysvinit/bootlogd-support-more-console-names.patch
@@ -0,0 +1,66 @@
+From 8a085ea9b7f2d8e59cbf17e9c04b155fddab4dd9 Mon Sep 17 00:00:00 2001
+From: Jesse Smith <jsmith@resonatingmedia.com>
+Date: Tue, 3 Aug 2021 18:21:16 -0300
+Subject: Applied patch from Matthias Schiffer which allows bootlogd to read
+ from a wider range of consoles. The console name is already passed in from
+ the kernel command line using "console=". We no longer filter out names as
+ strictly but do now check to confirm the "console=" device points to a valid
+ TTY.
+
+---
+ src/bootlogd.c | 25 ++++++++++++++++++++++++-
+ 1 file changed, 24 insertions(+), 1 deletion(-)
+
+diff --git a/src/bootlogd.c b/src/bootlogd.c
+index 787db87..78e4c81 100644
+--- a/src/bootlogd.c
++++ b/src/bootlogd.c
+@@ -212,6 +212,22 @@ int findpty(int *master, int *slave, char *name)
+
+ return 0;
+ }
++
++static int istty(const char *dev)
++{
++ int fd, ret;
++
++ fd = open(dev, O_RDONLY|O_NONBLOCK);
++ if (fd < 0)
++ return 0;
++
++ ret = isatty(fd);
++
++ close(fd);
++
++ return ret;
++}
++
+ /*
+ * See if a console taken from the kernel command line maps
+ * to a character device we know about, and if we can open it.
+@@ -228,7 +244,7 @@ int isconsole(char *s, char *res, int rlen)
+ l = strlen(c->cmdline);
+ if (sl <= l) continue;
+ p = s + l;
+- if (strncmp(s, c->cmdline, l) != 0 || !isdigit(*p))
++ if (strncmp(s, c->cmdline, l) != 0)
+ continue;
+ for (i = 0; i < 2; i++) {
+ snprintf(res, rlen, i ? c->dev1 : c->dev2, p);
+@@ -239,6 +255,13 @@ int isconsole(char *s, char *res, int rlen)
+ }
+ }
+ }
++
++ /* Fallback: accept any TTY device */
++ snprintf(res, rlen, "/dev/%s", s);
++ if ((q = strchr(res, ',')) != NULL) *q = 0;
++ if (istty(res))
++ return 1;
++
+ return 0;
+ }
+
+--
+cgit v1.1
+
diff --git a/recipes-core/sysvinit/sysvinit_2.96.bbappend b/recipes-core/sysvinit/sysvinit_2.96.bbappend
new file mode 100644
index 0000000..1f30887
--- /dev/null
+++ b/recipes-core/sysvinit/sysvinit_2.96.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+# Backport from sysvinit 3.00. Remove bbappend when updating the main recipe to
+# 3.00 or newer.
+
+PR = "r0"
+
+SRC_URI_append = " \
+ file://bootlogd-support-more-console-names.patch \
+"
diff --git a/recipes-core/udev/eudev/ubi.rules b/recipes-core/udev/eudev/ubi.rules
new file mode 100644
index 0000000..f681e27
--- /dev/null
+++ b/recipes-core/udev/eudev/ubi.rules
@@ -0,0 +1,7 @@
+SUBSYSTEM!="ubi", GOTO="ubi_end"
+# only ubi devices
+KERNEL!="ubi*", GOTO="ubi_end"
+
+SUBSYSTEM=="ubi", KERNEL=="ubi*_*", SYMLINK+="ubi_%s{name}"
+
+LABEL="ubi_end"
diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend
index f669a76..a7b0d67 100644
--- a/recipes-core/udev/eudev_%.bbappend
+++ b/recipes-core/udev/eudev_%.bbappend
@@ -6,6 +6,7 @@ PR .= ".mlinux8"
# add custom rules for persistent modem device names
SRC_URI += "file://cellular_radios.rules \
file://cellular_radios.sh \
+ file://ubi.rules \
file://${MACHINE}.rules"
do_install_append() {
@@ -15,4 +16,7 @@ do_install_append() {
install -m 755 ${WORKDIR}/cellular_radios.sh ${D}${sysconfdir}/udev/scripts/
}
+do_install_append_mtcap3() {
+ install -m 644 ${WORKDIR}/ubi.rules ${D}${sysconfdir}/udev/rules.d/
+}