1919b37f3a
* Add HTC Desire (Bravo) device-specific and kernel package * Enable kernel virtual terminal support * Add framebuffer and usb configuration in initfs-hook script * Add udev required kernel options and set correct framebuffer resolution * Add touchscreen device rules and enabled kernel logs (dmesg) * Add deviceinfo_flash_offset_base in deviceinfo and update other offsets
109 lines
3 KiB
Text
109 lines
3 KiB
Text
# APKBUILD based on linux-vanilla aport. Changes:
|
|
# - disabled module installation
|
|
# - add !check !tracedeps
|
|
# - add xz package (necessary to build)
|
|
#
|
|
# Kernel config based on: arch/arm/configs/bravo_defconfig
|
|
# Changes:
|
|
# - apply patches to compile with gcc6
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
|
# - enable udev required options (https://wiki.gentoo.org/wiki/Udev#Kernel)
|
|
|
|
_vendor=htc
|
|
_flavor=htc-bravo
|
|
_config="config-${_flavor}.armhf"
|
|
_hash="4bc19919f805777947c243e6c2ed41ece530488b"
|
|
|
|
pkgname=linux-${_flavor}
|
|
pkgver=3.0.16
|
|
case $pkgver in
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
*.*) _kernver=$pkgver;;
|
|
esac
|
|
pkgrel=1
|
|
arch="armhf"
|
|
pkgdesc="HTC Desire kernel from spezi77"
|
|
url="https://github.com/spezi77/android_kernel_htc_qsd8k_3.0"
|
|
depends="postmarketos-mkinitfs"
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz"
|
|
options="!strip !check !tracedeps"
|
|
install=
|
|
source="
|
|
$pkgname-$_hash.zip::https://github.com/spezi77/android_kernel_htc_qsd8k_3.0/archive/${_hash}.zip
|
|
$_config
|
|
compiler-gcc6.h
|
|
"
|
|
subpackages=""
|
|
license="GPL2"
|
|
|
|
_abi_release=${pkgver}
|
|
_carch="arm"
|
|
HOSTCC="${CC:-gcc}"
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
ksrcdir="$srcdir/android_kernel_htc_qsd8k_3.0-${_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
|
|
|
|
# gcc6 support
|
|
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/" || return 1
|
|
|
|
mkdir -p "$srcdir"/build
|
|
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
|
|
yes "" | make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
|
oldconfig
|
|
}
|
|
|
|
|
|
|
|
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
|
menuconfig() {
|
|
cd "$srcdir"/build || return 1
|
|
echo "--[ menuconfig ]--"
|
|
make ARCH="$_carch" menuconfig
|
|
cp .config "$startdir"/$_config
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/build
|
|
unset LDFLAGS
|
|
|
|
echo "--[ Build kernel + modules ]--"
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
|
|
|| return 1
|
|
}
|
|
|
|
package() {
|
|
echo "--[ Installing kernel ]--"
|
|
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="f66f850a4abafc1290c09403e27cee530f37e54474532f9cf13c031df30490003c762df9075b2dd29a3b02fe46913be23b4286b0ed16fc320fe9786f0799fb32 linux-htc-bravo-4bc19919f805777947c243e6c2ed41ece530488b.zip
|
|
27ec53afdd9898495ae296b8e98b05401aae3a0bf390ba276f6a878d6bf1ccf3f59da78a5ee50ba4ee0744e4768f71aab53b782511c4f8ad22fefc821a2c815c config-htc-bravo.armhf
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|