Fairphone 1 support
This commit is contained in:
parent
9d8928f2a0
commit
98c88bd9f6
7 changed files with 2684 additions and 2 deletions
22
device/device-fairphone-fp1/APKBUILD
Normal file
22
device/device-fairphone-fp1/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-fairphone-fp1"
|
||||
pkgdesc="FP1"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
options="!check"
|
||||
depends="postmarketos-base linux-fairphone-fp1 mkbootimg mtk-mkimage mesa-dri-swrast"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="b7f72c78a464b26a7401d3f995690f3fe4dead60f9967498ac22290e36dfbacb2c60ce1900a66c998cdb6e09433277fcf055610bc69710018e0aef8fa0b8e8aa deviceinfo"
|
33
device/device-fairphone-fp1/deviceinfo
Normal file
33
device/device-fairphone-fp1/deviceinfo
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Fairphone 1"
|
||||
deviceinfo_manufacturer="Fairphone"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="armhf"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="540"
|
||||
deviceinfo_screen_height="960"
|
||||
deviceinfo_dev_touchscreen="/dev/input/event3"
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline=""
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="true"
|
||||
deviceinfo_flash_offset_base="0x10000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
|
58
device/linux-fairphone-fp1/APKBUILD
Normal file
58
device/linux-fairphone-fp1/APKBUILD
Normal file
|
@ -0,0 +1,58 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: kernel/arch/arm/configs/fp1_defconfig
|
||||
|
||||
pkgname="linux-fairphone-fp1"
|
||||
pkgver=3.4.5
|
||||
pkgrel=0
|
||||
pkgdesc="Fairphone 1 kernel fork"
|
||||
arch="armhf"
|
||||
_carch="arm"
|
||||
_flavor="fairphone-fp1"
|
||||
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 grep coreutils mtk-mkimage gcc6"
|
||||
|
||||
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_fairphone_FP1"
|
||||
_commit="f1a2a1f0b862cb96c669881cd31ba7729e31d90f"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/z3ntu/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}/kernel"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
TARGET_BUILD_VARIANT=user TARGET_PRODUCT=ahong89_wet_jb2 \
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
# kernel.release
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
cd "$builddir/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="00f02c71ed097ba40530c000df24539234fab110d08477578ed31bd6f6c92cff2d48611e01dccba6cb54aaf83b0739df27c9684112eb7d89e21a47e538b56b8b linux-fairphone-fp1-f1a2a1f0b862cb96c669881cd31ba7729e31d90f.tar.gz
|
||||
425d550de5aca702e269b30f2e4e9104757ade36bc9a307c023089dcb14e294a37a720070b39eb42b4ffbab4154624d40f2c883f624abc99cf08ac9670027222 config-fairphone-fp1.armhf"
|
2544
device/linux-fairphone-fp1/config-fairphone-fp1.armhf
Normal file
2544
device/linux-fairphone-fp1/config-fairphone-fp1.armhf
Normal file
File diff suppressed because it is too large
Load diff
19
main/mtk-mkimage/APKBUILD
Normal file
19
main/mtk-mkimage/APKBUILD
Normal file
|
@ -0,0 +1,19 @@
|
|||
pkgname=mtk-mkimage
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Append MediaTek header to boot.img files for Mediatek devices"
|
||||
url="http://rex-shen.net/customize-flash-mt6589-rom/"
|
||||
arch="all"
|
||||
license="GPL-3.0-or-later"
|
||||
depends=""
|
||||
makedepends=""
|
||||
install=""
|
||||
source="https://gist.githubusercontent.com/ollieparanoid/6eaaba3d520cf938cee10c72eb31f0a8/raw/80ba45e32e358935a11083e7a847ce582906961a/mtk_mkimage.sh"
|
||||
builddir="$srcdir/"
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
install -Dm755 mtk_mkimage.sh "$pkgdir"/usr/bin/mtk-mkimage
|
||||
}
|
||||
|
||||
sha512sums="7709b7abf20fa69eb7ae3f58648f6cefdf85130a2422755c143be05e4f59436f4231bba3965a04da1fe45fdabbdb314a99e08a380c17a4d6d8c1d062d18d074c mtk_mkimage.sh"
|
|
@ -1,5 +1,5 @@
|
|||
pkgname=postmarketos-mkinitfs
|
||||
pkgver=0.7.0
|
||||
pkgver=0.7.1
|
||||
pkgrel=0
|
||||
pkgdesc="Tool to generate initramfs images for postmarketOS"
|
||||
url="https://postmarketos.org"
|
||||
|
@ -25,4 +25,4 @@ package() {
|
|||
}
|
||||
sha512sums="d5abfe9a1298069e6722555c6e16223b09b36af65d879feb64d540aa6cbc009a3aa7f00528bcf656370ec37cc64f925c72ebb77813961cd6ebf22107b57ea029 init.sh.in
|
||||
4515bc6891110e9c8b1ed8d31a89818c7c222a364bdbdf90097d5d6bbdb97eb889d4dbaec78dc928aa5ff698a8e89a76338e7c63017bf8dfb93f44a293848ca0 init_functions.sh
|
||||
01f8ce63c011fe565212d03e5b0be730c06885dbf7344509c8ea1b4f112c0ca582ff59faf30a366055d9f15295edd0fa2219542987456fe4d06c35584102bb8f mkinitfs.sh"
|
||||
4c8a999009bc7e909bc1848c8c2421cb5f79f2603ee210b8f8c145f47c31a9e56e1861cffe742fcfd3c7bbb315e37dbe347bb5ac602f45eeccc0e40516889618 mkinitfs.sh"
|
||||
|
|
|
@ -239,6 +239,12 @@ create_bootimg()
|
|||
_base="${deviceinfo_flash_offset_base}"
|
||||
[ -z "$_base" ] && _base="0x10000000"
|
||||
|
||||
if [ "${deviceinfo_bootimg_mtk_mkimage}" == "true" ]; then
|
||||
require_package "mtk-mkimage" "mtk-mkimage" "bootimg_mtk_mkimage"
|
||||
mv $outfile $outfile-orig
|
||||
mtk-mkimage ROOTFS $outfile-orig $outfile
|
||||
fi
|
||||
|
||||
kernelfile="${outfile/initramfs-/vmlinuz-}"
|
||||
if [ -n "${deviceinfo_dtb}" ]; then
|
||||
kernelfile="${kernelfile}-dtb"
|
||||
|
|
Loading…
Reference in a new issue