From 0bb531b926ccbb3b0bcad8f3a4de0459543dc3d9 Mon Sep 17 00:00:00 2001 From: knuxify Date: Sat, 23 Mar 2024 20:24:10 +0100 Subject: [PATCH] community/linux-postmarketos-exynos4: Add patch needed for booting samsung-lt01 (MR 4435) This one has stalled a bit due to some upstream shenanigans, but is now confirmed to be fine; since it hasn't been merged yet, add it here manually. [ci:skip-build]: already built successfully in CI --- .../linux-postmarketos-exynos4/APKBUILD | 4 ++- .../tab3-limit-memory.patch | 36 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 device/community/linux-postmarketos-exynos4/tab3-limit-memory.patch diff --git a/device/community/linux-postmarketos-exynos4/APKBUILD b/device/community/linux-postmarketos-exynos4/APKBUILD index d538df84d..3fcf6b74d 100644 --- a/device/community/linux-postmarketos-exynos4/APKBUILD +++ b/device/community/linux-postmarketos-exynos4/APKBUILD @@ -4,7 +4,7 @@ pkgname=linux-postmarketos-exynos4 pkgver=6.7.6 -pkgrel=1 +pkgrel=2 pkgdesc="Mainline kernel fork for Samsung Exynos4 devices" arch="armv7" _carch="arm" @@ -42,6 +42,7 @@ source=" $_config initramfs.list init + tab3-limit-memory.patch " builddir="$srcdir/linux-$_tag" @@ -83,4 +84,5 @@ sha512sums=" ee4cec8100ebe1d85bd18ba0ba5bdf9746f1fb7a7cb6dff0d8f6782d03f51e5d87f0d05a388ff641c276db7857e729ceb900bf33061d079e97cf6e7b43dd5027 config-postmarketos-exynos4.armv7 aaff0332b90e1f9f62de1128cace934717336e54ab09de46477369fa808302482d97334e43a85ee8597c1bcab64d3484750103559fea2ce8cd51776156bf7591 initramfs.list 09f1f214a24300696809727a7b04378887c06ca6f40803ca51a12bf2176a360b2eb8632139d6a0722094e05cb2038bdb04018a1e3d33fc2697674552ade03bee init +aea665e80dee318ec3be23d3f28b88e87eb551d2756e14d896781a0861a4387920f6969990eb171e8c7d6f86c36cef63a89337d63bfee7e44b9de7a8efb36c73 tab3-limit-memory.patch " diff --git a/device/community/linux-postmarketos-exynos4/tab3-limit-memory.patch b/device/community/linux-postmarketos-exynos4/tab3-limit-memory.patch new file mode 100644 index 000000000..7751171c1 --- /dev/null +++ b/device/community/linux-postmarketos-exynos4/tab3-limit-memory.patch @@ -0,0 +1,36 @@ +From 57ae04aa40be1e83e2da2fdf92de749f694ea5f8 Mon Sep 17 00:00:00 2001 +From: Artur Weber +Date: Sat, 17 Feb 2024 12:34:46 +0100 +Link: https://gitlab.com/exynos4-mainline/linux/-/merge_requests/13 +Subject: [PATCH] ARM: dts: exynos4212-tab3: Limit usable memory range + +The stock bootloader on the Samsung Galaxy Tab 3 8.0 provides an +incorrect available memory range over ATAG_MEM. Limit the usable +memory in the DTS to prevent it from doing so, without having to +disable ATAG support. + +Signed-off-by: Artur Weber +--- + arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi +index 87a1317f9220..996cd5cb0c07 100644 +--- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi ++++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi +@@ -45,6 +45,12 @@ chosen { + /* Default S-BOOT bootloader loads initramfs here */ + linux,initrd-start = <0x42000000>; + linux,initrd-end = <0x42800000>; ++ ++ /* ++ * S-BOOT provides incorrect memory size in bootloader; ++ * override it here ++ */ ++ linux,usable-memory-range = <0x40000000 0x3fc00000>; + }; + + firmware@204f000 { +-- +2.44.0 +