fairphone-fp1: modernize (MR 1483)

This also removes the code to add the mediatek header to the zImage as
this is now handled by postmarketos-mkinitfs.
This commit is contained in:
Luca Weiss 2020-07-06 11:20:50 +02:00 committed by Bart Ribbers
parent 37e43bcaac
commit 0511b83771
No known key found for this signature in database
GPG key ID: 699D16185DAFAE61
3 changed files with 11 additions and 19 deletions

View file

@ -1,13 +1,13 @@
# Reference: <https://postmarketos.org/devicepkg> # Reference: <https://postmarketos.org/devicepkg>
pkgname=device-fairphone-fp1 pkgname=device-fairphone-fp1
pkgdesc="FP1" pkgdesc="Fairphone 1"
pkgver=0.1 pkgver=0.1
pkgrel=6 pkgrel=7
url="https://postmarketos.org" url="https://postmarketos.org"
license="MIT" license="MIT"
arch="armv7" arch="armv7"
options="!check !archcheck" options="!check !archcheck"
depends="postmarketos-base linux-fairphone-fp1 mkbootimg mtk-mkimage mesa-dri-swrast msm-fb-refresher" depends="postmarketos-base linux-fairphone-fp1 mkbootimg mtk-mkimage mesa-dri-gallium msm-fb-refresher"
makedepends="devicepkg-dev" makedepends="devicepkg-dev"
source="deviceinfo" source="deviceinfo"
@ -19,4 +19,4 @@ package() {
devicepkg_package $startdir $pkgname devicepkg_package $startdir $pkgname
} }
sha512sums="0eee62f4fe769cea144e9814bd3de7e254b7d4a3b9e5ccba6d0207cd7cb2c59ab20f57847f4ef1afdb657b91394eb8a1410605d9b58856f85f5cb1ec6ff04084 deviceinfo" sha512sums="14ffb46857d37f965b494d3deb2a908eec06018e6a56f01a8eba52a8b14b9514c39d77461c556604ccb0a0d4784dc59a08c18c211d6a1f94c527800483897661 deviceinfo"

View file

@ -16,7 +16,6 @@ deviceinfo_keyboard="false"
deviceinfo_external_storage="true" deviceinfo_external_storage="true"
deviceinfo_screen_width="540" deviceinfo_screen_width="540"
deviceinfo_screen_height="960" deviceinfo_screen_height="960"
deviceinfo_dev_touchscreen="/dev/input/event3"
# Bootloader related # Bootloader related
deviceinfo_flash_method="fastboot" deviceinfo_flash_method="fastboot"
@ -24,10 +23,10 @@ deviceinfo_kernel_cmdline=""
deviceinfo_generate_bootimg="true" deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false" deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="true" deviceinfo_bootimg_mtk_mkimage="true"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x10000000" deviceinfo_flash_offset_base="0x10000000"
deviceinfo_flash_offset_kernel="0x00008000" deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000" deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000" deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100" deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048" deviceinfo_flash_pagesize="2048"

View file

@ -3,7 +3,7 @@
pkgname=linux-fairphone-fp1 pkgname=linux-fairphone-fp1
pkgver=3.4.5 pkgver=3.4.5
pkgrel=4 pkgrel=5
pkgdesc="Fairphone 1 kernel fork" pkgdesc="Fairphone 1 kernel fork"
arch="armv7" arch="armv7"
_carch="arm" _carch="arm"
@ -11,7 +11,7 @@ _flavor="fairphone-fp1"
url="https://kernel.org" url="https://kernel.org"
license="GPL-2.0-only" license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native" options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev grep coreutils mtk-mkimage gcc6" makedepends="bash bc bison devicepkg-dev flex openssl-dev perl grep coreutils gcc6"
# Compiler: GCC 6 (doesn't boot when compiled with newer versions) # Compiler: GCC 6 (doesn't boot when compiled with newer versions)
if [ "${CC:0:5}" != "gcc6-" ]; then if [ "${CC:0:5}" != "gcc6-" ]; then
@ -29,6 +29,7 @@ source="
$_config $_config
" "
builddir="$srcdir/$_repository-$_commit" builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() { prepare() {
default_prepare default_prepare
@ -40,23 +41,15 @@ prepare() {
} }
build() { build() {
cd "$builddir"/kernel cd kernel
unset LDFLAGS unset LDFLAGS
TARGET_BUILD_VARIANT=user TARGET_PRODUCT=ahong89_wet_jb2 \ TARGET_BUILD_VARIANT=user TARGET_PRODUCT=ahong89_wet_jb2 \
make ARCH="$_carch" CC="${CC:-gcc}" \ make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
} }
package() { package() {
# kernel.release downstreamkernel_package "$builddir"/kernel "$pkgdir" "$_carch" "$_flavor" "$_outdir"
install -D "$builddir/kernel/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
cd "$builddir/kernel/arch/$_carch/boot"
# Add mediatek header to zImage
mtk-mkimage KERNEL zImage zImage-mtk
# Install modified zImage
install -Dm644 zImage-mtk "$pkgdir/boot/vmlinuz-$_flavor"
} }
sha512sums="9ab967c0635dc5b3dca457725d25b44cfc391cb8fb5b9417fe5d6636131aecdf36575375f6151496d5269aaaf14cf15a4580aaee6a4699f0644822af66efba06 linux-fairphone-fp1-328160cf6ddec4ad417cdf648b61d26cc09f9e73.tar.gz sha512sums="9ab967c0635dc5b3dca457725d25b44cfc391cb8fb5b9417fe5d6636131aecdf36575375f6151496d5269aaaf14cf15a4580aaee6a4699f0644822af66efba06 linux-fairphone-fp1-328160cf6ddec4ad417cdf648b61d26cc09f9e73.tar.gz