2018-01-09 19:42:52 +00:00
|
|
|
# Kernel config based on: arch/arm/configs/janice_defconfig
|
2017-06-29 20:04:16 +00:00
|
|
|
|
2018-01-09 19:42:52 +00:00
|
|
|
pkgname="linux-samsung-i9070"
|
2017-06-29 20:04:16 +00:00
|
|
|
pkgver=3.0.101
|
2018-11-30 20:56:06 +00:00
|
|
|
pkgrel=12
|
2017-06-29 20:04:16 +00:00
|
|
|
pkgdesc="Samsung Galaxy S Advance kernel from Epirex"
|
2018-01-09 19:42:52 +00:00
|
|
|
arch="armhf"
|
|
|
|
_carch="arm"
|
|
|
|
_flavor="samsung-i9070"
|
2017-06-29 20:04:16 +00:00
|
|
|
url="https://github.com/Epirex/Samsung_STE_Kernel"
|
2018-01-09 19:42:52 +00:00
|
|
|
license="GPL2"
|
2017-06-29 20:04:16 +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 busybox-static-armhf 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-30 20:56:06 +00:00
|
|
|
HOSTCC="gcc6-gcc"
|
2018-10-01 06:44:18 +00:00
|
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
|
|
fi
|
2018-01-09 19:42:52 +00:00
|
|
|
|
|
|
|
# Source
|
|
|
|
_repository="Samsung_STE_Kernel"
|
|
|
|
_commit="ac7219c4b8dcec7bc5a598d42c6be0db4aa36332"
|
|
|
|
_config="config-${_flavor}.armhf"
|
2017-06-29 20:04:16 +00:00
|
|
|
source="
|
2018-01-09 19:42:52 +00:00
|
|
|
$pkgname-$_commit.tar.gz::https://github.com/Epirex/${_repository}/archive/${_commit}.tar.gz
|
2017-06-29 20:04:16 +00:00
|
|
|
$_config
|
2017-07-08 05:30:00 +00:00
|
|
|
00_fix_return_address.patch
|
|
|
|
01_remove_ramdisks_from_initramfs.patch
|
|
|
|
02_reduce_lzo_compression.patch
|
|
|
|
03_change_modules_install_dir.patch
|
|
|
|
04_change_dhd_firmware_dir.patch
|
2018-01-09 19:42:52 +00:00
|
|
|
05_fix_fb_rgb_mode.patch
|
2017-06-29 20:04:16 +00:00
|
|
|
compiler-gcc6.h
|
|
|
|
init
|
|
|
|
"
|
2018-01-09 19:42:52 +00:00
|
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
2017-07-08 05:30:00 +00:00
|
|
|
|
2017-06-29 20:04:16 +00:00
|
|
|
prepare() {
|
2018-01-09 19:42:52 +00:00
|
|
|
default_prepare
|
2017-06-29 20:04:16 +00:00
|
|
|
|
|
|
|
# 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 \
|
2018-01-09 19:42:52 +00:00
|
|
|
"$builddir"/usr/u8500_initramfs_files/busybox
|
2017-06-29 20:04:16 +00:00
|
|
|
|
2017-10-04 15:05:00 +00:00
|
|
|
# use custom init script in the initramfs which loads the initramfs from
|
2017-07-08 05:30:00 +00:00
|
|
|
# the kernel2 partition ("isorec")
|
2018-01-09 19:42:52 +00:00
|
|
|
cp -v "$srcdir"/init "$builddir"/usr/u8500_initramfs_files/init
|
2017-06-29 20:04:16 +00:00
|
|
|
|
|
|
|
# gcc6 support
|
2018-01-09 19:42:52 +00:00
|
|
|
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
|
|
|
|
|
|
|
# Remove -Werror from all makefiles
|
|
|
|
find . -type f -name Makefile -print0 | \
|
|
|
|
xargs -0 sed -i 's/-Werror-/-W/g'
|
|
|
|
find . -type f -name Makefile -print0 | \
|
|
|
|
xargs -0 sed -i 's/-Werror//g'
|
2017-06-29 20:04:16 +00:00
|
|
|
|
2018-01-09 19:42:52 +00:00
|
|
|
cp "$srcdir"/$_config "$builddir"/.config
|
|
|
|
make ARCH="$_carch" HOSTCC="$HOSTCC" silentoldconfig
|
2017-06-29 20:04:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2018-01-09 19:42:52 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS"
|
2017-10-04 15:05:00 +00:00
|
|
|
# the 'no-pic' flag is necessary to avoid the
|
2017-07-08 05:30:00 +00:00
|
|
|
# error 'Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)' when loading the module
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" CFLAGS_MODULE="-fno-pic" \
|
2018-01-09 19:42:52 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" modules
|
2017-06-29 20:04:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2018-01-09 19:42:52 +00:00
|
|
|
# kernel.release
|
|
|
|
install -D "$builddir/include/config/kernel.release" \
|
2017-06-29 20:04:16 +00:00
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
2017-07-08 05:30:00 +00:00
|
|
|
|
2018-01-09 19:42:52 +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
|
2017-07-08 05:30:00 +00:00
|
|
|
|
2018-01-09 19:42:52 +00:00
|
|
|
# Modules
|
|
|
|
cd "$builddir"
|
|
|
|
unset LDFLAGS
|
2017-07-08 05:30:00 +00:00
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2018-01-09 19:42:52 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \
|
|
|
|
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 \
|
|
|
|
modules_install
|
2017-06-29 20:04:16 +00:00
|
|
|
}
|
|
|
|
|
2017-09-13 17:47:53 +00:00
|
|
|
sha512sums="bb8218d803ec27f983449a43d14df75122311609a39e5b57095f4e8933752a2699fa0d4df1674aeee7d6e3a439551dacc9af3cab26b6e3e71f0441a4f16693df linux-samsung-i9070-ac7219c4b8dcec7bc5a598d42c6be0db4aa36332.tar.gz
|
2018-01-09 19:42:52 +00:00
|
|
|
63295d5ff1af86765ef35cc175f133be9ba29b9a4e0aac13e69af6dcca1952730db8b4444ca62ba47214ff0c5720aa126e95db0829396ba934d272fdbeb74fb5 config-samsung-i9070.armhf
|
2017-07-08 05:30:00 +00:00
|
|
|
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
|
2018-01-09 19:42:52 +00:00
|
|
|
3c8e15644eced6f73c5c7d3df0437f3a9f750f4ec32d744c9e4266ccccef9e38316a898227a898a9fc0696bee0281c0e14312de2944e27a696f18a42deabb383 01_remove_ramdisks_from_initramfs.patch
|
2017-07-08 05:30:00 +00:00
|
|
|
ef5b912c26fea4ab882592bdf7487942c64b123de8d25d08d976f29743f311742ee2f773bf2d110ddb5095f254dbb0bd4487c5cfce77311929082599199e7ebd 02_reduce_lzo_compression.patch
|
|
|
|
27bba6d070db6f499d030680c020906fc3238dc60d90a9b2f0f3a355ef15beb227c1cf48b7858156264fe10f7943772ed00a837be36ba4b80de8199f0383e688 03_change_modules_install_dir.patch
|
|
|
|
47533412cc91d2ead046039c90180ebc459e157017be85dca69cd882a183963448beb973f2cb7eaccbcd35354b0ed6a668131cd39ea30393dd52fd93b7e26815 04_change_dhd_firmware_dir.patch
|
2018-01-09 19:42:52 +00:00
|
|
|
67278735e21c00d4208e76788d3d99ff1bd9c628608f60a73004f6deb8a4bc75fdf7c1e43108010c57aa6da06aa5e49292b109a2c4421212e181abaca45ea44d 05_fix_fb_rgb_mode.patch
|
2017-06-29 20:04:16 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
|
|
|
ef01c51c138239a49c1d00ae0074a07fed267d64934cf3d436a8ff057b91692ee2d040a45eacbb0dc62d5017a708c4dca2fadc282c850fa72aeebcfa787e2cbc init"
|