2018-05-28 21:44:56 +00:00
|
|
|
# Kernel config based on: arch/arm/configs/tegra_defconfig
|
2018-03-05 20:55:05 +00:00
|
|
|
|
|
|
|
pkgname="linux-samsung-p4wifi"
|
2018-04-03 23:29:11 +00:00
|
|
|
pkgver=4.16.0
|
2018-05-28 21:44:56 +00:00
|
|
|
pkgrel=1
|
2018-03-05 20:55:05 +00:00
|
|
|
pkgdesc="Galaxy Tab 10.1 kernel"
|
|
|
|
arch="armhf"
|
|
|
|
_carch="arm"
|
|
|
|
_flavor="samsung-p4wifi"
|
|
|
|
url="https://kernel.org"
|
|
|
|
license="GPL2"
|
|
|
|
options="!strip !check !tracedeps"
|
2018-05-28 21:44:56 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz flex bison libressl-dev"
|
2018-03-05 20:55:05 +00:00
|
|
|
HOSTCC="${CC:-gcc}"
|
|
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
|
|
|
|
# Source
|
|
|
|
_repository="linux"
|
2018-05-28 21:44:56 +00:00
|
|
|
_rev="b40b7265e2e3ec66e460e5615e7804f7a5d9db67"
|
2018-03-05 20:55:05 +00:00
|
|
|
_config="config-${_flavor}.${arch}"
|
|
|
|
source="
|
|
|
|
$pkgname-$_rev.tar.gz::https://github.com/decatf/${_repository}/archive/${_rev}.tar.gz
|
|
|
|
$_config
|
|
|
|
compiler-gcc6.h
|
|
|
|
"
|
|
|
|
builddir="$srcdir/${_repository}-${_rev}"
|
|
|
|
|
|
|
|
prepare() {
|
2018-04-03 23:29:11 +00:00
|
|
|
local _patch_failed=
|
|
|
|
cd "$builddir"
|
|
|
|
# first apply patches in specified order
|
|
|
|
for i in $source; do
|
|
|
|
case $i in
|
|
|
|
*.patch|*.patch::*)
|
|
|
|
_patch=${i%::*}
|
|
|
|
msg "Applying $_patch..."
|
|
|
|
if ! patch -s -p1 -N -i "$srcdir"/$_patch; then
|
|
|
|
echo $_patch >>failed
|
|
|
|
_patch_failed=1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2018-03-05 20:55:05 +00:00
|
|
|
done
|
|
|
|
|
2018-04-03 23:29:11 +00:00
|
|
|
if ! [ -z "$_patch_failed" ]; then
|
|
|
|
error "The following patches failed:"
|
|
|
|
cat failed
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "$srcdir"/build
|
|
|
|
cp -v "$srcdir"/$_config "$srcdir"/build/.config
|
|
|
|
make -C "$builddir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
|
|
|
olddefconfig
|
2018-03-05 20:55:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2018-04-03 23:29:11 +00:00
|
|
|
cd "$srcdir"/build
|
2018-03-05 20:55:05 +00:00
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2018-04-03 23:29:11 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-${_flavor}" \
|
|
|
|
CFLAGS_MODULE=-fno-pic
|
2018-03-05 20:55:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2018-04-03 23:29:11 +00:00
|
|
|
cd "$srcdir/build/arch/${_carch}/boot"
|
2018-03-05 20:55:05 +00:00
|
|
|
|
2018-04-03 23:29:11 +00:00
|
|
|
if [ "$CARCH" == "aarch64" ]; then
|
|
|
|
install -Dm644 "$srcdir/build/arch/${_carch}/boot/Image" \
|
|
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
else
|
|
|
|
install -Dm644 "$srcdir/build/arch/${_carch}/boot/"*zImage \
|
|
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
2018-03-05 20:55:05 +00:00
|
|
|
fi
|
2018-03-13 19:39:07 +00:00
|
|
|
|
2018-04-03 23:29:11 +00:00
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
|
|
|
|
cd "$srcdir"/build
|
|
|
|
|
|
|
|
local _install
|
|
|
|
case "$CARCH" in
|
|
|
|
aarch64*|arm*) _install="modules_install dtbs_install" ;;
|
|
|
|
*) _install="modules_install" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
make -j1 $_install \
|
|
|
|
ARCH="$_carch" \
|
|
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
|
|
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
2018-03-05 20:55:05 +00:00
|
|
|
}
|
|
|
|
|
2018-04-03 23:29:11 +00:00
|
|
|
|
2018-05-28 21:44:56 +00:00
|
|
|
sha512sums="1678192f73cf4a0bba8e4aba4b7e90ce0e5a61d47a952328725e773ccc9060d42dc299e887e6398454442dfa1580bd68c7edd479a51ec0d91b9a7d8a06014b67 linux-samsung-p4wifi-b40b7265e2e3ec66e460e5615e7804f7a5d9db67.tar.gz
|
|
|
|
287c414d87431ca00fb455b4cc3325d243d01d75a819054053a28899152f1b0143707c10ac050b7daeac03e8d79d40886f30bca22b5272ff06963ef7d3026c97 config-samsung-p4wifi.armhf
|
2018-03-05 20:55:05 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|