diff --git a/device/community/device-samsung-coreprimevelte/APKBUILD b/device/community/device-samsung-coreprimevelte/APKBUILD index b8bc0d60f..4ee523429 100644 --- a/device/community/device-samsung-coreprimevelte/APKBUILD +++ b/device/community/device-samsung-coreprimevelte/APKBUILD @@ -2,7 +2,7 @@ maintainer="Duje Mihanović " pkgname=device-samsung-coreprimevelte pkgdesc="Samsung Galaxy Core Prime VE LTE" -pkgver=9 +pkgver=10 pkgrel=0 url="https://postmarketos.org" license="MIT" @@ -15,20 +15,24 @@ depends=" mkbootimg postmarketos-base pxa-mkbootimg + systemd-boot u-boot-coreprimevelte u-boot-tools " makedepends="devicepkg-dev" source=" - boot-image.its deviceinfo + kernel-cmdline.conf modprobe.d_mwifiex.conf modules-initfs 90-mlan-to-wlan.rules " +subpackages="$pkgname-udev" build() { devicepkg_build $startdir $pkgname + + fallocate -l 4k dummy-initramfs } package() { @@ -36,15 +40,23 @@ package() { install -Dm644 "$srcdir"/90-mlan-to-wlan.rules \ -t "$pkgdir"/usr/lib/udev/rules.d - install -Dm644 "$srcdir"/boot-image.its \ + + mkdir -p "$pkgdir"/usr/share/u-boot/coreprimevelte/ + install -Dm644 dummy-initramfs \ -t "$pkgdir"/usr/share/u-boot/coreprimevelte/ + install -Dm644 "$srcdir"/modprobe.d_mwifiex.conf \ "$pkgdir"/usr/lib/modprobe.d/mwifiex.conf } +udev() { + default_udev + install_if="$pkgname=$pkgver-r$pkgrel udev" +} + sha512sums=" -fd8183975ed524f5f04f45abadd58bf7cccda5672262dcb733a180f1a9b3edbab1abda3e849f2c0a7a8d593ac804b9b07952955f7c8af8bad1263015ab02c242 boot-image.its -452485d2da3802b0a8557f951c94085c31f5ba5bb67a6c446080cd3735766d75cfbaa4f54c4396d0ba7919717f79130e953b047223de2b7d37cbfb5badbc3e3e deviceinfo +59b0f7785ed4db79b4b78cc88a601d23e3bda7f0ff46f97ffe2a11ec70824955b65f4854a7cecfa4314fb5fee587723e443391bbab9afa915ed3d69eab0d308f deviceinfo +a9193f0e8190aca5820a5c96c575c87cf190e61a015cb7145ee47721fb543868207725ee9ba113981e1a158ea3cabfeedb26160692b32306d6d7c84791f71dd2 kernel-cmdline.conf d0f22c864f19d9d54c42a8397cb8c2412d43192211fb36a86d0bd61f9f420349f774282b9b6789b54e7a8be6d379f18e56b49ae19260a60d0b572e39729931c2 modprobe.d_mwifiex.conf b1617e4b116d60abb15003c5bf7d4e8fa13e57a4a12feadd1e128946238b0922e98810289690f0466fec39f54adcc9ef08346acdef0f5a0fbb62c68438c3a063 modules-initfs d51facbaa99f69964786e770dc8ed500bfb2609353a25aa344701c851131cc421ef3a2663fe4422a21a5f38e01f0c34235fa4fad75739fb614109a2fb268db8a 90-mlan-to-wlan.rules diff --git a/device/community/device-samsung-coreprimevelte/boot-image.its b/device/community/device-samsung-coreprimevelte/boot-image.its deleted file mode 100644 index 298c57963..000000000 --- a/device/community/device-samsung-coreprimevelte/boot-image.its +++ /dev/null @@ -1,46 +0,0 @@ -/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/("/boot/dtbs/marvell/mmp/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"; - }; - }; -}; diff --git a/device/community/device-samsung-coreprimevelte/deviceinfo b/device/community/device-samsung-coreprimevelte/deviceinfo index 03df7fab6..a1a106955 100644 --- a/device/community/device-samsung-coreprimevelte/deviceinfo +++ b/device/community/device-samsung-coreprimevelte/deviceinfo @@ -17,15 +17,11 @@ deviceinfo_screen_height="800" deviceinfo_drm="true" # Bootloader related -deviceinfo_create_initfs_extra="true" deviceinfo_dtb="marvell/mmp/pxa1908-samsung-coreprimevelte" -deviceinfo_generate_uboot_fit_images="true" deviceinfo_flash_method="heimdall-bootimg" deviceinfo_generate_bootimg="true" deviceinfo_bootimg_qcdt="true" 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_kernel="0x00008000" deviceinfo_flash_offset_ramdisk="0x01000000" @@ -35,3 +31,9 @@ deviceinfo_flash_pagesize="2048" deviceinfo_flash_sparse="true" deviceinfo_flash_sparse_samsung_format="1" deviceinfo_bootimg_append_seandroidenforce="true" + +# U-Boot related stuff. U-Boot is wrapped into an uImage and chainloaded by +# Samsung's bootloader, after which the OS is located and booted through UEFI. +# We only need a dummy initfs for boot-deploy (inspired by jolla-c2). +deviceinfo_bootimg_override_payload="u-boot.uImage" +deviceinfo_bootimg_override_initramfs="dummy-initramfs" diff --git a/device/community/device-samsung-coreprimevelte/kernel-cmdline.conf b/device/community/device-samsung-coreprimevelte/kernel-cmdline.conf new file mode 100644 index 000000000..c19f7c9b3 --- /dev/null +++ b/device/community/device-samsung-coreprimevelte/kernel-cmdline.conf @@ -0,0 +1,3 @@ +# Our U-Boot currently implements no shutdown or reboot methods, so relying on +# EFI services to do either doesn't work. +efi=noruntime