2017-05-26 20:26:25 +00:00
|
|
|
# Based on linux-lg-mako. Changes:
|
|
|
|
# - add findutils makedepend (necessary for the initramfs)
|
|
|
|
# - it builds an initramfs - do not use ramdisk.cpio and
|
|
|
|
# ramdisk-recovery-device.cpio, in there, always use the
|
|
|
|
# initramfs from the recovery partition ("isorec")
|
|
|
|
# - directly boot to that initramfs, not only when the recovery
|
|
|
|
# key combination was pressed.
|
|
|
|
# - use Alpine's busybox-static instead of the pre-compiled
|
|
|
|
# binary, that comes with the source
|
|
|
|
#
|
|
|
|
# Kernel config changes, based on: arch/arm/configs/i9100_defconfig
|
|
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
|
|
|
# - change compression from CONFIG_KERNEL_LZMA=y to
|
|
|
|
# CONFIG_KERNEL_GZIP=y (so it works with busybox)
|
2017-10-11 15:21:01 +00:00
|
|
|
# - disable ANDROID_PARANOID_NETWORK (removes network restrictions)
|
2017-05-26 20:26:25 +00:00
|
|
|
|
|
|
|
_vendor=samsung
|
|
|
|
_flavor=samsung-i9100
|
|
|
|
_hash="349a3e91e76d17e67ef6213e1f6712e700695631"
|
|
|
|
_config="config-${_flavor}.armhf"
|
|
|
|
|
|
|
|
pkgname=linux-${_flavor}
|
|
|
|
pkgver=3.0.101
|
|
|
|
case $pkgver in
|
|
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
|
|
*.*) _kernver=$pkgver;;
|
|
|
|
esac
|
2018-02-17 17:26:31 +00:00
|
|
|
pkgrel=11
|
2017-05-26 20:26:25 +00:00
|
|
|
arch="armhf"
|
|
|
|
pkgdesc="Samsung Galaxy SII kernel from LineageOS"
|
|
|
|
url="https://github.com/LineageOS/android_kernel_samsung_smdk4412"
|
2018-02-17 17:26:31 +00:00
|
|
|
depends=""
|
2017-05-26 20:26:25 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev
|
2017-07-05 16:40:00 +00:00
|
|
|
findutils busybox-static-armhf"
|
2017-05-26 20:26:25 +00:00
|
|
|
options="!strip !check !tracedeps"
|
|
|
|
install=
|
|
|
|
source="
|
2017-08-01 15:57:52 +00:00
|
|
|
$pkgname-$_hash.tar.gz::https://github.com/LineageOS/android_kernel_samsung_smdk4412/archive/${_hash}.tar.gz
|
2017-05-26 20:26:25 +00:00
|
|
|
$_config
|
|
|
|
compiler-gcc6.h
|
|
|
|
init
|
|
|
|
"
|
|
|
|
subpackages=""
|
|
|
|
license="GPL2"
|
|
|
|
|
|
|
|
_abi_release=${pkgver}
|
|
|
|
_carch="arm"
|
|
|
|
HOSTCC="${CC:-gcc}"
|
|
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
|
|
|
|
ksrcdir="$srcdir/android_kernel_samsung_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
|
|
|
|
|
|
|
|
# Use Alpine's busybox.static instead of the pre-compiled busybox shipped
|
|
|
|
# with the source
|
2017-07-05 16:40:00 +00:00
|
|
|
cp -v /usr/$(arch_to_hostspec $arch)/bin/busybox.static \
|
|
|
|
"$ksrcdir"/usr/galaxys2_initramfs_files/busybox
|
2017-05-26 20:26:25 +00:00
|
|
|
|
|
|
|
# do not use ramdisk.cpio and ramdisk-recovery-device.cpio, always use
|
|
|
|
# the initramfs from the recovery partition ("isorec"), so we can build
|
|
|
|
# it later and independently from the kernel. also directly boot that
|
|
|
|
# partition, not only when the recovery key combination was used.
|
|
|
|
cd "$ksrcdir"/usr/
|
|
|
|
mv galaxys2_initramfs.list galaxys2_initramfs.list_old
|
2017-10-04 15:05:00 +00:00
|
|
|
grep -v "../../ramdisk" galaxys2_initramfs.list_old > galaxys2_initramfs.list
|
|
|
|
cp -v "$srcdir"/init "$ksrcdir"/usr/galaxys2_initramfs_files/init
|
2017-05-26 20:26:25 +00:00
|
|
|
|
|
|
|
# gcc6 support
|
2017-10-04 15:05:00 +00:00
|
|
|
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
2017-05-26 20:26:25 +00:00
|
|
|
|
|
|
|
mkdir -p "$srcdir"/build
|
2017-10-04 15:05:00 +00:00
|
|
|
cp "$srcdir"/$_config "$srcdir"/build/.config
|
2017-05-26 20:26:25 +00:00
|
|
|
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
|
|
|
silentoldconfig
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
|
|
|
menuconfig() {
|
2017-10-04 15:05:00 +00:00
|
|
|
cd "$srcdir"/build
|
2017-05-26 20:26:25 +00:00
|
|
|
make ARCH="$_carch" menuconfig
|
|
|
|
cp .config "$startdir"/$_config
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$srcdir"/build
|
|
|
|
unset LDFLAGS
|
|
|
|
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2017-10-04 15:05:00 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine"
|
2017-05-26 20:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2017-09-13 19:40:17 +00:00
|
|
|
sha512sums="285ffd2c82d0444b99da583573d19443b73de22d7382aae54413af229a28bebf4ea32ecbe248ae54ae64bbbc0af7d722b1ef86d5dd099e2990dcc6284fb195fa linux-samsung-i9100-349a3e91e76d17e67ef6213e1f6712e700695631.tar.gz
|
2017-10-10 19:18:31 +00:00
|
|
|
087372ce82f8eae44694d7c6288822e5565c6bbed3a07cb42a6b009fa25a84a16ec44d76fe5f504bcf945e28237e1d62cf3686d1a60126525e3fdea2613cbb3c config-samsung-i9100.armhf
|
2017-05-26 20:26:25 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
|
|
|
dd4094d5f4ec281d32f12af88cb22a782e497c8e52f69cf60b73ac7d6171fc95f1f8040b3d0ad2ff3f016d22ac1d91c5b522e5d03203534a76742bc55a082af5 init"
|