From e4e5108c11806d9fd5e6e05ffc8ccfd0515450ff Mon Sep 17 00:00:00 2001 From: methanal <13671494-methanal@users.noreply.gitlab.com> Date: Mon, 11 Sep 2023 17:41:06 +0000 Subject: [PATCH] samsung-on7xelte: enable modem using samsungipcd (MR 4394) [ci:skip-build]: already built successfully in CI --- device/testing/device-samsung-on7xelte/APKBUILD | 14 +++++++++++++- .../device-samsung-on7xelte.post-install | 3 +++ .../device-samsung-on7xelte/mount-efs.rc-init | 12 ++++++++++++ .../device-samsung-on7xelte/samsungipcd.rc-conf | 1 + device/testing/linux-samsung-on7xelte/APKBUILD | 4 ++-- .../config-samsung-on7xelte.aarch64 | 3 ++- 6 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 device/testing/device-samsung-on7xelte/device-samsung-on7xelte.post-install create mode 100644 device/testing/device-samsung-on7xelte/mount-efs.rc-init create mode 100644 device/testing/device-samsung-on7xelte/samsungipcd.rc-conf diff --git a/device/testing/device-samsung-on7xelte/APKBUILD b/device/testing/device-samsung-on7xelte/APKBUILD index e0ddc6a98..268c39612 100644 --- a/device/testing/device-samsung-on7xelte/APKBUILD +++ b/device/testing/device-samsung-on7xelte/APKBUILD @@ -2,7 +2,7 @@ pkgname=device-samsung-on7xelte pkgdesc="Samsung Galaxy J7 Prime" pkgver=0.1 -pkgrel=0 +pkgrel=1 url="https://postmarketos.org" license="MIT" arch="aarch64" @@ -12,12 +12,16 @@ depends=" mkbootimg msm-fb-refresher postmarketos-base + samsungipcd " subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-lightdm" makedepends="devicepkg-dev" +install="$pkgname.post-install" source=" deviceinfo lightdm.conf + mount-efs.rc-init + samsungipcd.rc-conf " build() { @@ -26,6 +30,12 @@ build() { package() { devicepkg_package $startdir $pkgname + + # Mounting EFS Partition + install -Dm755 mount-efs.rc-init "$pkgdir"/etc/init.d/mount-efs + + # Modem Configuration - samsungipcd + install -Dm644 samsungipcd.rc-conf "$pkgdir"/etc/conf.d/samsungipcd } nonfree_firmware() { @@ -43,4 +53,6 @@ lightdm() { sha512sums=" ce87c75f3b16ed56aea5577d9b1da96b90a22d8778639db80636fd5d9ee0f3633c814ae3280542385f6c7ce4fbd0eafbd4c98776aa5e657f4331b8e0b2fadff2 deviceinfo baee319b6d2f49a15680b0f322ec3e398a071d73fbf7713d14f26a1d027f8950457a482ac3f019605af3dfcf25bbb33ebaa0ffde181f7f96d911d56251c81eef lightdm.conf +efbe3d6217854c0131e61f9f3722100d349cb0673f4923bc3d56dae30a6346b0c33e676a39fc4c080150f6ea9457bf268abf870eea916a7d5daae1a22642a2b8 mount-efs.rc-init +3e5bb764529010d2b6b1f2759a7799f665d140aebcee2dd63433e68cd4282e09b5d3b34fb7c21e737595b406501e7f02ece4592651c60e4c2b9419de4aedb438 samsungipcd.rc-conf " diff --git a/device/testing/device-samsung-on7xelte/device-samsung-on7xelte.post-install b/device/testing/device-samsung-on7xelte/device-samsung-on7xelte.post-install new file mode 100644 index 000000000..e7c497acc --- /dev/null +++ b/device/testing/device-samsung-on7xelte/device-samsung-on7xelte.post-install @@ -0,0 +1,3 @@ +#!/bin/sh + +rc-update -q add mount-efs boot diff --git a/device/testing/device-samsung-on7xelte/mount-efs.rc-init b/device/testing/device-samsung-on7xelte/mount-efs.rc-init new file mode 100644 index 000000000..5e5878846 --- /dev/null +++ b/device/testing/device-samsung-on7xelte/mount-efs.rc-init @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +command="/bin/mount" +command_args="/dev/disk/by-partlabel/EFS /efs/" + +depend() { + after bootmisc +} + +start_pre() { + mkdir -p /efs/ +} diff --git a/device/testing/device-samsung-on7xelte/samsungipcd.rc-conf b/device/testing/device-samsung-on7xelte/samsungipcd.rc-conf new file mode 100644 index 000000000..4e744c06b --- /dev/null +++ b/device/testing/device-samsung-on7xelte/samsungipcd.rc-conf @@ -0,0 +1 @@ +IPC_DEVICE_NAME="herolte" diff --git a/device/testing/linux-samsung-on7xelte/APKBUILD b/device/testing/linux-samsung-on7xelte/APKBUILD index b0af46544..3c6802690 100644 --- a/device/testing/linux-samsung-on7xelte/APKBUILD +++ b/device/testing/linux-samsung-on7xelte/APKBUILD @@ -3,7 +3,7 @@ pkgname=linux-samsung-on7xelte pkgver=3.18.14 -pkgrel=0 +pkgrel=1 pkgdesc="Samsung Galaxy J7 Prime kernel fork" arch="aarch64" _carch="arm64" @@ -89,7 +89,7 @@ nonfree_firmware() { sha512sums=" 88cad50360ca1687067e8adba0a5c2d023ddeb20fdf8e7752d626b7173e20b1ee8532265ea3a3395506ed9464379d8039c70e8721ba3f86b70ec44860b01bb96 linux-samsung-on7xelte-dc426ce2d91179926c0fd9ab7d2404fbac4a55d0.tar.gz -96360349f21f39ffdfd05d5f8d16daf067941b66e412b4d4366ac5c79746e06d2a4abf68b9b1d4031e78e06f5dcc9d40972dfbb6186dc1d693dd2f607668a422 config-samsung-on7xelte.aarch64 +0ae84b5fa2f292419e6d513eda614ff533828b04127de491c9d2984fe159b3b7811aaba37c667aae38f405e8557ca343f7cad5d529d0e183e4b84367ecf8e2ff config-samsung-on7xelte.aarch64 2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch 77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch 197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch diff --git a/device/testing/linux-samsung-on7xelte/config-samsung-on7xelte.aarch64 b/device/testing/linux-samsung-on7xelte/config-samsung-on7xelte.aarch64 index 769ea4b33..72979bc9a 100644 --- a/device/testing/linux-samsung-on7xelte/config-samsung-on7xelte.aarch64 +++ b/device/testing/linux-samsung-on7xelte/config-samsung-on7xelte.aarch64 @@ -1805,7 +1805,8 @@ CONFIG_HW_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set CONFIG_UNIX98_PTYS=y CONFIG_DEVPTS_MULTIPLE_INSTANCES=y -# CONFIG_LEGACY_PTYS is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_N_GSM is not set # CONFIG_TRACE_SINK is not set