testing/device-samsung-jflte: Unarchive, switch to mainline
What works on mainline (all tested): - screen and partial screen brightness - only 10 different shades of brightness, like downstream - usb and usb networking - wifi - bluetooth - battery & charging status - gpu acceleration (partial, only with GLES 2.0) - buttons What does not work yet on mainline: - cameras - audio - sensors - external gpios for the smart cover - cpufreq - usb smart dock (hdmi sharing, audio dock...) - full gpu support - IR transmitter - external sd card - 3G / 4G - radio - backlight Signed-off-by: Alexandre MINETTE <contact@alex-min.fr> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8887>
This commit is contained in:
parent
4d2fed2962
commit
8a13849a22
29 changed files with 9182 additions and 4073 deletions
|
|
@ -1,42 +0,0 @@
|
|||
# Archived: unmaintained
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer=""
|
||||
pkgname=device-samsung-jflte
|
||||
pkgdesc="Samsung Galaxy S4"
|
||||
pkgver=5
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
postmarketos-base
|
||||
linux-samsung-jflte
|
||||
mkbootimg
|
||||
msm-fb-refresher
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
source="deviceinfo kernel-cmdline.conf fb.modes"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
install -D -m644 "$srcdir"/fb.modes \
|
||||
"$pkgdir"/etc/fb.modes
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Wifi firmware"
|
||||
depends="firmware-samsung-jflte"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
cc310756adb534d24c26e3f9a785bb56fc2d0ca9dff4179b1632de4ddcab480e95fc4e0e301a5eb958d8d0629a843eb35ec5772dc46b14c26c298872318813ec deviceinfo
|
||||
ac6545e7b812a53d4fffc8848801b0cfc90a83b2b281a65ee9d66b82ce76d31a5fdc24655c2d3dffbc32282a4313631ac9146821a15b2e1d955c5e8dcad2becc kernel-cmdline.conf
|
||||
515cd3be1816bea9a1859a37f6568e3e82a9f8f16cbbc71ba13d60723f98eafbda9046ebb1ee7f4ae23dd2b2b2b18506f64516ca45ff71af18e7c163f12248bd fb.modes
|
||||
"
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
mode "1080x1920-0"
|
||||
# D: 0.001 MHz, H: 0.001 kHz, V: 0.000 Hz
|
||||
geometry 1080 1920 1080 1920 16
|
||||
timings 898000000 36 159 4 10 10 2
|
||||
accel false
|
||||
rgba 8/0,8/8,8/16,8/24
|
||||
endmode
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
androidboot.hardware=qcom
|
||||
user_debug=31
|
||||
zcache
|
||||
msm_rtb.filter=0x3F
|
||||
ehci-hcd.park=3
|
||||
buildvariant=userdebug
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# Archived: unmaintained
|
||||
maintainer=""
|
||||
pkgname=firmware-samsung-jflte
|
||||
pkgver=1.1
|
||||
pkgrel=1
|
||||
_commit="af95c8f4af9fda8b909579dafc30ec1ce29cb12d"
|
||||
pkgdesc="Samsung Galaxy S4 Firmware"
|
||||
url="https://github.com/flo071/proprietary_vendor_samsung_jf-common"
|
||||
arch="armv7"
|
||||
license="proprietary"
|
||||
source="$pkgname-$_commit.tar.gz::https://github.com/flo071/proprietary_vendor_samsung_jf-common/archive/$_commit.tar.gz"
|
||||
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
|
||||
builddir="$srcdir/proprietary_vendor_samsung_jf-common-$_commit"
|
||||
|
||||
package() {
|
||||
# Wifi
|
||||
install -Dm644 proprietary/etc/wifi/bcmdhd_sta.bin \
|
||||
"$pkgdir"/lib/firmware/postmarketos/bcmdhd_sta.bin
|
||||
install -Dm644 proprietary/etc/wifi/nvram_net.txt \
|
||||
"$pkgdir"/lib/firmware/postmarketos/nvram_net.txt
|
||||
}
|
||||
sha512sums="b8b92806123b4ab5c02adfb1e33ad18a84a51f181485f7fffe51a6d60678b9750c3bc461550b0a3afde99b4685c8720b0b8be3626f68a284863cb10e3c68c7c5 firmware-samsung-jflte-af95c8f4af9fda8b909579dafc30ec1ce29cb12d.tar.gz"
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
From 79f928baf4e7b0fa8f36276b2f877da2d46a50d0 Mon Sep 17 00:00:00 2001
|
||||
From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
|
||||
Date: Mon, 11 Dec 2017 11:00:24 -0200
|
||||
Subject: [PATCH] fix video argb setting
|
||||
|
||||
---
|
||||
drivers/video/msm/msm_fb.c | 34 +++++++++++++++++-----------------
|
||||
1 file changed, 17 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/msm/msm_fb.c b/drivers/video/msm/msm_fb.c
|
||||
index 251a5cbb753d..dcd9262a88f4 100644
|
||||
--- a/drivers/video/msm/msm_fb.c
|
||||
+++ b/drivers/video/msm/msm_fb.c
|
||||
@@ -1342,16 +1342,16 @@ static int msm_fb_register(struct msm_fb_data_type *mfd)
|
||||
fix->xpanstep = 1;
|
||||
fix->ypanstep = 1;
|
||||
var->vmode = FB_VMODE_NONINTERLACED;
|
||||
- var->blue.offset = 0;
|
||||
- var->green.offset = 8;
|
||||
- var->red.offset = 16;
|
||||
+ var->blue.offset = 24;
|
||||
+ var->green.offset = 16;
|
||||
+ var->red.offset = 8;
|
||||
var->blue.length = 8;
|
||||
var->green.length = 8;
|
||||
var->red.length = 8;
|
||||
var->blue.msb_right = 0;
|
||||
var->green.msb_right = 0;
|
||||
var->red.msb_right = 0;
|
||||
- var->transp.offset = 24;
|
||||
+ var->transp.offset = 0;
|
||||
var->transp.length = 8;
|
||||
bpp = 4;
|
||||
break;
|
||||
@@ -1361,16 +1361,16 @@ static int msm_fb_register(struct msm_fb_data_type *mfd)
|
||||
fix->xpanstep = 1;
|
||||
fix->ypanstep = 1;
|
||||
var->vmode = FB_VMODE_NONINTERLACED;
|
||||
- var->blue.offset = 8;
|
||||
- var->green.offset = 16;
|
||||
- var->red.offset = 24;
|
||||
+ var->blue.offset = 16;
|
||||
+ var->green.offset = 8;
|
||||
+ var->red.offset = 0;
|
||||
var->blue.length = 8;
|
||||
var->green.length = 8;
|
||||
var->red.length = 8;
|
||||
var->blue.msb_right = 0;
|
||||
var->green.msb_right = 0;
|
||||
var->red.msb_right = 0;
|
||||
- var->transp.offset = 0;
|
||||
+ var->transp.offset = 24;
|
||||
var->transp.length = 8;
|
||||
bpp = 4;
|
||||
break;
|
||||
@@ -2260,15 +2260,15 @@ static int msm_fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
/* Figure out if the user meant RGBA or ARGB
|
||||
and verify the position of the RGB components */
|
||||
|
||||
- if (var->transp.offset == 24) {
|
||||
- if ((var->blue.offset != 0) ||
|
||||
- (var->green.offset != 8) ||
|
||||
- (var->red.offset != 16))
|
||||
- return -EINVAL;
|
||||
- } else if (var->transp.offset == 0) {
|
||||
- if ((var->blue.offset != 8) ||
|
||||
+ if (var->transp.offset == 0) {
|
||||
+ if ((var->blue.offset != 24) ||
|
||||
(var->green.offset != 16) ||
|
||||
- (var->red.offset != 24))
|
||||
+ (var->red.offset != 8))
|
||||
+ return -EINVAL;
|
||||
+ } else if (var->transp.offset == 24) {
|
||||
+ if ((var->blue.offset != 16) ||
|
||||
+ (var->green.offset != 8) ||
|
||||
+ (var->red.offset != 0))
|
||||
return -EINVAL;
|
||||
} else
|
||||
return -EINVAL;
|
||||
@@ -2365,7 +2365,7 @@ static int msm_fb_set_par(struct fb_info *info)
|
||||
break;
|
||||
|
||||
case 32:
|
||||
- if (var->transp.offset == 24)
|
||||
+ if (var->transp.offset == 0)
|
||||
mfd->fb_imgType = MDP_ARGB_8888;
|
||||
else
|
||||
mfd->fb_imgType = MDP_RGBA_8888;
|
||||
--
|
||||
2.14.1
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
# Archived: unmaintained
|
||||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/jf_defconfig
|
||||
|
||||
maintainer=""
|
||||
pkgname=linux-samsung-jflte
|
||||
pkgver=3.4.113
|
||||
pkgrel=2
|
||||
pkgdesc="Samsung Galaxy S4 kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="samsung-jflte"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev"
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_samsung_jf"
|
||||
_commit="0b7873d52c2331383f37eb908e54940eeac07345"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
03-fix-video-argb-setting.patch
|
||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
gcc8-fix-put-user.patch
|
||||
linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
|
||||
linux3.4-fix-piggy.gzip.S.patch
|
||||
deduplicate-copy_net_ns.patch
|
||||
nfqnl_ct_put.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
. downstreamkernel_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5301543d6f04c0b70ee8892cbc81e5c81965dd4e81b76282520f9bb7de8cebcb15323d8a58cc5ddaa29c7d7ef0107dcd9022bdbdd05e944516afbc256870513d linux-samsung-jflte-0b7873d52c2331383f37eb908e54940eeac07345.tar.gz
|
||||
b7595ecb480aeb93007bcd941dd131a80884db44fe714c681bdd79ac330df3ae904f8d6f53243f1bdd081949cb5f4b886e051641ea83d737e7b857b4c56dfa00 config-samsung-jflte.armv7
|
||||
e3083c260ed9c4fc0d83f43106700b6173876dbfae072f6e6696ac6785a4dc17771fbcb3e21601e04ed29a11bf0f7a2a09ad549375e0c34cea245c7f2e2bcbbd 03-fix-video-argb-setting.patch
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
9e3b067fa1b19ad02500c4fce1b6142051df3845c508e615788beb650c4f953683107ac2d80670c4e3df38f532e0e91060d2d13ec04c9ec985abd2dfa82e900b linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
|
||||
080745ca4ecaa804ee1df26ea81975ca93b74372e0c08322a6c481e97807495ae6ceb6cc77653afa24f9f2df45da8ebf8e5de6b06037fbb08e0279877ce42188 linux3.4-fix-piggy.gzip.S.patch
|
||||
213717aabd91c8b1fe93f113a33e8d859d29e319ae49b9c751bf4abdedc4ee3bc972a55141cf879876009001fedd055b07cae42aeffdc73535f2e99857f3a101 deduplicate-copy_net_ns.patch
|
||||
9bc646815e5064fade207b3cc62a7bfdef8edb2e8b9edf9c2110e35517001ead2f5a4725247dfcf734e1ce9f8cfdd1414338cae425ecdc4874cfcf1ead22cd05 nfqnl_ct_put.patch
|
||||
"
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,48 +0,0 @@
|
|||
diff -ru a/include/net/net_namespace.h b/include/net/net_namespace.h
|
||||
--- a/include/net/net_namespace.h 2021-05-03 18:16:44.000000000 -0400
|
||||
+++ b/include/net/net_namespace.h 2021-07-23 09:30:57.134066982 -0400
|
||||
@@ -114,18 +114,21 @@
|
||||
/* Init's network namespace */
|
||||
extern struct net init_net;
|
||||
|
||||
-#ifdef CONFIG_NET
|
||||
+#ifdef CONFIG_NET_NS
|
||||
extern struct net *copy_net_ns(unsigned long flags,
|
||||
struct user_namespace *user_ns, struct net *net_ns);
|
||||
|
||||
-#else /* CONFIG_NET */
|
||||
+#else /* CONFIG_NET_NS */
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/nsproxy.h>
|
||||
static inline struct net *copy_net_ns(unsigned long flags,
|
||||
- struct user_namespace *user_ns, struct net *net_ns)
|
||||
+ struct user_namespace *user_ns, struct net *old_net)
|
||||
{
|
||||
- /* There is nothing to copy so this is a noop */
|
||||
- return net_ns;
|
||||
+ if (flags & CLONE_NEWNET)
|
||||
+ return ERR_PTR(-EINVAL);
|
||||
+ return old_net;
|
||||
}
|
||||
-#endif /* CONFIG_NET */
|
||||
+#endif /* CONFIG_NET_NS */
|
||||
|
||||
|
||||
extern struct list_head net_namespace_list;
|
||||
diff -ru a/net/core/net_namespace.c b/net/core/net_namespace.c
|
||||
--- a/net/core/net_namespace.c 2021-05-03 18:16:44.000000000 -0400
|
||||
+++ b/net/core/net_namespace.c 2021-07-23 09:29:03.454038112 -0400
|
||||
@@ -353,13 +353,6 @@
|
||||
}
|
||||
|
||||
#else
|
||||
-struct net *copy_net_ns(unsigned long flags, struct net *old_net)
|
||||
-{
|
||||
- if (flags & CLONE_NEWNET)
|
||||
- return ERR_PTR(-EINVAL);
|
||||
- return old_net;
|
||||
-}
|
||||
-
|
||||
struct net *get_net_ns_by_fd(int fd)
|
||||
{
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../.shared-patches/linux/linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../.shared-patches/linux/linux3.4-fix-piggy.gzip.S.patch
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
From 674147e21195a496164e1c7ff70d0f0b45235f25 Mon Sep 17 00:00:00 2001
|
||||
From: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
Date: Tue, 19 Jun 2012 05:25:46 +0200
|
||||
Subject: [PATCH] netfilter: fix missing symbols if
|
||||
CONFIG_NETFILTER_NETLINK_QUEUE_CT unset
|
||||
|
||||
ERROR: "nfqnl_ct_parse" [net/netfilter/nfnetlink_queue.ko] undefined!
|
||||
ERROR: "nfqnl_ct_seq_adjust" [net/netfilter/nfnetlink_queue.ko] undefined!
|
||||
ERROR: "nfqnl_ct_put" [net/netfilter/nfnetlink_queue.ko] undefined!
|
||||
ERROR: "nfqnl_ct_get" [net/netfilter/nfnetlink_queue.ko] undefined!
|
||||
|
||||
We have to use CONFIG_NETFILTER_NETLINK_QUEUE_CT in
|
||||
include/net/netfilter/nfnetlink_queue.h, not CONFIG_NF_CONNTRACK.
|
||||
|
||||
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
include/net/netfilter/nfnetlink_queue.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/net/netfilter/nfnetlink_queue.h b/include/net/netfilter/nfnetlink_queue.h
|
||||
index 9f8095c108e4..86267a529514 100644
|
||||
--- a/include/net/netfilter/nfnetlink_queue.h
|
||||
+++ b/include/net/netfilter/nfnetlink_queue.h
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
struct nf_conn;
|
||||
|
||||
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
||||
+#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT
|
||||
struct nf_conn *nfqnl_ct_get(struct sk_buff *entskb, size_t *size,
|
||||
enum ip_conntrack_info *ctinfo);
|
||||
struct nf_conn *nfqnl_ct_parse(const struct sk_buff *skb,
|
||||
--
|
||||
2.32.0
|
||||
|
||||
94
device/testing/device-samsung-jflte/APKBUILD
Normal file
94
device/testing/device-samsung-jflte/APKBUILD
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
maintainer="Alex-min <contact@alex-min.fr>"
|
||||
pkgname=device-samsung-jflte
|
||||
pkgver=6
|
||||
pkgrel=0
|
||||
pkgdesc="Samsung Galaxy S4"
|
||||
url="https://postmarketos.org"
|
||||
arch="armv7"
|
||||
license="MIT"
|
||||
depends="
|
||||
evtest
|
||||
firmware-qcom-adreno-a300
|
||||
firmware-samsung-jflte
|
||||
linux-firmware-brcm
|
||||
linux-postmarketos-qcom-apq8064
|
||||
mkbootimg
|
||||
msm-firmware-loader
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="
|
||||
$pkgname-lomiri:lomiri
|
||||
$pkgname-lomiri-openrc:lomiri_openrc
|
||||
$pkgname-xfce:xfce"
|
||||
source="
|
||||
adreno-a3xx-quirks.sh
|
||||
deviceinfo
|
||||
device-samsung-jflte-lomiri.post-install
|
||||
kernel-cmdline.conf
|
||||
lomiri-init.sh
|
||||
lomiri_power_key_service_openrc
|
||||
lomiri_power_button_suspend
|
||||
modules-initfs
|
||||
xfce-phone-tweaks.desktop
|
||||
xfce-phone-tweaks.sh
|
||||
"
|
||||
options="!archcheck !check pmb:systemd"
|
||||
install="$pkgname-lomiri.post-install"
|
||||
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
|
||||
install -Dm644 "$srcdir"/adreno-a3xx-quirks.sh \
|
||||
"$pkgdir"/etc/profile.d/adreno-a3xx-quirks.sh
|
||||
|
||||
install -Dm644 -t "$pkgdir"/etc/profile.d/ \
|
||||
"$srcdir"/lomiri-init.sh
|
||||
|
||||
install -Dm644 -t "$pkgdir"/usr/bin/ \
|
||||
"$srcdir"/lomiri_power_button_suspend
|
||||
|
||||
install -Dm744 "$srcdir"/lomiri_power_key_service_openrc \
|
||||
"$pkgdir"/etc/init.d/lomiri-power-key
|
||||
}
|
||||
|
||||
lomiri() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-lomiri"
|
||||
amove etc/profile.d/lomiri-init.sh
|
||||
amove usr/bin/lomiri_power_button_suspend
|
||||
}
|
||||
|
||||
lomiri_openrc() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-lomiri openrc"
|
||||
|
||||
amove etc/init.d/lomiri-power-key
|
||||
}
|
||||
|
||||
xfce() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-xfce4"
|
||||
|
||||
install -Dm755 "$srcdir"/xfce-phone-tweaks.sh \
|
||||
"$subpkgdir"/usr/bin/xfce-phone-tweaks.sh
|
||||
|
||||
install -Dm644 "$srcdir"/xfce-phone-tweaks.desktop \
|
||||
"$subpkgdir"/etc/xdg/autostart/xfce-phone-tweaks.desktop
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f5e2a9cd2a0468ef7492096245319954e7d4de2db363f42a9b69d7e738b8808a0162fc74aa3d7bd44ebc30039d023e160e7be1bd571aeb0a7a2a3984090eaa94 adreno-a3xx-quirks.sh
|
||||
a228c9f93f041f6843f9eb9d8ce832b3e53083cef6e689067fb9ea63b4fff8940ce83039669754f5703eba44a9b99db9706f5702fedf51e0a0ee1d62d4821f16 deviceinfo
|
||||
568ad708d6844512f8e24ded91762671e1a5b9ecfd4c6fd52f5ec9fa1c7c2cf692ebd803117aa451e4e2ea7612eed1ecaf2b9cc2367998025cfacb170058f32d device-samsung-jflte-lomiri.post-install
|
||||
dce529d931031708299d534cb59e5d9862fb6d7bdb42f687242c6c88f5df96f184c39b99a27d734bea30471710dc63e80a356a6d9de78e4998e9da738158c252 kernel-cmdline.conf
|
||||
1dca3d37ae63db457464c15c19abce10b6ec6ff1dc29cbf93e41080020a4c2c8314f6244ec3da70c7bdf50825d431a9c0b41f3df37489dc1753ce0fdf836f079 lomiri-init.sh
|
||||
dc9ea2fdc979db4d40f9fc1bf793dc1cb4a519278e6c4b6d1061adfc9acf76b159d76e602fc83e5e2940eb73252776e056b897d15c660227fe11d3922617ca64 lomiri_power_key_service_openrc
|
||||
96b5093df4e89bc6d4295864ab5d7f2c917e0d482ab0d3c7335a35ad6a74a2415fd65e8c4d24a280b8f3eac6240ca9d8455a2c387a991f72b180421524338580 lomiri_power_button_suspend
|
||||
f627d473ccfc01f39ed7b1345c2795af0cd358b4738d202e53fbae07c605d239f9139b034c5a29411bafe368b92a44c756e2bd029246b385d6397f519af8ff7c modules-initfs
|
||||
2d9c82df7faa4c89350e634acfac533650ebce8e10a887d217ae7b9f820514b3347f1b2bccf1524bbdd32470665ba290cb6aace3262d396659bf2f580bba0fc6 xfce-phone-tweaks.desktop
|
||||
60d78e7b5da086c8bba9c1b1905e35776e3e049cbcb6e0fcbb4b373b9a0122ff9561102ab78134a346ea3d950462e6948761507cf23f9699273b7516d4ab904b xfce-phone-tweaks.sh
|
||||
"
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# GLES 3.0 is supported by the GPU but freedreno support of GLES 3.0 in
|
||||
# Adreno-a3xx is very buggy and crashes the device with anything more complicated
|
||||
# than a cube.
|
||||
# Forcing GLES 2.0 until I find what's wrong with freedreno.
|
||||
# Maybe relevant: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/12634#note_2792052
|
||||
export MESA_GLES_VERSION_OVERRIDE=2.0
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
rc-update add lomiri-power-key default
|
||||
rc-update del repowerd default
|
||||
|
|
@ -11,18 +11,21 @@ deviceinfo_arch="armv7"
|
|||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="1920"
|
||||
deviceinfo_dev_touchscreen="/dev/input/event3"
|
||||
deviceinfo_create_initfs_extra="true"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
deviceinfo_append_dtb="true"
|
||||
deviceinfo_boot_filesystem="ext2"
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
deviceinfo_flash_offset_base="0x80200000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||
deviceinfo_flash_offset_ramdisk="0x03200000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_offset_tags="0x02e00000"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||
deviceinfo_dtb="qcom-apq8064-samsung-jflte"
|
||||
|
||||
# lk2nd does not support GPT for subpartitions/SD cards yet
|
||||
deviceinfo_partition_type="msdos"
|
||||
7
device/testing/device-samsung-jflte/kernel-cmdline.conf
Normal file
7
device/testing/device-samsung-jflte/kernel-cmdline.conf
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
earlycon
|
||||
console=ttyMSM0,115200n8
|
||||
ignore_loglevel
|
||||
loglevel=8
|
||||
clk_ignore_unused
|
||||
regulator_ignore_unused
|
||||
pd_ignore_unused
|
||||
8
device/testing/device-samsung-jflte/lomiri-init.sh
Normal file
8
device/testing/device-samsung-jflte/lomiri-init.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Makes the Lomiri UI bigger
|
||||
# Calculation : round(411ppi * 0.05236) = 21
|
||||
# Reference: https://wiki.postmarketos.org/wiki/Lomiri
|
||||
export GRID_UNIT_PX=21
|
||||
|
||||
# Lomiri sleeping is broken on mainline
|
||||
# it expects an Android kernel
|
||||
printf off > /sys/power/autosleep
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
#!/bin/sh
|
||||
|
||||
### rpowerd doesn't support mainline linux very well
|
||||
### if it detects PM_SUSPEND kernel flag (/sys/power/autosleep)
|
||||
### it tries to do some Android-style sleep which is wrong on mainline Linux
|
||||
### This is a quirk script until I make a PR for rpowerd to better support mainline Linux
|
||||
|
||||
display_service=com.lomiri.SystemCompositor.Display
|
||||
display_path=/com/lomiri/SystemCompositor/Display
|
||||
display_interface=com.lomiri.SystemCompositor.Display
|
||||
restart_repowerd=0
|
||||
wake_press_deadline=0
|
||||
ignore_release=0
|
||||
|
||||
[ "$(id -u)" -eq 0 ] || {
|
||||
echo "Run as root" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
for command in evtest dbus-send rc-service; do
|
||||
command -v "$command" >/dev/null 2>&1 || {
|
||||
echo "Missing command: $command" >&2
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
find_power_event() {
|
||||
for name_file in /sys/class/input/event*/device/name; do
|
||||
read -r name < "$name_file"
|
||||
[ "$name" = pmic8xxx_pwrkey ] || continue
|
||||
event_name=${name_file#/sys/class/input/}
|
||||
event_name=${event_name%%/*}
|
||||
echo "/dev/input/$event_name"
|
||||
return
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
display() {
|
||||
dbus-send --system --type=method_call \
|
||||
--dest="$display_service" "$display_path" \
|
||||
"$display_interface.$1" string:all
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
printf off > /sys/power/autosleep
|
||||
[ "$restart_repowerd" -eq 1 ] && rc-service repowerd start
|
||||
}
|
||||
|
||||
trap cleanup EXIT INT TERM
|
||||
|
||||
if rc-service repowerd status >/dev/null 2>&1; then
|
||||
restart_repowerd=1
|
||||
rc-service repowerd stop
|
||||
fi
|
||||
|
||||
printf off > /sys/power/autosleep
|
||||
display TurnOn
|
||||
|
||||
power_event=$(find_power_event) || {
|
||||
echo "Could not find pmic8xxx_pwrkey input device" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Monitoring $power_event"
|
||||
evtest "$power_event" |
|
||||
while read -r line; do
|
||||
case "$line" in
|
||||
*"type 1 (EV_KEY), code 116 (KEY_POWER), value 1"*)
|
||||
now=$(date +%s)
|
||||
if [ "$now" -le "$wake_press_deadline" ]; then
|
||||
ignore_release=1
|
||||
else
|
||||
ignore_release=0
|
||||
fi
|
||||
;;
|
||||
*"type 1 (EV_KEY), code 116 (KEY_POWER), value 0"*)
|
||||
if [ "$ignore_release" -eq 1 ]; then
|
||||
ignore_release=0
|
||||
wake_press_deadline=0
|
||||
continue
|
||||
fi
|
||||
|
||||
display TurnOff
|
||||
sleep 1
|
||||
printf mem > /sys/power/state
|
||||
display TurnOn
|
||||
|
||||
# Ignore only a wake-key press read immediately after resume.
|
||||
wake_press_deadline=$(($(date +%s) + 1))
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#!/sbin/openrc-run
|
||||
# /etc/init.d/lomiri-power-key
|
||||
|
||||
description="Lomiri power key fix, makes the power key not loop"
|
||||
|
||||
supervisor="supervise-daemon"
|
||||
command="/bin/sh"
|
||||
command_args="/usr/bin/lomiri_power_button_suspend"
|
||||
command_user="root"
|
||||
|
||||
output_log="/var/log/lomiri_power_button_suspend.log"
|
||||
error_log="/var/log/lomiri_power_button_suspend.err"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
after bootmisc
|
||||
}
|
||||
1
device/testing/device-samsung-jflte/modules-initfs
Normal file
1
device/testing/device-samsung-jflte/modules-initfs
Normal file
|
|
@ -0,0 +1 @@
|
|||
msm
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=XFCE Phone Tweaks
|
||||
Exec=/usr/bin/xfce-phone-tweaks.sh
|
||||
OnlyShowIn=XFCE;
|
||||
X-GNOME-Autostart-enabled=true
|
||||
12
device/testing/device-samsung-jflte/xfce-phone-tweaks.sh
Normal file
12
device/testing/device-samsung-jflte/xfce-phone-tweaks.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
xfconf-query -c xsettings -p /Gdk/WindowScalingFactor --create -t int -s 2
|
||||
xfconf-query -c xsettings -p /Xft/DPI --create -t int -s 144
|
||||
xfconf-query -c xfwm4 -p /general/theme --create -t string -s Default-xhdpi
|
||||
xfconf-query -c xfwm4 -p /general/use_compositing --create -t bool -s false
|
||||
|
||||
# top panel
|
||||
xfconf-query -c xfce4-panel -p /panels/panel-1/size --create -t int -s 56
|
||||
xfconf-query -c xfce4-panel -p /panels/panel-1/length --create -t int -s 100
|
||||
xfconf-query -c xfce4-panel -p /panels/panel-1/length-adjust --create -t bool -s true
|
||||
xfconf-query -c xfce4-panel -p /panels/panel-1/position --reset
|
||||
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/firmware/samsung/ice4.bin
|
||||
50
device/testing/firmware-samsung-jflte/APKBUILD
Normal file
50
device/testing/firmware-samsung-jflte/APKBUILD
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
maintainer="Alex-min <contact@alex-min.fr>"
|
||||
pkgname=firmware-samsung-jflte
|
||||
pkgver=1.2
|
||||
pkgrel=0
|
||||
_commit="af95c8f4af9fda8b909579dafc30ec1ce29cb12d"
|
||||
pkgdesc="Samsung Galaxy S4 Firmware"
|
||||
url="https://github.com/flo071/proprietary_vendor_samsung_jf-common"
|
||||
arch="armv7"
|
||||
license="proprietary"
|
||||
makedepends="python3"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/flo071/proprietary_vendor_samsung_jf-common/archive/$_commit.tar.gz
|
||||
barcode_emul_ice4.h::https://raw.githubusercontent.com/LineageOS/android_kernel_samsung_jf/refs/heads/lineage-18.1/drivers/barcode_emul/barcode_emul_ice4.h
|
||||
ice4-firmware-extract.py
|
||||
30-ice4-firmware.files
|
||||
"
|
||||
options="
|
||||
!archcheck
|
||||
!check
|
||||
!spdx
|
||||
!strip
|
||||
!tracedeps
|
||||
pmb:cross-native
|
||||
"
|
||||
builddir="$srcdir/proprietary_vendor_samsung_jf-common-$_commit"
|
||||
|
||||
package() {
|
||||
# Bluetooth
|
||||
install -Dm644 proprietary/vendor/firmware/bcm4335_V0343.0353.hcd \
|
||||
"$pkgdir"/usr/lib/firmware/brcm/BCM4335A0.hcd
|
||||
# Wifi
|
||||
install -Dm644 proprietary/etc/wifi/nvram_net.txt \
|
||||
"$pkgdir"/usr/lib/firmware/brcm/brcmfmac4335-sdio.txt
|
||||
|
||||
# ICE4 FPGA
|
||||
# Originally bytes just stuffed in a .h file in downstream
|
||||
# We're repackaging it to a proper .bin firmware
|
||||
python3 "$srcdir/ice4-firmware-extract.py" "$srcdir/barcode_emul_ice4.h" -o "$srcdir"
|
||||
install -Dm644 "$srcdir"/30-ice4-firmware.files -t \
|
||||
"$pkgdir"/usr/share/mkinitfs/files
|
||||
install -Dm644 "$srcdir/ice4.bin" \
|
||||
"$pkgdir"/usr/lib/firmware/samsung/ice4.bin
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b8b92806123b4ab5c02adfb1e33ad18a84a51f181485f7fffe51a6d60678b9750c3bc461550b0a3afde99b4685c8720b0b8be3626f68a284863cb10e3c68c7c5 firmware-samsung-jflte-af95c8f4af9fda8b909579dafc30ec1ce29cb12d.tar.gz
|
||||
8992b7dcffc669f15ba83c8e86455f84d4db88594f33365b4b3ff7690a890ca7b9634f4992243d89b72f02f5d25f960f0c50e552220ad37a463c266d504d59be barcode_emul_ice4.h
|
||||
727d969945586000419a1ca600ba70d6dbe3f977315a5e0e6d6951d927810da42dae09750f930087909e08b6a7b7d23ed577ab2409516aab97545e5830a12991 ice4-firmware-extract.py
|
||||
084268e9e748aa3c32a77d15036b115008a708ee3d70d78c8bf580a5926eb28b2f58e97cc126a30dab73745e1eedf864a0e959a2df4cc4a0385317c6f294c828 30-ice4-firmware.files
|
||||
"
|
||||
101
device/testing/firmware-samsung-jflte/ice4-firmware-extract.py
Normal file
101
device/testing/firmware-samsung-jflte/ice4-firmware-extract.py
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright 2026 Alexandre MINETTE
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Extract jflte ICE4 FPGA firmware blobs from downstream source into a mainline .bin firmware file.
|
||||
# https://raw.githubusercontent.com/LineageOS/android_kernel_samsung_jf/refs/heads/lineage-18.1/drivers/barcode_emul/barcode_emul_ice4.h
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import hashlib
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
ARRAY_RE = re.compile(
|
||||
r"const\s+u8\s+(?P<name>\w+)\s*\[\]\s*=\s*\{(?P<body>.*?)\s*\};",
|
||||
re.S,
|
||||
)
|
||||
|
||||
OUTPUT_NAMES = {
|
||||
("spiword_24m", 1): "ice4-dcm-spiword-24m.bin",
|
||||
("spiword_24m", 2): "ice4-non-dcm-spiword-24m.bin",
|
||||
("spiword_i2c", 1): "ice4-spiword-i2c.bin",
|
||||
("spiword", 1): "ice4-spiword.bin",
|
||||
("spiword_legacy", 1): "ice4-spiword-legacy.bin",
|
||||
("spiword_irda", 1): "ice4-spiword-irda.bin",
|
||||
("spiword_irda_serrano", 1): "ice4-spiword-irda-serrano.bin",
|
||||
}
|
||||
DEFAULT_FIRMWARE = "ice4-non-dcm-spiword-24m.bin"
|
||||
DEFAULT_OUTPUT = "ice4.bin"
|
||||
|
||||
|
||||
def parse_arrays(header: str) -> list[tuple[str, int, bytes]]:
|
||||
counts: dict[str, int] = {}
|
||||
blobs = []
|
||||
|
||||
for match in ARRAY_RE.finditer(header):
|
||||
name = match.group("name")
|
||||
counts[name] = counts.get(name, 0) + 1
|
||||
occurrence = counts[name]
|
||||
values = [
|
||||
int(value, 16)
|
||||
for value in re.findall(r"0x([0-9A-Fa-f]{1,2})", match.group("body"))
|
||||
]
|
||||
blobs.append((name, occurrence, bytes(values)))
|
||||
|
||||
return blobs
|
||||
|
||||
|
||||
def output_name(name: str, occurrence: int) -> str:
|
||||
try:
|
||||
return OUTPUT_NAMES[(name, occurrence)]
|
||||
except KeyError:
|
||||
suffix = f"-{occurrence}" if occurrence > 1 else ""
|
||||
fallback = name.replace("_", "-")
|
||||
return f"ice4-{fallback}{suffix}.bin"
|
||||
|
||||
|
||||
def write_blob(path: Path, data: bytes) -> None:
|
||||
path.write_bytes(data)
|
||||
digest = hashlib.sha256(data).hexdigest()
|
||||
print(f"wrote {path} ({len(data)} bytes, sha256 {digest})")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Extract all downstream ICE4 firmware arrays as raw blobs."
|
||||
)
|
||||
parser.add_argument(
|
||||
"header",
|
||||
type=Path,
|
||||
help=f"downstream barcode_emul_ice4.h path",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-o",
|
||||
"--output-dir",
|
||||
type=Path,
|
||||
help=f"output directory",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
blobs = parse_arrays(args.header.read_text())
|
||||
if not blobs:
|
||||
raise ValueError("no ICE4 firmware arrays found")
|
||||
|
||||
args.output_dir.mkdir(parents=True, exist_ok=True)
|
||||
by_output: dict[str, bytes] = {}
|
||||
|
||||
for name, occurrence, data in blobs:
|
||||
filename = output_name(name, occurrence)
|
||||
by_output[filename] = data
|
||||
write_blob(args.output_dir / filename, data)
|
||||
|
||||
default = by_output[DEFAULT_FIRMWARE]
|
||||
write_blob(args.output_dir / DEFAULT_OUTPUT, default)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
72
device/testing/linux-postmarketos-qcom-apq8064/APKBUILD
Normal file
72
device/testing/linux-postmarketos-qcom-apq8064/APKBUILD
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
maintainer="Alexandre MINETTE <contact@alex-min.fr>"
|
||||
_flavor="postmarketos-qcom-apq8064"
|
||||
pkgname=linux-postmarketos-qcom-apq8064
|
||||
pkgver=7.1
|
||||
pkgrel=0
|
||||
_commit="085b3970a6a591d6703749aeed290413fe2a68b4"
|
||||
pkgdesc="Mainline Kernel fork for APQ8064 devices"
|
||||
url="https://github.com/apq8064-mainline/linux"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
license="GPL-2.0-only"
|
||||
options="
|
||||
!check
|
||||
!strip
|
||||
!tracedeps
|
||||
pmb:cross-native
|
||||
pmb:kconfigcheck-community
|
||||
"
|
||||
makedepends="
|
||||
bison
|
||||
clang
|
||||
findutils
|
||||
flex
|
||||
lld
|
||||
llvm
|
||||
openssl-dev
|
||||
perl
|
||||
postmarketos-installkernel
|
||||
python3
|
||||
xz
|
||||
zstd
|
||||
"
|
||||
_config="config-$_flavor.$arch"
|
||||
_tag="qcom-apq8064-v${pkgver/_/-}"
|
||||
|
||||
# Source
|
||||
source="
|
||||
https://github.com/apq8064-mainline/linux/archive/$_tag/$_commit.tar.gz
|
||||
$_config
|
||||
"
|
||||
builddir="$srcdir/linux-qcom-apq8064-v7.1"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
cp "$srcdir/config-$_flavor.$arch" .config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" LLVM=1 \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/boot
|
||||
make zinstall modules_install dtbs_install \
|
||||
ARCH="$_carch" \
|
||||
LLVM=1 \
|
||||
INSTALL_PATH="$pkgdir"/boot/ \
|
||||
INSTALL_MOD_PATH="$pkgdir"/usr \
|
||||
INSTALL_MOD_STRIP=1 \
|
||||
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
|
||||
rm -f "$pkgdir"/usr/lib/modules/*/build "$pkgdir"/usr/lib/modules/*/source
|
||||
|
||||
install -D "$builddir"/include/config/kernel.release \
|
||||
"$pkgdir"/usr/share/kernel/"$_flavor"/kernel.release
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b314e9385eb33b422ebfaf0e27641cf615247dcc2e0d77ae32c72ab77ea48c58cf1df1b39775b6e3ef14b98466085f3445934ba45796e14817b28576895983ee 085b3970a6a591d6703749aeed290413fe2a68b4.tar.gz
|
||||
f9fd62aa490658864e1295a84a720602da3bbd60aa6ef5f90af55ab878898381eb5528b2470732f88f3126ce852aafa3cc1a3615db138114d1c9f11f648da4e8 config-postmarketos-qcom-apq8064.armv7
|
||||
"
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue