From 7481632b192f61b5bcb028c885a460d8b9c2731c Mon Sep 17 00:00:00 2001 From: Piotr Kubik Date: Fri, 24 Nov 2023 17:30:46 +0100 Subject: bootm: Fix flags used for bootargs string substitution Commit 51bb33846ad2 ("bootm: Support string substitution in bootargs") introduced a feature of bootargs string substitution and changed a flag used in bootm_process_cmdline_env() call to be either true or false. With this flag value, condition in bootm_process_cmdline() `if (flags & BOOTM_CL_SUBST)` is never true and process_subst() is never called. Add a simple test to verify if substitution works OK. Signed-off-by: Piotr Kubik Reviewed-by: Simon Glass --- boot/bootm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'boot') diff --git a/boot/bootm.c b/boot/bootm.c index 301cfded05c..4cf66cca0d1 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -1103,7 +1103,11 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc, if (!ret && (states & BOOTM_STATE_OS_BD_T)) ret = boot_fn(BOOTM_STATE_OS_BD_T, argc, argv, images); if (!ret && (states & BOOTM_STATE_OS_PREP)) { - ret = bootm_process_cmdline_env(images->os.os == IH_OS_LINUX); + int flags = 0; + /* For Linux OS do all substitutions at console processing */ + if (images->os.os == IH_OS_LINUX) + flags = BOOTM_CL_ALL; + ret = bootm_process_cmdline_env(flags); if (ret) { printf("Cmdline setup failed (err=%d)\n", ret); ret = CMD_RET_FAILURE; -- cgit v1.3.1 From 4268ef9282c5870aaf45375e3816d0a8c644b214 Mon Sep 17 00:00:00 2001 From: Michael Trimarchi Date: Thu, 7 Dec 2023 15:28:19 +0100 Subject: pxe_utils: Increase feedback to user when fdt file is not found extlinux.conf can set fdtdir. fdtdir look for fdt file using information found in the environment variable. The function does not report any error in the case the file is not found Scanning for bootflows in all bootdevs Seq Method State Uclass Part Name Filename --- ----------- ------ -------- ---- ------------------------ ---------------- Scanning global bootmeth 'efi_mgr': No EFI system partition No EFI system partition Failed to persist EFI variables Scanning bootdev 'mmc@fa10000.bootdev': 0 extlinux ready mmc 1 mmc@fa10000.bootdev.part_ /boot/extlinux/extlinux.conf ** Booting bootflow 'mmc@fa10000.bootdev.part_1' with extlinux 1: am62x-sk-buildroot Retrieving file: /boot/Image append: console=ttyS2,115200n8 root=PARTUUID=c586a30c-0bf1-4323-aba8-779c814ee135 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000 Retrieving file: /boot/k3-am623_ccm_m3.dtb Skipping fdtdir /boot/ for failure retrieving dts Signed-off-by: Michael Trimarchi Reviewed-by: Simon Glass --- boot/pxe_utils.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'boot') diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index a92bb896c63..83bc1677856 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -700,6 +700,11 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) label->name); goto cleanup; } + + if (label->fdtdir) { + printf("Skipping fdtdir %s for failure retrieving dts\n", + label->fdtdir); + } } if (label->kaslrseed) -- cgit v1.3.1