fairphone-fp3: new device (MR 2158)
This commit is contained in:
parent
fb3365a982
commit
d8d69fd7da
45
device/testing/device-fairphone-fp3/APKBUILD
Normal file
45
device/testing/device-fairphone-fp3/APKBUILD
Normal file
@ -0,0 +1,45 @@
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-fairphone-fp3
|
||||
pkgdesc="Fairphone 3"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
mesa-dri-gallium
|
||||
msm-fb-refresher
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
subpackages="
|
||||
$pkgname-kernel-downstream:kernel_downstream
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
kernel_downstream() {
|
||||
pkgdesc="Downstream kernel (recommended)"
|
||||
depends="linux-fairphone-fp3"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Firmware for WiFi, Audio, etc."
|
||||
depends="firmware-fairphone-fp3-wcnss"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4b6858d52ca52841806c4853916919037a8add860446bdb5c0bccdf9a244ab63b8e0ddbdd456ee124e284dd99bc3d0caabc7543c73b9032da59dd2c747bafaad deviceinfo
|
||||
"
|
40
device/testing/device-fairphone-fp3/deviceinfo
Normal file
40
device/testing/device-fairphone-fp3/deviceinfo
Normal file
@ -0,0 +1,40 @@
|
||||
# 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 3"
|
||||
deviceinfo_manufacturer="Fairphone"
|
||||
deviceinfo_codename="fairphone-fp3"
|
||||
deviceinfo_year="2019"
|
||||
deviceinfo_dtb_mainline="qcom/sdm632-fairphone-fp3"
|
||||
deviceinfo_append_dtb_mainline="false"
|
||||
deviceinfo_dtb_downstream=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="2160"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline_downstream="console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_serial_dm,0x78af000 androidboot.usbconfigfs=true loop.max_part=7 buildvariant=user"
|
||||
deviceinfo_kernel_cmdline_mainline="console=ttyMSM0,115200"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_fastboot_partition_vbmeta="vbmeta"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
|
||||
# USB
|
||||
deviceinfo_rndis_function="ncm.usb0"
|
30
device/testing/firmware-fairphone-fp3/APKBUILD
Normal file
30
device/testing/firmware-fairphone-fp3/APKBUILD
Normal file
@ -0,0 +1,30 @@
|
||||
pkgname=firmware-fairphone-fp3
|
||||
pkgver=20210420.0
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for Fairphone 3"
|
||||
url="https://gitlab.com/knfr/firmware-fairphone-fp3"
|
||||
arch="aarch64"
|
||||
license="proprietary"
|
||||
subpackages="$pkgname-wcnss"
|
||||
options="!check !strip !archcheck"
|
||||
|
||||
source="$pkgname-$pkgver.tar.gz::$url/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
|
||||
_fwdir="/lib/firmware/postmarketos"
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"
|
||||
}
|
||||
|
||||
wcnss() {
|
||||
pkgdesc="Fairphone 3 firmware for the Qualcomm Wireless Connectivity Subsystem (WCNSS)"
|
||||
depends="wcnss-wlan"
|
||||
|
||||
install -Dm644 "$builddir"/wcnss.* -t \
|
||||
"$subpkgdir/$_fwdir"
|
||||
install -Dm644 "$builddir"/prima/* -t \
|
||||
"$subpkgdir/$_fwdir"/wlan/prima
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
bf2aea11343a4c0cd0f7a6d7ac7304674f2eb565ebe78dc1020e7756d9ee13c8fc45ff03e5c4d8f532528c2d613834603dbf01f68944ec8faeb08b3bc7d86470 firmware-fairphone-fp3-20210420.0.tar.gz
|
||||
"
|
73
device/testing/linux-fairphone-fp3/APKBUILD
Normal file
73
device/testing/linux-fairphone-fp3/APKBUILD
Normal file
@ -0,0 +1,73 @@
|
||||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/lineageos_FP3_defconfig
|
||||
|
||||
pkgname=linux-fairphone-fp3
|
||||
pkgver=4.9.218
|
||||
pkgrel=0
|
||||
pkgdesc="Fairphone 3 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="fairphone-fp3"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="
|
||||
bash
|
||||
bc
|
||||
bison
|
||||
devicepkg-dev
|
||||
flex
|
||||
openssl-dev
|
||||
perl
|
||||
dtc
|
||||
dtbtool
|
||||
gcc6
|
||||
"
|
||||
|
||||
# building with newer gcc causes build errors
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_fairphone_FP3"
|
||||
_commit="cb219d777064c83121fbaf2aa119f842c258b3b2"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://gitlab.e.foundation/e/devices/$_repository/-/archive/$_commit/$_repository-$_commit.tar.gz
|
||||
$_config
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
REPLACE_GCCH=0 . downstreamkernel_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" DTC=dtc \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
|
||||
dtbTool -p scripts/dtc/ -o "$_outdir/arch/$_carch/boot/dt.img" \
|
||||
"$_outdir/arch/$_carch/boot/"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||
|
||||
unset LDFLAGS
|
||||
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
||||
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 modules_install
|
||||
|
||||
install -Dm644 "$_outdir/arch/$_carch/boot/dt.img" "$pkgdir/boot/dt.img"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c56a5f57155e5f68770e85d50530ff87d09c545fb8c774faae61ee4ea8147842430dab9fa20b277388ddae87e5dd6a4f6393cce2bb5fc80cfdd50514fc11c281 linux-fairphone-fp3-cb219d777064c83121fbaf2aa119f842c258b3b2.tar.gz
|
||||
23c69ac1aa04152ae7033506956bf4c64a521e8dff71e47241e27809ead80e33c522aa70a088b3c9cf390b2fa6dba858c81738958efc217dddc023412fe20167 config-fairphone-fp3.aarch64
|
||||
"
|
5113
device/testing/linux-fairphone-fp3/config-fairphone-fp3.aarch64
Normal file
5113
device/testing/linux-fairphone-fp3/config-fairphone-fp3.aarch64
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user