device-samsung-coreprimevelte: use U-Boot (MR 5952)

Convert the device package to use U-Boot.

The U-Boot binary is gzipped and put into a U-Boot legacy uImage to
match what the factory bootloader's demands. The postmarketOS kernel,
initramfs and device tree are packed into a FIT and passed to U-Boot as
an initramfs.
This commit is contained in:
Duje Mihanović 2024-12-26 22:50:25 +01:00 committed by Stefan Hansson
parent bb7a87b47b
commit dfdc8d2f9e
No known key found for this signature in database
GPG key ID: ACD854892B38D898
3 changed files with 66 additions and 9 deletions

View file

@ -1,16 +1,23 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-coreprimevelte
pkgdesc="Samsung Galaxy Core Prime VE LTE"
pkgver=2
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="linux-samsung-coreprimevelte postmarketos-base mkbootimg u-boot-tools pxa-mkbootimg"
depends="dtc
linux-samsung-coreprimevelte
u-boot-coreprimevelte
postmarketos-base
mkbootimg
u-boot-tools
pxa-mkbootimg"
makedepends="devicepkg-dev"
_pmb_recommends="firmware-samsung-pxa1908"
source="
boot-image.its
deviceinfo
90-mlan-to-wlan.rules
"
@ -24,9 +31,14 @@ package() {
install -Dm644 "$srcdir"/90-mlan-to-wlan.rules \
-t "$pkgdir"/usr/lib/udev/rules.d
mkdir -p "$pkgdir"/usr/share/u-boot/coreprimevelte/
install -Dm644 "$srcdir"/boot-image.its \
-t "$pkgdir"/usr/share/u-boot/coreprimevelte/
}
sha512sums="
e9ed10e30e09b31f9f4cb148f3d0d2cef252f6c6a40161828d5bc7c8150772746d09e79c4d94614f2e2ce192f135e224cc0a9c61f1bdbd6cde2bc026018744af deviceinfo
2f19e7b805af1f58b7689f45990bf8cb97e902eec373e9420487ca9608cfd650eb37011d58597c8b8255bc6bc50b763711c57a5c711ead06b213c1df658d4b9a boot-image.its
82960dd68320abf6f24bd6e6a4629669617173be417d7ae1a1580f7c1239992a61829ed479e3e7cf2acc8e47cb3916afa2727694ac56f97cc82394b75bcc5713 deviceinfo
d51facbaa99f69964786e770dc8ed500bfb2609353a25aa344701c851131cc421ef3a2663fe4422a21a5f38e01f0c34235fa4fad75739fb614109a2fb268db8a 90-mlan-to-wlan.rules
"

View file

@ -0,0 +1,46 @@
/dts-v1/;
/ {
description = "Samsung Galaxy Core Prime VE LTE FIT";
#address-cells = <1>;
images {
kernel {
description = "Kernel image";
data = /incbin/("vmlinuz");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "gzip";
load = <0x1000000>;
entry = <0x1000000>;
};
fdt {
description = "Device tree";
data = /incbin/("/usr/share/dtb/marvell/pxa1908-samsung-coreprimevelte.dtb");
type = "flat_dt";
compression = "none";
};
initramfs {
description = "Initramfs image";
data = /incbin/("initramfs");
type = "ramdisk";
arch = "arm64";
os = "linux";
compression = "none";
};
};
configurations {
default = "standard";
standard {
description = "Normal boot";
kernel = "kernel";
fdt = "fdt";
ramdisk = "initramfs";
};
};
};

View file

@ -7,6 +7,7 @@ deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-coreprimevelte"
deviceinfo_year="2014"
deviceinfo_arch="aarch64"
deviceinfo_uboot_boardname="coreprimevelte"
# Device related
deviceinfo_chassis="handset"
@ -17,13 +18,15 @@ deviceinfo_screen_height="800"
deviceinfo_gpu_accelerated="true"
# Bootloader related
deviceinfo_create_initfs_extra="true"
deviceinfo_dtb="marvell/pxa1908-samsung-coreprimevelte"
deviceinfo_generate_uboot_fit_images="true"
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_bootimg_pxa="true"
deviceinfo_bootimg_override_payload="u-boot.uImage"
deviceinfo_bootimg_override_initramfs="boot-image.itb"
deviceinfo_flash_kernel_on_update="true"
deviceinfo_flash_offset_base="0x10000000"
deviceinfo_flash_offset_kernel="0x00008000"
@ -34,7 +37,3 @@ deviceinfo_flash_pagesize="2048"
deviceinfo_flash_sparse="true"
deviceinfo_flash_sparse_samsung_format="1"
deviceinfo_bootimg_append_seandroidenforce="true"
deviceinfo_generate_legacy_uboot_initfs="true"
deviceinfo_legacy_uboot_load_address="01000000"
deviceinfo_legacy_uboot_image_name="pxa1928dkb linux"
deviceinfo_bootimg_override_payload="uImage"