WIP dunfell + kirkstone

This commit is contained in:
Alexandre Bard 2023-07-20 16:34:50 +02:00
parent 078887e4e8
commit 1d54186dee
18 changed files with 265 additions and 42 deletions

View File

@ -3,7 +3,10 @@ require conf/machine/include/soc-family.inc
require netmodule-hardware.inc
DEFAULTTUNE ?= "cortexa8thf-neon"
require conf/machine/include/arm/armv7a/tune-cortexa8.inc
# dunfell
include conf/machine/include/tune-cortexa8.inc
# kirkstone+
include conf/machine/include/arm/armv7a/tune-cortexa8.inc
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"

View File

@ -2,8 +2,11 @@ SUMMARY = "Set mac addresses of Wifi and bluetooth chips"
DESCRIPTION = "Small scripts that set the mac addresses based on ethernet mac"
AUTHOR = "Alexandre Bard"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
LICENSE = "GPL-2.0-only"
include ${LAYERSERIES_CORENAMES}/licenses.inc
LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
PR = "r2"
inherit systemd

View File

@ -7,7 +7,7 @@ require recipes-bsp/u-boot/u-boot.inc
PROVIDES += "u-boot"
LICENSE = "GPL-2.0-or-later"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://gitlab.com/netmodule/bootloader/netmodule-uboot.git;protocol=ssh;user=git;branch=2018.03/imx/imx8-nmhw23;destsuffix=git"

View File

@ -1,6 +1,6 @@
require recipes-bsp/u-boot/u-boot.inc
LICENSE = "GPL-2.0-or-later"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
S = "${WORKDIR}/git"

View File

@ -1,21 +0,0 @@
SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol"
DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems and \
devices which speak the Qualcomm MSM Interface (QMI) protocol"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi"
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
"
DEPENDS = "glib-2.0 glib-2.0-native"
inherit autotools pkgconfig bash-completion gobject-introspection
SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz"
SRC_URI[sha256sum] = "a71963bb1097a42665287e40a9a36f95b8f9d6d6a4b7a5de22d660328af97cb9"
PACKAGECONFIG ??= "udev mbim"
PACKAGECONFIG[udev] = ",--without-udev,libgudev"
PACKAGECONFIG[mbim] = "--enable-mbim-qmux,--disable-mbim-qmux,libmbim"

View File

@ -0,0 +1,28 @@
SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol"
DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems and \
devices which speak the Qualcomm MSM Interface (QMI) protocol"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi"
LICENSE = "GPL-2.0-only& LGPL-2.1-only"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
"
DEPENDS = "glib-2.0 glib-2.0-native"
inherit meson pkgconfig bash-completion gobject-introspection
SRCREV = "6e248aceb66f53b467b343bca1c467a8211dd30d"
SRC_URI = "git://gitlab.freedesktop.org/mobile-broadband/libqmi.git;protocol=https;branch=qmi-1-32"
S = "${WORKDIR}/git"
PACKAGECONFIG ??= "udev mbim"
PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,libgudev"
PACKAGECONFIG[mbim] = "-Dmbim_qmux=true,-Dmbim_qmux=false,libmbim"
PACKAGECONFIG[qrtr] = "-Dqrtr=true,-Dqrtr=false,libqrtr-glib"
EXTRA_OEMESON = " \
-Dgtk_doc=false \
-Dman=false \
"

View File

@ -1 +0,0 @@
../../../../meta-openembedded/meta-oe/recipes-connectivity/modemmanager/files/0001-core-switch-bash-shell-scripts-to-use-bin-sh-for-use.patch

View File

