Add package main/linux-postmarketos-exynos4 (MR 1634)
The devices supported by this package are Galaxy S3 (GT-I9300, GT-I9305, SHV-E210K/L/S) and the Galaxy Note 2 (GT-N7100, GT-N7105) - a family of boards also known by the codename "Midas" - and the Galaxy S2 (GT-I9100) From this list, only the i9100 doesn't support the bootimg method. Because of this, this kernel package is using the isorec method for all the devices on the list. Additionally, for the midas devices, there is no problem with this because the boot.img file is, in fact, a copy of the kernel+initramfs on the pmos boot partition and what the isorec initramfs does is actually to load the initramfs on that partition directly (at least on my understanding).
This commit is contained in:
parent
b5895c0e19
commit
0bab9b5f8a
5 changed files with 5891 additions and 0 deletions
|
@ -0,0 +1,37 @@
|
||||||
|
From 2a6027178ae40c1d3baa965fe21b19cbf09493ce Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
|
||||||
|
Date: Fri, 30 Nov 2012 17:05:40 -0800
|
||||||
|
Subject: [PATCH] ARM: decompressor: Flush tlb before swiching domain 0 to
|
||||||
|
client mode
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
If the bootloader used a page table that is incompatible with domain 0
|
||||||
|
in client mode, and boots with the mmu on, then swithing domain 0 to
|
||||||
|
client mode causes a fault if we don't flush the tlb after updating
|
||||||
|
the page table pointer.
|
||||||
|
|
||||||
|
v2: Add ISB before loading dacr.
|
||||||
|
|
||||||
|
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
||||||
|
---
|
||||||
|
arch/arm/boot/compressed/head.S | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
|
||||||
|
index 8a756870..5b9e2d4b 100644
|
||||||
|
--- a/arch/arm/boot/compressed/head.S
|
||||||
|
+++ b/arch/arm/boot/compressed/head.S
|
||||||
|
@@ -794,6 +794,8 @@ __armv7_mmu_cache_on:
|
||||||
|
bic r6, r6, #1 << 31 @ 32-bit translation system
|
||||||
|
bic r6, r6, #(7 << 0) | (1 << 4) @ use only ttbr0
|
||||||
|
mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
|
||||||
|
+ mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
|
||||||
|
+ mcr p15, 0, r0, c7, c5, 4 @ ISB
|
||||||
|
mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
|
||||||
|
mcrne p15, 0, r6, c2, c0, 2 @ load ttb control
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
69
main/linux-postmarketos-exynos4/APKBUILD
Normal file
69
main/linux-postmarketos-exynos4/APKBUILD
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
# Contributor: Thiago Foganholi <thiagaoplusplus@outlook.com>
|
||||||
|
# Maintainer: Thiago Foganholi <thiagaoplusplus@outlook.com>
|
||||||
|
# Kernel config based on: arch/arm/configs/exynos_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-postmarketos-exynos4
|
||||||
|
pkgver=5.9.1
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Mainline kernel fork for Samsung Exynos4 devices"
|
||||||
|
arch="armv7"
|
||||||
|
_carch="arm"
|
||||||
|
_flavor="${pkgname#linux-}"
|
||||||
|
url="https://kernel.org"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-anbox"
|
||||||
|
makedepends="bison busybox-static-$arch findutils flex installkernel openssl-dev perl xz"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
case $pkgver in
|
||||||
|
*.*.*) _kernver=${pkgver%.0};;
|
||||||
|
*.*) _kernver=$pkgver;;
|
||||||
|
esac
|
||||||
|
source="
|
||||||
|
https://cdn.kernel.org/pub/linux/kernel/v${_kernver%%.*}.x/linux-$_kernver.tar.xz
|
||||||
|
$_config
|
||||||
|
0001-ARM-decompressor-Flush-tlb-before-swiching-domain-0-.patch
|
||||||
|
initramfs.list
|
||||||
|
init
|
||||||
|
"
|
||||||
|
builddir="$srcdir/linux-$_kernver"
|
||||||
|
|
||||||
|
prepare_isorec() {
|
||||||
|
# https://wiki.postmarketos.org/wiki/Boot_process#isorec
|
||||||
|
cp -v /usr/$(arch_to_hostspec $arch)/bin/busybox.static \
|
||||||
|
"$builddir"/usr/
|
||||||
|
cp -v "$srcdir"/init "$builddir"/usr/
|
||||||
|
cp -v "$srcdir"/initramfs.list "$builddir"/usr/
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
prepare_isorec
|
||||||
|
cp -v "$srcdir/$_config" .config
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
unset LDFLAGS
|
||||||
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
mkdir -p "$pkgdir"/boot
|
||||||
|
make zinstall modules_install dtbs_install \
|
||||||
|
ARCH="$_carch" \
|
||||||
|
INSTALL_MOD_STRIP=1 \
|
||||||
|
INSTALL_PATH="$pkgdir"/boot \
|
||||||
|
INSTALL_MOD_PATH="$pkgdir" \
|
||||||
|
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
||||||
|
|
||||||
|
install -D "$builddir"/include/config/kernel.release \
|
||||||
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="96af08c1dc964e5dbb3d221880ef8ca246f13370d2dc2f5ae64039f0352efc687c7446a2b4f86dad553b776ee75f78bbf58bb9bc845c9b57a9013ece63264874 linux-5.9.1.tar.xz
|
||||||
|
c817cbc005b7f3c14c2f171c800753b6180f3a72d8164db977c341015b331fe0865c4024454a22604765bc53f1df4554b29f3c8b86c3ab9f8020c8ba148960e7 config-postmarketos-exynos4.armv7
|
||||||
|
4bb111db4396a1981ad0883737c6594ca93701699846298b940d2ea202c666be0158a0f9ddc5b95b9147fa4cfe62639512ae78e9315f8d975b379ccc4e15da36 0001-ARM-decompressor-Flush-tlb-before-swiching-domain-0-.patch
|
||||||
|
aaff0332b90e1f9f62de1128cace934717336e54ab09de46477369fa808302482d97334e43a85ee8597c1bcab64d3484750103559fea2ce8cd51776156bf7591 initramfs.list
|
||||||
|
09f1f214a24300696809727a7b04378887c06ca6f40803ca51a12bf2176a360b2eb8632139d6a0722094e05cb2038bdb04018a1e3d33fc2697674552ade03bee init"
|
5744
main/linux-postmarketos-exynos4/config-postmarketos-exynos4.armv7
Normal file
5744
main/linux-postmarketos-exynos4/config-postmarketos-exynos4.armv7
Normal file
File diff suppressed because it is too large
Load diff
20
main/linux-postmarketos-exynos4/init
Normal file
20
main/linux-postmarketos-exynos4/init
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/busybox sh
|
||||||
|
|
||||||
|
# Samsung kernels come with their own initramfs, which extract and load another
|
||||||
|
# initramfs. Usually that depends on the recovery key combination being pressed
|
||||||
|
# or not. For simplicity, we always boot the recovery image (from the recovery
|
||||||
|
# partition) here.
|
||||||
|
echo "### isorec initramfs ###"
|
||||||
|
busybox mount -t proc proc /proc
|
||||||
|
busybox mount -t sysfs sysfs /sys
|
||||||
|
|
||||||
|
# always use the "isorec"-style lzop compressed initramfs
|
||||||
|
# from the recovery partition
|
||||||
|
load_image=/isorec.cpio
|
||||||
|
busybox lzop -dc /dev/block/mmcblk0p6 > ${load_image}
|
||||||
|
busybox cpio -iu < ${load_image}
|
||||||
|
busybox rm ${load_image}
|
||||||
|
|
||||||
|
busybox umount /sys
|
||||||
|
busybox umount /proc
|
||||||
|
exec /init
|
21
main/linux-postmarketos-exynos4/initramfs.list
Normal file
21
main/linux-postmarketos-exynos4/initramfs.list
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
dir /dev 755 0 0
|
||||||
|
dir /dev/block 755 0 0
|
||||||
|
nod /dev/block/mmcblk0 600 0 0 b 179 0
|
||||||
|
nod /dev/block/mmcblk0p1 600 0 0 b 179 1
|
||||||
|
nod /dev/block/mmcblk0p2 600 0 0 b 179 2
|
||||||
|
nod /dev/block/mmcblk0p3 600 0 0 b 179 3
|
||||||
|
nod /dev/block/mmcblk0p4 600 0 0 b 179 4
|
||||||
|
nod /dev/block/mmcblk0p5 600 0 0 b 179 5
|
||||||
|
nod /dev/block/mmcblk0p6 600 0 0 b 179 6
|
||||||
|
nod /dev/block/mmcblk0p7 600 0 0 b 179 7
|
||||||
|
nod /dev/block/mmcblk0p8 600 0 0 b 179 8
|
||||||
|
nod /dev/block/mmcblk0p9 600 0 0 b 179 9
|
||||||
|
nod /dev/block/mmcblk0p10 600 0 0 b 179 10
|
||||||
|
nod /dev/block/mmcblk0p11 600 0 0 b 179 11
|
||||||
|
nod /dev/block/mmcblk0p12 600 0 0 b 179 12
|
||||||
|
nod /dev/console 600 0 0 c 5 1
|
||||||
|
dir /bin 755 0 0
|
||||||
|
dir /proc 755 0 0
|
||||||
|
dir /sys 755 0 0
|
||||||
|
file /bin/busybox usr/busybox.static 755 0 0
|
||||||
|
file /init usr/init 755 0 0
|
Loading…
Reference in a new issue