From 5c5ba015dcddb55b19bc4e3faf3ccc7d83d92f8c Mon Sep 17 00:00:00 2001 From: Igor Belwon Date: Mon, 29 Sep 2025 19:09:23 +0200 Subject: [PATCH] device-nothing-tetris: adapt to U-Boot As a first-stage U-Boot port is now available for this device, adapt the device package to use it. NOTE: Currently, EFI boot is unsupported, because of this device having to send a specific SMC command on kernel launch, if this is not done, then the device will crash after ~30s with weird errors, and access to peripherals shared with the Secure World (for example UFS) will be unavailable. This is only a temporary workaround for the time being. Signed-off-by: Igor Belwon Part-of: --- device/testing/device-nothing-tetris/APKBUILD | 5 ++-- .../testing/device-nothing-tetris/deviceinfo | 24 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/device/testing/device-nothing-tetris/APKBUILD b/device/testing/device-nothing-tetris/APKBUILD index ad1add1c9..4210c9172 100644 --- a/device/testing/device-nothing-tetris/APKBUILD +++ b/device/testing/device-nothing-tetris/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: BotchedRPR pkgname=device-nothing-tetris pkgdesc="Nothing CMF Phone 1" -pkgver=2 +pkgver=3 pkgrel=0 url="https://postmarketos.org" license="MIT" @@ -9,7 +9,6 @@ arch="aarch64" options="!check !archcheck" depends=" linux-postmarketos-mediatek-mt6878 - mkbootimg postmarketos-base " makedepends="devicepkg-dev" @@ -26,5 +25,5 @@ package() { } sha512sums=" -fbb2f4c0d1ea57baf8ffc46ad10306f6a383c4a6cbcc58a1fd843d48b0da836517ae2191f5f1b102e388db1e41665d47e273f6cd09cc6cba5d7768bdd8898806 deviceinfo +2f6d90fb4d79b2747bf9fc9b16f0efba52e1c34561cc32ae10ce824aa8064968da7339641a8a9c0abf848932aa70ab025034fe4a547481db9d87abcacd8f1f6b deviceinfo " diff --git a/device/testing/device-nothing-tetris/deviceinfo b/device/testing/device-nothing-tetris/deviceinfo index 3e3922951..49e74d595 100644 --- a/device/testing/device-nothing-tetris/deviceinfo +++ b/device/testing/device-nothing-tetris/deviceinfo @@ -1,3 +1,7 @@ +# Reference: +# Please use double quotes only. You can source this file in shell +# scripts. + deviceinfo_format_version="0" deviceinfo_name="Nothing CMF Phone 1" deviceinfo_manufacturer="Nothing" @@ -13,16 +17,12 @@ deviceinfo_external_storage="true" deviceinfo_rootfs_image_sector_size="4096" # Bootloader related -deviceinfo_flash_method="fastboot" -deviceinfo_bootimg_dtb_second="false" -deviceinfo_bootimg_qcdt="false" +# NOTE: We do not use EFI, because of this board's quirk of needing +# a SMC call on every jump to the kernel, else, the device will +# not succesfully boot and will bite a watchdog in Secure World. +# As such, bootm is used (with a patch to u-boot). +deviceinfo_flash_method="fastboot-bootpart" +deviceinfo_flash_fastboot_partition_kernel="super" +# Required for devices using UFS as storage (instead of e.g. eMMC) +deviceinfo_rootfs_image_sector_size="4096" -# Boot image -deviceinfo_generate_bootimg="true" -deviceinfo_flash_offset_base="0x0" -deviceinfo_flash_offset_dtb="0x47c80000" -deviceinfo_flash_offset_tags="0x47c80000" -deviceinfo_flash_offset_ramdisk="0x66f00000" -deviceinfo_flash_offset_kernel="0x40000000" -deviceinfo_flash_pagesize="4096" -deviceinfo_header_version="2"