@ -0,0 +1,70 @@
From 35173fa04d0116ba30a86dc1a19f859f2be14a24 Mon Sep 17 00:00:00 2001
From: "Bruce A. Johnson" <waterfordtrack@gmail.com>
Date: Wed, 22 Dec 2021 14:24:02 -0500
Subject: [PATCH] core: switch bash shell scripts to use /bin/sh for use
w/Busybox.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/483
%% original patch: 0001-core-switch-bash-shell-scripts-to-use-bin-sh-for-use.patch
---
data/dispatcher-fcc-unlock/105b | 2 +-
data/dispatcher-fcc-unlock/1199 | 2 +-
data/dispatcher-fcc-unlock/1eac | 2 +-
test/mmcli-test-sms | 2 +-
tools/tests/test-wrapper.sh.in | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/data/dispatcher-fcc-unlock/105b b/data/dispatcher-fcc-unlock/105b
index 444bd51f..772c90f4 100644
--- a/data/dispatcher-fcc-unlock/105b
+++ b/data/dispatcher-fcc-unlock/105b
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# SPDX-License-Identifier: CC0-1.0
# 2021 Aleksander Morgado <aleksander@aleksander.es>
diff --git a/data/dispatcher-fcc-unlock/1199 b/data/dispatcher-fcc-unlock/1199
index 83ab2c9e..6dbf8d1b 100644
--- a/data/dispatcher-fcc-unlock/1199
+++ b/data/dispatcher-fcc-unlock/1199
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# SPDX-License-Identifier: CC0-1.0
# 2021 Aleksander Morgado <aleksander@aleksander.es>
diff --git a/data/dispatcher-fcc-unlock/1eac b/data/dispatcher-fcc-unlock/1eac
index 1a048dc8..44ce46d7 100644
--- a/data/dispatcher-fcc-unlock/1eac
+++ b/data/dispatcher-fcc-unlock/1eac
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# SPDX-License-Identifier: CC0-1.0
# 2021 Aleksander Morgado <aleksander@aleksander.es>
diff --git a/test/mmcli-test-sms b/test/mmcli-test-sms
index 18e0a7b4..7136ee0d 100755
--- a/test/mmcli-test-sms
+++ b/test/mmcli-test-sms
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
print_usage () {
echo "usage: $0 [MODEM INDEX] [all|ucs2|gsm7|data] [NUMBER]"
diff --git a/tools/tests/test-wrapper.sh.in b/tools/tests/test-wrapper.sh.in
index d64ea4cb..fcdb56de 100644
--- a/tools/tests/test-wrapper.sh.in
+++ b/tools/tests/test-wrapper.sh.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# For debugging behavior of test-modemmanager-service.py, you can modify
# this line to add --log-file option
--
2.35.3

View File

@ -0,0 +1,61 @@
SUMMARY = "ModemManager is a daemon controlling broadband devices/connections"
DESCRIPTION = "ModemManager is a DBus-activated daemon which controls mobile broadband (2G/3G/4G) devices and connections"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/ModemManager/"
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
"
GNOMEBASEBUILDCLASS = "meson"
inherit gnomebase gettext systemd gobject-introspection bash-completion
DEPENDS = "glib-2.0 libgudev libxslt-native dbus"
SRCREV ?= "0d8b5e93fc62eb0f41e18a2d9d845331d7af36ec"
# Patch 0001 will be in ModemManager > 1.19
SRC_URI = " \
git://gitlab.freedesktop.org/mobile-broadband/ModemManager.git;protocol=https;branch=mm-1-18 \
file://0001-core-switch-bash-shell-scripts-to-use-bin-sh-for-use.patch \
"
S = "${WORKDIR}/git"
# strict, permissive
MODEMMANAGER_POLKIT_TYPE ??= "permissive"
PACKAGECONFIG ??= "vala mbim qmi \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd polkit', d)} \
"
PACKAGECONFIG[at] = "-Dat_command_via_dbus=true"
PACKAGECONFIG[systemd] = " \
-Dsystemdsystemunitdir=${systemd_unitdir}/system/, \
-Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsystemd_suspend_resume=false \
"
PACKAGECONFIG[polkit] = "-Dpolkit=${MODEMMANAGER_POLKIT_TYPE},-Dpolkit=no,polkit"
# Support WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol.
PACKAGECONFIG[mbim] = "-Dmbim=true,-Dmbim=false -Dplugin_dell=disabled -Dplugin_foxconn=disabled,libmbim"
# Support WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol.
PACKAGECONFIG[qmi] = "-Dqmi=true,-Dqmi=false,libqmi"
PACKAGECONFIG[qrtr] = "-Dqrtr=true,-Dqrtr=false,libqrtr-glib"
PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false"
inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)}
EXTRA_OEMESON = " \
-Dudevdir=${nonarch_base_libdir}/udev \
-Dqrtr=false \
"
FILES:${PN} += " \
${datadir}/icons \
${datadir}/polkit-1 \
${datadir}/dbus-1 \
${datadir}/ModemManager \
${libdir}/ModemManager \
${systemd_unitdir}/system \
"
SYSTEMD_SERVICE:${PN} = "ModemManager.service"

View File

