-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ModemManager #359
Draft
Dennisbonke
wants to merge
4
commits into
managarm:master
Choose a base branch
from
Dennisbonke:modem
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+334
−2
Draft
Add ModemManager #359
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -884,6 +884,72 @@ packages: | |
DESTDIR: '@THIS_COLLECT_DIR@' | ||
quiet: true | ||
|
||
- name: libgudev | ||
architecture: '@OPTION:arch@' | ||
metadata: | ||
summary: GObject bindings for libudev | ||
description: This package contains GObject bindings for libudev. | ||
spdx: 'LGPL-2.1-or-later' | ||
website: 'https://wiki.gnome.org/Projects/libgudev' | ||
maintainer: "Dennis Bonke <[email protected]>" | ||
categories: ['dev-libs'] | ||
source: | ||
subdir: 'ports' | ||
git: 'https://gitlab.gnome.org/GNOME/libgudev.git' | ||
tag: '237' # DON'T BUMP, DOES NOT WORK WITH EUDEV | ||
version: '237' | ||
tools_required: | ||
- system-gcc | ||
- virtual: pkgconfig-for-target | ||
triple: "@OPTION:arch-triple@" | ||
- host-mlibc | ||
- host-gobject-introspection | ||
- host-python | ||
- host-glib | ||
pkgs_required: | ||
- mlibc | ||
- glib | ||
- eudev | ||
- gobject-introspection | ||
revision: 1 | ||
configure: | ||
- args: | ||
- 'meson' | ||
- 'setup' | ||
- '--cross-file' | ||
- '@SOURCE_ROOT@/scripts/meson-@OPTION:[email protected]' | ||
- '--prefix=/usr' | ||
- '--buildtype=release' | ||
- '--wrap-mode=nodownload' | ||
- '-Dintrospection=enabled' | ||
- '-Dvapi=disabled' | ||
- '-Dgtk_doc=false' | ||
- '@THIS_SOURCE_DIR@' | ||
environ: | ||
# Same as below | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
build: | ||
- args: ['ninja'] | ||
environ: | ||
# Make python load host libraries instead of the ones in the rootfs | ||
LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' | ||
# Library path for our run-wrapper that allows it to load managarm libraries | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
# Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an | ||
# executable that was cross-compiled for managarm | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
# This is a custom environment variable which tells g-ir-scanner what to use instead of ldd | ||
# We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection | ||
GI_LDD_WRAPPER: ldd-wrapper | ||
# This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds | ||
GI_CROSS_LAUNCHER: run-wrapper | ||
# Path to the introspection data installed by other packages | ||
GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' | ||
- args: ['ninja', 'install'] | ||
environ: | ||
DESTDIR: '@THIS_COLLECT_DIR@' | ||
|
||
- name: libiconv | ||
labels: [aarch64] | ||
architecture: '@OPTION:arch@' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,10 +126,15 @@ packages: | |
- host-pkg-config | ||
- virtual: pkgconfig-for-target | ||
triple: "@OPTION:arch-triple@" | ||
- host-mlibc | ||
- host-gobject-introspection | ||
- host-python | ||
- host-glib | ||
pkgs_required: | ||
- mlibc | ||
- glib | ||
revision: 4 | ||
- gobject-introspection | ||
revision: 5 | ||
configure: | ||
- args: | ||
- 'meson' | ||
|
@@ -138,12 +143,31 @@ packages: | |
- '@SOURCE_ROOT@/scripts/meson-@OPTION:[email protected]' | ||
- '--prefix=/usr' | ||
- '--buildtype=debugoptimized' | ||
- '-Dintrospection=false' | ||
- '-Dintrospection=true' | ||
- '-Dbash_completion=false' | ||
- '-Dman=false' | ||
- '@THIS_SOURCE_DIR@' | ||
environ: | ||
# Same as below | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
build: | ||
- args: ['ninja'] | ||
environ: | ||
# Make python load host libraries instead of the ones in the rootfs | ||
LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' | ||
# Library path for our run-wrapper that allows it to load managarm libraries | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
# Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an | ||
# executable that was cross-compiled for managarm | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
# This is a custom environment variable which tells g-ir-scanner what to use instead of ldd | ||
# We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection | ||
GI_LDD_WRAPPER: ldd-wrapper | ||
# This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds | ||
GI_CROSS_LAUNCHER: run-wrapper | ||
# Path to the introspection data installed by other packages | ||
GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' | ||
- args: ['ninja', 'install'] | ||
environ: | ||
DESTDIR: '@THIS_COLLECT_DIR@' | ||
|
@@ -197,6 +221,76 @@ packages: | |
environ: | ||
DESTDIR: '@THIS_COLLECT_DIR@' | ||
|
||
- name: libqmi | ||
architecture: '@OPTION:arch@' | ||
metadata: | ||
summary: Qualcomm MSM (Mobile Station Modem) Interface (QMI) modem protocol library | ||
description: The libqmi package contains a GLib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol. | ||
spdx: 'LGPL-2.0-only' | ||
website: 'https://www.freedesktop.org/wiki/Software/libqmi/' | ||
maintainer: "Dennis Bonke <[email protected]>" | ||
categories: ['net-libs'] | ||
source: | ||
subdir: 'ports' | ||
git: 'https://gitlab.freedesktop.org/mobile-broadband/libqmi.git' | ||
tag: '1.34.0' | ||
version: '1.34.0' | ||
tools_required: | ||
- system-gcc | ||
- host-pkg-config | ||
- virtual: pkgconfig-for-target | ||
triple: "@OPTION:arch-triple@" | ||
- host-mlibc | ||
- host-gobject-introspection | ||
- host-python | ||
- host-glib | ||
pkgs_required: | ||
- mlibc | ||
- glib | ||
- libgudev | ||
- libmbim | ||
- gobject-introspection | ||
revision: 1 | ||
configure: | ||
- args: | ||
- 'meson' | ||
- 'setup' | ||
- '--cross-file' | ||
- '@SOURCE_ROOT@/scripts/meson-@OPTION:[email protected]' | ||
- '--prefix=/usr' | ||
- '--buildtype=debugoptimized' | ||
- '-Dintrospection=true' | ||
- '-Dbash_completion=false' | ||
- '-Drmnet=true' | ||
- '-Dudev=true' | ||
- '-Dqrtr=false' | ||
- '-Dman=false' | ||
- '@THIS_SOURCE_DIR@' | ||
environ: | ||
# Same as below | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
build: | ||
- args: ['ninja'] | ||
environ: | ||
# Make python load host libraries instead of the ones in the rootfs | ||
LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' | ||
# Library path for our run-wrapper that allows it to load managarm libraries | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
# Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an | ||
# executable that was cross-compiled for managarm | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
# This is a custom environment variable which tells g-ir-scanner what to use instead of ldd | ||
# We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection | ||
GI_LDD_WRAPPER: ldd-wrapper | ||
# This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds | ||
GI_CROSS_LAUNCHER: run-wrapper | ||
# Path to the introspection data installed by other packages | ||
GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' | ||
- args: ['ninja', 'install'] | ||
environ: | ||
DESTDIR: '@THIS_COLLECT_DIR@' | ||
|
||
- name: libsoup | ||
architecture: '@OPTION:arch@' | ||
metadata: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,115 @@ packages: | |
- args: ['cp', '@THIS_BUILD_DIR@/services', '@THIS_COLLECT_DIR@/etc/'] | ||
- args: ['cp', '@THIS_BUILD_DIR@/protocols', '@THIS_COLLECT_DIR@/etc/'] | ||
|
||
- name: modemmanager | ||
architecture: '@OPTION:arch@' | ||
metadata: | ||
summary: Modem and mobile broadband management libraries | ||
description: ModemManager provides a unified high level API for communicating with mobile broadband modems, regardless of the protocol used to communicate with the actual device. | ||
spdx: 'GPL-2.0-or-later' | ||
website: 'https://www.freedesktop.org/wiki/Software/ModemManager/' | ||
maintainer: "Dennis Bonke <[email protected]>" | ||
categories: ['net-misc'] | ||
source: | ||
subdir: 'ports' | ||
git: 'https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git' | ||
tag: '1.22.0' | ||
version: '1.22.0' | ||
tools_required: | ||
- system-gcc | ||
- host-pkg-config | ||
- virtual: pkgconfig-for-target | ||
triple: "@OPTION:arch-triple@" | ||
- host-mlibc | ||
- host-gobject-introspection | ||
- host-python | ||
- host-glib | ||
- host-vala | ||
pkgs_required: | ||
- mlibc | ||
- glib | ||
- libgudev | ||
- libmbim | ||
- libqmi | ||
- gobject-introspection | ||
revision: 1 | ||
configure: | ||
- args: | ||
- 'meson' | ||
- 'setup' | ||
- '--cross-file' | ||
- '@SOURCE_ROOT@/scripts/meson-@OPTION:[email protected]' | ||
- '--prefix=/usr' | ||
- '--buildtype=debugoptimized' | ||
- '-Dintrospection=true' | ||
- '-Dbash_completion=false' | ||
- '-Dudev=true' | ||
- '-Dqrtr=false' | ||
- '-Dman=false' | ||
- '-Dsystemd_journal=false' | ||
- '-Dpolkit=no' | ||
- '-Dvapi=true' | ||
- '-Dsystemd_suspend_resume=false' | ||
- '-Dsystemdsystemunitdir=no' | ||
- '@THIS_SOURCE_DIR@' | ||
environ: | ||
# Same as below | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
# Wrapper to add our valadir | ||
VAPIGEN: 'cross-vapigen' | ||
# Wrapper to add our valadir | ||
VALAC: 'cross-valac' | ||
build: | ||
- args: ['ninja'] | ||
environ: | ||
# Make python load host libraries instead of the ones in the rootfs | ||
LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' | ||
# Library path for our run-wrapper that allows it to load managarm libraries | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
# Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an | ||
# executable that was cross-compiled for managarm | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
# This is a custom environment variable which tells g-ir-scanner what to use instead of ldd | ||
# We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection | ||
GI_LDD_WRAPPER: ldd-wrapper | ||
# This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds | ||
GI_CROSS_LAUNCHER: run-wrapper | ||
# Path to the introspection data installed by other packages | ||
GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' | ||
VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' | ||
# Wrapper to add our valadir | ||
VALAC: 'cross-valac' | ||
# Wrapper to add our valadir | ||
VAPIGEN: 'cross-vapigen' | ||
- args: ['ninja', 'install'] | ||
environ: | ||
DESTDIR: '@THIS_COLLECT_DIR@' | ||
# Make python load host libraries instead of the ones in the rootfs | ||
LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-glib/lib:@BUILD_ROOT@/tools/host-glib/lib/x86_64-linux-gnu:@BUILD_ROOT@/tools/host-gobject-introspection/lib/x86_64-linux-gnu' | ||
# Library path for our run-wrapper that allows it to load managarm libraries | ||
RUN_WRAPPER_LD_LIBRARY_PATH: '@BUILD_ROOT@/tools/host-mlibc/lib:@SYSROOT_DIR@/usr/lib:@SYSROOT_DIR@/usr/lib64:@THIS_BUILD_DIR@/girepository' | ||
# Similar to above, but using a nasty (but working) hack lets us use a Linux mlibc build to execute an | ||
# executable that was cross-compiled for managarm | ||
RUN_WRAPPER_INTERP: '@BUILD_ROOT@/tools/host-mlibc/lib/ld.so' | ||
# This is a custom environment variable which tells g-ir-scanner what to use instead of ldd | ||
# We point it at our native ldd-wrapper that's installed as part of host-gobject-introspection | ||
GI_LDD_WRAPPER: ldd-wrapper | ||
# This tells g-ir-scanner what program should be used for "cross-launching" the executables it builds | ||
GI_CROSS_LAUNCHER: run-wrapper | ||
# Path to the introspection data installed by other packages | ||
GI_GIR_PATH: '@SYSROOT_DIR@/usr/share/gir-1.0' | ||
VALADIR: '@SYSROOT_DIR@/usr/share/vala/vapi' | ||
# Wrapper to add our valadir | ||
VALAC: 'cross-valac' | ||
# Wrapper to add our valadir | ||
VAPIGEN: 'cross-vapigen' | ||
- args: ['touch', '@THIS_COLLECT_DIR@/etc/ModemManager/.keep'] | ||
- args: ['touch', '@THIS_COLLECT_DIR@/etc/ModemManager/connection.d/.keep'] | ||
- args: ['touch', '@THIS_COLLECT_DIR@/etc/ModemManager/fcc-unlock.d/.keep'] | ||
- args: ['touch', '@THIS_COLLECT_DIR@/usr/lib/ModemManager/connection.d/.keep'] | ||
- args: ['touch', '@THIS_COLLECT_DIR@/usr/lib/ModemManager/fcc-unlock.d/.keep'] | ||
|
||
- name: rsync | ||
architecture: '@OPTION:arch@' | ||
source: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 2bb74b9cfea19838b1fb4c175caec5377a5a94fa Mon Sep 17 00:00:00 2001 | ||
From: Dennis Bonke <[email protected]> | ||
Date: Tue, 18 Jun 2024 21:07:19 +0200 | ||
Subject: [PATCH] Add missing _GNU_SOURCE define | ||
|
||
Signed-off-by: Dennis Bonke <[email protected]> | ||
--- | ||
src/qmi-firmware-update/qfu-at-device.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/src/qmi-firmware-update/qfu-at-device.c b/src/qmi-firmware-update/qfu-at-device.c | ||
index 89005bd..aeeeed0 100644 | ||
--- a/src/qmi-firmware-update/qfu-at-device.c | ||
+++ b/src/qmi-firmware-update/qfu-at-device.c | ||
@@ -19,6 +19,7 @@ | ||
* Copyright (C) 2016-2017 Aleksander Morgado <[email protected]> | ||
*/ | ||
|
||
+#define _GNU_SOURCE | ||
#include <errno.h> | ||
#include <fcntl.h> | ||
#include <stdlib.h> | ||
-- | ||
2.45.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From b11885c2054f62a5db2d6122802deded561fe6e4 Mon Sep 17 00:00:00 2001 | ||
From: Dennis Bonke <[email protected]> | ||
Date: Tue, 18 Jun 2024 21:27:13 +0200 | ||
Subject: [PATCH] Add Managarm support | ||
|
||
Signed-off-by: Dennis Bonke <[email protected]> | ||
--- | ||
libqcdm/src/com.c | 1 + | ||
src/mm-port-serial-qcdm.c | 1 + | ||
2 files changed, 2 insertions(+) | ||
|
||
diff --git a/libqcdm/src/com.c b/libqcdm/src/com.c | ||
index d6283e0..3b63c82 100644 | ||
--- a/libqcdm/src/com.c | ||
+++ b/libqcdm/src/com.c | ||
@@ -15,6 +15,7 @@ | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
+#define _GNU_SOURCE | ||
#include <errno.h> | ||
#include <termios.h> | ||
#include <fcntl.h> | ||
diff --git a/src/mm-port-serial-qcdm.c b/src/mm-port-serial-qcdm.c | ||
index 08f2430..91262bf 100644 | ||
--- a/src/mm-port-serial-qcdm.c | ||
+++ b/src/mm-port-serial-qcdm.c | ||
@@ -18,6 +18,7 @@ | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
#include <string.h> | ||
+#include <endian.h> | ||
|
||
#include <ModemManager.h> | ||
#include <mm-errors-types.h> | ||
-- | ||
2.45.2 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- '-Dudevdir=/usr/lib/udev/'
should be supplied here.