This port is exclusively for AArch64 TV boxes. Given that there is an Amlogic TV box port for Meson8 (ARMv7) in the works, it doesn't make sense for the AArch64 port to have that generic name anymore. So rename it to reflect which Amlogic SoCs are suitable for it. [ci:skip-vercheck] Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org> Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6744
101 lines
3.4 KiB
Bash
101 lines
3.4 KiB
Bash
# Reference: <https://postmarketos.org/devicepkg>
|
|
# Maintainer: Ferass El Hafidi <funderscore@postmarketos.org>
|
|
pkgname=device-amlogic-aarch64-tvbox
|
|
pkgdesc="Amlogic AArch64 TV box"
|
|
pkgver=8
|
|
pkgrel=2
|
|
url="https://postmarketos.org"
|
|
license="MIT"
|
|
arch="aarch64"
|
|
options="!check !archcheck"
|
|
depends="
|
|
dtc
|
|
postmarketos-base
|
|
soc-amlogic-aarch64
|
|
u-boot-tools
|
|
"
|
|
makedepends="devicepkg-dev"
|
|
source="
|
|
boot-image.its
|
|
deviceinfo
|
|
modules-initfs
|
|
"
|
|
subpackages="
|
|
$pkgname-kernel-p201:kernel_p201
|
|
$pkgname-kernel-p212:kernel_p212
|
|
$pkgname-kernel-p241:kernel_p241
|
|
$pkgname-kernel-ugoos-am3:kernel_ugoos_am3
|
|
$pkgname-kernel-videostrong-kii-pro:kernel_videostrong_kii_pro
|
|
$pkgname-kernel-xiaomi-aquaman:kernel_xiaomi_aquaman
|
|
"
|
|
provides="device-amlogic-tvbox=$pkgver-r$pkgrel"
|
|
replaces="device-amlogic-tvbox"
|
|
|
|
build() {
|
|
devicepkg_build $startdir $pkgname
|
|
}
|
|
|
|
package() {
|
|
devicepkg_package $startdir $pkgname
|
|
}
|
|
|
|
aml_boot_prep() {
|
|
# uEnv.ini: Used to set kernel cmdline, and DTB if booting a legacy uImage
|
|
mkdir -p "$2"/boot/
|
|
echo "bootargs=console=tty0 console=ttyAML0,115200n8" > "$2"/boot/uEnv.ini
|
|
echo "pmos_env_dtb=$1" >> "$2"/boot/uEnv.ini
|
|
|
|
# FIT image used to boot Amlogic devices if their vendor U-Boot build supports it
|
|
mkdir -p "$2"/usr/share/u-boot/amlogic-tvbox
|
|
sed "s@\\[\\[\\[DEVICETREE\\]\\]\\]@/boot/dtbs/amlogic/$1@" "$srcdir/boot-image.its" > "$2"/usr/share/u-boot/amlogic-tvbox/boot-image.its
|
|
chmod 644 "$2"/usr/share/u-boot/amlogic-tvbox/boot-image.its # Perms fixup
|
|
}
|
|
|
|
kernel_p201() {
|
|
pkgdesc="Kernel for Amlogic P201-based TV box (S905)"
|
|
depends="linux-postmarketos-amlogic u-boot-amlogic-s905-tv"
|
|
aml_boot_prep "meson-gxbb-p201.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_p212() {
|
|
pkgdesc="Kernel for Amlogic P212-based TV box (S905X)"
|
|
depends="linux-postmarketos-amlogic u-boot-amlogic-s905x-tv"
|
|
aml_boot_prep "meson-gxl-s905x-p212.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_p241() {
|
|
pkgdesc="Kernel for Amlogic P241-based TV box (S805X/S805Y)"
|
|
depends="linux-postmarketos-amlogic u-boot-amlogic-s905x-tv"
|
|
aml_boot_prep "meson-gxl-s805x-p241.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_ugoos_am3() {
|
|
pkgdesc="Kernel for Ugoos AM3 (S912)"
|
|
depends="linux-postmarketos-amlogic"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_videostrong_kii_pro() {
|
|
pkgdesc="Kernel for Videostrong KII Pro (S905)"
|
|
depends="linux-postmarketos-amlogic u-boot-amlogic-s905-tv"
|
|
_pmb_recommends="firmware-videostrong-kii-pro"
|
|
aml_boot_prep "meson-gxbb-kii-pro.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_xiaomi_aquaman() {
|
|
pkgdesc="Kernel for Xiaomi Mi TV Stick (S805Y)"
|
|
depends="linux-postmarketos-amlogic soc-amlogic-aarch64-boot linux-firmware-meson linux-firmware-brcm linux-firmware-rtl_bt"
|
|
aml_boot_prep "meson-gxl-s805y-xiaomi-aquaman.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
sha512sums="
|
|
17e803e341c362f54df2116125549ededc41deb89cd6f57974133e18053b30af35fc2b60cdb732b10efadf95234f154bdd7b32410c139f0166adfe9b4ffe02dd boot-image.its
|
|
4daa0548ce37d6dfc597e7a38ec76957e9c1c3e9990e3cc6d27399c7f08a87433519108fd7c569b8fcec026d7e9d737786e71146f320a841eca00f6587c236f4 deviceinfo
|
|
52948c2884a6f6384e12b7a598f70878526d0d3293c214425170145231144ec7de805c038641741a4a5d75b50e554f6a3fa3769784a674217ed032f9b6a233c8 modules-initfs
|
|
"
|