2018-06-09 15:03:28 +00:00
|
|
|
# Kernel config based on: arch/arm/configs/msm8974-hdx_defconfig
|
2017-10-29 21:33:52 +00:00
|
|
|
|
2018-06-11 21:43:33 +00:00
|
|
|
pkgname="linux-amazon-thor"
|
2018-06-09 15:03:28 +00:00
|
|
|
pkgver=3.4.113
|
2018-11-28 22:54:09 +00:00
|
|
|
pkgrel=2
|
2018-06-09 15:03:28 +00:00
|
|
|
pkgdesc="Phoenix Kernel for the 7-inch Kindle Fire HDX 3rd generation"
|
2018-06-11 21:43:33 +00:00
|
|
|
arch="armhf"
|
|
|
|
_carch="arm"
|
|
|
|
_flavor="amazon-thor"
|
|
|
|
url="https://kernel.org"
|
|
|
|
license="GPL2"
|
2017-10-29 21:33:52 +00:00
|
|
|
options="!strip !check !tracedeps"
|
2018-10-01 06:44:18 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz dtbtool gcc6"
|
|
|
|
|
|
|
|
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
|
|
|
|
# request if you find out that it is booting working with newer GCCs as
|
|
|
|
# well. See <https://postmarketos.org/vendorkernel> for instructions.
|
|
|
|
if [ "${CC:0:5}" != "gcc6-" ]; then
|
|
|
|
CC="gcc6-$CC"
|
2018-11-28 22:54:09 +00:00
|
|
|
HOSTCC="gcc-6"
|
2018-10-01 06:44:18 +00:00
|
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
|
|
fi
|
2018-06-11 21:43:33 +00:00
|
|
|
|
|
|
|
# Source
|
|
|
|
_repository="kernel_phoenix_hdx-common"
|
|
|
|
_commit="f73e4eec8717c6104eca954cf9c259d9d37c38a5"
|
|
|
|
_config="config-${_flavor}.${arch}"
|
2017-10-29 21:33:52 +00:00
|
|
|
source="
|
2018-06-11 21:43:33 +00:00
|
|
|
$pkgname-$_commit.tar.gz::https://github.com/ggow/${_repository}/archive/${_commit}.tar.gz
|
2017-10-29 21:33:52 +00:00
|
|
|
$_config
|
|
|
|
compiler-gcc6.h
|
2018-06-11 21:43:33 +00:00
|
|
|
00_fix_smd_private.patch
|
|
|
|
00_fix_qaudio.patch
|
2017-10-29 21:33:52 +00:00
|
|
|
00_fix_return_address.patch
|
|
|
|
00_Input-sentelic-use-static-inline-instead-of-inline.patch
|
|
|
|
00_Input-lifebook-use-static-inline-instead-of-inline-i.patch
|
|
|
|
02_gpu-msm-fix-gcc5-compile.patch
|
2018-06-11 21:43:33 +00:00
|
|
|
03_msm_fix_trace.patch
|
2018-02-24 08:25:32 +00:00
|
|
|
06_fix_mdss_fb_rgb_mode.patch
|
2017-10-29 21:33:52 +00:00
|
|
|
"
|
2018-06-11 21:43:33 +00:00
|
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
2017-10-29 21:33:52 +00:00
|
|
|
|
|
|
|
prepare() {
|
2018-06-11 21:43:33 +00:00
|
|
|
default_prepare
|
2017-10-29 21:33:52 +00:00
|
|
|
|
|
|
|
# gcc6 support
|
2018-06-11 21:43:33 +00:00
|
|
|
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
2017-10-29 21:33:52 +00:00
|
|
|
|
2018-06-11 21:43:33 +00:00
|
|
|
# Remove -Werror from all makefiles
|
|
|
|
local i
|
|
|
|
local makefiles="$(find . -type f -name Makefile)
|
|
|
|
$(find . -type f -name Kbuild)"
|
|
|
|
for i in $makefiles; do
|
|
|
|
sed -i 's/-Werror-/-W/g' "$i"
|
|
|
|
sed -i 's/-Werror//g' "$i"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
|
|
|
|
cp "$srcdir"/$_config "$builddir"/.config
|
|
|
|
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
|
2017-10-29 21:33:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2018-06-11 21:43:33 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
2017-10-29 21:33:52 +00:00
|
|
|
|
2018-06-11 21:43:33 +00:00
|
|
|
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/" --version=1
|
2017-10-29 21:33:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2018-06-11 21:43:33 +00:00
|
|
|
# kernel.release
|
|
|
|
install -D "$builddir/include/config/kernel.release" \
|
2017-10-29 21:33:52 +00:00
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
2018-06-09 15:03:28 +00:00
|
|
|
|
2018-06-11 21:43:33 +00:00
|
|
|
# zImage (find the right one)
|
|
|
|
cd "$builddir/arch/$_carch/boot"
|
|
|
|
_target="$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
|
|
|
|
[ -e "$_zimg" ] || continue
|
|
|
|
msg "zImage found: $_zimg"
|
|
|
|
install -Dm644 "$_zimg" "$_target"
|
|
|
|
break
|
|
|
|
done
|
|
|
|
if ! [ -e "$_target" ]; then
|
|
|
|
error "Could not find zImage in $PWD!"
|
|
|
|
return 1
|
|
|
|
fi
|
2018-06-09 15:03:28 +00:00
|
|
|
|
2018-06-11 21:43:33 +00:00
|
|
|
install -Dm644 "$builddir/arch/$_carch/boot/dt.img" \
|
|
|
|
"$pkgdir/boot/dt.img"
|
2017-10-29 21:33:52 +00:00
|
|
|
}
|
|
|
|
|
2018-06-09 15:03:28 +00:00
|
|
|
sha512sums="7d9f9001c6fc11954922070e3ed18f7e2843d5cd45dbab0f86ab332d6c45ee0279dd2c9bf498d91c017322f8b56f7f7417f132201bf2104ea5826212d09224f7 linux-amazon-thor-f73e4eec8717c6104eca954cf9c259d9d37c38a5.tar.gz
|
|
|
|
d682b04c30b7829d6e90b4ad3eb40201ff253dfdb1717742b6b6574b8d3c86abc95e6f7ee8e8ab097520b41e0240b06bdd75fc8be727ac481e656c4d23f8dd30 config-amazon-thor.armhf
|
2017-10-29 21:33:52 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
2018-06-11 21:43:33 +00:00
|
|
|
ddf6caae3f087f21fbfdc258da1c05731bc14c24fe25ce1383133140129d44c48dc427b52d93ed7395def9ad5bf4dab01cc2792581c8ec3e10278c014a64d240 00_fix_smd_private.patch
|
|
|
|
f40a9b3395882046adc66f97631dc85815f1901471559a40df502ec3fb0334ce2fd14202cd2a2b0de5a5e78deb103983bb0bcf9a5dce14cf1048b9750ebba6fa 00_fix_qaudio.patch
|
2017-10-29 21:33:52 +00:00
|
|
|
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
|
|
|
|
2d77d90b501aa8afbf81629e73fc0a2055b373942975f58277e43f398d0835b3dbbff4a1118137ec82873ba90a254fea87c1d73ba7708578f1779bd0b4c6ff2d 00_Input-sentelic-use-static-inline-instead-of-inline.patch
|
|
|
|
5c49f6ff6773a7dc3067d2b1359648fe7a9f758b6c068d6fa69d9aaf24a291ba8022c960317d926aabc11d020a71b20c4e81a6fcf9b21ef66d9b6d065bae23e9 00_Input-lifebook-use-static-inline-instead-of-inline-i.patch
|
2018-02-24 08:25:32 +00:00
|
|
|
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 02_gpu-msm-fix-gcc5-compile.patch
|
2018-06-11 21:43:33 +00:00
|
|
|
657630a1ebd5a9aff872530022e83b1087ef3c0eb7a214d350c9caf779c2691f92de6630a40d735b5f7a34ba6a3e9e7eb708d3deb52f134d53164836c312e5e9 03_msm_fix_trace.patch
|
2018-02-24 08:25:32 +00:00
|
|
|
2ce72397039e5a842e6564586ec14dcd2aaf0430959a42c18406c9c3736ce6f6fc6af146b345fa81977748a3182ce585af0da5db3e39cd4dc5314b6186478a64 06_fix_mdss_fb_rgb_mode.patch"
|