Compare commits

...
Author SHA1 Message Date
Luca Weiss 2aea5578d5 device-fairphone-fp6: fix useless append_dtb for header v2
This was actually used with boot-deploy < 0.20.0 because
deviceinfo_header_version="2" was ignored and therefore v0 was used,
which requires appended dtb. Now that boot-deploy is actually passing
this parameter, we do not have to append the dtb to the kernel image
anymore, because the dtb is passed in a separate field.
2025-11-21 09:56:42 +01:00
Luca Weiss 83fc9dcc10 main/boot-deploy: Add patch to fix Fairphone (Gen. 6) boot.img generation
Submitted as https://gitlab.postmarketos.org/postmarketOS/boot-deploy/-/merge_requests/94
2025-11-21 09:56:36 +01:00
4 changed files with 43 additions and 4 deletions

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@
# Maintainer: Luca Weiss <luca@lucaweiss.eu>
pkgname=device-fairphone-fp6
pkgdesc="The Fairphone (Gen. 6)"
pkgver=2
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@@ -44,6 +44,6 @@ package() {
sha512sums="
17533b261db6ead91b360e2d71355297fc3ad37f3fc68f6f03a8f7bb31e1ca82ecc403454aa360c7eace9164199086422f9e2d7507e24e4695caa8d3c117034f 00-mesa.sh
b6fd85a06f911d27ba998ebb987002c094d4ec1c14ad458274e0ea38f73af03c9739447094d8312cf623401b5bfe92d087fc063008eecab3a2f1331907d44f65 deviceinfo
ed15b117238efa256bcf8187e7919114bfda59acc2023a0e647155934b1d9916cc224fa68d6fb99d94e8ff5eb0af9ba92812048b831a0df8c68f54f0a3e03e78 deviceinfo
c535c211a6d594605e0e2af3536e457b4b6a4b833f26efda4dbd514597d080393a621338c274173f4633eadefc0c2ae830f7ceaa4cbe56a1e6715ff825af18f1 modules-initfs
"
@@ -8,7 +8,6 @@ deviceinfo_manufacturer="Fairphone"
deviceinfo_codename="fairphone-fp6"
deviceinfo_year="2025"
deviceinfo_dtb="qcom/milos-fairphone-fp6"
deviceinfo_append_dtb="true"
deviceinfo_arch="aarch64"
deviceinfo_flash_kernel_on_update="true"
@@ -0,0 +1,38 @@
From f6216db878e9c5d30fd3c9b7f2a1ed2b0d124d3e Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca.weiss@fairphone.com>
Date: Fri, 21 Nov 2025 09:43:07 +0100
Subject: [PATCH] Remove boot image header v2 spaghetti
Some devices that use use boot image header v2 also require the setting
of bootimg_custom_args. Currently the --dtb and --dtb_offset parameters
are silently not added to the mkbootimg invocation, leading to failure
to include the dtb in the boot image.
Currently in postmarketOS pmaports there is one device that has both
header_version="2" AND bootimg_custom_args set, which is the Fairphone
(Gen. 6), and it's breaking boot.img generation there. I didn't dig into
if at earlier times (e.g. when that code was introduced in July 2022)
there were occurances in pmaports where this broke but now this should
be safe to do.
---
boot-deploy-functions.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/boot-deploy-functions.sh b/boot-deploy-functions.sh
index 105a61e..364bd63 100755
--- a/boot-deploy-functions.sh
+++ b/boot-deploy-functions.sh
@@ -744,9 +744,7 @@ create_bootimg() {
fi
local _header_v2=""
- # XXX: Some deviceinfo files used custom_args for header v2 support before it was implemented
- # here. We check if deviceinfo_bootimg_custom_args is set to avoid breaking those devices.
- if [ "$deviceinfo_header_version" = "2" ] && [ -z "$deviceinfo_bootimg_custom_args" ]; then
+ if [ "$deviceinfo_header_version" = "2" ]; then
if [ -z "$deviceinfo_flash_offset_dtb" ]; then
log "ERROR: deviceinfo_header_version is 2, but"
log "'deviceinfo_flash_offset_dtb' is missing. Set it"
--
2.51.2
+3 -1
View File
@@ -1,13 +1,14 @@
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=boot-deploy
pkgver=0.20.3
pkgrel=0
pkgrel=1
pkgdesc="tool for finalizing and deploying boot related files"
url="https://gitlab.postmarketos.org/postmarketOS/boot-deploy"
arch="noarch"
license="GPL-2.0-or-later"
source="
https://gitlab.postmarketos.org/postmarketOS/boot-deploy/-/archive/$pkgver/boot-deploy-$pkgver.tar.gz
0001-Remove-boot-image-header-v2-spaghetti.patch
os-customization
use-busybox-sh.patch
@@ -30,6 +31,7 @@ package() {
}
sha512sums="
f760748eb65e2f1505dafc95d01e9426224f495ff015c9eae98ea02545379ec9424345a0915d323aaa8a6e83f34a1db53e8ddb01ae751261299c59d0a76491a0 boot-deploy-0.20.3.tar.gz
58b6c77023e38d1a7f59fcaf42943135bec645adbdbd394e936d056926f743bf7454b5d94e148be26b36df7e1787ae2f872c20f675cef6cd48fc22cd129cd126 0001-Remove-boot-image-header-v2-spaghetti.patch
a243975b9850d9933e0f917f7eb38fc4a76ea658c3dcc56f035f60ee6c62d6740c1107143b8210bdc0231d4c9b6b2003e458120985604eb09649322d359ae89f os-customization
5b3da17fab1b0e76b3686667c0c8c3a3e29a5794406875dd6375d73c5b1b47d60da6cf54720a3d8ad98b79c563af0863fedc87d2506b19055fb3fdea1cbd731d use-busybox-sh.patch
"