102 lines
2.7 KiB
Text
102 lines
2.7 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_mako_defconfig
|
||
|
# Changes:
|
||
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
||
|
|
||
|
_vendor=nokia
|
||
|
_flavor=nokia-rx51
|
||
|
_hash="7b6fbfd899b4133e4f789843e5967beb139ec4d2"
|
||
|
_config="config-${_flavor}.armhf"
|
||
|
|
||
|
pkgname=linux-${_flavor}
|
||
|
pkgver=4.6
|
||
|
case $pkgver in
|
||
|
*.*.*) _kernver=${pkgver%.*};;
|
||
|
*.*) _kernver=$pkgver;;
|
||
|
esac
|
||
|
pkgrel=1
|
||
|
arch="armhf"
|
||
|
pkgdesc="Mainline Linux for the Nokia N900"
|
||
|
url="https://github.com/pali/linux-n900"
|
||
|
depends="postmarketos-mkinitfs"
|
||
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||
|
options="!strip !check !tracedeps"
|
||
|
install=
|
||
|
source="
|
||
|
$pkgname-$_hash.tar.gz::https://github.com/pali/linux-n900/archive/${_hash}.tar.gz
|
||
|
$_config
|
||
|
"
|
||
|
subpackages=""
|
||
|
license="GPL2"
|
||
|
|
||
|
_abi_release=${pkgver}
|
||
|
_carch="arm"
|
||
|
HOSTCC="${CC:-gcc}"
|
||
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||
|
|
||
|
ksrcdir="$srcdir/linux-n900-${_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
|
||
|
|
||
|
mkdir -p "$srcdir"/build
|
||
|
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
|
||
|
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||
|
silentoldconfig
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
||
|
menuconfig() {
|
||
|
cd "$srcdir"/build || return 1
|
||
|
make ARCH="$_carch" menuconfig
|
||
|
cp .config "$startdir"/$_config
|
||
|
}
|
||
|
|
||
|
build() {
|
||
|
cd "$srcdir"/build
|
||
|
unset LDFLAGS
|
||
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
|
||
|
zImage modules omap3-n900.dtb \
|
||
|
|| return 1
|
||
|
}
|
||
|
|
||
|
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"
|
||
|
}
|
||
|
|
||
|
sha512sums="ad1288233893ce3de9c81f4672f4f2439c8d6665a0a0289f5cbe826fd08c69292de02a2fd9856dcd6d91c7f6930273319e1888bf0a146aee3a4e1ff50f6f7b19 linux-nokia-rx51-7b6fbfd899b4133e4f789843e5967beb139ec4d2.tar.gz
|
||
|
6bdc31f83806cb1398bf9304755a3c35dd60be35d424149118ddbe72c78ad4ffa7296a9d5f141a1c68865e673aa2d9ba370223b0460b4ea202a476cb7ed99771 config-nokia-rx51.armhf"
|