* [PATCH v2 0/4] tools: qcom: mkmbn: Updates to support ipq5210
@ 2026-09-10 10:29 Varadarajan Narayanan
2026-09-10 10:29 ` [PATCH v2 1/4] tools: qcom: mkmbn: Fix ipq5424 MBN version Varadarajan Narayanan
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Varadarajan Narayanan @ 2026-09-10 10:29 UTC (permalink / raw)
To: Sumit Garg, u-boot-qcom, u-boot
Cc: Casey Connolly, Neil Armstrong, Tom Rini, Varadarajan Narayanan,
Balaji Selvanathan
As part of adding Qualcomm ipq5210 SoC U-Boot SPL & U-Boot proper support,
the mkmbn script has to be upgraded to create images that can be used
in the ipq5210 SoC.
These changes are to address the feedback in the 'Qualcomm IPQ5210 SoC
bringup' series [1] to use mkbn.
1 - https://lore.kernel.org/u-boot/78ff6a8d-5c63-4bc2-bf1e-6b71b8f9c6cf@linaro.org/
While at it, fix the MBN version number for ipq5424.
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
v2:
- Remove 'load address' from MbnData and get it from .config
- Add qcom_sm8550_defconfig
- Use 4K alignment for padding the MBN images
- Remove '--melfs' option and make them positional
Link for v1: https://lore.kernel.org/u-boot/20260714-ipq5210-v1-0-0b98251aabbd@oss.qualcomm.com/
---
Varadarajan Narayanan (4):
tools: qcom: mkmbn: Fix ipq5424 MBN version
configs: add qcom_sm8550_defconfig and debug fragment
tools: qcom: mkmbn: Add support for ipq5210
tools: qcom: mkmbn: Add support to create multi-elf
board/qualcomm/config.mk | 2 +-
configs/qcom_sm8550_defconfig | 15 +++++++++++++
tools/qcom/mkmbn/mkmbn.py | 51 +++++++++++++++++++++++++++++++++----------
3 files changed, 56 insertions(+), 12 deletions(-)
---
base-commit: 914dd2f5d18a3a89e4ddb6d1d97b2743618ae5ee
change-id: 20260714-ipq5210-52e1da5af9fc
Best regards,
--
Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/4] tools: qcom: mkmbn: Fix ipq5424 MBN version
2026-09-10 10:29 [PATCH v2 0/4] tools: qcom: mkmbn: Updates to support ipq5210 Varadarajan Narayanan
@ 2026-09-10 10:29 ` Varadarajan Narayanan
2026-09-10 10:29 ` [PATCH v2 2/4] configs: add qcom_sm8550_defconfig and debug fragment Varadarajan Narayanan
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Varadarajan Narayanan @ 2026-09-10 10:29 UTC (permalink / raw)
To: Sumit Garg, u-boot-qcom, u-boot
Cc: Casey Connolly, Neil Armstrong, Tom Rini, Varadarajan Narayanan,
Balaji Selvanathan
Since ipq5424 uses MBN version 7, update the ipq5424 entry in the 'boards'
table accordingly.
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
tools/qcom/mkmbn/mkmbn.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/qcom/mkmbn/mkmbn.py b/tools/qcom/mkmbn/mkmbn.py
index e4484b539b0..8d2078acc30 100755
--- a/tools/qcom/mkmbn/mkmbn.py
+++ b/tools/qcom/mkmbn/mkmbn.py
@@ -85,7 +85,7 @@ boards: dict[bytes, MbnData] = {
b"qcom,sm8550\0": MbnData(0xA7000000, 7, SwId.uefi), # C8550
b"qcom,sm8650\0": MbnData(0xA7000000, 7, SwId.uefi), # SM8650
b"qcom,qcs615\0": MbnData(0x9FC00000, 6, SwId.uefi), # Dragonwing IQ6
- b"qcom,ipq5424\0": MbnData(0x8a380000, 6, SwId.aboot),
+ b"qcom,ipq5424\0": MbnData(0x8a380000, 7, SwId.aboot),
b"qcom,ipq9574\0": MbnData(0x4A240000, 6, SwId.aboot),
# msm8916/apq8016 has an "aboot" partition but the process is the same
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/4] configs: add qcom_sm8550_defconfig and debug fragment
2026-09-10 10:29 [PATCH v2 0/4] tools: qcom: mkmbn: Updates to support ipq5210 Varadarajan Narayanan
2026-09-10 10:29 ` [PATCH v2 1/4] tools: qcom: mkmbn: Fix ipq5424 MBN version Varadarajan Narayanan
@ 2026-09-10 10:29 ` Varadarajan Narayanan
2026-09-10 13:17 ` Casey Connolly
2026-09-10 10:29 ` [PATCH v2 3/4] tools: qcom: mkmbn: Add support for ipq5210 Varadarajan Narayanan
2026-09-10 10:29 ` [PATCH v2 4/4] tools: qcom: mkmbn: Add support to create multi-elf Varadarajan Narayanan
3 siblings, 1 reply; 8+ messages in thread
From: Varadarajan Narayanan @ 2026-09-10 10:29 UTC (permalink / raw)
To: Sumit Garg, u-boot-qcom, u-boot
Cc: Casey Connolly, Neil Armstrong, Tom Rini, Varadarajan Narayanan,
Balaji Selvanathan
Add a defconfig for running on sm5650 as the first stage bootloader and
associated debug config fragment.
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
configs/qcom_sm8550_defconfig | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/configs/qcom_sm8550_defconfig b/configs/qcom_sm8550_defconfig
new file mode 100644
index 00000000000..30d11f36eb3
--- /dev/null
+++ b/configs/qcom_sm8550_defconfig
@@ -0,0 +1,15 @@
+# Configuration for building U-Boot to be flashed
+# to the uefi partition of QCM6490 dev boards with
+# the "Linux Embedded" partition layout (which have
+# a dedicated "uefi" partition for edk2/U-Boot)
+
+#include "qcom_defconfig"
+
+# Otherwise buildman thinks this isn't an ARM platform
+CONFIG_ARM=y
+
+# Address where U-Boot will be loaded
+CONFIG_TEXT_BASE=0xa7000000
+CONFIG_REMAKE_ELF=y
+
+CONFIG_DEFAULT_DEVICE_TREE="qcom/sm8550-hdk"
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/4] tools: qcom: mkmbn: Add support for ipq5210
2026-09-10 10:29 [PATCH v2 0/4] tools: qcom: mkmbn: Updates to support ipq5210 Varadarajan Narayanan
2026-09-10 10:29 ` [PATCH v2 1/4] tools: qcom: mkmbn: Fix ipq5424 MBN version Varadarajan Narayanan
2026-09-10 10:29 ` [PATCH v2 2/4] configs: add qcom_sm8550_defconfig and debug fragment Varadarajan Narayanan
@ 2026-09-10 10:29 ` Varadarajan Narayanan
2026-09-11 4:59 ` Balaji Selvanathan
2026-09-10 10:29 ` [PATCH v2 4/4] tools: qcom: mkmbn: Add support to create multi-elf Varadarajan Narayanan
3 siblings, 1 reply; 8+ messages in thread
From: Varadarajan Narayanan @ 2026-09-10 10:29 UTC (permalink / raw)
To: Sumit Garg, u-boot-qcom, u-boot
Cc: Casey Connolly, Neil Armstrong, Tom Rini, Varadarajan Narayanan,
Balaji Selvanathan
- Add ipq5210 entry to the 'boards' table
- Add an argument to specify the SPL load address
- ipq5210's boot rom expects the SPL image size to be 4-byte aligned. To
support this add an argument to specify the image size alignment to
enable the mkmbn script to pad the image accordingly.
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
board/qualcomm/config.mk | 2 +-
tools/qcom/mkmbn/mkmbn.py | 34 ++++++++++++++++++++++++----------
2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/board/qualcomm/config.mk b/board/qualcomm/config.mk
index 769e4a51ca0..dd61ffd98e8 100644
--- a/board/qualcomm/config.mk
+++ b/board/qualcomm/config.mk
@@ -8,7 +8,7 @@
# Create Qualcomm signed elf images
CMD_MKMBN = $(srctree)/tools/qcom/mkmbn/mkmbn.py
quiet_cmd_mkmbn = MBN $@
- cmd_mkmbn = $(CMD_MKMBN) $<
+ cmd_mkmbn = $(CMD_MKMBN) -l $(CONFIG_TEXT_BASE) $<
u-boot.mbn: u-boot.bin FORCE
$(call if_changed,mkmbn)
diff --git a/tools/qcom/mkmbn/mkmbn.py b/tools/qcom/mkmbn/mkmbn.py
index 8d2078acc30..6fe66fc4e55 100755
--- a/tools/qcom/mkmbn/mkmbn.py
+++ b/tools/qcom/mkmbn/mkmbn.py
@@ -18,6 +18,8 @@ import sys
from enum import Enum
import struct
+MBN_ALIGN_SIZE = 4096
+
verbose = False
def log(*args, **kwargs):
@@ -63,19 +65,17 @@ class MbnData:
"""
-This dictionary is used to map a board or platform to the appropriate load address and
-other MBN metadata. When adding support for a new platform to U-Boot, the appropriate
-data should be filled out here. The load address can typically be determined by looking
-at the uefi.elf or xbl.elf for the platform. For the uefi.elf it is the load address, and
-for xbl.elf it is typically the RWX section in the middle, just BEFORE the section loaded
-at 0x1495xxxx or similar. Looking at similar platforms in the table below may help.
+This dictionary is used to map a board or platform to the appropriate MBN
+metadata. When adding support for a new platform to U-Boot, the appropriate data
+should be filled out here. Looking at similar platforms in the table below may
+help.
"""
boards: dict[bytes, MbnData] = {
# Exact matches for boards, these are preferred
- b"qcom,qcs6490-rb3gen2\0": MbnData(0x9FC00000, 6, SwId.uefi),
- b"qcom,qcs9100-ride-r3\0": MbnData(0xAF000000, 6, SwId.uefi), # Dragonwing IQ9
- b"qcom,qcs8300-ride\0": MbnData(0xAF000000, 6, SwId.uefi), # Dragonwing IQ8
- b"qcom,qcs615-ride\0": MbnData(0x9FC00000, 6, SwId.uefi), # Dragonwing IQ6
+ b"qcom,qcs6490-rb3gen2\0": MbnData(6, SwId.uefi),
+ b"qcom,qcs9100-ride-r3\0": MbnData(6, SwId.uefi), # Dragonwing IQ9
+ b"qcom,qcs8300-ride\0": MbnData(6, SwId.uefi), # Dragonwing IQ8
+ b"qcom,qcs615-ride\0": MbnData(6, SwId.uefi), # Dragonwing IQ6
# Fallback/generic matches since most boards for a platform will
# use the same load address
b"qcom,qcm6490\0": MbnData(0x9FC00000, 6, SwId.uefi), # rb3gen2, rubikpi3
@@ -85,6 +85,7 @@ boards: dict[bytes, MbnData] = {
b"qcom,sm8550\0": MbnData(0xA7000000, 7, SwId.uefi), # C8550
b"qcom,sm8650\0": MbnData(0xA7000000, 7, SwId.uefi), # SM8650
b"qcom,qcs615\0": MbnData(0x9FC00000, 6, SwId.uefi), # Dragonwing IQ6
+ b"qcom,ipq5210\0": MbnData(0x87980000, 7, SwId.aboot),
b"qcom,ipq5424\0": MbnData(0x8a380000, 7, SwId.aboot),
b"qcom,ipq9574\0": MbnData(0x4A240000, 6, SwId.aboot),
@@ -100,6 +101,9 @@ parser = argparse.ArgumentParser(
"""
)
parser.register("type", "hex", lambda s: int(s, 16))
+parser.add_argument(
+ "-l", "--load", type=lambda x: int(x, 0), default=0, help="Load address"
+)
parser.add_argument(
"-o", "--output", type=Path, default="u-boot.mbn", help="Output file"
)
@@ -149,8 +153,18 @@ if not mbn:
args.output.unlink(missing_ok=True)
exit(1)
+if args.load == 0:
+ error(
+ "Cannot proceed without load address.\n"
+ "Ensure CONFIG_TEXT_BASE/CONFIG_SPL_TEXT_BASE is set\n")
+ exit(1)
+else:
+ mbn.loadaddr = args.load
+
log(f"Detected board {match.decode('UTF-8')} with load address {mbn.loadaddr:#x}")
+data += b'\x00' * (-len(data) % MBN_ALIGN_SIZE)
+
elf.phdrs.append(Phdr.from_bin(data, mbn.loadaddr))
elf.ehdr.e_entry = mbn.loadaddr
elf.update()
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/4] tools: qcom: mkmbn: Add support to create multi-elf
2026-09-10 10:29 [PATCH v2 0/4] tools: qcom: mkmbn: Updates to support ipq5210 Varadarajan Narayanan
` (2 preceding siblings ...)
2026-09-10 10:29 ` [PATCH v2 3/4] tools: qcom: mkmbn: Add support for ipq5210 Varadarajan Narayanan
@ 2026-09-10 10:29 ` Varadarajan Narayanan
2026-09-11 5:37 ` Balaji Selvanathan
3 siblings, 1 reply; 8+ messages in thread
From: Varadarajan Narayanan @ 2026-09-10 10:29 UTC (permalink / raw)
To: Sumit Garg, u-boot-qcom, u-boot
Cc: Casey Connolly, Neil Armstrong, Tom Rini, Varadarajan Narayanan,
Balaji Selvanathan
Add a command line argument to take a list of files to be combined to create a
multi-elf expected by the boot rom.
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
---
tools/qcom/mkmbn/mkmbn.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tools/qcom/mkmbn/mkmbn.py b/tools/qcom/mkmbn/mkmbn.py
index 6fe66fc4e55..6b0ea3a4239 100755
--- a/tools/qcom/mkmbn/mkmbn.py
+++ b/tools/qcom/mkmbn/mkmbn.py
@@ -104,6 +104,9 @@ parser.register("type", "hex", lambda s: int(s, 16))
parser.add_argument(
"-l", "--load", type=lambda x: int(x, 0), default=0, help="Load address"
)
+parser.add_argument(
+ "-m", "--melfs", nargs='+', default=[], help="List of ELFs to include in multi-elf"
+)
parser.add_argument(
"-o", "--output", type=Path, default="u-boot.mbn", help="Output file"
)
@@ -116,6 +119,18 @@ parser.add_argument(
args = parser.parse_args()
verbose = args.verbose
+if (len(args.melfs)):
+ try:
+ with open(args.output, "wb") as f:
+ for path in args.melfs:
+ with open(path, 'rb') as tmp:
+ f.write(tmp.read())
+ except Exception as e:
+ print(f"Error: {e}")
+ sys.exit(1)
+
+ sys.exit(0)
+
elf = Elf()
data: bytes = args.bin.read()
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/4] configs: add qcom_sm8550_defconfig and debug fragment
2026-09-10 10:29 ` [PATCH v2 2/4] configs: add qcom_sm8550_defconfig and debug fragment Varadarajan Narayanan
@ 2026-09-10 13:17 ` Casey Connolly
0 siblings, 0 replies; 8+ messages in thread
From: Casey Connolly @ 2026-09-10 13:17 UTC (permalink / raw)
To: Varadarajan Narayanan, Sumit Garg, u-boot-qcom, u-boot
Cc: Neil Armstrong, Tom Rini, Balaji Selvanathan
On 9/10/26 12:29, Varadarajan Narayanan wrote:
> Add a defconfig for running on sm5650 as the first stage bootloader and
> associated debug config fragment.
>
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
> ---
> configs/qcom_sm8550_defconfig | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/configs/qcom_sm8550_defconfig b/configs/qcom_sm8550_defconfig
> new file mode 100644
> index 00000000000..30d11f36eb3
> --- /dev/null
> +++ b/configs/qcom_sm8550_defconfig
> @@ -0,0 +1,15 @@
> +# Configuration for building U-Boot to be flashed
> +# to the uefi partition of QCM6490 dev boards with
> +# the "Linux Embedded" partition layout (which have
> +# a dedicated "uefi" partition for edk2/U-Boot)
> +
> +#include "qcom_defconfig"
> +
> +# Otherwise buildman thinks this isn't an ARM platform
> +CONFIG_ARM=y
> +
> +# Address where U-Boot will be loaded
> +CONFIG_TEXT_BASE=0xa7000000
> +CONFIG_REMAKE_ELF=y
CONFIG_QCOM_GENERATE_MBN??> +
> +CONFIG_DEFAULT_DEVICE_TREE="qcom/sm8550-hdk"
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/4] tools: qcom: mkmbn: Add support for ipq5210
2026-09-10 10:29 ` [PATCH v2 3/4] tools: qcom: mkmbn: Add support for ipq5210 Varadarajan Narayanan
@ 2026-09-11 4:59 ` Balaji Selvanathan
0 siblings, 0 replies; 8+ messages in thread
From: Balaji Selvanathan @ 2026-09-11 4:59 UTC (permalink / raw)
To: Varadarajan Narayanan, Sumit Garg, u-boot-qcom, u-boot
Cc: Casey Connolly, Neil Armstrong, Tom Rini
Hi Varadarajan,
On 9/10/2026 3:59 PM, Varadarajan Narayanan wrote:
> - Add ipq5210 entry to the 'boards' table
> - Add an argument to specify the SPL load address
> - ipq5210's boot rom expects the SPL image size to be 4-byte aligned. To
> support this add an argument to specify the image size alignment to
> enable the mkmbn script to pad the image accordingly.
>
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
> ---
> board/qualcomm/config.mk | 2 +-
> tools/qcom/mkmbn/mkmbn.py | 34 ++++++++++++++++++++++++----------
> 2 files changed, 25 insertions(+), 11 deletions(-)
>
> diff --git a/board/qualcomm/config.mk b/board/qualcomm/config.mk
> index 769e4a51ca0..dd61ffd98e8 100644
> --- a/board/qualcomm/config.mk
> +++ b/board/qualcomm/config.mk
> @@ -8,7 +8,7 @@
> # Create Qualcomm signed elf images
> CMD_MKMBN = $(srctree)/tools/qcom/mkmbn/mkmbn.py
> quiet_cmd_mkmbn = MBN $@
> - cmd_mkmbn = $(CMD_MKMBN) $<
> + cmd_mkmbn = $(CMD_MKMBN) -l $(CONFIG_TEXT_BASE) $<
>
> u-boot.mbn: u-boot.bin FORCE
> $(call if_changed,mkmbn)
> diff --git a/tools/qcom/mkmbn/mkmbn.py b/tools/qcom/mkmbn/mkmbn.py
> index 8d2078acc30..6fe66fc4e55 100755
> --- a/tools/qcom/mkmbn/mkmbn.py
> +++ b/tools/qcom/mkmbn/mkmbn.py
> @@ -18,6 +18,8 @@ import sys
> from enum import Enum
> import struct
>
> +MBN_ALIGN_SIZE = 4096
> +
> verbose = False
>
> def log(*args, **kwargs):
> @@ -63,19 +65,17 @@ class MbnData:
>
>
> """
> -This dictionary is used to map a board or platform to the appropriate load address and
> -other MBN metadata. When adding support for a new platform to U-Boot, the appropriate
> -data should be filled out here. The load address can typically be determined by looking
> -at the uefi.elf or xbl.elf for the platform. For the uefi.elf it is the load address, and
> -for xbl.elf it is typically the RWX section in the middle, just BEFORE the section loaded
> -at 0x1495xxxx or similar. Looking at similar platforms in the table below may help.
> +This dictionary is used to map a board or platform to the appropriate MBN
> +metadata. When adding support for a new platform to U-Boot, the appropriate data
> +should be filled out here. Looking at similar platforms in the table below may
> +help.
> """
> boards: dict[bytes, MbnData] = {
> # Exact matches for boards, these are preferred
> - b"qcom,qcs6490-rb3gen2\0": MbnData(0x9FC00000, 6, SwId.uefi),
> - b"qcom,qcs9100-ride-r3\0": MbnData(0xAF000000, 6, SwId.uefi), # Dragonwing IQ9
> - b"qcom,qcs8300-ride\0": MbnData(0xAF000000, 6, SwId.uefi), # Dragonwing IQ8
> - b"qcom,qcs615-ride\0": MbnData(0x9FC00000, 6, SwId.uefi), # Dragonwing IQ6
> + b"qcom,qcs6490-rb3gen2\0": MbnData(6, SwId.uefi),
> + b"qcom,qcs9100-ride-r3\0": MbnData(6, SwId.uefi), # Dragonwing IQ9
> + b"qcom,qcs8300-ride\0": MbnData(6, SwId.uefi), # Dragonwing IQ8
> + b"qcom,qcs615-ride\0": MbnData(6, SwId.uefi), # Dragonwing IQ6
> # Fallback/generic matches since most boards for a platform will
> # use the same load address
> b"qcom,qcm6490\0": MbnData(0x9FC00000, 6, SwId.uefi), # rb3gen2, rubikpi3
> @@ -85,6 +85,7 @@ boards: dict[bytes, MbnData] = {
> b"qcom,sm8550\0": MbnData(0xA7000000, 7, SwId.uefi), # C8550
Can't we remove the load address from MbnData for non-IQ targets also?
Pls tell if i miss anything.
Regards,
Balaji
> b"qcom,sm8650\0": MbnData(0xA7000000, 7, SwId.uefi), # SM8650
> b"qcom,qcs615\0": MbnData(0x9FC00000, 6, SwId.uefi), # Dragonwing IQ6
> + b"qcom,ipq5210\0": MbnData(0x87980000, 7, SwId.aboot),
> b"qcom,ipq5424\0": MbnData(0x8a380000, 7, SwId.aboot),
> b"qcom,ipq9574\0": MbnData(0x4A240000, 6, SwId.aboot),
>
> @@ -100,6 +101,9 @@ parser = argparse.ArgumentParser(
> """
> )
> parser.register("type", "hex", lambda s: int(s, 16))
> +parser.add_argument(
> + "-l", "--load", type=lambda x: int(x, 0), default=0, help="Load address"
> +)
> parser.add_argument(
> "-o", "--output", type=Path, default="u-boot.mbn", help="Output file"
> )
> @@ -149,8 +153,18 @@ if not mbn:
> args.output.unlink(missing_ok=True)
> exit(1)
>
> +if args.load == 0:
> + error(
> + "Cannot proceed without load address.\n"
> + "Ensure CONFIG_TEXT_BASE/CONFIG_SPL_TEXT_BASE is set\n")
> + exit(1)
> +else:
> + mbn.loadaddr = args.load
> +
> log(f"Detected board {match.decode('UTF-8')} with load address {mbn.loadaddr:#x}")
>
> +data += b'\x00' * (-len(data) % MBN_ALIGN_SIZE)
> +
> elf.phdrs.append(Phdr.from_bin(data, mbn.loadaddr))
> elf.ehdr.e_entry = mbn.loadaddr
> elf.update()
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 4/4] tools: qcom: mkmbn: Add support to create multi-elf
2026-09-10 10:29 ` [PATCH v2 4/4] tools: qcom: mkmbn: Add support to create multi-elf Varadarajan Narayanan
@ 2026-09-11 5:37 ` Balaji Selvanathan
0 siblings, 0 replies; 8+ messages in thread
From: Balaji Selvanathan @ 2026-09-11 5:37 UTC (permalink / raw)
To: Varadarajan Narayanan, Sumit Garg, u-boot-qcom, u-boot
Cc: Casey Connolly, Neil Armstrong, Tom Rini
Hi Varadarajan,
On 9/10/2026 3:59 PM, Varadarajan Narayanan wrote:
> Add a command line argument to take a list of files to be combined to create a
> multi-elf expected by the boot rom.
>
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
> ---
> tools/qcom/mkmbn/mkmbn.py | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/tools/qcom/mkmbn/mkmbn.py b/tools/qcom/mkmbn/mkmbn.py
> index 6fe66fc4e55..6b0ea3a4239 100755
> --- a/tools/qcom/mkmbn/mkmbn.py
> +++ b/tools/qcom/mkmbn/mkmbn.py
> @@ -104,6 +104,9 @@ parser.register("type", "hex", lambda s: int(s, 16))
> parser.add_argument(
> "-l", "--load", type=lambda x: int(x, 0), default=0, help="Load address"
> )
> +parser.add_argument(
> + "-m", "--melfs", nargs='+', default=[], help="List of ELFs to include in multi-elf"
> +)
In cover letter, in v2 changelog its mentioned: "
Remove '--melfs' option and make them positional
",
but here we are adding it. Request to say if this correct.
Regards,
Balaji
> parser.add_argument(
> "-o", "--output", type=Path, default="u-boot.mbn", help="Output file"
> )
> @@ -116,6 +119,18 @@ parser.add_argument(
> args = parser.parse_args()
> verbose = args.verbose
>
> +if (len(args.melfs)):
> + try:
> + with open(args.output, "wb") as f:
> + for path in args.melfs:
> + with open(path, 'rb') as tmp:
> + f.write(tmp.read())
> + except Exception as e:
> + print(f"Error: {e}")
> + sys.exit(1)
> +
> + sys.exit(0)
> +
> elf = Elf()
>
> data: bytes = args.bin.read()
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-09-11 5:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 10:29 [PATCH v2 0/4] tools: qcom: mkmbn: Updates to support ipq5210 Varadarajan Narayanan
2026-09-10 10:29 ` [PATCH v2 1/4] tools: qcom: mkmbn: Fix ipq5424 MBN version Varadarajan Narayanan
2026-09-10 10:29 ` [PATCH v2 2/4] configs: add qcom_sm8550_defconfig and debug fragment Varadarajan Narayanan
2026-09-10 13:17 ` Casey Connolly
2026-09-10 10:29 ` [PATCH v2 3/4] tools: qcom: mkmbn: Add support for ipq5210 Varadarajan Narayanan
2026-09-11 4:59 ` Balaji Selvanathan
2026-09-10 10:29 ` [PATCH v2 4/4] tools: qcom: mkmbn: Add support to create multi-elf Varadarajan Narayanan
2026-09-11 5:37 ` Balaji Selvanathan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.