devices/qcom/bootloader.sh should pass all parameters to mkbootimg otherwise base is assumed 0x10000000 by default
I think there's something wrong in our boot images' generation: by doing
Click to expand
diff --git a/devices/qcom/bootloader.sh b/devices/qcom/bootloader.sh
index c0c64ab..110a635 100755
--- a/devices/qcom/bootloader.sh
+++ b/devices/qcom/bootloader.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+set -x
+
SCRIPT="$0"
DEVICE="$1"
and launching a build, I would have expected bootimg addresses for a device e.g. fajita to be the same as sdm845 defaults
[bootimg]
base = 0x0
kernel = 0x8000
ramdisk = 0x1000000
second = 0
tags = 0x100
pagesize = 4096
...
[[device]]
vendor = "oneplus"
model = "fajita"
append = "console=ttyMSM0,115200"yet (I'm analyzing the locally built boot image, but I've checked one downloaded from the official server with same output)
$ abootimg -x mobian-sdm845-plasma-mobile-20260712.boot-fajita.img
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
$ cat bootimg.cfg
bootsize = 0x1da1000
pagesize = 0x1000
kerneladdr = 0x10008000
ramdiskaddr = 0x11000000
secondaddr = 0x0
tagsaddr = 0x10000100
name =
cmdline = mobile.root=UUID=d0a0962c-6cae-4da3-b96d-be99274437b9 mobile.qcomsoc=qcom/sdm845 mobile.vendor=oneplus mobile.model=fajita console=ttyMSM0,115200 init=/sbin/init ro loglevel=7 splashconfirmed by the build log
Click to expand
2026/07/12 17:01:54 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + tomlq -r .device[5].vendor /tmp/script/configs/sdm845.toml
2026/07/12 17:01:56 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + VENDOR=oneplus
2026/07/12 17:01:56 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + tomlq -r .device[5].model /tmp/script/configs/sdm845.toml
2026/07/12 17:01:57 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + MODEL=fajita
2026/07/12 17:01:57 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + tomlq -r if .device[5].variant then .device[5].variant else "" end /tmp/script/configs/sdm845.toml
2026/07/12 17:01:59 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + VARIANT=
2026/07/12 17:01:59 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + tomlq -r if .device[5].chipset then .device[5].chipset else "sdm845" end /tmp/script/configs/sdm845.toml
2026/07/12 17:02:01 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + DEVICE_SOC=sdm845
2026/07/12 17:02:01 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + tomlq -r if .device[5].append then .device[5].append else "" end /tmp/script/configs/sdm845.toml
2026/07/12 17:02:03 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + APPEND=console=ttyMSM0,115200
2026/07/12 17:02:03 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + tomlq -r if .device[5].bootimg then .device[5].bootimg else "" end /tmp/script/configs/sdm845.toml
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + DEVICE_BOOTIMG=
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + CMDLINE=mobile.qcomsoc=qcom/sdm845 mobile.vendor=oneplus mobile.model=fajita
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + [ ]
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + FULLMODEL=fajita
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + DTB_FILE=/usr/lib/linux-image-6.12-sdm845/qcom/sdm845-oneplus-fajita.dtb
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + LOGLEVEL=quiet
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + [ console=ttyMSM0,115200 ]
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + CMDLINE=mobile.qcomsoc=qcom/sdm845 mobile.vendor=oneplus mobile.model=fajita console=ttyMSM0,115200
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + echo console=ttyMSM0,115200
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + grep -q console=
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + LOGLEVEL=loglevel=7
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + [ ]
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + BOOTIMG_ARGS=--kernel_offset 32768 --ramdisk_offset 16777216 --second_offset 0 --tags_offset 256 --pagesize 4096
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + echo --kernel_offset 32768 --ramdisk_offset 16777216 --second_offset 0 --tags_offset 256 --pagesize 4096
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + grep -q dtb_offset
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + echo Creating boot image for fajita...
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | Creating boot image for fajita...
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + cat /boot/vmlinuz-6.12-sdm845 /usr/lib/linux-image-6.12-sdm845/qcom/sdm845-oneplus-fajita.dtb
2026/07/12 17:02:04 bootloader.sh sdm845 mobian-sdm845-plasma-mobile-20260712 | + mkbootimg -o /bootimg-fajita --kernel_offset 32768 --ramdisk_offset 16777216 --second_offset 0 --tags_offset 256 --pagesize 4096 --kernel /tmp/kernel-dtb --ramdisk /boot/initrd.img-6.12-sdm845 --cmdline mobile.root=UUID=d0a0962c-6cae-4da3-b96d-be99274437b9 mobile.qcomsoc=qcom/sdm845 mobile.vendor=oneplus mobile.model=fajita console=ttyMSM0,115200 init=/sbin/init ro loglevel=7 splashthat shows
mkbootimg -o /bootimg-fajita --kernel_offset 32768 --ramdisk_offset 16777216 --second_offset 0 --tags_offset 256 --pagesize 4096 --kernel /tmp/kernel-dtb --ramdisk /boot/initrd.img-6.12-sdm845 --cmdline mobile.root=UUID=d0a0962c-6cae-4da3-b96d-be99274437b9 mobile.qcomsoc=qcom/sdm845 mobile.vendor=oneplus mobile.model=fajita console=ttyMSM0,115200 init=/sbin/init ro loglevel=7 splashwhere the --base argument is missing, then mkbootimg's default ( 0x10000000 ) is taken.
As comparison, pmOS images have the expected values
$ abootimg -x 20260710-0712-postmarketOS-v26.06-plasma-mobile-6-oneplus-fajita-boot.img
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
$ cat bootimg.cfg
bootsize = 0x1be9000
pagesize = 0x1000
kerneladdr = 0x8000
ramdiskaddr = 0x1000000
secondaddr = 0xf00000
tagsaddr = 0x100
name =
cmdline = splash plymouth.ignore-serial-consoles plymouth.prefer-fbcon console=ttyMSM0,115200 pmos_boot_uuid=BD26-9003 pmos_root_uuid=b28d1016-d008-4bca-ac0b-bbac28d5edab pmos_rootfsopts=defaultsTBH I've no clue how comes our images are working anyway... maybe the "wrong" addresses are wrapping around to the right ones?
Locally I've fixed this by doing
diff --git a/devices/qcom/bootloader.sh b/devices/qcom/bootloader.sh
index 932ddbf..bf09fea 100755
--- a/devices/qcom/bootloader.sh
+++ b/devices/qcom/bootloader.sh
@@ -14,6 +14,7 @@ fi
bootimg_offsets() {
local BOOTIMG="$1"
+ local BASE="$(echo "${BOOTIMG}" | jq -r 'if .base then .base else 268435456 end' -)"
local VERSION="$(echo "${BOOTIMG}" | jq -r 'if .version then .version else 0 end' -)"
local KERNEL="$(echo "${BOOTIMG}" | jq -r '.kernel + .base' -)"
local RAMDISK="$(echo "${BOOTIMG}" | jq -r '.ramdisk + .base' -)"
@@ -22,7 +23,7 @@ bootimg_offsets() {
local PAGE_SIZE="$(echo "${BOOTIMG}" | jq -r '.pagesize' -)"
local DTB="$(echo "${BOOTIMG}" | jq -r 'if .dtb_offset then .dtb_offset + .base else "" end' -)"
- local ARGS="--kernel_offset ${KERNEL} --ramdisk_offset ${RAMDISK}"
+ local ARGS="--base ${BASE} --kernel_offset ${KERNEL} --ramdisk_offset ${RAMDISK}"
ARGS="${ARGS} --second_offset ${SECOND} --tags_offset ${TAGS}"
ARGS="${ARGS} --pagesize ${PAGE_SIZE}"
but there are other points I'm not 100% sure about with boot image generation, will try to come to a point and prepare a MR...