From 20b10c6179a6cc17c30825475b6acfa613ef771b Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Wed, 10 Aug 2022 14:08:37 +0200 Subject: [PATCH 01/16] ostree-initrd: Adapt patch after update of meta-updater This patch is removing the logs from the ostree initramdisk. It had to be adapted in regards to latest changes in meta-updater. BugzID: 80886 --- .../0001-Remove-log-info-from-init.patch | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/bbappends/sota/recipes-sota/ostree-initrd/files/0001-Remove-log-info-from-init.patch b/bbappends/sota/recipes-sota/ostree-initrd/files/0001-Remove-log-info-from-init.patch index a234abc..323932e 100644 --- a/bbappends/sota/recipes-sota/ostree-initrd/files/0001-Remove-log-info-from-init.patch +++ b/bbappends/sota/recipes-sota/ostree-initrd/files/0001-Remove-log-info-from-init.patch @@ -1,52 +1,51 @@ -diff --git a/init.sh -index 4818a07..c2b2c64 100644 +diff --git a/init.sh b/init.sh +index e599451..ab6e016 100644 --- a/init.sh +++ b/init.sh -@@ -3,20 +3,17 @@ set -eu - - # ------------------------------------------- +@@ -1,20 +1,17 @@ + #!/bin/sh + set -eu -log_info() { echo "$0[$$]: $*" >&2; } log_error() { echo "$0[$$]: ERROR $*" >&2; } do_mount_fs() { -- log_info "mounting FS: $*" - [[ -e /proc/filesystems ]] && { grep -q "$1" /proc/filesystems || { log_error "Unknown filesystem"; return 1; } } - [[ -d "$2" ]] || mkdir -p "$2" -- [[ -e /proc/mounts ]] && { grep -q -e "^$1 $2 $1" /proc/mounts && { log_info "$2 ($1) already mounted"; return 0; } } -+ [[ -e /proc/mounts ]] && { grep -q -e "^$1 $2 $1" /proc/mounts && { return 0; } } - mount -t "$1" "$1" "$2" +- log_info "mounting FS: $*" + [ -e /proc/filesystems ] && { grep -q "$1" /proc/filesystems || { log_error "Unknown filesystem"; return 1; } } + [ -d "$2" ] || mkdir -p "$2" +- [ -e /proc/mounts ] && { grep -q -e "^$1 $2 $1" /proc/mounts && { log_info "$2 ($1) already mounted"; return 0; } } ++ [ -e /proc/mounts ] && { grep -q -e "^$1 $2 $1" /proc/mounts && { return 0; } } + mount -t "$1" "$1" "$2" } bail_out() { - log_error "$@" -- log_info "Rebooting..." - #exec reboot -f - exec sh + log_error "$@" +- log_info "Rebooting..." + #exec reboot -f + exec sh } -@@ -34,7 +31,6 @@ get_ostree_sysroot() { +@@ -33,8 +30,6 @@ get_ostree_sysroot() { export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/ostree -log_info "Starting OSTree initrd script" - +- do_mount_fs proc /proc do_mount_fs sysfs /sys -@@ -58,14 +54,13 @@ ostree_sysroot=$(get_ostree_sysroot) + do_mount_fs devtmpfs /dev +@@ -57,14 +52,12 @@ ostree_sysroot=$(get_ostree_sysroot) mount "$ostree_sysroot" /sysroot || { - # The SD card in the R-Car M3 takes a bit of time to come up - # Retry the mount if it fails the first time -- log_info "Mounting $ostree_sysroot failed, waiting 5s for the device to be available..." - sleep 5 - mount "$ostree_sysroot" /sysroot || bail_out "Unable to mount $ostree_sysroot as physical sysroot" + # The SD card in the R-Car M3 takes a bit of time to come up + # Retry the mount if it fails the first time +- log_info "Mounting $ostree_sysroot failed, waiting 5s for the device to be available..." + sleep 5 + mount "$ostree_sysroot" /sysroot || bail_out "Unable to mount $ostree_sysroot as physical sysroot" } -ostree-prepare-root /sysroot +ostree-prepare-root /sysroot > /dev/null 2>&1 -+ -log_info "Switching to rootfs" + # shellcheck disable=SC2093 exec switch_root /sysroot /sbin/init - bail_out "Failed to switch_root to $ostree_sysroot" - From da7c62fa14790a09898ee6863d963ae7c701a75c Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Thu, 4 Aug 2022 17:34:30 +0200 Subject: [PATCH 02/16] pkggroup wwan: Add lpa to manage eUICC sim cards profiles BugzID: 80707 --- recipes-core/packagegroups-features/packagegroup-nm-wwan.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb b/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb index 76aaeee..bb7ad3e 100644 --- a/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb +++ b/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb @@ -6,4 +6,5 @@ require packagegroup-feature.inc RDEPENDS_${PN}-extended = " \ modemmanager \ wwan-config \ + lpa \ " From 8a75c1b88a78a0fcc4b95011e87538c50489a982 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Wed, 24 Aug 2022 10:58:00 +0200 Subject: [PATCH 03/16] distro-netmodule: Enforce an empty packageconfig for lmsensors Since the bbappend in meta-netmodule-bsp is not needed anymore, this is easier to set this here. BugzID: 81093 --- conf/distro/netmodule-linux.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/netmodule-linux.conf b/conf/distro/netmodule-linux.conf index 3838a3b..c31876e 100644 --- a/conf/distro/netmodule-linux.conf +++ b/conf/distro/netmodule-linux.conf @@ -39,6 +39,7 @@ PACKAGECONFIG_append_pn-libgpiod = " python3" PACKAGECONFIG_append_pn-networkmanager = " modemmanager" PACKAGECONFIG_pn-gpsd = "" PACKAGECONFIG_append_pn-openssl = " cryptodev-linux" +PACKAGECONFIG_pn-lmsensors = "" # These rules may make gpsd start automatically when detecting a # receiver. We don't want that since gpsd is started by gnss-mgr From 68f1d6876b83d597df4261c89b1c123a0a3e2609 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Mon, 12 Sep 2022 11:17:42 +0200 Subject: [PATCH 04/16] packagegroup-net: Add ethtool to base package It is required on fct image to read broadr metadata. BugzID: 77243 --- recipes-core/packagegroups-features/packagegroup-nm-net.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/packagegroups-features/packagegroup-nm-net.bb b/recipes-core/packagegroups-features/packagegroup-nm-net.bb index 2054d9f..1bc738c 100644 --- a/recipes-core/packagegroups-features/packagegroup-nm-net.bb +++ b/recipes-core/packagegroups-features/packagegroup-nm-net.bb @@ -13,10 +13,10 @@ RDEPENDS_${PN}-base = " \ iproute2 \ packagegroup-core-ssh-openssh \ openssh-sftp-server \ + ethtool \ " RDEPENDS_${PN}-extended= " \ - ethtool \ iptables \ iptables-module-ipt-masquerade \ iptables-module-ip6t-masquerade \ From 535e4a4c8af1416d48925c53df45761db3d85dd7 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Fri, 16 Sep 2022 13:49:39 +0200 Subject: [PATCH 05/16] distro-minimal: Reinclude python cached files The difference in size of the final image is really minimal, but having this config different between minimal and "normal" distributions, makes us unable to share quite a lot of sstate between the two distributions. BugzID: 80673 --- conf/distro/netmodule-linux-minimal.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/distro/netmodule-linux-minimal.conf b/conf/distro/netmodule-linux-minimal.conf index 4cd3550..1229cc9 100644 --- a/conf/distro/netmodule-linux-minimal.conf +++ b/conf/distro/netmodule-linux-minimal.conf @@ -2,8 +2,6 @@ require netmodule-linux.conf DISTRO = "netmodule-linux-minimal" DISTRO_VARIANT = " for minimal fitImage" -INCLUDE_PYCS_pn-python3 = "0" - INHERIT += "reproducible_build_simple" export SOURCE_DATE_EPOCH ?= "0" REPRODUCIBLE_TIMESTAMP_ROOTFS = "" From 7b7a373dbf3f7a71f13bad6bb7a1f5b17581f0d5 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Wed, 21 Sep 2022 14:45:24 +0200 Subject: [PATCH 06/16] pyhon3: Remove extra pycache cleanup This extra step is not necessary. Specially since we don't remove the cached files anymore. BugzID: 80673 --- bbappends/core/recipes-devtools/python/python3_%.bbappend | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bbappends/core/recipes-devtools/python/python3_%.bbappend b/bbappends/core/recipes-devtools/python/python3_%.bbappend index 492ec87..9293ac0 100644 --- a/bbappends/core/recipes-devtools/python/python3_%.bbappend +++ b/bbappends/core/recipes-devtools/python/python3_%.bbappend @@ -1,9 +1,3 @@ -PACKAGE_PREPROCESS_FUNCS += "${@ 'clean_pycache' if not bb.utils.to_boolean(d.getVar('INCLUDE_PYCS')) else '' }" - -clean_pycache(){ - find ${PKGD} | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf -} - do_install_append(){ cd ${D}${libdir}/python${PYTHON_MAJMIN} rm -rf turtle.py turtledemo/ From f601e2d57d445932ada46d39b7799afbcd1cc179 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Mon, 26 Sep 2022 17:47:35 +0200 Subject: [PATCH 07/16] Remove python3_bbappend This is not required anymore. The turtledemo were part of the python3-misc package which is not used anymore. BugzID: 81512 --- bbappends/core/recipes-devtools/python/python3_%.bbappend | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 bbappends/core/recipes-devtools/python/python3_%.bbappend diff --git a/bbappends/core/recipes-devtools/python/python3_%.bbappend b/bbappends/core/recipes-devtools/python/python3_%.bbappend deleted file mode 100644 index 9293ac0..0000000 --- a/bbappends/core/recipes-devtools/python/python3_%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -do_install_append(){ - cd ${D}${libdir}/python${PYTHON_MAJMIN} - rm -rf turtle.py turtledemo/ - cd - -} From c4f38ccd97934aafc29844a5668c2f58e7ff18b8 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Mon, 26 Sep 2022 17:53:41 +0200 Subject: [PATCH 08/16] distro-netmodule: Move curl packageconfig to distro instead of bbappend Better keep all the packageconfig at one place and avoid an additional bbappend. Especially this config is apparently only required for factory, so we may move to fct distro. Original commit message: we need tftp client to upload factory test logs - enable package option 'tftp' in bbappend file. BUGZID: 52537 --- bbappends/core/recipes-support/curl/curl_%.bbappend | 1 - conf/distro/netmodule-linux.conf | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 bbappends/core/recipes-support/curl/curl_%.bbappend diff --git a/bbappends/core/recipes-support/curl/curl_%.bbappend b/bbappends/core/recipes-support/curl/curl_%.bbappend deleted file mode 100644 index a886dfe..0000000 --- a/bbappends/core/recipes-support/curl/curl_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -PACKAGECONFIG_append = " tftp" diff --git a/conf/distro/netmodule-linux.conf b/conf/distro/netmodule-linux.conf index c31876e..0d8379d 100644 --- a/conf/distro/netmodule-linux.conf +++ b/conf/distro/netmodule-linux.conf @@ -32,7 +32,7 @@ EXTRA_IMAGECMD_append_ota-ext4 = " -O ^64bit" # Packages -PACKAGECONFIG_append_pn-curl = " ssl" +PACKAGECONFIG_append_pn-curl = " tftp ssl" PACKAGECONFIG_remove_pn-curl = "gnutls" PACKAGECONFIG_append_pn-libgpiod = " python3" From 66216504ee263cbf110bc379685a1342e65015a5 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Mon, 14 Nov 2022 13:48:47 +0100 Subject: [PATCH 09/16] um-service-cfg: Small improvements Since kernel 5.10 upgrade, this script was actually not working properly. The script is waiting on network.target to be ready, but network.target does not mean that the route to user module is already setup. And since with kernel 5.10 the route needs a bridge to be setup, this takes a bit longer to be ready. When there is no route to an IP address, ping does not wait the specified timeout (-W) and returns immediately with an error. this was leading to the 30 pings being done over a much smaller time period than expected and therefore made the service fail before the route was setup. Also in case the user module was not found, the service did not fail but continued checking the port, which failed (of course) and the script was then wrongly assuming the presence of an old UM. BugzID: 81969 --- .../um-service-cfg/files/um-service-config.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes-user-module/um-service-cfg/files/um-service-config.sh b/recipes-user-module/um-service-cfg/files/um-service-config.sh index 9889c29..f38f148 100644 --- a/recipes-user-module/um-service-cfg/files/um-service-config.sh +++ b/recipes-user-module/um-service-cfg/files/um-service-config.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash UM_CONFIG_PATH=/etc/user-module UM_CONFIG_FILE=network.conf @@ -37,16 +37,22 @@ done source $UM_CONFIG -max_retry=30 +max_retry=15 counter=0 until [[ counter -ge $max_retry ]] do echo "Probing um. #$counter" ping -qc 1 -W 1 $USER_MODULE_ipv4_addr && break + sleep 1 ((counter++)) done +if ! ping -qc 1 -W 1 $USER_MODULE_ipv4_addr +then + echo "UM not reachable" + exit 1 +fi # Decide which config to load depending on the sw revision if `nc -z $USER_MODULE_ipv4_addr 7000` ; then From e2ecd080a09c4745c1ce20d66c56426143647051 Mon Sep 17 00:00:00 2001 From: Mr Jenkins Date: Fri, 25 Nov 2022 11:19:52 +0100 Subject: [PATCH 10/16] meta-netmodule-distro: updated source revisions --- recipes-tools/libnmapp/libnmapp_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-tools/libnmapp/libnmapp_git.bb b/recipes-tools/libnmapp/libnmapp_git.bb index 79a86af..df198d3 100644 --- a/recipes-tools/libnmapp/libnmapp_git.bb +++ b/recipes-tools/libnmapp/libnmapp_git.bb @@ -4,7 +4,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://LICENSE;md5=1f002990697cc3f88357d1c0790d47b2" SRC_URI = "git://gitlab.com/netmodule/tools/libnmapp.git;protocol=ssh;user=git;branch=develop" -SRCREV ?= "09aafd5ac85cc277cd1d9bb5cd922520b9a3dddb" +SRCREV ?= "dcf72e619b3a5085bba14db42e3a0d86cb4acdc8" PV = "0.0.1+git${SRCPV}" LIB_SHORT_NAME = "nmapp" From 504e367a0c729b672a97a0e6dea100b822b82400 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Tue, 13 Dec 2022 13:15:19 +0100 Subject: [PATCH 11/16] distro/netmodule-linux: Disable all libqmi configs Since libqmi is only used by ModemManager we don't need all the features. Default features (excluded with this commit) are udev and mbim. BugzID: 81947 --- conf/distro/netmodule-linux.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/netmodule-linux.conf b/conf/distro/netmodule-linux.conf index 0d8379d..4effabc 100644 --- a/conf/distro/netmodule-linux.conf +++ b/conf/distro/netmodule-linux.conf @@ -40,6 +40,7 @@ PACKAGECONFIG_append_pn-networkmanager = " modemmanager" PACKAGECONFIG_pn-gpsd = "" PACKAGECONFIG_append_pn-openssl = " cryptodev-linux" PACKAGECONFIG_pn-lmsensors = "" +PACKAGECONFIG_pn-libqmi = "" # These rules may make gpsd start automatically when detecting a # receiver. We don't want that since gpsd is started by gnss-mgr From f6e5b36d1e36f1427adf978cde62ac97e954c914 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Fri, 10 Mar 2023 15:34:58 +0100 Subject: [PATCH 12/16] sdk: Add libc static libraries Several libraries which are part of the libc package are required to statically link our firmware packages. --- recipes-core/sdk/netmodule-linux-sdk.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-core/sdk/netmodule-linux-sdk.bb b/recipes-core/sdk/netmodule-linux-sdk.bb index a6278ed..c49a1fa 100644 --- a/recipes-core/sdk/netmodule-linux-sdk.bb +++ b/recipes-core/sdk/netmodule-linux-sdk.bb @@ -7,5 +7,6 @@ inherit populate_sdk TOOLCHAIN_TARGET_TASK_append = " \ cpputest-staticdev \ libnmapp-staticdev \ + libc-staticdev \ " From 1be3029e383d5ae940327fe8e4600a804fdb9f9b Mon Sep 17 00:00:00 2001 From: Patrick Zysset Date: Fri, 24 Mar 2023 17:41:14 +0100 Subject: [PATCH 13/16] Revert "pkggroup wwan: Add lpa to manage eUICC sim cards profiles" This reverts commit da7c62fa14790a09898ee6863d963ae7c701a75c. id:379399 Signed-off-by: Patrick Zysset --- recipes-core/packagegroups-features/packagegroup-nm-wwan.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb b/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb index bb7ad3e..76aaeee 100644 --- a/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb +++ b/recipes-core/packagegroups-features/packagegroup-nm-wwan.bb @@ -6,5 +6,4 @@ require packagegroup-feature.inc RDEPENDS_${PN}-extended = " \ modemmanager \ wwan-config \ - lpa \ " From 694d02aea16e0de6c1eb594b3f8d60733ca38c1f Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Wed, 19 Apr 2023 16:05:28 +0200 Subject: [PATCH 14/16] packagegroup-nm-net: Replace bare openvpn by NetworkManager integration NetworkManager can handle OpenVPN configurations directly, it is easier to use it directly than --- recipes-core/packagegroups-features/packagegroup-nm-net.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/packagegroups-features/packagegroup-nm-net.bb b/recipes-core/packagegroups-features/packagegroup-nm-net.bb index 1bc738c..206af23 100644 --- a/recipes-core/packagegroups-features/packagegroup-nm-net.bb +++ b/recipes-core/packagegroups-features/packagegroup-nm-net.bb @@ -21,5 +21,5 @@ RDEPENDS_${PN}-extended= " \ iptables-module-ipt-masquerade \ iptables-module-ip6t-masquerade \ bridge-utils \ - openvpn \ + networkmanager-openvpn \ " From 6be13a7db6bc646a81409ea22c3e3feaf50d3826 Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Wed, 21 Jun 2023 10:53:38 +0200 Subject: [PATCH 15/16] distro/netmodule-linux: Make build sstate compatible with all HOSTs --- conf/distro/netmodule-linux.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/distro/netmodule-linux.conf b/conf/distro/netmodule-linux.conf index 4effabc..b6d1a9a 100644 --- a/conf/distro/netmodule-linux.conf +++ b/conf/distro/netmodule-linux.conf @@ -1,11 +1,13 @@ # Global - TARGET_VENDOR = "-netmodule" SANITY_TESTED_DISTROS ?= " \ debian-10 \n \ debian-11 \n \ " +# Make shared states compatible with all build host +require conf/distro/include/yocto-uninative.inc +INHERIT += "uninative" # Don't append libc name in tmp directory # eg. build/tmp instead of build/tmp-glibc # Since we only support glibc, we don't need different tmp directories From 6f8a55775af4598d5143f985f43ba49fe5735f3b Mon Sep 17 00:00:00 2001 From: Alexandre Bard Date: Wed, 21 Jun 2023 10:54:26 +0200 Subject: [PATCH 16/16] distro/netmodule-linux: Mark debian 12 as valid build host --- conf/distro/netmodule-linux.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/distro/netmodule-linux.conf b/conf/distro/netmodule-linux.conf index b6d1a9a..30bee33 100644 --- a/conf/distro/netmodule-linux.conf +++ b/conf/distro/netmodule-linux.conf @@ -3,6 +3,7 @@ TARGET_VENDOR = "-netmodule" SANITY_TESTED_DISTROS ?= " \ debian-10 \n \ debian-11 \n \ + debian-12 \n \ " # Make shared states compatible with all build host