# Reference: # Kernel config based on: /proc/config.gz pulled from vendor's Android 4.1 pkgname=linux-medion-kai pkgver=3.1.10 pkgrel=2 pkgdesc="Lenovo Medion Lifetab S9714 kernel fork" arch="armv7" _carch="arm" _flavor="medion-kai" url="https://kernel.org" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native" makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: GCC 6 (doesn't boot when compiled with newer versions) if [ "${CC:0:5}" != "gcc6-" ]; then CC="gcc6-$CC" HOSTCC="gcc6-gcc" CROSS_COMPILE="gcc6-$CROSS_COMPILE" fi # Source _repository="android_kernel_medion_lifetab_s9714" _commit="d10779497812934afcadc0da2940caf91f03ed0e" _config="config-$_flavor.$arch" source=" $pkgname-$_commit.tar.gz::https://github.com/red-black-bonsai/$_repository/archive/$_commit.tar.gz $_config gcc7-give-up-on-ilog2-const-optimizations.patch gcc8-fix-put-user.patch kernel-use-the-gnu89-standard-explicitly.patch 01_timeconst_fix.patch " builddir="$srcdir/$_repository-$_commit" prepare() { default_prepare . downstreamkernel_prepare } build() { unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" # 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))-postmarketOS" modules } package() { downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Modules unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \ INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 \ modules_install } sha512sums="c14af0ed4ada9d91b9fd42ca9150f6e57f8504d6236ea582732cdebedc530f031add7afbb57b4df16dbf6af4287ca60ad56b28e4d3c0c3c58ab6a3aba0b95dcc linux-medion-kai-d10779497812934afcadc0da2940caf91f03ed0e.tar.gz ee8611ad4aa4ea413b7ad9b5ab1380417cdde89c37defa31697efb6825cc4cfa88ff79ef32c155a2d6b838e352787e1488695cd616d5b4bbb1ef8784e3397093 config-medion-kai.armv7 77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch 197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch d126b4ba0da557a0f29d6cc9c7d69b578c676265662a5a49906051dc27093c4212465d92076f4d90d5b5a06c996c78cbf921faffe7b07e33f74cfb00a7e520d4 01_timeconst_fix.patch"