Force rootfs resize on first boot to take all the space available. This is very useful for prebuilt images, where as-is the rootfs only takes a bit of space and then it quickly fills up. Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9396>
145 lines
5.2 KiB
Bash
145 lines
5.2 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=19
|
|
pkgrel=0
|
|
url="https://postmarketos.org"
|
|
license="MIT"
|
|
arch="aarch64"
|
|
options="!check !archcheck"
|
|
depends="
|
|
dtc
|
|
linux-firmware-meson
|
|
postmarketos-base
|
|
soc-amlogic-aarch64
|
|
u-boot-tools
|
|
"
|
|
makedepends="devicepkg-dev"
|
|
source="
|
|
boot-image.its
|
|
deviceinfo
|
|
kernel-cmdline.conf
|
|
modules-initfs
|
|
"
|
|
subpackages="
|
|
$pkgname-kernel-fiberhome-hg680p:kernel_fiberhome_hg680p
|
|
$pkgname-kernel-p201:kernel_p201
|
|
$pkgname-kernel-p212:kernel_p212
|
|
$pkgname-kernel-p241:kernel_p241
|
|
$pkgname-kernel-p281:kernel_p281
|
|
$pkgname-kernel-sei510:kernel_sei510
|
|
$pkgname-kernel-ugoos-am3:kernel_ugoos_am3
|
|
$pkgname-kernel-videostrong-kii-pro:kernel_videostrong_kii_pro
|
|
$pkgname-kernel-xiaomi-aquaman:kernel_xiaomi_aquaman
|
|
$pkgname-kernel-xiaomi-once:kernel_xiaomi_once
|
|
$pkgname-kernel-zte-b860h:kernel_zte_b860h
|
|
"
|
|
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_fiberhome_hg680p() {
|
|
pkgdesc="Kernel for FiberHome HG680-P (S905X)"
|
|
depends="linux-firmware-rtlwifi linux-postmarketos-amlogic u-boot-amlogic-s905x-tv"
|
|
aml_boot_prep "meson-gxl-s905x-fiberhome-hg680p.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_p201() {
|
|
pkgdesc="Kernel for Amlogic P201-based TV box (S905) [ONLY FOR TESTING]"
|
|
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) [ONLY FOR TESTING]"
|
|
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) [ONLY FOR TESTING]"
|
|
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_p281() {
|
|
pkgdesc="Kernel for Amlogic P281-based TV box (S905W) [ONLY FOR TESTING]"
|
|
depends="linux-postmarketos-amlogic u-boot-amlogic-s905x-tv"
|
|
aml_boot_prep "meson-gxl-s905w-p281.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_sei510() {
|
|
pkgdesc="Kernel for SEI Robotics SEI510-based TV box (S905X2) [ONLY FOR TESTING]"
|
|
depends="linux-postmarketos-amlogic u-boot-amlogic-s905x2-tv"
|
|
aml_boot_prep "meson-g12a-sei510.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_ugoos_am3() {
|
|
pkgdesc="Kernel for Ugoos AM3 (S912)"
|
|
depends="linux-postmarketos-amlogic"
|
|
aml_boot_prep "meson-gxm-ugoos-am3.dtb" "$subpkgdir"
|
|
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-brcm linux-firmware-rtl_bt"
|
|
aml_boot_prep "meson-gxl-s805y-xiaomi-aquaman.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_xiaomi_once() {
|
|
pkgdesc="Kernel for Xiaomi Mi Box 3 (S905X)"
|
|
depends="linux-firmware-brcm linux-postmarketos-amlogic u-boot-amlogic-s905x-tv"
|
|
aml_boot_prep "meson-gxl-s905x-xiaomi-once.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
kernel_zte_b860h() {
|
|
pkgdesc="Kernel for ZTE B860H V1/V2 (S905X)"
|
|
depends="linux-postmarketos-amlogic u-boot-amlogic-s905x-tv"
|
|
aml_boot_prep "meson-gxl-s905x-zte-b860h.dtb" "$subpkgdir"
|
|
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
|
}
|
|
|
|
sha512sums="
|
|
17e803e341c362f54df2116125549ededc41deb89cd6f57974133e18053b30af35fc2b60cdb732b10efadf95234f154bdd7b32410c139f0166adfe9b4ffe02dd boot-image.its
|
|
6eec3f25b4157de4d0ca86dd8e31ba0411419fb98ff841e486cfc2d841bb0673bd99cdb6a108bf039c26cb7bae30e239d3392c4f704cee782f1ffd2b984de7f2 deviceinfo
|
|
274a58cae87b2357f1a30c0463b2728d4dbea1a9c7bd3a17a62b22cd947ef8169c39bb21a480ba3d2dfae1fddcec3812d43dfdd7e44e81619124d6551a1611e2 kernel-cmdline.conf
|
|
52948c2884a6f6384e12b7a598f70878526d0d3293c214425170145231144ec7de805c038641741a4a5d75b50e554f6a3fa3769784a674217ed032f9b6a233c8 modules-initfs
|
|
"
|