summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Jörns <ejo@pengutronix.de>2024-11-18 08:40:58 +0100
committerKhem Raj <raj.khem@gmail.com>2025-04-16 08:04:42 -0700
commit24dd46daf8672d814eb4baa8cb1ead547613836c (patch)
treed1f4155786dab50a7491635cfa04afbb3632e28d
parent5bff8f5b3b1103b73a0e775a6c2a71c18339e130 (diff)
downloadmeta-openembedded-24dd46daf8672d814eb4baa8cb1ead547613836c.tar.gz
fitimage.bbclass: error-out for empty configurations
Otherwise mkimage will, but with a way less helpful error message. Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
-rw-r--r--meta-oe/classes/fitimage.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta-oe/classes/fitimage.bbclass b/meta-oe/classes/fitimage.bbclass
index 5d70b1d85b..bc69320552 100644
--- a/meta-oe/classes/fitimage.bbclass
+++ b/meta-oe/classes/fitimage.bbclass
@@ -462,6 +462,7 @@ python write_manifest() {
462 # Step 5: Prepare a configurations section 462 # Step 5: Prepare a configurations section
463 # 463 #
464 fitimage_emit_section_start(d, fd, 'configurations') 464 fitimage_emit_section_start(d, fd, 'configurations')
465 confcount = 0
465 dtbcount = 1 466 dtbcount = 1
466 for dtb in (DTBS or "").split(): 467 for dtb in (DTBS or "").split():
467 import subprocess 468 import subprocess
@@ -474,6 +475,7 @@ python write_manifest() {
474 dtb_path, dtb_file = os.path.split(dtb) 475 dtb_path, dtb_file = os.path.split(dtb)
475 fitimage_emit_section_config(d, fd, dtb_file, kernelcount, ramdiskcount, setupcount, bootscriptid, compatible, dtbcount) 476 fitimage_emit_section_config(d, fd, dtb_file, kernelcount, ramdiskcount, setupcount, bootscriptid, compatible, dtbcount)
476 dtbcount += 1 477 dtbcount += 1
478 confcount += 1
477 for dtb in (DTBOS or "").split(): 479 for dtb in (DTBOS or "").split():
478 import subprocess 480 import subprocess
479 try: 481 try:
@@ -485,8 +487,13 @@ python write_manifest() {
485 487
486 dtb_path, dtb_file = os.path.split(dtb) 488 dtb_path, dtb_file = os.path.split(dtb)
487 fitimage_emit_section_config_fdto(d, fd, dtb_file, compatible) 489 fitimage_emit_section_config_fdto(d, fd, dtb_file, compatible)
490 confcount += 1
488 491
489 fitimage_emit_section_end(d, fd) 492 fitimage_emit_section_end(d, fd)
493
494 if confcount == 0:
495 bb.fatal("Empty 'configurations' node generated! At least one 'fdt' or 'fdto' type is required.")
496
490 fitimage_emit_fit_footer(d, fd) 497 fitimage_emit_fit_footer(d, fd)
491} 498}
492 499