4472448e6b
All kernels compile again, after the GCC 8 upgrade. All 3.x kernels have been changed to use GCC 6 now, because we can't say for sure that they boot with GCC 8 even if we made them compile with that newer GCC. If someone wants to test a kernel for a newer device which they can test, see the instructions on <https://postmarketos.org/vendorkernel>. The linux-sony-castor-windy 4.x kernel did not compile out of the box with the latest GCC, so we set it to GCC 6 as well. This can probably be fixed easily. linux-teclast-x80-pro: removed Werror and updated to latest 4.14 kernel from kernel.org, otherwise this would not compile anymore (tested with both GCC 6 and 8, probably incompatibility with the latest binutils or something). This commit will take too long to compile in CI, so let's [skip ci]. I've compiled all kernels multiple times and fixed them up until all of them were working again. Related: #103
124 lines
3.9 KiB
Text
124 lines
3.9 KiB
Text
# APKBUILD based on linux-vanilla aport. Changes:
|
|
# - disabled module installation
|
|
# - add !check !tracedeps
|
|
# - package: just install zimage and kernel.release, because the kernel config
|
|
# does not generate modules or dtb files
|
|
# - do not create -dev subpackage (makes no sense without module support)
|
|
#
|
|
# Kernel config based on: arch/arm/configs/lineageos_i9305_defconfig
|
|
# Changes:
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
|
# - adding xz to makedepends because of lzma: unrecognized option: 9 (https://wiki.postmarketos.org/wiki/Troubleshooting:kernel)
|
|
# - add kernel modules installation
|
|
# - disable ANDROID_PARANOID_NETWORK (removes network restrictions)
|
|
|
|
_vendor=samsung
|
|
_flavor=samsung-i9305
|
|
_hash="fa8fa332fdec11744ffe0c742775cc22efe0d041"
|
|
_config="config-${_flavor}.armhf"
|
|
|
|
pkgname=linux-${_flavor}
|
|
pkgver=3.0.101
|
|
case $pkgver in
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
*.*) _kernver=$pkgver;;
|
|
esac
|
|
pkgrel=4
|
|
arch="armhf"
|
|
pkgdesc="Samsung Galaxy SIII LTE kernel from LineageOS"
|
|
url="https://github.com/LineageOS/android_kernel_samsung_smdk4412"
|
|
depends=""
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz busybox-static-armhf gcc6"
|
|
options="!strip !check !tracedeps"
|
|
install=
|
|
source="
|
|
$pkgname-$_hash.tar.gz::https://github.com/LineageOS/android_kernel_${_vendor}_smdk4412/archive/${_hash}.tar.gz
|
|
$_config
|
|
compiler-gcc6.h
|
|
"
|
|
subpackages=""
|
|
license="GPL2"
|
|
|
|
_abi_release=${pkgver}
|
|
_carch="arm"
|
|
|
|
# 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"
|
|
HOSTCC="gcc6-gcc"
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
fi
|
|
|
|
ksrcdir="$srcdir/android_kernel_${_vendor}_smdk4412-${_hash}"
|
|
|
|
prepare() {
|
|
local _patch_failed=
|
|
cd "$ksrcdir"
|
|
|
|
# first apply patches in specified order
|
|
for i in $source; do
|
|
case $i in
|
|
*.patch)
|
|
msg "Applying $i..."
|
|
if ! patch -s -p1 -N -i "$srcdir"/$i; then
|
|
echo $i >>failed
|
|
_patch_failed=1
|
|
fi
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if ! [ -z "$_patch_failed" ]; then
|
|
error "The following patches failed:"
|
|
cat failed
|
|
return 1
|
|
fi
|
|
|
|
# gcc6 support
|
|
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
|
|
|
mkdir -p "$srcdir"/build
|
|
cp "$srcdir"/$_config "$srcdir"/build/.config
|
|
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
|
silentoldconfig
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/build
|
|
unset LDFLAGS
|
|
|
|
echo "-- [ Build kernel ] --"
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-Alpine"
|
|
|
|
echo "-- [ Build modules ] --"
|
|
# the 'no-pic' flag is necessary to avoid the
|
|
# error 'Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)' when loading the module
|
|
make ARCH="$_carch" CC="${CC:-gcc}" CFLAGS_MODULE="-fno-pic" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y \
|
|
modules
|
|
}
|
|
|
|
package() {
|
|
echo "--[ Installing kernel ]--"
|
|
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
|
|
cd "$srcdir"/build
|
|
unset LDFLAGS
|
|
|
|
echo "--[ Installing modules ]--"
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y \
|
|
INSTALL_MOD_PATH="$pkgdir" modules_install
|
|
}
|
|
|
|
sha512sums="d87dd54152980b30012fead62e639dde6ff0862d376790eac32800aeffd91482a220c7b1f233933a1879796dcaa3722e86c42a5f0e4df4168ae1f65362952779 linux-samsung-i9305-fa8fa332fdec11744ffe0c742775cc22efe0d041.tar.gz
|
|
168d3f4839332f31b7cedf18f274b0a691af19e76f4d9cebba02a060c3908dc73f5a3d3a7cfa39f49a6a5aaf29440bfab258de746a5c3981e27195e7baea0c6c config-samsung-i9305.armhf
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|