Compare commits

...

18 Commits

Author SHA1 Message Date
Alexandre Bard 10c6f4e374 WIP: be compatible with both kirkstone and dunfell 2023-07-27 16:11:22 +02:00
Alexandre Bard 34c69f68ab Merge branch 'develop' into kirkstone 2023-07-24 15:01:19 +02:00
Alexandre Bard 6f8a55775a distro/netmodule-linux: Mark debian 12 as valid build host 2023-06-21 10:54:26 +02:00
Alexandre Bard 6be13a7db6 distro/netmodule-linux: Make build sstate compatible with all HOSTs 2023-06-21 10:53:38 +02:00
Alexandre Bard 694d02aea1 packagegroup-nm-net: Replace bare openvpn by NetworkManager integration
NetworkManager can handle OpenVPN configurations directly, it is easier
to use it directly than
2023-04-19 16:05:28 +02:00
Patrick Zysset 1be3029e38 Revert "pkggroup wwan: Add lpa to manage eUICC sim cards profiles"
This reverts commit da7c62fa14.

id:379399

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2023-03-24 17:42:14 +01:00
Alexandre Bard f6e5b36d1e sdk: Add libc static libraries
Several libraries which are part of the libc package are required to
statically link our firmware packages.
2023-03-10 15:34:58 +01:00
Alexandre Bard 504e367a0c 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
2022-12-13 13:15:19 +01:00
Mr Jenkins e2ecd080a0 meta-netmodule-distro: updated source revisions 2022-11-25 11:19:52 +01:00
Alexandre Bard 66216504ee 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
2022-11-14 14:36:18 +01:00
Alexandre Bard c4f38ccd97 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
2022-09-26 17:53:41 +02:00
Alexandre Bard f601e2d57d Remove python3_bbappend
This is not required anymore. The turtledemo were part of the
python3-misc package which is not used anymore.

BugzID: 81512
2022-09-26 17:47:35 +02:00
Alexandre Bard 7b7a373dbf pyhon3: Remove extra pycache cleanup
This extra step is not necessary. Specially since we don't remove the
cached files anymore.

BugzID: 80673
2022-09-21 14:45:24 +02:00
Alexandre Bard 535e4a4c8a 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
2022-09-16 13:49:39 +02:00
Alexandre Bard 68f1d6876b packagegroup-net: Add ethtool to base package
It is required on fct image to read broadr metadata.

BugzID: 77243
2022-09-12 11:17:42 +02:00
Alexandre Bard 8a75c1b88a 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
2022-08-24 10:58:00 +02:00
Alexandre Bard da7c62fa14 pkggroup wwan: Add lpa to manage eUICC sim cards profiles
BugzID: 80707
2022-08-10 14:10:27 +02:00
Alexandre Bard 20b10c6179 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
2022-08-10 14:09:41 +02:00
19 changed files with 82 additions and 60 deletions

View File

@ -2,7 +2,7 @@ SUMMARY = "Display or change ethernet card settings"
DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
SECTION = "console/network"
LICENSE = "GPL-2.0-or-later"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"

View File

@ -1,11 +0,0 @@
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/
cd -
}

View File

@ -1 +0,0 @@
PACKAGECONFIG:append = " tftp"

View File

@ -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"

View File

@ -1,3 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://0001-Remove-log-info-from-init.patch"

View File

@ -2,10 +2,7 @@ require netmodule-linux.conf
DISTRO = "netmodule-linux-minimal"
DISTRO_VARIANT = " for minimal fitImage"
INCLUDE_PYCS:pn-python3 = "0"
#export SOURCE_DATE_EPOCH ?= "0"
#REPRODUCIBLE_TIMESTAMP_ROOTFS = ""
include ${LAYERSERIES_CORENAMES}/distro-minimal.inc
PREFERRED_PROVIDER_virtual/netmodule-image = "netmodule-fitimage"
INITRAMFS_IMAGE:pn-netmodule-fitimage = "netmodule-linux-image-minimal"

View File

