samsung-herolte: use dtbtool-exynos (!764)
Since dtbtool-exynos is packaged, we can use it to generate the DT image outside the kernel tree. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
77ea310aac
commit
b88862a624
4 changed files with 19 additions and 47 deletions
|
@ -1,31 +0,0 @@
|
|||
Exynos devices have a special device tree image format, which the built in
|
||||
script in this kernel source facilitates.
|
||||
Unfortunately, the script is badly written in the part where command line
|
||||
arguments are parsed, so this fixes it to create a valid dtb.
|
||||
|
||||
diff --git a/scripts/dtbtool_exynos/dtbtool.c b/scripts/dtbtool_exynos/dtbtool.c
|
||||
index f72fe8662ee..cacd8c69a32 100644
|
||||
--- a/scripts/dtbtool_exynos/dtbtool.c
|
||||
+++ b/scripts/dtbtool_exynos/dtbtool.c
|
||||
@@ -378,13 +378,14 @@ int main(int argc, char **argv)
|
||||
dt_subtype_code = strtoul(val, 0, 16);
|
||||
} else if (*arg != '-') {
|
||||
/* skip over already allocated file names */
|
||||
- for (; dtb_files[dt_count]; dt_count++)
|
||||
- if (dt_count >= DTB_MAX)
|
||||
- fail("reached dtb file limit (%d)", DTB_MAX);
|
||||
-
|
||||
- dtb_files[dt_count] = strdup(arg);
|
||||
- if (!dtb_files[dt_count])
|
||||
- fail("failed to allocate memory");
|
||||
+ for (; dtb_files[dt_count]; dt_count++) {
|
||||
+ if (dt_count >= DTB_MAX) {
|
||||
+ fail("reached dtb file limit (%d)", DTB_MAX);
|
||||
+ } else {
|
||||
+ dtb_files[dt_count] = strdup(arg);
|
||||
+ if (!dtb_files[dt_count]) fail("failed to allocate memory");
|
||||
+ }
|
||||
+ }
|
||||
} else
|
||||
usage();
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
# Kernel config based on: arch/arm64/configs/exynos8890-hero2lte_defconfig
|
||||
|
||||
pkgname="linux-samsung-herolte"
|
||||
pkgver=3.18.133
|
||||
pkgrel=1
|
||||
pkgver=3.18.140
|
||||
pkgrel=0
|
||||
pkgdesc="Samsung Galaxy S7 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
|
@ -11,7 +11,7 @@ _flavor="samsung-herolte"
|
|||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool-exynos"
|
||||
|
||||
# Compiler: latest GCC from Alpine
|
||||
HOSTCC="${CC:-gcc}"
|
||||
|
@ -19,14 +19,13 @@ HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|||
|
||||
# Source - use Ivan Meler's 3.18 upstream kernel
|
||||
_repository="android_kernel_samsung_herolte"
|
||||
_commit="24b577569468748591f7be6435af67e17b532886"
|
||||
_commit="4f50ed696fc6ec36d277ba1af73e98d34e7bc0d6"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/ivanmeler/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
01-remove-android-defines.patch
|
||||
02-fix-dtbtool.patch
|
||||
03-fix-wifi-firmware-path.patch
|
||||
02-fix-wifi-firmware-path.patch
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
|
@ -39,7 +38,15 @@ build() {
|
|||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
# Note: the DTB for this kernel is built in tree, we just need to copy it.
|
||||
|
||||
# Build dt image with exynos dtbtool
|
||||
dtbTool-exynos --pagesize 2048 \
|
||||
--platform 0x50a6 \
|
||||
--subtype 0x217584da \
|
||||
-o "arch/arm64/boot/dt.img" \
|
||||
"arch/arm64/boot/dts/exynos8890-herolte_eur_open_04.dtb" \
|
||||
"arch/arm64/boot/dts/exynos8890-herolte_eur_open_08.dtb" \
|
||||
"arch/arm64/boot/dts/exynos8890-herolte_eur_open_09.dtb"
|
||||
}
|
||||
|
||||
package() {
|
||||
|
@ -62,12 +69,11 @@ package() {
|
|||
fi
|
||||
|
||||
# Copy the in-tree DTBH block image
|
||||
install -Dm644 "$builddir/arch/arm64/boot/dtb.img" \
|
||||
install -Dm644 "$builddir/arch/arm64/boot/dt.img" \
|
||||
"$pkgdir/boot/dt.img"
|
||||
}
|
||||
|
||||
sha512sums="59c128754698259ad7f759def8a82b3f0756404bfe8b474df375c6af0a45b9875ba9a00acca5605b8dcebff4fa5ca1cd20d84d3f398999fe38c3f5837690848c linux-samsung-herolte-24b577569468748591f7be6435af67e17b532886.tar.gz
|
||||
59389d636795aca954dc5c263bbcb9c244309fab79f7088818a412b18e893526b5e13138db3b1ae35ea677c74d091e008ec8d057b0752894a620278e98d08c65 config-samsung-herolte.aarch64
|
||||
sha512sums="28a447fca84c3c1bc95b505362a989964e652ff0c11a8f99e151225c4a29971c7698c846c7826552fcdc4acff799b3150e577892df88697776ce13cd0e76ac5f linux-samsung-herolte-4f50ed696fc6ec36d277ba1af73e98d34e7bc0d6.tar.gz
|
||||
d445cac0faeec22c5fee208dce5fdde9d5c7c0885483ec45a0f172cd89ff9089bf413448b42cef8ef658b0a532403fb8d33decc986c29bb7383106c46e9ee81e config-samsung-herolte.aarch64
|
||||
66e27a174e12d56f5b77932985f0001b551c834d68b2a1bcc1d0b7d04e555757fc9137c182bd4cf5ffd57bf2cb0918d758dfe153a6140b77f02e7b9f33ecfb2c 01-remove-android-defines.patch
|
||||
59b7151edece9fec879c12fe53fa4a7d34563c9b7ed45fa5e96036bde7616cac0976adeef54a5f36d883d51747831881b2586ac02ac47db4123c399cf98e93d8 02-fix-dtbtool.patch
|
||||
ffef99094b44893d07aedf3bbf12b03f2c26fb93be4eb179ade9552ae82be6680daca06b6fc0f95064ef08fd94ef4a0b192a94f5065314a4608de8b8c413d86e 03-fix-wifi-firmware-path.patch"
|
||||
ffef99094b44893d07aedf3bbf12b03f2c26fb93be4eb179ade9552ae82be6680daca06b6fc0f95064ef08fd94ef4a0b192a94f5065314a4608de8b8c413d86e 02-fix-wifi-firmware-path.patch"
|
||||
|
|
|
@ -563,10 +563,7 @@ CONFIG_EXYNOS_BIG_FREQ_BOOST=y
|
|||
# Control Flow Protection
|
||||
#
|
||||
CONFIG_RKP_CFP_JOPP_MAGIC=0xb3ea3bad
|
||||
CONFIG_EXYNOS_DTBTOOL=y
|
||||
CONFIG_EXYNOS_DTBH_PLATFORM_CODE=0x50a6
|
||||
CONFIG_EXYNOS_DTBH_SUBTYPE_CODE=0x217584da
|
||||
CONFIG_EXYNOS_DTBH_PAGE_SIZE=2048
|
||||
# CONFIG_EXYNOS_DTBTOOL is not set
|
||||
CONFIG_NET=y
|
||||
CONFIG_COMPAT_NETLINK_MESSAGES=y
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue