From: Simon Glass <simon.glass@canonical.com> Add a demo-rom binman entry that reuses the rom_common template and packages the demo example binary alongside the device tree and fdtmap, producing a demo.rom that can be run on qemu-x86. Enable CONFIG_EXAMPLES in qemu-x86_defconfig so the demo is built by default. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- arch/x86/dts/u-boot.dtsi | 18 ++++++++++++++++++ configs/qemu-x86_defconfig | 1 + 2 files changed, 19 insertions(+) diff --git a/arch/x86/dts/u-boot.dtsi b/arch/x86/dts/u-boot.dtsi index 630f85db31a..69925c49c49 100644 --- a/arch/x86/dts/u-boot.dtsi +++ b/arch/x86/dts/u-boot.dtsi @@ -195,4 +195,22 @@ }; #endif }; + +#ifdef CONFIG_EXAMPLES +/ { binman { + demo-rom { + filename = "demo.rom"; + insert-template = <&rom_common>; + + blob { + filename = "examples/ulib/demo-nodtb.bin"; + offset = <CONFIG_X86_OFFSET_U_BOOT>; + }; + u-boot-dtb { + }; + fdtmap { + }; + }; +}; }; +#endif #endif diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index 30b69908988..2275ff9de1a 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -14,6 +14,7 @@ CONFIG_SMP=y CONFIG_GENERATE_PIRQ_TABLE=y CONFIG_GENERATE_MP_TABLE=y CONFIG_ULIB=y +CONFIG_EXAMPLES=y CONFIG_FIT=y CONFIG_BOOTSTD_FULL=y CONFIG_BOOTSTAGE=y -- 2.43.0