@ -1,11 +1,14 @@
# Global
TARGET_VENDOR = "-netmodule"
SANITY_TESTED_DISTROS ?= " \
debian-10 \n \
debian-11 \n \
debian-12 \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
@ -34,7 +37,7 @@ EXTRA_IMAGECMD:append_ota-ext4 = " -O ^64bit"
# Packages
PACKAGECONFIG:append:pn-curl = " openssl"
PACKAGECONFIG:append:pn-curl = " tftp openssl"
PACKAGECONFIG:remove:pn-curl = "gnutls"
PACKAGECONFIG:append:pn-wget = " openssl"
@ -45,6 +48,9 @@ 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
PACKAGE_EXCLUDE = "gpsd-udev"
@ -55,3 +61,6 @@ SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
SDK_VENDOR = "-netmodule"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
# Changes specific to current yocto version
include ${LAYERSERIES_CORENAMES}/distro.inc

View File

@ -0,0 +1,3 @@
INHERIT += "reproducible_build_simple"
export SOURCE_DATE_EPOCH ?= "0"
REPRODUCIBLE_TIMESTAMP_ROOTFS = ""

15
dunfell/distro.inc Normal file
View File

@ -0,0 +1,15 @@
# in newer versions, networkmanager is splitted
PACKAGES:append:pn-networkmanager += "networkmanager-wwan \
networkmanager-wifi \
networkmanager-bluetooth \
networkmanager-nmcli \
"
ALLOW_EMPTY_networkmanager-wwan = "1"
ALLOW_EMPTY_networkmanager-wifi = "1"
ALLOW_EMPTY_networkmanager-bluetooth = "1"
ALLOW_EMPTY_networkmanager-nmcli = "1"
# ssl the former equivalent of openssl
PACKAGECONFIG:append:pn-curl = " ssl"
PACKAGECONFIG:remove:pn-curl = " openssl"

5
dunfell/licenses.inc Normal file
View File

@ -0,0 +1,5 @@
LIC_FILES_CHKSUM = "${@bb.utils.contains('LICENSE', 'GPL-2.0-only', \
'file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6', \
'', \
d)}"

View File

@ -1,7 +1,9 @@
DESCRIPTION = "CPU Benchmarking bin"
HOMEPAGE = "http://www.netmodule.com/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
include ${LAYERSERIES_CORENAMES}/licenses.inc
LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
PROVIDES = "benchmarking-cpu"

View File

@ -14,13 +14,13 @@ 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 \
bridge-utils \
openvpn \
networkmanager-openvpn \
"

View File

@ -7,5 +7,6 @@ inherit populate_sdk
TOOLCHAIN_TARGET_TASK:append = " \
cpputest-staticdev \
libnmapp-staticdev \
libc-staticdev \
"

View File

@ -2,7 +2,7 @@ SUMMARY = "Battery Test tool"
DESCRIPTION = "Read battery state, remaining time and other informations from battery"
AUTHOR = "Ramon Mösching (ramon.moesching@netmodule.com)"
SECTION = "core"
LICENSE = "GPL-2.0-or-later"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
PR = "r0"

View File

@ -1,10 +1,10 @@
SUMMARY = "NetModule shared library"
SECTION = "base"
LICENSE = "GPL-2.0-or-later"
LICENSE = "GPL-2.0-only"
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"

View File

@ -1,7 +1,7 @@
SUMMARY = "Adds a script and a systemd service to partition the drives of the system on the first boot."
DESCRIPTION = "Adds a script and a systemd service to partition the drives of the system on the first boot."
PR = "r1"
LICENSE = "GPL-3.0-or-later"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"

View File

@ -3,8 +3,8 @@ DESCRIPTION = "Generic NetModule update tool for firmware, bootloaders, etc"
AUTHOR = "Alexandre Bard"
SECTION = "core"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=e45effb5e2fdf3ead60ab663bccdc4b8"
RDEPENDS:${PN} = " \
wget \

View File

@ -1,6 +1,6 @@
SUMMARY = "NetModule system-state-framework manager"
SECTION = "base"
LICENSE = "GPL-2.0-or-later"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6f1c528c9a0010ef398e26c661ff286e"
SRC_URI = "git://gitlab.com/netmodule/tools/ssf-mgr.git;protocol=ssh;user=git;branch=develop"

View File

@ -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