This package is being used by a huge number of Amlogic devices besides Amlogic S905. This can lead to confusion, so rename it to a more generic name. [ci:ignore-count] [ci:skip-vercheck] Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org> Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6744
99 lines
3.3 KiB
Bash
99 lines
3.3 KiB
Bash
# Reference: <https://postmarketos.org/devicepkg>
|
|
# Maintainer: Ferass El Hafidi <funderscore@postmarketos.org>
|
|
pkgname=device-amlogic-tvbox
|
|
pkgdesc="Amlogic TV box"
|
|
pkgver=8
|
|
pkgrel=1
|
|
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
|
|
"
|
|
|
|
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
|
|
d133a85e67e5aea1430b540892dbe0c15e2770b70d3e58ce5a5cc6065395e33f8101fec9143ef0601e137d1d9c6d125db7bd21e0b009ac82def00829759ad4e8 deviceinfo
|
|
52948c2884a6f6384e12b7a598f70878526d0d3293c214425170145231144ec7de805c038641741a4a5d75b50e554f6a3fa3769784a674217ed032f9b6a233c8 modules-initfs
|
|
"
|