device/testing: update htc-flounder to use mainline kernel (MR 3623)

This is an incomplete port but it has greater functionality than the existing downstream based one, which has been moved to unmaintained.

[ci:skip-build]: Already built successfully in CI
This commit is contained in:
Segfault 2022-11-07 21:52:35 +11:00 committed by Newbyte
parent d4eed06542
commit a2365ffc57
No known key found for this signature in database
GPG key ID: 990600ED1DB95E02
5 changed files with 7644 additions and 0 deletions

View file

@ -0,0 +1,35 @@
# Maintainer: Segfault <awarnecke002@hotmail.com>
pkgname=device-htc-flounder
pkgdesc="Google Nexus 9"
pkgver=0.2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
linux-htc-flounder
mkbootimg
postmarketos-base
"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="Google Nexus 9 firmware"
depends="linux-firmware-brcm linux-firmware-nvidia firmware-htc-flounder"
mkdir "$subpkgdir"
}
sha512sums="
91501e12adbb13d5f70a24abdd6eb51f4f671c22b6a25405af7032d2902226527e862736af18e95e278d46b6266ca58f130fb9fe0d8c553251b8e2e85345a7e4 deviceinfo
"

View file

@ -0,0 +1,35 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Google Nexus 9"
deviceinfo_manufacturer="HTC"
deviceinfo_codename="htc-flounder"
deviceinfo_year="2014"
deviceinfo_dtb="nvidia/tegra132-flounder"
deviceinfo_append_dtb="true"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="false"
deviceinfo_screen_width="1536"
deviceinfo_screen_height="2048"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyS0,115200"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_header_version="0"
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_sparse="true"

View file

@ -0,0 +1,23 @@
# Maintainer: Segfault <awarnecke002@hotmail.com>
pkgname=firmware-htc-flounder
pkgver=2.0
pkgrel=0
pkgdesc="Firmware for Google Nexus 9"
url="https://github.com/LineageOS/android_device_htc_flounder"
arch="aarch64"
license="custom:proprietary"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
# Sources
_commit="2ef67acc1769613c968493feeb8e2548a1519d37"
_url="https://github.com/LineageOS/android_device_htc_flounder"
source="$pkgname-$_commit.tar.gz::$_url/archive/$_commit.tar.gz"
package() {
cd "$srcdir/android_device_htc_flounder-$_commit"
install -Dm644 bcmdhd.cal \
"$pkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4354-sdio.google,flounder64.txt
}
sha512sums="
4e931621822a041570bca1e8ba7548b5c954c5c6b382665e263205b7247b67640df83cecdf32a0d6890f49c93393fe1305a60ab4bce85d435fadeece2042b38e firmware-htc-flounder-2ef67acc1769613c968493feeb8e2548a1519d37.tar.gz
"

View file

@ -0,0 +1,57 @@
# Maintainer: Segfault <awarnecke002@hotmail.com>
pkgname=linux-htc-flounder
pkgver=6.0.0
pkgrel=0
pkgdesc="Google Nexus 9 kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="htc-flounder"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native
pmb:kconfigcheck-nftables pmb:kconfigcheck-zram
pmb:kconfigcheck-containers pmb:kconfigcheck-waydroid"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev
devicepkg-dev bison flex openssl-dev xz findutils gzip"
# Source
_repository="linux"
_commit="1af7ece0542ef888433623a572ed8e19ca5e956a"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/TuxThePenguin0/$_repository/archive/$_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}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
make modules_install dtbs_install \
O="$_outdir" ARCH="$_carch" \
INSTALL_MOD_STRIP=1 \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
# Flounder requires a gzip compressed kernel
gzip "$pkgdir"/boot/vmlinuz
mv "$pkgdir"/boot/vmlinuz.gz "$pkgdir"/boot/vmlinuz
}
sha512sums="
ee712d770cc863a6acff52ee32c5009657480864fcd748f0ccc7afb9edba912d727e56bd1d484bd391c5f3d0fed0d063ec8fca36af80c88572bcf85a6f00522e linux-htc-flounder-1af7ece0542ef888433623a572ed8e19ca5e956a.tar.gz
4c1a3d44019233ebe2ec9987b4b7ebc1f3d4f60cff7a0fef17b3bfa4df108c8810c023a795500e72f9a697a871438d10be45deb0799648050cf71733055c8637 config-htc-flounder.aarch64
"

File diff suppressed because it is too large Load diff