@ -1,12 +1,14 @@
require recipes-connectivity/modemmanager/modemmanager_1.18.8.bb
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
# Use custom git repo as SRC
SRC_URI = " \
git://gitlab.com/netmodule/third-party/ModemManager;protocol=ssh;user=git;branch=mm-1-18-netmodule \
file://0001-core-switch-bash-shell-scripts-to-use-bin-sh-for-use.patch \
"
SRCREV = "a092259df33cc70a04826f0e7117475ac9b26f99"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
# Keep only ublox plugin
@ -16,7 +18,6 @@ EXTRA_OECONF += "--disable-all-plugins --enable-plugin-ublox --enable-plugin-gen
PACKAGECONFIG = "systemd qmi"
# Add whitelist rules
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://77-mm-netmodule-whitelist.rules"
do_install:append() {

View File

@ -0,0 +1,61 @@
From f7c129b1775e35f603c1c58c12f958ae81ae6bb8 Mon Sep 17 00:00:00 2001
From: Alexandre Bard <alexandre.bard@netmodule.com>
Date: Wed, 13 Nov 2019 17:53:54 +0100
Subject: [PATCH] Reactivate GSM connections when ModemManager reconnects by
itself
After a disconnection from network side, ModemManager can reconnect
itself if the modem requests it. This commit makes sure that a
reconnection of the modem makes the GSM connection active in NM.
BugzID: 60029
---
src/devices/wwan/nm-device-modem.c | 8 +++++---
src/nm-policy.c | 5 +++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c
index 1e3162808..f03818599 100644
--- a/src/devices/wwan/nm-device-modem.c
+++ b/src/devices/wwan/nm-device-modem.c
@@ -360,9 +360,11 @@ modem_state_cb (NMModem *modem,
nm_device_recheck_available_connections (device);
}
- nm_device_queue_recheck_available (device,
- NM_DEVICE_STATE_REASON_MODEM_AVAILABLE,
- NM_DEVICE_STATE_REASON_MODEM_FAILED);
+ nm_device_recheck_available_connections (device);
+
+ if (new_state == NM_MODEM_STATE_CONNECTED)
+ nm_device_emit_recheck_auto_activate(device);
+
}
static void
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 1faba5c7b..02088bb6e 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1019,6 +1019,9 @@ update_ip4_routing (NMPolicy *self, gboolean force_update)
nm_connection_get_id (nm_active_connection_get_applied_connection (best_ac)),
ip_iface);
_notify (self, PROP_DEFAULT_IP4_AC);
+
+ /* Recheck all connections to enable potential VPN depending on new route */
+ schedule_activate_all(self);
}
static void
@@ -2041,6 +2044,8 @@ device_recheck_auto_activate (NMDevice *device, gpointer user_data)
NMPolicyPrivate *priv = user_data;
NMPolicy *self = _PRIV_TO_SELF (priv);
+ /* Reset retries count */
+ reset_autoconnect_all(self, device, FALSE);
schedule_activate_check (self, device);
}
--
2.20.1

View File

@ -1,9 +1,12 @@
FILESEXTRAPATHS:append := "${THISDIR}/${PN}"
RDEPENDS:${PN} = "networkmanager-conf"
SRC_URI:append = "\
file://0001-Reactivate-GSM-connections-when-ModemManager-reconne.patch \
"
FILESEXTRAPATHS:append := "${THISDIR}/${PN}"
SRC_URI:append = " \
${@bb.utils.contains('PV', '1.22.16', \
'file://0001-nm-1-22-Reactivate-GSM-connections-when-ModemManager.patch', \
'file://0001-nm-1-36-Reactivate-GSM-connections-when-ModemManager.patch', \
d)} \
"
#PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq,,,dnsmasq"

View File

@ -3,8 +3,11 @@ DESCRIPTION = "Run hciattach for ti bluetooth wl12xx module"
AUTHOR = "Stefan Eichenberger"
SECTION = "connectivity"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
LICENSE = "GPL-2.0-only"
include ${LAYERSERIES_CORENAMES}/licenses.inc
LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
PR = "r2"
inherit systemd

View File

@ -5,8 +5,11 @@ AUTHOR = "Stefan Eichenberger (stefan.eichenberger@netmodule.com)"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${MACHINE}:"
SECTION = "core"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
LICENSE = "GPL-2.0-only"
include ${LAYERSERIES_CORENAMES}/licenses.inc
LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
PR = "r0"
inherit python3-dir

View File

@ -2,7 +2,9 @@
DESCRIPTION = "implements a publish/subscribe broker for the various system state topics"
HOMEPAGE = "http://www.netmodule.com/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
include ${LAYERSERIES_CORENAMES}/licenses.inc
LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
inherit packagegroup

View File

@ -3,7 +3,9 @@
DESCRIPTION = "implements a publish/subscribe broker for the various system state topics"
HOMEPAGE = "http://www.netmodule.com/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
include ${LAYERSERIES_CORENAMES}/licenses.inc
LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
inherit module

View File

@ -3,7 +3,9 @@
DESCRIPTION = "implements a publish/subscribe broker for the various system state topics"
HOMEPAGE = "http://www.netmodule.com/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
include ${LAYERSERIES_CORENAMES}/licenses.inc
LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
DEPENDS = "ssc-broker-driver"
RDEPENDS:${PN} = "ssc-broker-driver"

View File

@ -3,7 +3,10 @@
DESCRIPTION = "implements a publish/subscribe broker for the various system state topics"
HOMEPAGE = "http://www.netmodule.com/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
include ${LAYERSERIES_CORENAMES}/licenses.inc
LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
DEPENDS = "ssc-broker-driver"
RDEPENDS:${PN} = "ssc-broker-driver"