8b758c877c
The device boots, USB networking works, display works (touch doesn't work). All other information is in the Wiki page.
77 lines
2.9 KiB
Text
77 lines
2.9 KiB
Text
# Reference: <https://postmarketos.org/vendorkernel>
|
|
# Kernel config based on: arch/arm64/configs/cedric_defconfig
|
|
|
|
pkgname="linux-motorola-cedric"
|
|
pkgver=3.18.49
|
|
pkgrel=0
|
|
pkgdesc="Motorola Moto G5 kernel fork"
|
|
arch="aarch64"
|
|
_carch="arm64"
|
|
_flavor="motorola-cedric"
|
|
url="https://kernel.org"
|
|
license="GPL-2.0-only"
|
|
options="!strip !check !tracedeps"
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz"
|
|
|
|
# Compiler: latest GCC from Alpine
|
|
HOSTCC="${CC:-gcc}"
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
# Source
|
|
_repository="android_kernel_motorola_msm8937"
|
|
_commit="2d29701ed2d080029f0bd3ceba07df66ae4e9c2d"
|
|
_config="config-${_flavor}.${arch}"
|
|
source="
|
|
$pkgname-$_commit.tar.gz::https://github.com/Sohamlad7/${_repository}/archive/${_commit}.tar.gz
|
|
$_config
|
|
gcc8-fix-put-user.patch
|
|
03_fix_rndis_ipa_trace_header_not_found.patch
|
|
05_fix_u_f_header.patch
|
|
06_fix_usb_gadget_function.patch
|
|
"
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
|
# Generate master DTB
|
|
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm64/boot/dt.img" "arch/arm64/boot/"
|
|
}
|
|
|
|
|
|
package() {
|
|
# kernel.release
|
|
install -D "$builddir/include/config/kernel.release" \
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
# 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
|
|
|
|
# Master DTB
|
|
install -Dm644 "$builddir/arch/arm64/boot/dt.img" \
|
|
"$pkgdir/boot/dt.img"
|
|
}
|
|
|
|
sha512sums="706b37cf09d23abab80ba6e8dfbd8c806e4ecb4c3a31f0b0b5ba7ac29c7922716c46e89e4a99eb0febc2d7abe4b433e1b25a7e4f4c05ec43646c6c685e44b4c4 linux-motorola-cedric-2d29701ed2d080029f0bd3ceba07df66ae4e9c2d.tar.gz
|
|
21077263e7b8f2cd168d6fb4589b9823c2465e10facb3c4cb2a658a26413267781c233a85251017f1a33a88dfb11a08f5e35ea7b437f0098693ca32cfd6fd41a config-motorola-cedric.aarch64
|
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
|
9c549714f03c7a7666e8aa7508a48cfdccab7cf3e97fb59c4df8fa97f75492365926f82c4a677c50780d68d4905504dcccbdd6de6344bd8d4b88b2331933ed46 03_fix_rndis_ipa_trace_header_not_found.patch
|
|
b408f157cc025d410b38f5aee9be977e670e1ac3f195f6c3a6681446fa0c3887067d62a4f729cfcd058fab42fca355b0265764dc2d21515f6e023ed025f55d41 05_fix_u_f_header.patch
|
|
1f23466d1a864f2d2c67ae4250b0c166ecb7755779bbdad6732808a001cc2826cc1d013c2281d2ca1d5abd7d60d13783f0b9f11bb8359971f2b30b911e627220 06_fix_usb_gadget_function.patch"
|