* [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled
@ 2023-12-04 0:31 Simon Glass
2023-12-04 0:31 ` [PATCH 01/14] boot: Reorder FIT and BOOTSTD to be first Simon Glass
` (13 more replies)
0 siblings, 14 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, AKASHI Takahiro, Abdellatif El Khlifi,
Alexey Brodkin, Alexey Brodkin, Angelo Dureghello, Anup Patel,
Bin Meng, Dan Carpenter, Daniel Schwierzeck, Dario Binacchi,
Dmitrii Merkurev, Eddie James, Eric Nelson, Eugeniy Paltsev,
Heiko Schocher, Heinrich Schuchardt, Huan Wang, Ilias Apalodimas,
Kautuk Consul, Leo, Manuel Traut, Marcel Ziswiler, Marek Vasut,
Mattijs Korpershoek, Max Filippov, Michal Simek, Neil Armstrong,
Nobuhiro Iwamatsu, Patrice Chotard, Patrick Delaunay, Peter Hoyes,
Quentin Schulz, Ramon Fried, Rick Chen, Safae Ouajih,
Samuel Holland, Sean Anderson, Sean Edmond, Shiji Yang,
Soeren Moch, Thomas Chou, Tobias Waldekranz, Yu Chien Peter Lin,
uboot-snps-arc
This series is the culmanation of the current line of refactoring
series. It adjusts pxe to call the booting functionality directly
rather than going through the command-line interface.
With this is is possible to boot using the extlinux bootmeth without
the command line enabled.
It also updates fastboot to do a similar thing.
This is cmdf (part f of CMDLINE refactoring)
It depends on dm/cmde-working
which depends on dm/cmdd-working
which depends on dm/bootstda-working
which depends on dm/cmdc-working
Simon Glass (14):
boot: Reorder FIT and BOOTSTD to be first
bootm: Add a Kconfig option for bootm functionality
bootm: Make OS booting dependent on BOOTM
treewide: Make arch-specific bootm code depend on BOOTM
boot: Update SYS_BOOTM_LEN to depend on BOOTM
fastboot: Change fastboot_buf_addr to an address
bootm: Make cmdline optional with bootm_boot_start()
fastboot: Remove dependencies on CMDLINE
pxe: Refactor to reduce the size of label_boot()
pxe: Refactor to avoid over-using bootm_argv
pxe: Move calculation of FDT file into a function
pxe: Allow booting without CMDLINE for bootm methods
pxe: Allow booting without CMDLINE for the zboot method
x86: Drop message about features being missing with 64-bit
arch/arc/lib/Makefile | 2 +-
arch/arm/lib/Makefile | 2 +-
arch/m68k/lib/Makefile | 2 +-
arch/microblaze/lib/Makefile | 2 +-
arch/mips/lib/Makefile | 2 +-
arch/nios2/lib/Makefile | 2 +-
arch/powerpc/lib/Makefile | 2 +-
arch/riscv/lib/Makefile | 2 +-
arch/sandbox/lib/Makefile | 2 +-
arch/sh/lib/Makefile | 2 +-
arch/x86/lib/Makefile | 2 +-
arch/x86/lib/spl.c | 2 +-
arch/xtensa/lib/Makefile | 2 +-
boot/Kconfig | 99 ++++-
boot/Makefile | 2 +-
boot/bootm.c | 10 +-
boot/pxe_utils.c | 361 ++++++++++--------
cmd/Kconfig | 50 +--
cmd/fastboot.c | 2 +-
configs/colibri_vf_defconfig | 2 +-
configs/iot_devkit_defconfig | 2 +-
configs/mx6memcal_defconfig | 2 +-
configs/tools-only_defconfig | 2 +-
configs/xilinx_versal_mini_defconfig | 2 +-
configs/xilinx_versal_mini_emmc0_defconfig | 2 +-
configs/xilinx_versal_mini_emmc1_defconfig | 2 +-
configs/xilinx_versal_mini_ospi_defconfig | 2 +-
configs/xilinx_versal_mini_qspi_defconfig | 2 +-
configs/xilinx_versal_net_mini_defconfig | 2 +-
configs/xilinx_versal_net_mini_emmc_defconfig | 2 +-
configs/xilinx_versal_net_mini_ospi_defconfig | 2 +-
configs/xilinx_versal_net_mini_qspi_defconfig | 2 +-
configs/xilinx_zynqmp_mini_defconfig | 2 +-
configs/xilinx_zynqmp_mini_emmc0_defconfig | 2 +-
configs/xilinx_zynqmp_mini_emmc1_defconfig | 2 +-
configs/xilinx_zynqmp_mini_nand_defconfig | 2 +-
.../xilinx_zynqmp_mini_nand_single_defconfig | 2 +-
configs/xilinx_zynqmp_mini_qspi_defconfig | 2 +-
configs/zynq_cse_nand_defconfig | 2 +-
configs/zynq_cse_nor_defconfig | 2 +-
configs/zynq_cse_qspi_defconfig | 2 +-
doc/board/emulation/qemu-x86.rst | 2 +-
drivers/fastboot/Kconfig | 1 -
drivers/fastboot/fb_command.c | 13 +-
drivers/fastboot/fb_common.c | 37 +-
include/bootm.h | 2 +-
include/fastboot-internal.h | 2 +-
include/fastboot.h | 6 +-
48 files changed, 352 insertions(+), 305 deletions(-)
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 01/14] boot: Reorder FIT and BOOTSTD to be first
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-04 0:31 ` [PATCH 02/14] bootm: Add a Kconfig option for bootm functionality Simon Glass
` (12 subsequent siblings)
13 siblings, 1 reply; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Tom Rini, Simon Glass, Eddie James
The boot menu shows Android first and then a timestamp option. Move
these later since they are less commonly used.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/Kconfig | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/boot/Kconfig b/boot/Kconfig
index b438002059c3..e0098b3f31d7 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -2,24 +2,6 @@ menu "Boot options"
menu "Boot images"
-config ANDROID_BOOT_IMAGE
- bool "Android Boot Images"
- default y if FASTBOOT
- help
- This enables support for booting images which use the Android
- image format header.
-
-config TIMESTAMP
- bool "Show image date and time when displaying image information"
- default y if CMD_DATE
- help
- When CONFIG_TIMESTAMP is selected, the timestamp (date and time) of
- an image is printed by image commands like bootm or iminfo. This
- is shown as 'Timestamp: xxx' and 'Created: xxx'. If this option is
- enabled, then U-Boot requires FITs to have a timestamp. If a FIT is
- loaded that does not, the message 'Wrong FIT format: no timestamp'
- is shown.
-
menuconfig FIT
bool "Flattened Image Tree (FIT)"
select HASH
@@ -695,6 +677,24 @@ config BOOTMETH_SCRIPT
endif # BOOTSTD
+config ANDROID_BOOT_IMAGE
+ bool "Android Boot Images"
+ default y if FASTBOOT
+ help
+ This enables support for booting images which use the Android
+ image format header.
+
+config TIMESTAMP
+ bool "Show image date and time when displaying image information"
+ default y if CMD_DATE
+ help
+ When CONFIG_TIMESTAMP is selected, the timestamp (date and time) of
+ an image is printed by image commands like bootm or iminfo. This
+ is shown as 'Timestamp: xxx' and 'Created: xxx'. If this option is
+ enabled, then U-Boot requires FITs to have a timestamp. If a FIT is
+ loaded that does not, the message 'Wrong FIT format: no timestamp'
+ is shown.
+
config LEGACY_IMAGE_FORMAT
bool "Enable support for the legacy image format"
default y if !FIT_SIGNATURE && !TI_SECURE_DEVICE
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 02/14] bootm: Add a Kconfig option for bootm functionality
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
2023-12-04 0:31 ` [PATCH 01/14] boot: Reorder FIT and BOOTSTD to be first Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-04 0:31 ` [PATCH 03/14] bootm: Make OS booting dependent on BOOTM Simon Glass
` (11 subsequent siblings)
13 siblings, 1 reply; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, AKASHI Takahiro, Abdellatif El Khlifi,
Alexey Brodkin, Bin Meng, Eddie James, Eric Nelson,
Heinrich Schuchardt, Marcel Ziswiler, Michal Simek, Sean Edmond,
Tobias Waldekranz
Create a separate Kconfig option which enables the bootm logic,
separate from the 'bootm' command. This will eventually allow booting
without CMDLINE enabled.
Update boards which disable CMD_BOOTM to disable BOOTM instead, since
CMD_BOOTM now depends on BOOTM
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/Kconfig | 12 ++++++++++++
boot/Makefile | 2 +-
cmd/Kconfig | 1 +
configs/colibri_vf_defconfig | 2 +-
configs/iot_devkit_defconfig | 2 +-
configs/mx6memcal_defconfig | 2 +-
configs/tools-only_defconfig | 2 +-
configs/xilinx_versal_mini_defconfig | 2 +-
configs/xilinx_versal_mini_emmc0_defconfig | 2 +-
configs/xilinx_versal_mini_emmc1_defconfig | 2 +-
configs/xilinx_versal_mini_ospi_defconfig | 2 +-
configs/xilinx_versal_mini_qspi_defconfig | 2 +-
configs/xilinx_versal_net_mini_defconfig | 2 +-
configs/xilinx_versal_net_mini_emmc_defconfig | 2 +-
configs/xilinx_versal_net_mini_ospi_defconfig | 2 +-
configs/xilinx_versal_net_mini_qspi_defconfig | 2 +-
configs/xilinx_zynqmp_mini_defconfig | 2 +-
configs/xilinx_zynqmp_mini_emmc0_defconfig | 2 +-
configs/xilinx_zynqmp_mini_emmc1_defconfig | 2 +-
configs/xilinx_zynqmp_mini_nand_defconfig | 2 +-
configs/xilinx_zynqmp_mini_nand_single_defconfig | 2 +-
configs/xilinx_zynqmp_mini_qspi_defconfig | 2 +-
configs/zynq_cse_nand_defconfig | 2 +-
configs/zynq_cse_nor_defconfig | 2 +-
configs/zynq_cse_qspi_defconfig | 2 +-
25 files changed, 36 insertions(+), 23 deletions(-)
diff --git a/boot/Kconfig b/boot/Kconfig
index e0098b3f31d7..8b32a51f7e7c 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -677,6 +677,18 @@ config BOOTMETH_SCRIPT
endif # BOOTSTD
+config BOOTM
+ bool "Support booting an application image from memory"
+ default y
+ help
+ This is the main boot implementation in U-Boot, supporting a wide
+ variety of features including FIT and legacy-image boot, kernel and
+ FDT selection, setting up of the command line for the OS and many
+ other features.
+
+ This option should normally be enabled. It is used to implement the
+ 'bootm' command.
+
config ANDROID_BOOT_IMAGE
bool "Android Boot Images"
default y if FASTBOOT
diff --git a/boot/Makefile b/boot/Makefile
index de0eafed14b1..a4ea2f9e062f 100644
--- a/boot/Makefile
+++ b/boot/Makefile
@@ -6,7 +6,7 @@
ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_BOOT_RETRY) += bootretry.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o
+obj-$(CONFIG_BOOTM) += bootm.o bootm_os.o
obj-$(CONFIG_CMD_BOOTZ) += bootm.o bootm_os.o
obj-$(CONFIG_CMD_BOOTI) += bootm.o bootm_os.o
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 584ffd039686..74e1950e51fc 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -219,6 +219,7 @@ config CMD_BOOTD
config CMD_BOOTM
bool "bootm"
+ depends on BOOTM
default y
help
Boot an application image from the memory.
diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index 8b2324fd5648..48019f0fa0b8 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -17,6 +17,7 @@ CONFIG_SYS_MEMTEST_END=0x87c00000
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_HAS_BOARD_SIZE_LIMIT=y
CONFIG_BOARD_SIZE_LIMIT=520192
+# CONFIG_BOOTM is not set
CONFIG_BOOTDELAY=1
CONFIG_FDT_FIXUP_PARTITIONS=y
CONFIG_USE_BOOTCOMMAND=y
@@ -33,7 +34,6 @@ CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="Colibri VFxx # "
CONFIG_SYS_PBSIZE=1056
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_IMI is not set
diff --git a/configs/iot_devkit_defconfig b/configs/iot_devkit_defconfig
index 55ced6bc3c32..a09f3ed5f77b 100644
--- a/configs/iot_devkit_defconfig
+++ b/configs/iot_devkit_defconfig
@@ -14,12 +14,12 @@ CONFIG_DEFAULT_DEVICE_TREE="iot_devkit"
CONFIG_SYS_CLK_FREQ=16000000
CONFIG_SYS_LOAD_ADDR=0x30000000
CONFIG_LOCALVERSION="-iotdk-1.0"
+# CONFIG_BOOTM is not set
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_SYS_PROMPT="IoTDK# "
CONFIG_SYS_CBSIZE=256
CONFIG_SYS_PBSIZE=280
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_LOADB is not set
diff --git a/configs/mx6memcal_defconfig b/configs/mx6memcal_defconfig
index 6dd64b6da1ba..6da7a0eaf09c 100644
--- a/configs/mx6memcal_defconfig
+++ b/configs/mx6memcal_defconfig
@@ -14,6 +14,7 @@ CONFIG_SPL_SERIAL=y
CONFIG_SPL=y
CONFIG_SYS_MEMTEST_START=0x10000000
CONFIG_SYS_MEMTEST_END=0x20000000
+# CONFIG_BOOTM is not set
CONFIG_SUPPORT_RAW_INITRD=y
CONFIG_SPL_SYS_MALLOC=y
CONFIG_SPL_WATCHDOG=y
@@ -21,7 +22,6 @@ CONFIG_HUSH_PARSER=y
CONFIG_SYS_MAXARGS=32
CONFIG_SYS_PBSIZE=528
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_XIMG is not set
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index fa1ff4a73f21..fb180f0ebce9 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -12,10 +12,10 @@ CONFIG_FIT_SIGNATURE=y
# CONFIG_BOOTSTD_FULL is not set
# CONFIG_BOOTMETH_CROS is not set
# CONFIG_BOOTMETH_VBE is not set
+# CONFIG_BOOTM is not set
CONFIG_USE_BOOTCOMMAND=y
CONFIG_BOOTCOMMAND="run distro_bootcmd"
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_EXTENSION is not set
# CONFIG_CMD_DATE is not set
diff --git a/configs/xilinx_versal_mini_defconfig b/configs/xilinx_versal_mini_defconfig
index d6d6dc1664a3..6cba3160e389 100644
--- a/configs/xilinx_versal_mini_defconfig
+++ b/configs/xilinx_versal_mini_defconfig
@@ -18,6 +18,7 @@ CONFIG_SYS_MEMTEST_START=0x00000000
CONFIG_SYS_MEMTEST_END=0x00001000
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTM is not set
# CONFIG_LEGACY_IMAGE_FORMAT is not set
# CONFIG_AUTOBOOT is not set
CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -34,7 +35,6 @@ CONFIG_SYS_CBSIZE=1024
CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_versal_mini_emmc0_defconfig b/configs/xilinx_versal_mini_emmc0_defconfig
index 858bb35e00ee..117fc500b103 100644
--- a/configs/xilinx_versal_mini_emmc0_defconfig
+++ b/configs/xilinx_versal_mini_emmc0_defconfig
@@ -15,6 +15,7 @@ CONFIG_DEFAULT_DEVICE_TREE="versal-mini-emmc0"
CONFIG_SYS_LOAD_ADDR=0x8000000
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTM is not set
# CONFIG_AUTOBOOT is not set
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_CPUINFO is not set
@@ -31,7 +32,6 @@ CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_versal_mini_emmc1_defconfig b/configs/xilinx_versal_mini_emmc1_defconfig
index 2488edea41d4..bb7375d2deda 100644
--- a/configs/xilinx_versal_mini_emmc1_defconfig
+++ b/configs/xilinx_versal_mini_emmc1_defconfig
@@ -15,6 +15,7 @@ CONFIG_DEFAULT_DEVICE_TREE="versal-mini-emmc1"
CONFIG_SYS_LOAD_ADDR=0x8000000
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTM is not set
# CONFIG_AUTOBOOT is not set
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_CPUINFO is not set
@@ -31,7 +32,6 @@ CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_versal_mini_ospi_defconfig b/configs/xilinx_versal_mini_ospi_defconfig
index 389ca50703e8..e0e8583bef72 100644
--- a/configs/xilinx_versal_mini_ospi_defconfig
+++ b/configs/xilinx_versal_mini_ospi_defconfig
@@ -18,6 +18,7 @@ CONFIG_VERSAL_NO_DDR=y
CONFIG_SYS_LOAD_ADDR=0x8000000
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTM is not set
# CONFIG_AUTOBOOT is not set
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_CPUINFO is not set
@@ -30,7 +31,6 @@ CONFIG_SYS_PROMPT="Versal> "
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_versal_mini_qspi_defconfig b/configs/xilinx_versal_mini_qspi_defconfig
index 5724aa3040ff..1b2de4358f32 100644
--- a/configs/xilinx_versal_mini_qspi_defconfig
+++ b/configs/xilinx_versal_mini_qspi_defconfig
@@ -16,6 +16,7 @@ CONFIG_VERSAL_NO_DDR=y
CONFIG_SYS_LOAD_ADDR=0x8000000
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTM is not set
# CONFIG_AUTOBOOT is not set
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_LOGLEVEL=0
@@ -31,7 +32,6 @@ CONFIG_SYS_PROMPT="Versal> "
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_versal_net_mini_defconfig b/configs/xilinx_versal_net_mini_defconfig
index 3f45630a11f9..77e6e3e3c316 100644
--- a/configs/xilinx_versal_net_mini_defconfig
+++ b/configs/xilinx_versal_net_mini_defconfig
@@ -20,6 +20,7 @@ CONFIG_SYS_MEMTEST_START=0x00000000
CONFIG_SYS_MEMTEST_END=0x00001000
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTM is not set
# CONFIG_LEGACY_IMAGE_FORMAT is not set
# CONFIG_AUTOBOOT is not set
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
@@ -33,7 +34,6 @@ CONFIG_BOARD_EARLY_INIT_R=y
CONFIG_SYS_PROMPT="Versal NET> "
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_versal_net_mini_emmc_defconfig b/configs/xilinx_versal_net_mini_emmc_defconfig
index 1d79eff33173..da03b9fe4a79 100644
--- a/configs/xilinx_versal_net_mini_emmc_defconfig
+++ b/configs/xilinx_versal_net_mini_emmc_defconfig
@@ -25,7 +25,7 @@ CONFIG_SYS_PROMPT="Versal NET> "
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
+# CONFIG_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_versal_net_mini_ospi_defconfig b/configs/xilinx_versal_net_mini_ospi_defconfig
index 0656b23ae17b..ecd720681944 100644
--- a/configs/xilinx_versal_net_mini_ospi_defconfig
+++ b/configs/xilinx_versal_net_mini_ospi_defconfig
@@ -29,7 +29,7 @@ CONFIG_SYS_PROMPT="Versal NET> "
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
+# CONFIG_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_versal_net_mini_qspi_defconfig b/configs/xilinx_versal_net_mini_qspi_defconfig
index c0e9ba9f76f9..78626f31ccd9 100644
--- a/configs/xilinx_versal_net_mini_qspi_defconfig
+++ b/configs/xilinx_versal_net_mini_qspi_defconfig
@@ -30,7 +30,7 @@ CONFIG_SYS_PROMPT="Versal NET> "
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
+# CONFIG_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_zynqmp_mini_defconfig b/configs/xilinx_zynqmp_mini_defconfig
index fc768b613a25..7a0a9d260b62 100644
--- a/configs/xilinx_zynqmp_mini_defconfig
+++ b/configs/xilinx_zynqmp_mini_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_LOAD_ADDR=0x8000000
CONFIG_SYS_MEMTEST_START=0x00000000
CONFIG_SYS_MEMTEST_END=0x00001000
CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTM is not set
# CONFIG_LEGACY_IMAGE_FORMAT is not set
# CONFIG_AUTOBOOT is not set
# CONFIG_DISPLAY_CPUINFO is not set
@@ -27,7 +28,6 @@ CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_zynqmp_mini_emmc0_defconfig b/configs/xilinx_zynqmp_mini_emmc0_defconfig
index 72b1ad4660ad..a39a29521481 100644
--- a/configs/xilinx_zynqmp_mini_emmc0_defconfig
+++ b/configs/xilinx_zynqmp_mini_emmc0_defconfig
@@ -17,6 +17,7 @@ CONFIG_SYS_LOAD_ADDR=0x8000000
CONFIG_REMAKE_ELF=y
# CONFIG_MP is not set
CONFIG_FIT=y
+# CONFIG_BOOTM is not set
CONFIG_SUPPORT_RAW_INITRD=y
# CONFIG_AUTOBOOT is not set
# CONFIG_DISPLAY_CPUINFO is not set
@@ -38,7 +39,6 @@ CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_zynqmp_mini_emmc1_defconfig b/configs/xilinx_zynqmp_mini_emmc1_defconfig
index 310aad445a55..97e640c20226 100644
--- a/configs/xilinx_zynqmp_mini_emmc1_defconfig
+++ b/configs/xilinx_zynqmp_mini_emmc1_defconfig
@@ -17,6 +17,7 @@ CONFIG_SYS_LOAD_ADDR=0x8000000
CONFIG_REMAKE_ELF=y
# CONFIG_MP is not set
CONFIG_FIT=y
+# CONFIG_BOOTM is not set
CONFIG_SUPPORT_RAW_INITRD=y
# CONFIG_AUTOBOOT is not set
# CONFIG_DISPLAY_CPUINFO is not set
@@ -38,7 +39,6 @@ CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/xilinx_zynqmp_mini_nand_defconfig b/configs/xilinx_zynqmp_mini_nand_defconfig
index ce224f80ecc3..4eeaa98a51bb 100644
--- a/configs/xilinx_zynqmp_mini_nand_defconfig
+++ b/configs/xilinx_zynqmp_mini_nand_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_LOAD_ADDR=0x8000000
CONFIG_REMAKE_ELF=y
# CONFIG_MP is not set
CONFIG_FIT=y
+# CONFIG_BOOTM is not set
CONFIG_SUPPORT_RAW_INITRD=y
# CONFIG_AUTOBOOT is not set
# CONFIG_DISPLAY_CPUINFO is not set
@@ -28,7 +29,6 @@ CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_GO is not set
# CONFIG_CMD_RUN is not set
diff --git a/configs/xilinx_zynqmp_mini_nand_single_defconfig b/configs/xilinx_zynqmp_mini_nand_single_defconfig
index ce23cb1d01e0..1b6262ab55a6 100644
--- a/configs/xilinx_zynqmp_mini_nand_single_defconfig
+++ b/configs/xilinx_zynqmp_mini_nand_single_defconfig
@@ -13,6 +13,7 @@ CONFIG_SYS_LOAD_ADDR=0x8000000
CONFIG_REMAKE_ELF=y
# CONFIG_MP is not set
CONFIG_FIT=y
+# CONFIG_BOOTM is not set
CONFIG_SUPPORT_RAW_INITRD=y
# CONFIG_AUTOBOOT is not set
# CONFIG_DISPLAY_CPUINFO is not set
@@ -28,7 +29,6 @@ CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_GO is not set
# CONFIG_CMD_RUN is not set
diff --git a/configs/xilinx_zynqmp_mini_qspi_defconfig b/configs/xilinx_zynqmp_mini_qspi_defconfig
index b044743474da..6d56c1fae246 100644
--- a/configs/xilinx_zynqmp_mini_qspi_defconfig
+++ b/configs/xilinx_zynqmp_mini_qspi_defconfig
@@ -19,6 +19,7 @@ CONFIG_ZYNQMP_NO_DDR=y
CONFIG_SYS_LOAD_ADDR=0x8000000
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTM is not set
# CONFIG_LEGACY_IMAGE_FORMAT is not set
# CONFIG_AUTOBOOT is not set
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
@@ -42,7 +43,6 @@ CONFIG_SYS_PBSIZE=1049
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
diff --git a/configs/zynq_cse_nand_defconfig b/configs/zynq_cse_nand_defconfig
index 2eb45e1242eb..28e15adc266b 100644
--- a/configs/zynq_cse_nand_defconfig
+++ b/configs/zynq_cse_nand_defconfig
@@ -19,6 +19,7 @@ CONFIG_SYS_LOAD_ADDR=0x0
CONFIG_REMAKE_ELF=y
CONFIG_SYS_CUSTOM_LDSCRIPT=y
CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
+# CONFIG_BOOTM is not set
# CONFIG_AUTOBOOT is not set
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
@@ -43,7 +44,6 @@ CONFIG_SYS_PBSIZE=1047
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
# CONFIG_CMD_GO is not set
diff --git a/configs/zynq_cse_nor_defconfig b/configs/zynq_cse_nor_defconfig
index c5a28f28b9dc..7b2f374d2272 100644
--- a/configs/zynq_cse_nor_defconfig
+++ b/configs/zynq_cse_nor_defconfig
@@ -19,6 +19,7 @@ CONFIG_SYS_LOAD_ADDR=0x0
CONFIG_REMAKE_ELF=y
CONFIG_SYS_CUSTOM_LDSCRIPT=y
CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
+# CONFIG_BOOTM is not set
# CONFIG_AUTOBOOT is not set
CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
@@ -43,7 +44,6 @@ CONFIG_SYS_PBSIZE=1047
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
# CONFIG_CMD_GO is not set
diff --git a/configs/zynq_cse_qspi_defconfig b/configs/zynq_cse_qspi_defconfig
index 9a2770af20ef..7c4452d0b5b8 100644
--- a/configs/zynq_cse_qspi_defconfig
+++ b/configs/zynq_cse_qspi_defconfig
@@ -25,6 +25,7 @@ CONFIG_DEBUG_UART=y
CONFIG_REMAKE_ELF=y
CONFIG_SYS_CUSTOM_LDSCRIPT=y
CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
+# CONFIG_BOOTM is not set
# CONFIG_AUTOBOOT is not set
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_USE_PREBOOT=y
@@ -52,7 +53,6 @@ CONFIG_SYS_PBSIZE=1047
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
# CONFIG_CMD_GO is not set
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 03/14] bootm: Make OS booting dependent on BOOTM
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
2023-12-04 0:31 ` [PATCH 01/14] boot: Reorder FIT and BOOTSTD to be first Simon Glass
2023-12-04 0:31 ` [PATCH 02/14] bootm: Add a Kconfig option for bootm functionality Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-04 0:31 ` [PATCH 04/14] treewide: Make arch-specific bootm code depend " Simon Glass
` (10 subsequent siblings)
13 siblings, 1 reply; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, AKASHI Takahiro, Abdellatif El Khlifi,
Eddie James, Heinrich Schuchardt, Sean Edmond, Tobias Waldekranz
Booting an OS does not require the 'bootm' command, so change the
condition for these options.
Move them into boot/ so they don't depend on CMDLINE
Note that CMD_BOOTM_PRE_LOAD has been put directly into the bootm code
so will need some additional refactoring (and a test!) to allow it to
change over.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/Kconfig | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
cmd/Kconfig | 49 -------------------------------------------------
2 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/boot/Kconfig b/boot/Kconfig
index 8b32a51f7e7c..9fa8789bc2b1 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -689,6 +689,55 @@ config BOOTM
This option should normally be enabled. It is used to implement the
'bootm' command.
+config BOOTM_LINUX
+ bool "Support booting Linux OS images"
+ depends on BOOTM || CMD_BOOTZ || CMD_BOOTI
+ default y
+ help
+ Support booting the Linux kernel directly via a command such as bootm
+ or booti or bootz.
+
+config BOOTM_NETBSD
+ bool "Support booting NetBSD (non-EFI) loader images"
+ depends on BOOTM
+ default y
+ help
+ Support booting NetBSD via the bootm command.
+
+config BOOTM_OPENRTOS
+ bool "Support booting OPENRTOS / FreeRTOS images"
+ depends on BOOTM
+ help
+ Support booting OPENRTOS / FreeRTOS via the bootm command.
+
+config BOOTM_OSE
+ bool "Support booting Enea OSE images"
+ depends on (ARM && (ARM64 || CPU_V7A || CPU_V7R) || SANDBOX || PPC || X86)
+ depends on BOOTM
+ help
+ Support booting Enea OSE images via the bootm command.
+
+config BOOTM_PLAN9
+ bool "Support booting Plan9 OS images"
+ depends on BOOTM
+ default y
+ help
+ Support booting Plan9 images via the bootm command.
+
+config BOOTM_RTEMS
+ bool "Support booting RTEMS OS images"
+ depends on BOOTM
+ default y
+ help
+ Support booting RTEMS images via the bootm command.
+
+config BOOTM_VXWORKS
+ bool "Support booting VxWorks OS images"
+ depends on BOOTM
+ default y
+ help
+ Support booting VxWorks images via the bootm command.
+
config ANDROID_BOOT_IMAGE
bool "Android Boot Images"
default y if FASTBOOT
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 74e1950e51fc..758e817e2eae 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -291,48 +291,6 @@ config CMD_BOOTI
help
Boot an AArch64 Linux Kernel image from memory.
-config BOOTM_LINUX
- bool "Support booting Linux OS images"
- depends on CMD_BOOTM || CMD_BOOTZ || CMD_BOOTI
- default y
- help
- Support booting the Linux kernel directly via a command such as bootm
- or booti or bootz.
-
-config BOOTM_NETBSD
- bool "Support booting NetBSD (non-EFI) loader images"
- depends on CMD_BOOTM
- default y
- help
- Support booting NetBSD via the bootm command.
-
-config BOOTM_OPENRTOS
- bool "Support booting OPENRTOS / FreeRTOS images"
- depends on CMD_BOOTM
- help
- Support booting OPENRTOS / FreeRTOS via the bootm command.
-
-config BOOTM_OSE
- bool "Support booting Enea OSE images"
- depends on (ARM && (ARM64 || CPU_V7A || CPU_V7R) || SANDBOX || PPC || X86)
- depends on CMD_BOOTM
- help
- Support booting Enea OSE images via the bootm command.
-
-config BOOTM_PLAN9
- bool "Support booting Plan9 OS images"
- depends on CMD_BOOTM
- default y
- help
- Support booting Plan9 images via the bootm command.
-
-config BOOTM_RTEMS
- bool "Support booting RTEMS OS images"
- depends on CMD_BOOTM
- default y
- help
- Support booting RTEMS images via the bootm command.
-
config CMD_SEAMA
bool "Support read SEAMA NAND images"
depends on MTD_RAW_NAND
@@ -349,13 +307,6 @@ config CMD_VBE
is used to boot. Updating the parameters is not currently
supported.
-config BOOTM_VXWORKS
- bool "Support booting VxWorks OS images"
- depends on CMD_BOOTM
- default y
- help
- Support booting VxWorks images via the bootm command.
-
config CMD_BOOTEFI
bool "bootefi"
depends on EFI_LOADER
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 04/14] treewide: Make arch-specific bootm code depend on BOOTM
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (2 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 03/14] bootm: Make OS booting dependent on BOOTM Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-23 7:09 ` Angelo Dureghello
2023-12-04 0:31 ` [PATCH 05/14] boot: Update SYS_BOOTM_LEN to " Simon Glass
` (9 subsequent siblings)
13 siblings, 1 reply; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Alexey Brodkin, Angelo Dureghello,
Anup Patel, Bin Meng, Daniel Schwierzeck, Eugeniy Paltsev,
Huan Wang, Kautuk Consul, Leo, Marek Vasut, Max Filippov,
Michal Simek, Nobuhiro Iwamatsu, Rick Chen, Sean Anderson,
Thomas Chou, Yu Chien Peter Lin, uboot-snps-arc
Allow these functions to be compiled in when CONFIG_BOOTM is enabled,
even if CONFIG_CMD_BOOTM is not.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/arc/lib/Makefile | 2 +-
arch/arm/lib/Makefile | 2 +-
arch/m68k/lib/Makefile | 2 +-
arch/microblaze/lib/Makefile | 2 +-
arch/mips/lib/Makefile | 2 +-
arch/nios2/lib/Makefile | 2 +-
arch/powerpc/lib/Makefile | 2 +-
arch/riscv/lib/Makefile | 2 +-
arch/sandbox/lib/Makefile | 2 +-
arch/sh/lib/Makefile | 2 +-
arch/x86/lib/Makefile | 2 +-
arch/xtensa/lib/Makefile | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arc/lib/Makefile b/arch/arc/lib/Makefile
index 0eb44bcf33d0..bde1c3d8af3a 100644
--- a/arch/arc/lib/Makefile
+++ b/arch/arc/lib/Makefile
@@ -12,6 +12,6 @@ obj-y += reset.o
obj-y += ints_low.o
obj-y += init_helpers.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
lib-$(CONFIG_USE_PRIVATE_LIBGCC) += _millicodethunk.o libgcc2.o
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index b1bcd3746625..b20a467f684c 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -31,7 +31,7 @@ endif
obj-$(CONFIG_CPU_V7M) += cmd_boot.o
obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
else
obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile
index 6e1fd938f526..5ccd9545cb5c 100644
--- a/arch/m68k/lib/Makefile
+++ b/arch/m68k/lib/Makefile
@@ -8,7 +8,7 @@
lib-$(CONFIG_USE_PRIVATE_LIBGCC) += lshrdi3.o muldi3.o ashldi3.o ashrdi3.o
obj-y += bdinfo.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-y += cache.o
obj-y += interrupts.o
obj-y += time.o
diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile
index dfd8135f4f25..2f234825f804 100644
--- a/arch/microblaze/lib/Makefile
+++ b/arch/microblaze/lib/Makefile
@@ -3,6 +3,6 @@
# (C) Copyright 2003-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-$(CONFIG_CMD_BDI) += bdinfo.o
obj-y += muldi3.o
diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index 9ee1fcb5c702..f8e162c53b58 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -10,7 +10,7 @@ obj-y += reloc.o
obj-y += stack.o
obj-y += traps.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-$(CONFIG_CMD_GO) += boot.o
obj-$(CONFIG_SPL_BUILD) += spl.o
diff --git a/arch/nios2/lib/Makefile b/arch/nios2/lib/Makefile
index a9f3c7100e72..68a5ca007d55 100644
--- a/arch/nios2/lib/Makefile
+++ b/arch/nios2/lib/Makefile
@@ -4,5 +4,5 @@
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
obj-y += cache.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-y += libgcc.o
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index bb819dcbb6cc..dcce9834927d 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -34,7 +34,7 @@ obj-y += ticks.o
endif
obj-y += reloc.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-y += cache.o
obj-y += extable.o
obj-y += interrupts.o
diff --git a/arch/riscv/lib/Makefile b/arch/riscv/lib/Makefile
index 9a05b662fd63..0b2c88db6bad 100644
--- a/arch/riscv/lib/Makefile
+++ b/arch/riscv/lib/Makefile
@@ -6,7 +6,7 @@
# Copyright (C) 2017 Andes Technology Corporation
# Rick Chen, Andes Technology Corporation <rick@andestech.com>
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
obj-$(CONFIG_CMD_GO) += boot.o
obj-y += cache.o
diff --git a/arch/sandbox/lib/Makefile b/arch/sandbox/lib/Makefile
index a2bc5a7ee60f..c4924b23c832 100644
--- a/arch/sandbox/lib/Makefile
+++ b/arch/sandbox/lib/Makefile
@@ -7,5 +7,5 @@
obj-y += fdt_fixup.o interrupts.o sections.o
obj-$(CONFIG_PCI) += pci_io.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-$(CONFIG_CMD_BOOTZ) += bootm.o
diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
index e7520a328d54..8c3c30293a3c 100644
--- a/arch/sh/lib/Makefile
+++ b/arch/sh/lib/Makefile
@@ -6,7 +6,7 @@
extra-y += start.o
obj-y += board.o
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-y += time.o
obj-$(CONFIG_CMD_SH_ZIMAGEBOOT) += zimageboot.o
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 8fc35e1b51ea..94aa335ede4c 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -16,7 +16,7 @@ obj-$(CONFIG_X86_32BIT_INIT) += string.o
endif
ifndef CONFIG_SPL_BUILD
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
endif
obj-y += cmd_boot.o
obj-$(CONFIG_$(SPL_)COREBOOT_SYSINFO) += coreboot/
diff --git a/arch/xtensa/lib/Makefile b/arch/xtensa/lib/Makefile
index ad4fe32cb699..bb9157f30f0f 100644
--- a/arch/xtensa/lib/Makefile
+++ b/arch/xtensa/lib/Makefile
@@ -3,6 +3,6 @@
# (C) Copyright 2007 - 2013 Tensilica Inc.
# (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
-obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM) += bootm.o
obj-y += cache.o misc.o relocate.o time.o
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 05/14] boot: Update SYS_BOOTM_LEN to depend on BOOTM
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (3 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 04/14] treewide: Make arch-specific bootm code depend " Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-04 0:31 ` [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address Simon Glass
` (8 subsequent siblings)
13 siblings, 0 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List; +Cc: Tom Rini, Simon Glass, Eddie James
Use the new CONFIG_BOOTM symbol to determine whether SYS_BOOT_LEN is
visible or not, since we want to support decompression when CMDLINE is
disabled.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boot/Kconfig b/boot/Kconfig
index 9fa8789bc2b1..d83047acbd0d 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -800,7 +800,7 @@ endif # MEASURED_BOOT
config SYS_BOOTM_LEN
hex "Maximum size of a decompresed OS image"
- depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ || \
+ depends on BOOTM || CMD_BOOTI || CMD_BOOTZ || \
LEGACY_IMAGE_FORMAT || SPL_LEGACY_IMAGE_FORMAT
default 0x4000000 if PPC || ARM64
default 0x1000000 if X86 || ARCH_MX6 || ARCH_MX7
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (4 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 05/14] boot: Update SYS_BOOTM_LEN to " Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-05 3:00 ` Dmitrii Merkurev
2023-12-05 9:16 ` Mattijs Korpershoek
2023-12-04 0:31 ` [PATCH 07/14] bootm: Make cmdline optional with bootm_boot_start() Simon Glass
` (7 subsequent siblings)
13 siblings, 2 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Dmitrii Merkurev, Heiko Schocher,
Marek Vasut, Mattijs Korpershoek, Patrick Delaunay, Ramon Fried,
Samuel Holland, Sean Anderson
Given the name of this variable, it should be an address, not a
pointer. Update this, to make it easier to use with sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
cmd/fastboot.c | 2 +-
drivers/fastboot/fb_command.c | 13 ++++++++-----
drivers/fastboot/fb_common.c | 15 ++++-----------
include/fastboot-internal.h | 2 +-
include/fastboot.h | 6 +++---
5 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index c3c19231c988..792e83d372c3 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -159,7 +159,7 @@ NXTARG:
return CMD_RET_USAGE;
}
- fastboot_init((void *)buf_addr, buf_size);
+ fastboot_init(buf_addr, buf_size);
if (!strcmp(argv[1], "udp"))
return do_fastboot_udp(argc, argv, buf_addr, buf_size);
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 5fcadcdf503d..ec030886dbb8 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -10,6 +10,7 @@
#include <fastboot-internal.h>
#include <fb_mmc.h>
#include <fb_nand.h>
+#include <mapmem.h>
#include <part.h>
#include <stdlib.h>
#include <linux/printk.h>
@@ -252,7 +253,7 @@ void fastboot_data_download(const void *fastboot_data,
return;
}
/* Download data to fastboot_buf_addr */
- memcpy(fastboot_buf_addr + fastboot_bytes_received,
+ memcpy(map_sysmem(fastboot_buf_addr, 0) + fastboot_bytes_received,
fastboot_data, fastboot_data_len);
pre_dot_num = fastboot_bytes_received / BYTES_PER_DOT;
@@ -296,13 +297,15 @@ void fastboot_data_complete(char *response)
*/
static void __maybe_unused flash(char *cmd_parameter, char *response)
{
+ void *buf = map_sysmem(fastboot_buf_addr, 0);
+
if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC))
- fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr,
- image_size, response);
+ fastboot_mmc_flash_write(cmd_parameter, buf, image_size,
+ response);
if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
- fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr,
- image_size, response);
+ fastboot_nand_flash_write(cmd_parameter, buf, image_size,
+ response);
}
/**
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index 3576b0677299..07f5946d9ed1 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -20,7 +20,7 @@
/**
* fastboot_buf_addr - base address of the fastboot download buffer
*/
-void *fastboot_buf_addr;
+ulong fastboot_buf_addr;
/**
* fastboot_buf_size - size of the fastboot download buffer
@@ -154,7 +154,7 @@ void fastboot_boot(void)
};
snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
- "0x%p", fastboot_buf_addr);
+ "%lx", fastboot_buf_addr);
printf("Booting kernel at %s...\n\n\n", boot_addr_start);
do_bootm(NULL, 0, 2, bootm_args);
@@ -214,16 +214,9 @@ void fastboot_set_progress_callback(void (*progress)(const char *msg))
fastboot_progress_callback = progress;
}
-/*
- * fastboot_init() - initialise new fastboot protocol session
- *
- * @buf_addr: Pointer to download buffer, or NULL for default
- * @buf_size: Size of download buffer, or zero for default
- */
-void fastboot_init(void *buf_addr, u32 buf_size)
+void fastboot_init(ulong buf_addr, u32 buf_size)
{
- fastboot_buf_addr = buf_addr ? buf_addr :
- (void *)CONFIG_FASTBOOT_BUF_ADDR;
+ fastboot_buf_addr = buf_addr ? buf_addr : CONFIG_FASTBOOT_BUF_ADDR;
fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
fastboot_set_progress_callback(NULL);
}
diff --git a/include/fastboot-internal.h b/include/fastboot-internal.h
index bf2f2b3c8914..d3e1c106e23f 100644
--- a/include/fastboot-internal.h
+++ b/include/fastboot-internal.h
@@ -6,7 +6,7 @@
/**
* fastboot_buf_addr - base address of the fastboot download buffer
*/
-extern void *fastboot_buf_addr;
+extern ulong fastboot_buf_addr;
/**
* fastboot_buf_size - size of the fastboot download buffer
diff --git a/include/fastboot.h b/include/fastboot.h
index 296451f89d44..744ab61cc18a 100644
--- a/include/fastboot.h
+++ b/include/fastboot.h
@@ -103,13 +103,13 @@ int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason);
*/
void fastboot_set_progress_callback(void (*progress)(const char *msg));
-/*
+/**
* fastboot_init() - initialise new fastboot protocol session
*
- * @buf_addr: Pointer to download buffer, or NULL for default
+ * @buf_addr: Address of download buffer, or 0 for default
* @buf_size: Size of download buffer, or zero for default
*/
-void fastboot_init(void *buf_addr, u32 buf_size);
+void fastboot_init(ulong buf_addr, u32 buf_size);
/**
* fastboot_boot() - Execute fastboot boot command
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 07/14] bootm: Make cmdline optional with bootm_boot_start()
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (5 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-04 0:31 ` [PATCH 08/14] fastboot: Remove dependencies on CMDLINE Simon Glass
` (6 subsequent siblings)
13 siblings, 1 reply; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Eddie James, Ilias Apalodimas,
Mattijs Korpershoek, Safae Ouajih
Allow the default command line to be used when booting the OS. This is
needed by fastboot.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/bootm.c | 10 ++++++----
include/bootm.h | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/boot/bootm.c b/boot/bootm.c
index f630b8c1a9c3..4a5da2a3bebf 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -1187,10 +1187,12 @@ int bootm_boot_start(ulong addr, const char *cmdline)
snprintf(addr_str, sizeof(addr_str), "%lx", addr);
- ret = env_set("bootargs", cmdline);
- if (ret) {
- printf("Failed to set cmdline\n");
- return ret;
+ if (cmdline) {
+ ret = env_set("bootargs", cmdline);
+ if (ret) {
+ printf("Failed to set cmdline\n");
+ return ret;
+ }
}
memset(&bmi, '\0', sizeof(bmi));
bmi.addr_fit = addr_str;
diff --git a/include/bootm.h b/include/bootm.h
index 1800ca32c264..8b0c907497ae 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -286,7 +286,7 @@ void zimage_dump(struct boot_params *base_ptr, bool show_cmdline);
* bootm_boot_start() - Boot an image at the given address
*
* @addr: Image address
- * @cmdline: Command line to set
+ * @cmdline: Command line to set, NULL for default
*/
int bootm_boot_start(ulong addr, const char *cmdline);
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 08/14] fastboot: Remove dependencies on CMDLINE
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (6 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 07/14] bootm: Make cmdline optional with bootm_boot_start() Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-04 10:27 ` Alex Kiernan
2023-12-04 0:31 ` [PATCH 09/14] pxe: Refactor to reduce the size of label_boot() Simon Glass
` (5 subsequent siblings)
13 siblings, 1 reply; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Dmitrii Merkurev, Heiko Schocher,
Mattijs Korpershoek, Patrick Delaunay, Ramon Fried,
Samuel Holland, Sean Anderson
It is possible to boot a kernel without CMDLINE being enabled. Update
the implementation to handle this, and drop the condition from the
FASTBOOT config.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/fastboot/Kconfig | 1 -
drivers/fastboot/fb_common.c | 26 ++++++++++++--------------
2 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
index 11fc0fe1c800..837c6f1180da 100644
--- a/drivers/fastboot/Kconfig
+++ b/drivers/fastboot/Kconfig
@@ -1,5 +1,4 @@
menu "Fastboot support"
- depends on CMDLINE
config FASTBOOT
bool
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index 07f5946d9ed1..85935380e79d 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -11,6 +11,7 @@
*/
#include <bcb.h>
+#include <bootm.h>
#include <common.h>
#include <command.h>
#include <env.h>
@@ -144,20 +145,17 @@ void fastboot_boot(void)
{
char *s;
- s = env_get("fastboot_bootcmd");
- if (s) {
- run_command(s, CMD_FLAG_ENV);
- } else if (IS_ENABLED(CONFIG_CMD_BOOTM)) {
- static char boot_addr_start[20];
- static char *const bootm_args[] = {
- "bootm", boot_addr_start, NULL
- };
-
- snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
- "%lx", fastboot_buf_addr);
- printf("Booting kernel at %s...\n\n\n", boot_addr_start);
-
- do_bootm(NULL, 0, 2, bootm_args);
+ if (IS_ENABLED(CONFIG_CMDLINE)) {
+ s = env_get("fastboot_bootcmd");
+ if (s) {
+ run_command(s, CMD_FLAG_ENV);
+ return;
+ }
+ } else if (IS_ENABLED(CONFIG_BOOTM)) {
+ int ret;
+
+ printf("Booting kernel at %lx...\n\n\n", fastboot_buf_addr);
+ ret = bootm_boot_start(fastboot_buf_addr, NULL);
/*
* This only happens if image is somehow faulty so we start
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 09/14] pxe: Refactor to reduce the size of label_boot()
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (7 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 08/14] fastboot: Remove dependencies on CMDLINE Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-04 0:31 ` [PATCH 10/14] pxe: Refactor to avoid over-using bootm_argv Simon Glass
` (4 subsequent siblings)
13 siblings, 1 reply; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Manuel Traut, Marek Vasut, Neil Armstrong,
Patrick Delaunay
This function is far too long and complicated. Split out the part
which actually calls the boot commands into a separate function.
Change a strncpy() to strlcpy() to keep checkpatch happy.
No functional change is intended.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/pxe_utils.c | 301 +++++++++++++++++++++++++----------------------
1 file changed, 163 insertions(+), 138 deletions(-)
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index a92bb896c63e..6fbccadd99e6 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -470,159 +470,47 @@ skip_overlay:
#endif
/**
- * label_boot() - Boot according to the contents of a pxe_label
+ * label_run_boot() - Run the correct boot procedure
*
- * If we can't boot for any reason, we return. A successful boot never
- * returns.
+ * fdt usage is optional:
+ * It handles the following scenarios.
*
- * The kernel will be stored in the location given by the 'kernel_addr_r'
- * environment variable.
+ * Scenario 1: If fdt_addr_r specified and "fdt" or "fdtdir" label is
+ * defined in pxe file, retrieve fdt blob from server. Pass fdt_addr_r to
+ * bootm, and adjust argc appropriately.
*
- * If the label specifies an initrd file, it will be stored in the location
- * given by the 'ramdisk_addr_r' environment variable.
+ * If retrieve fails and no exact fdt blob is specified in pxe file with
+ * "fdt" label, try Scenario 2.
*
- * If the label specifies an 'append' line, its contents will overwrite that
- * of the 'bootargs' environment variable.
+ * Scenario 2: If there is an fdt_addr specified, pass it along to
+ * bootm, and adjust argc appropriately.
+ *
+ * Scenario 3: If there is an fdtcontroladdr specified, pass it along to
+ * bootm, and adjust argc appropriately, unless the image type is fitImage.
+ *
+ * Scenario 4: fdt blob is not available.
*
* @ctx: PXE context
* @label: Label to process
+ * @kernel_addr: string containing the kernel address / config
+ * @initrd_str: string containing the initrd address / size
+ * @initrd_addr_str: initrd address, or NULL if none
+ * @initrd_filesize: initrd size in bytes; only valid if initrd_addr_str is not
+ * NULL
* Returns does not return on success, otherwise returns 0 if a localboot
* label was processed, or 1 on error
*/
-static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
+static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
+ char *kernel_addr, char *initrd_str,
+ char *initrd_addr_str, char *initrd_filesize)
{
char *bootm_argv[] = { "bootm", NULL, NULL, NULL, NULL };
char *zboot_argv[] = { "zboot", NULL, "0", NULL, NULL };
- char *kernel_addr = NULL;
- char *initrd_addr_str = NULL;
- char initrd_filesize[10];
- char initrd_str[28];
- char mac_str[29] = "";
- char ip_str[68] = "";
- char *fit_addr = NULL;
+ ulong kernel_addr_r;
int bootm_argc = 2;
int zboot_argc = 3;
- int len = 0;
- ulong kernel_addr_r;
void *buf;
- label_print(label);
-
- label->attempted = 1;
-
- if (label->localboot) {
- if (label->localboot_val >= 0)
- label_localboot(label);
- return 0;
- }
-
- if (!label->kernel) {
- printf("No kernel given, skipping %s\n",
- label->name);
- return 1;
- }
-
- if (get_relfile_envaddr(ctx, label->kernel, "kernel_addr_r",
- NULL) < 0) {
- printf("Skipping %s for failure retrieving kernel\n",
- label->name);
- return 1;
- }
-
- kernel_addr = env_get("kernel_addr_r");
- /* for FIT, append the configuration identifier */
- if (label->config) {
- int len = strlen(kernel_addr) + strlen(label->config) + 1;
-
- fit_addr = malloc(len);
- if (!fit_addr) {
- printf("malloc fail (FIT address)\n");
- return 1;
- }
- snprintf(fit_addr, len, "%s%s", kernel_addr, label->config);
- kernel_addr = fit_addr;
- }
-
- /* For FIT, the label can be identical to kernel one */
- if (label->initrd && !strcmp(label->kernel_label, label->initrd)) {
- initrd_addr_str = kernel_addr;
- } else if (label->initrd) {
- ulong size;
- if (get_relfile_envaddr(ctx, label->initrd, "ramdisk_addr_r",
- &size) < 0) {
- printf("Skipping %s for failure retrieving initrd\n",
- label->name);
- goto cleanup;
- }
- strcpy(initrd_filesize, simple_xtoa(size));
- initrd_addr_str = env_get("ramdisk_addr_r");
- size = snprintf(initrd_str, sizeof(initrd_str), "%s:%lx",
- initrd_addr_str, size);
- if (size >= sizeof(initrd_str))
- goto cleanup;
- }
-
- if (label->ipappend & 0x1) {
- sprintf(ip_str, " ip=%s:%s:%s:%s",
- env_get("ipaddr"), env_get("serverip"),
- env_get("gatewayip"), env_get("netmask"));
- }
-
- if (IS_ENABLED(CONFIG_CMD_NET)) {
- if (label->ipappend & 0x2) {
- int err;
-
- strcpy(mac_str, " BOOTIF=");
- err = format_mac_pxe(mac_str + 8, sizeof(mac_str) - 8);
- if (err < 0)
- mac_str[0] = '\0';
- }
- }
-
- if ((label->ipappend & 0x3) || label->append) {
- char bootargs[CONFIG_SYS_CBSIZE] = "";
- char finalbootargs[CONFIG_SYS_CBSIZE];
-
- if (strlen(label->append ?: "") +
- strlen(ip_str) + strlen(mac_str) + 1 > sizeof(bootargs)) {
- printf("bootarg overflow %zd+%zd+%zd+1 > %zd\n",
- strlen(label->append ?: ""),
- strlen(ip_str), strlen(mac_str),
- sizeof(bootargs));
- goto cleanup;
- }
-
- if (label->append)
- strncpy(bootargs, label->append, sizeof(bootargs));
-
- strcat(bootargs, ip_str);
- strcat(bootargs, mac_str);
-
- cli_simple_process_macros(bootargs, finalbootargs,
- sizeof(finalbootargs));
- env_set("bootargs", finalbootargs);
- printf("append: %s\n", finalbootargs);
- }
-
- /*
- * fdt usage is optional:
- * It handles the following scenarios.
- *
- * Scenario 1: If fdt_addr_r specified and "fdt" or "fdtdir" label is
- * defined in pxe file, retrieve fdt blob from server. Pass fdt_addr_r to
- * bootm, and adjust argc appropriately.
- *
- * If retrieve fails and no exact fdt blob is specified in pxe file with
- * "fdt" label, try Scenario 2.
- *
- * Scenario 2: If there is an fdt_addr specified, pass it along to
- * bootm, and adjust argc appropriately.
- *
- * Scenario 3: If there is an fdtcontroladdr specified, pass it along to
- * bootm, and adjust argc appropriately, unless the image type is fitImage.
- *
- * Scenario 4: fdt blob is not available.
- */
bootm_argv[3] = env_get("fdt_addr_r");
/* For FIT, the label can be identical to kernel one */
@@ -637,6 +525,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
fdtfile = label->fdt;
} else if (label->fdtdir) {
char *f1, *f2, *f3, *f4, *slash;
+ int len;
f1 = env_get("fdtfile");
if (f1) {
@@ -679,7 +568,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
fdtfilefree = malloc(len);
if (!fdtfilefree) {
printf("malloc fail (FDT filename)\n");
- goto cleanup;
+ return -ENOMEM;
}
snprintf(fdtfilefree, len, "%s%s%s%s%s%s",
@@ -698,7 +587,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
if (label->fdt) {
printf("Skipping %s for failure retrieving FDT\n",
label->name);
- goto cleanup;
+ return -ENOENT;
}
}
@@ -757,6 +646,142 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
unmap_sysmem(buf);
+ return 0;
+}
+
+/**
+ * label_boot() - Boot according to the contents of a pxe_label
+ *
+ * If we can't boot for any reason, we return. A successful boot never
+ * returns.
+ *
+ * The kernel will be stored in the location given by the 'kernel_addr_r'
+ * environment variable.
+ *
+ * If the label specifies an initrd file, it will be stored in the location
+ * given by the 'ramdisk_addr_r' environment variable.
+ *
+ * If the label specifies an 'append' line, its contents will overwrite that
+ * of the 'bootargs' environment variable.
+ *
+ * @ctx: PXE context
+ * @label: Label to process
+ * Returns does not return on success, otherwise returns 0 if a localboot
+ * label was processed, or 1 on error
+ */
+static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
+{
+ char *kernel_addr = NULL;
+ char *initrd_addr_str = NULL;
+ char initrd_filesize[10];
+ char initrd_str[28];
+ char mac_str[29] = "";
+ char ip_str[68] = "";
+ char *fit_addr = NULL;
+ int ret;
+
+ label_print(label);
+
+ label->attempted = 1;
+
+ if (label->localboot) {
+ if (label->localboot_val >= 0)
+ label_localboot(label);
+ return 0;
+ }
+
+ if (!label->kernel) {
+ printf("No kernel given, skipping %s\n",
+ label->name);
+ return 1;
+ }
+
+ if (get_relfile_envaddr(ctx, label->kernel, "kernel_addr_r",
+ NULL) < 0) {
+ printf("Skipping %s for failure retrieving kernel\n",
+ label->name);
+ return 1;
+ }
+
+ kernel_addr = env_get("kernel_addr_r");
+ /* for FIT, append the configuration identifier */
+ if (label->config) {
+ int len = strlen(kernel_addr) + strlen(label->config) + 1;
+
+ fit_addr = malloc(len);
+ if (!fit_addr) {
+ printf("malloc fail (FIT address)\n");
+ return 1;
+ }
+ snprintf(fit_addr, len, "%s%s", kernel_addr, label->config);
+ kernel_addr = fit_addr;
+ }
+
+ /* For FIT, the label can be identical to kernel one */
+ if (label->initrd && !strcmp(label->kernel_label, label->initrd)) {
+ initrd_addr_str = kernel_addr;
+ } else if (label->initrd) {
+ ulong size;
+
+ if (get_relfile_envaddr(ctx, label->initrd, "ramdisk_addr_r",
+ &size) < 0) {
+ printf("Skipping %s for failure retrieving initrd\n",
+ label->name);
+ goto cleanup;
+ }
+ strcpy(initrd_filesize, simple_xtoa(size));
+ initrd_addr_str = env_get("ramdisk_addr_r");
+ size = snprintf(initrd_str, sizeof(initrd_str), "%s:%lx",
+ initrd_addr_str, size);
+ if (size >= sizeof(initrd_str))
+ goto cleanup;
+ }
+
+ if (label->ipappend & 0x1) {
+ sprintf(ip_str, " ip=%s:%s:%s:%s",
+ env_get("ipaddr"), env_get("serverip"),
+ env_get("gatewayip"), env_get("netmask"));
+ }
+
+ if (IS_ENABLED(CONFIG_CMD_NET)) {
+ if (label->ipappend & 0x2) {
+ int err;
+
+ strcpy(mac_str, " BOOTIF=");
+ err = format_mac_pxe(mac_str + 8, sizeof(mac_str) - 8);
+ if (err < 0)
+ mac_str[0] = '\0';
+ }
+ }
+
+ if ((label->ipappend & 0x3) || label->append) {
+ char bootargs[CONFIG_SYS_CBSIZE] = "";
+ char finalbootargs[CONFIG_SYS_CBSIZE];
+
+ if (strlen(label->append ?: "") +
+ strlen(ip_str) + strlen(mac_str) + 1 > sizeof(bootargs)) {
+ printf("bootarg overflow %zd+%zd+%zd+1 > %zd\n",
+ strlen(label->append ?: ""),
+ strlen(ip_str), strlen(mac_str),
+ sizeof(bootargs));
+ goto cleanup;
+ }
+
+ if (label->append)
+ strlcpy(bootargs, label->append, sizeof(bootargs));
+
+ strcat(bootargs, ip_str);
+ strcat(bootargs, mac_str);
+
+ cli_simple_process_macros(bootargs, finalbootargs,
+ sizeof(finalbootargs));
+ env_set("bootargs", finalbootargs);
+ printf("append: %s\n", finalbootargs);
+ }
+
+ ret = label_run_boot(ctx, label, kernel_addr, initrd_str,
+ initrd_addr_str, initrd_filesize);
+
cleanup:
free(fit_addr);
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 10/14] pxe: Refactor to avoid over-using bootm_argv
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (8 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 09/14] pxe: Refactor to reduce the size of label_boot() Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-04 0:31 ` [PATCH 11/14] pxe: Move calculation of FDT file into a function Simon Glass
` (3 subsequent siblings)
13 siblings, 0 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Dan Carpenter, Manuel Traut, Marek Vasut,
Neil Armstrong, Patrick Delaunay, Sean Edmond
The bootm_argv[3] expression is used in many places. It is the FDT
address, so use that name throughout.
Assign it to bootm_argv[3] only at the end, when all the conditions are
resolved.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/pxe_utils.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 6fbccadd99e6..a6aee68bb797 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -506,18 +506,19 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
{
char *bootm_argv[] = { "bootm", NULL, NULL, NULL, NULL };
char *zboot_argv[] = { "zboot", NULL, "0", NULL, NULL };
+ const char *fdt_addr;
ulong kernel_addr_r;
int bootm_argc = 2;
int zboot_argc = 3;
void *buf;
- bootm_argv[3] = env_get("fdt_addr_r");
+ fdt_addr = env_get("fdt_addr_r");
/* For FIT, the label can be identical to kernel one */
if (label->fdt && !strcmp(label->kernel_label, label->fdt)) {
- bootm_argv[3] = kernel_addr;
+ fdt_addr = kernel_addr;
/* if fdt label is defined then get fdt from server */
- } else if (bootm_argv[3]) {
+ } else if (fdt_addr) {
char *fdtfile = NULL;
char *fdtfilefree = NULL;
@@ -582,7 +583,7 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
free(fdtfilefree);
if (err < 0) {
- bootm_argv[3] = NULL;
+ fdt_addr = NULL;
if (label->fdt) {
printf("Skipping %s for failure retrieving FDT\n",
@@ -599,7 +600,7 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
label_boot_fdtoverlay(ctx, label);
#endif
} else {
- bootm_argv[3] = NULL;
+ fdt_addr = NULL;
}
}
@@ -615,20 +616,21 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
zboot_argc = 5;
}
- if (!bootm_argv[3])
- bootm_argv[3] = env_get("fdt_addr");
+ if (!fdt_addr)
+ fdt_addr = env_get("fdt_addr");
kernel_addr_r = genimg_get_kernel_addr(kernel_addr);
buf = map_sysmem(kernel_addr_r, 0);
- if (!bootm_argv[3] && genimg_get_format(buf) != IMAGE_FORMAT_FIT)
- bootm_argv[3] = env_get("fdtcontroladdr");
+ if (!fdt_addr && genimg_get_format(buf) != IMAGE_FORMAT_FIT)
+ fdt_addr = env_get("fdtcontroladdr");
- if (bootm_argv[3]) {
+ if (fdt_addr) {
if (!bootm_argv[2])
bootm_argv[2] = "-";
bootm_argc = 4;
}
+ bootm_argv[3] = (char *)fdt_addr;
/* Try bootm for legacy and FIT format image */
if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID &&
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 11/14] pxe: Move calculation of FDT file into a function
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (9 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 10/14] pxe: Refactor to avoid over-using bootm_argv Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-04 0:31 ` [PATCH 12/14] pxe: Allow booting without CMDLINE for bootm methods Simon Glass
` (2 subsequent siblings)
13 siblings, 0 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Manuel Traut, Marek Vasut, Neil Armstrong,
Patrick Delaunay, Peter Hoyes
This code undertakes a separate task from the main logic of
label_run_boot() so move it into its own function.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/pxe_utils.c | 112 +++++++++++++++++++++++++++--------------------
1 file changed, 64 insertions(+), 48 deletions(-)
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index a6aee68bb797..a34f4410e07e 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -469,6 +469,68 @@ skip_overlay:
}
#endif
+/**
+ * calc_fdt_fname() - Figure out the filename to use for the FDT
+ *
+ * Determine the path to the FDT filename, based on the "fdtfile" environment
+ * variable. Use <soc>-<board>.dtb as a fallback
+ *
+ * @fdtdir: Directory to use for the FDT file
+ * Return: allocated filename (including directory), or NULL if out of memory
+ */
+static char *calc_fdt_fname(const char *fdtdir)
+{
+ char *fdtfile;
+ char *f1, *f2, *f3, *f4, *slash;
+ int len;
+
+ f1 = env_get("fdtfile");
+ if (f1) {
+ f2 = "";
+ f3 = "";
+ f4 = "";
+ } else {
+ /*
+ * For complex cases where this code doesn't generate the
+ * correct filename, the board code should set $fdtfile during
+ * early boot, or the boot scripts should set $fdtfile before
+ * invoking "pxe" or "sysboot".
+ */
+ f1 = env_get("soc");
+ f2 = "-";
+ f3 = env_get("board");
+ f4 = ".dtb";
+ if (!f1) {
+ f1 = "";
+ f2 = "";
+ }
+ if (!f3) {
+ f2 = "";
+ f3 = "";
+ }
+ }
+
+ len = strlen(fdtdir);
+ if (!len)
+ slash = "./";
+ else if (fdtdir[len - 1] != '/')
+ slash = "/";
+ else
+ slash = "";
+
+ len = strlen(fdtdir) + strlen(slash) + strlen(f1) + strlen(f2) +
+ strlen(f3) + strlen(f4) + 1;
+ fdtfile = malloc(len);
+ if (!fdtfile) {
+ printf("malloc fail (FDT filename)\n");
+ return NULL;
+ }
+
+ snprintf(fdtfile, len, "%s%s%s%s%s%s", fdtdir, slash, f1, f2, f3, f4);
+
+ return fdtfile;
+}
+
/**
* label_run_boot() - Run the correct boot procedure
*
@@ -525,55 +587,9 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
if (label->fdt) {
fdtfile = label->fdt;
} else if (label->fdtdir) {
- char *f1, *f2, *f3, *f4, *slash;
- int len;
-
- f1 = env_get("fdtfile");
- if (f1) {
- f2 = "";
- f3 = "";
- f4 = "";
- } else {
- /*
- * For complex cases where this code doesn't
- * generate the correct filename, the board
- * code should set $fdtfile during early boot,
- * or the boot scripts should set $fdtfile
- * before invoking "pxe" or "sysboot".
- */
- f1 = env_get("soc");
- f2 = "-";
- f3 = env_get("board");
- f4 = ".dtb";
- if (!f1) {
- f1 = "";
- f2 = "";
- }
- if (!f3) {
- f2 = "";
- f3 = "";
- }
- }
-
- len = strlen(label->fdtdir);
- if (!len)
- slash = "./";
- else if (label->fdtdir[len - 1] != '/')
- slash = "/";
- else
- slash = "";
-
- len = strlen(label->fdtdir) + strlen(slash) +
- strlen(f1) + strlen(f2) + strlen(f3) +
- strlen(f4) + 1;
- fdtfilefree = malloc(len);
- if (!fdtfilefree) {
- printf("malloc fail (FDT filename)\n");
+ fdtfilefree = calc_fdt_fname(label->fdtdir);
+ if (!fdtfilefree)
return -ENOMEM;
- }
-
- snprintf(fdtfilefree, len, "%s%s%s%s%s%s",
- label->fdtdir, slash, f1, f2, f3, f4);
fdtfile = fdtfilefree;
}
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 12/14] pxe: Allow booting without CMDLINE for bootm methods
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (10 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 11/14] pxe: Move calculation of FDT file into a function Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-04 0:31 ` [PATCH 13/14] pxe: Allow booting without CMDLINE for the zboot method Simon Glass
2023-12-04 0:31 ` [PATCH 14/14] x86: Drop message about features being missing with 64-bit Simon Glass
13 siblings, 0 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Dan Carpenter, Marek Vasut, Neil Armstrong,
Patrick Delaunay, Quentin Schulz, Sean Edmond
Use bootm_run() to boot rather than the command line. This allows
extlinux to be used without CMDLINE being enabled.
Collect any error but do not return it, to match the existing code.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/pxe_utils.c | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index a34f4410e07e..322ee93a2804 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <bootm.h>
#include <command.h>
#include <dm.h>
#include <env.h>
@@ -566,13 +567,15 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
char *kernel_addr, char *initrd_str,
char *initrd_addr_str, char *initrd_filesize)
{
- char *bootm_argv[] = { "bootm", NULL, NULL, NULL, NULL };
+ struct bootm_info bmi;
char *zboot_argv[] = { "zboot", NULL, "0", NULL, NULL };
const char *fdt_addr;
ulong kernel_addr_r;
- int bootm_argc = 2;
int zboot_argc = 3;
void *buf;
+ int ret;
+
+ memset(&bmi, '\0', sizeof(struct bootm_info));
fdt_addr = env_get("fdt_addr_r");
@@ -620,12 +623,11 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
}
}
- bootm_argv[1] = kernel_addr;
+ bmi.addr_fit = kernel_addr;
zboot_argv[1] = kernel_addr;
if (initrd_addr_str) {
- bootm_argv[2] = initrd_str;
- bootm_argc = 3;
+ bmi.conf_ramdisk = initrd_str;
zboot_argv[3] = initrd_addr_str;
zboot_argv[4] = initrd_filesize;
@@ -641,23 +643,20 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
if (!fdt_addr && genimg_get_format(buf) != IMAGE_FORMAT_FIT)
fdt_addr = env_get("fdtcontroladdr");
- if (fdt_addr) {
- if (!bootm_argv[2])
- bootm_argv[2] = "-";
- bootm_argc = 4;
- }
- bootm_argv[3] = (char *)fdt_addr;
+ bmi.conf_fdt = fdt_addr;
+ if (IS_ENABLED(CONFIG_BOOTM))
+ bmi.images = &images;
/* Try bootm for legacy and FIT format image */
if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID &&
- IS_ENABLED(CONFIG_CMD_BOOTM))
- do_bootm(ctx->cmdtp, 0, bootm_argc, bootm_argv);
+ IS_ENABLED(CONFIG_BOOTM))
+ ret = bootm_run(&bmi);
/* Try booting an AArch64 Linux kernel image */
- else if (IS_ENABLED(CONFIG_CMD_BOOTI))
- do_booti(ctx->cmdtp, 0, bootm_argc, bootm_argv);
+ else if (IS_ENABLED(CONFIG_BOOTM))
+ ret = booti_run(&bmi);
/* Try booting a Image */
- else if (IS_ENABLED(CONFIG_CMD_BOOTZ))
- do_bootz(ctx->cmdtp, 0, bootm_argc, bootm_argv);
+ else if (IS_ENABLED(CONFIG_BOOTM))
+ ret = bootz_run(&bmi);
/* Try booting an x86_64 Linux kernel image */
else if (IS_ENABLED(CONFIG_CMD_ZBOOT))
do_zboot_parent(ctx->cmdtp, 0, zboot_argc, zboot_argv, NULL);
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 13/14] pxe: Allow booting without CMDLINE for the zboot method
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (11 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 12/14] pxe: Allow booting without CMDLINE for bootm methods Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
2023-12-04 0:31 ` [PATCH 14/14] x86: Drop message about features being missing with 64-bit Simon Glass
13 siblings, 0 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Dan Carpenter, Marek Vasut, Neil Armstrong,
Patrick Delaunay, Ramon Fried, Sean Edmond
Use zboot_run() to boot rather than the command line. This allows
extlinux to be used (on x86) without CMDLINE being enabled.
Collect any error but do not return it, to match the existing code.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
boot/pxe_utils.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 322ee93a2804..2bfd82e68b9b 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -568,10 +568,8 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
char *initrd_addr_str, char *initrd_filesize)
{
struct bootm_info bmi;
- char *zboot_argv[] = { "zboot", NULL, "0", NULL, NULL };
const char *fdt_addr;
ulong kernel_addr_r;
- int zboot_argc = 3;
void *buf;
int ret;
@@ -624,16 +622,10 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
}
bmi.addr_fit = kernel_addr;
- zboot_argv[1] = kernel_addr;
- if (initrd_addr_str) {
+ if (initrd_addr_str)
bmi.conf_ramdisk = initrd_str;
- zboot_argv[3] = initrd_addr_str;
- zboot_argv[4] = initrd_filesize;
- zboot_argc = 5;
- }
-
if (!fdt_addr)
fdt_addr = env_get("fdt_addr");
@@ -658,8 +650,13 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
else if (IS_ENABLED(CONFIG_BOOTM))
ret = bootz_run(&bmi);
/* Try booting an x86_64 Linux kernel image */
- else if (IS_ENABLED(CONFIG_CMD_ZBOOT))
- do_zboot_parent(ctx->cmdtp, 0, zboot_argc, zboot_argv, NULL);
+ else if (IS_ENABLED(CONFIG_ZBOOT))
+ ret = zboot_run(hextoul(kernel_addr, NULL), 0,
+ initrd_addr_str ?
+ hextoul(initrd_addr_str, NULL) : 0,
+ initrd_addr_str ?
+ hextoul(initrd_filesize, NULL) : 0,
+ 0, NULL);
unmap_sysmem(buf);
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 14/14] x86: Drop message about features being missing with 64-bit
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
` (12 preceding siblings ...)
2023-12-04 0:31 ` [PATCH 13/14] pxe: Allow booting without CMDLINE for the zboot method Simon Glass
@ 2023-12-04 0:31 ` Simon Glass
13 siblings, 0 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-04 0:31 UTC (permalink / raw)
To: U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Bin Meng, Dario Binacchi, Patrice Chotard,
Patrick Delaunay, Shiji Yang, Soeren Moch
At this point most things work, including booting a distro, so drop
this message.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/x86/lib/spl.c | 2 +-
doc/board/emulation/qemu-x86.rst | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index c15f11f8cdf4..4e4cf18dec5c 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -283,7 +283,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
{
int ret;
- printf("Jumping to 64-bit U-Boot: Note many features are missing\n");
+ printf("Jumping to 64-bit U-Boot\n");
ret = cpu_jump_to_64bit_uboot(spl_image->entry_point);
debug("ret=%d\n", ret);
hang();
diff --git a/doc/board/emulation/qemu-x86.rst b/doc/board/emulation/qemu-x86.rst
index c604e42990ed..4eeba46ba7a9 100644
--- a/doc/board/emulation/qemu-x86.rst
+++ b/doc/board/emulation/qemu-x86.rst
@@ -134,7 +134,7 @@ The output will be something like this::
U-Boot SPL 2023.07 (Jul 23 2023 - 08:00:12 -0600)
Trying to boot from SPI
- Jumping to 64-bit U-Boot: Note many features are missing
+ Jumping to 64-bit U-Boot
U-Boot 2023.07 (Jul 23 2023 - 08:00:12 -0600)
--
2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: [PATCH 08/14] fastboot: Remove dependencies on CMDLINE
2023-12-04 0:31 ` [PATCH 08/14] fastboot: Remove dependencies on CMDLINE Simon Glass
@ 2023-12-04 10:27 ` Alex Kiernan
2023-12-09 18:20 ` Tom Rini
0 siblings, 1 reply; 29+ messages in thread
From: Alex Kiernan @ 2023-12-04 10:27 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Tom Rini, Dmitrii Merkurev, Heiko Schocher,
Mattijs Korpershoek, Patrick Delaunay, Ramon Fried,
Samuel Holland, Sean Anderson
On Mon, Dec 4, 2023 at 1:31 AM Simon Glass <sjg@chromium.org> wrote:
>
> It is possible to boot a kernel without CMDLINE being enabled. Update
> the implementation to handle this, and drop the condition from the
> FASTBOOT config.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> drivers/fastboot/Kconfig | 1 -
> drivers/fastboot/fb_common.c | 26 ++++++++++++--------------
> 2 files changed, 12 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
> index 11fc0fe1c800..837c6f1180da 100644
> --- a/drivers/fastboot/Kconfig
> +++ b/drivers/fastboot/Kconfig
> @@ -1,5 +1,4 @@
> menu "Fastboot support"
> - depends on CMDLINE
>
> config FASTBOOT
> bool
> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
> index 07f5946d9ed1..85935380e79d 100644
> --- a/drivers/fastboot/fb_common.c
> +++ b/drivers/fastboot/fb_common.c
> @@ -11,6 +11,7 @@
> */
>
> #include <bcb.h>
> +#include <bootm.h>
> #include <common.h>
> #include <command.h>
> #include <env.h>
> @@ -144,20 +145,17 @@ void fastboot_boot(void)
> {
> char *s;
>
> - s = env_get("fastboot_bootcmd");
> - if (s) {
> - run_command(s, CMD_FLAG_ENV);
> - } else if (IS_ENABLED(CONFIG_CMD_BOOTM)) {
> - static char boot_addr_start[20];
> - static char *const bootm_args[] = {
> - "bootm", boot_addr_start, NULL
> - };
> -
> - snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
> - "%lx", fastboot_buf_addr);
> - printf("Booting kernel at %s...\n\n\n", boot_addr_start);
> -
> - do_bootm(NULL, 0, 2, bootm_args);
> + if (IS_ENABLED(CONFIG_CMDLINE)) {
> + s = env_get("fastboot_bootcmd");
> + if (s) {
> + run_command(s, CMD_FLAG_ENV);
> + return;
> + }
> + } else if (IS_ENABLED(CONFIG_BOOTM)) {
> + int ret;
> +
> + printf("Booting kernel at %lx...\n\n\n", fastboot_buf_addr);
> + ret = bootm_boot_start(fastboot_buf_addr, NULL);
>
> /*
> * This only happens if image is somehow faulty so we start
> --
Doesn't this change the logic? Previously if you didn't set
fastboot_bootcmd you'd fall into the bootm path (if CONFIG_BOOTM was
enabled), with this, if CONFIG_CMDLINE is enabled then you will never
hit the bootm path.
--
Alex Kiernan
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address
2023-12-04 0:31 ` [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address Simon Glass
@ 2023-12-05 3:00 ` Dmitrii Merkurev
2023-12-05 9:16 ` Mattijs Korpershoek
1 sibling, 0 replies; 29+ messages in thread
From: Dmitrii Merkurev @ 2023-12-05 3:00 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Tom Rini, Heiko Schocher, Marek Vasut,
Mattijs Korpershoek, Patrick Delaunay, Ramon Fried,
Samuel Holland, Sean Anderson
Verified this change with AOSP u-boot fastboot flashing tests and it works
as expected.
Reviewed-by: Dmitrii Merkurev <dimorinny@google.com>
On Mon, Dec 4, 2023 at 12:32 AM Simon Glass <sjg@chromium.org> wrote:
> Given the name of this variable, it should be an address, not a
> pointer. Update this, to make it easier to use with sandbox.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> cmd/fastboot.c | 2 +-
> drivers/fastboot/fb_command.c | 13 ++++++++-----
> drivers/fastboot/fb_common.c | 15 ++++-----------
> include/fastboot-internal.h | 2 +-
> include/fastboot.h | 6 +++---
> 5 files changed, 17 insertions(+), 21 deletions(-)
>
> diff --git a/cmd/fastboot.c b/cmd/fastboot.c
> index c3c19231c988..792e83d372c3 100644
> --- a/cmd/fastboot.c
> +++ b/cmd/fastboot.c
> @@ -159,7 +159,7 @@ NXTARG:
> return CMD_RET_USAGE;
> }
>
> - fastboot_init((void *)buf_addr, buf_size);
> + fastboot_init(buf_addr, buf_size);
>
> if (!strcmp(argv[1], "udp"))
> return do_fastboot_udp(argc, argv, buf_addr, buf_size);
> diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
> index 5fcadcdf503d..ec030886dbb8 100644
> --- a/drivers/fastboot/fb_command.c
> +++ b/drivers/fastboot/fb_command.c
> @@ -10,6 +10,7 @@
> #include <fastboot-internal.h>
> #include <fb_mmc.h>
> #include <fb_nand.h>
> +#include <mapmem.h>
> #include <part.h>
> #include <stdlib.h>
> #include <linux/printk.h>
> @@ -252,7 +253,7 @@ void fastboot_data_download(const void *fastboot_data,
> return;
> }
> /* Download data to fastboot_buf_addr */
> - memcpy(fastboot_buf_addr + fastboot_bytes_received,
> + memcpy(map_sysmem(fastboot_buf_addr, 0) + fastboot_bytes_received,
> fastboot_data, fastboot_data_len);
>
> pre_dot_num = fastboot_bytes_received / BYTES_PER_DOT;
> @@ -296,13 +297,15 @@ void fastboot_data_complete(char *response)
> */
> static void __maybe_unused flash(char *cmd_parameter, char *response)
> {
> + void *buf = map_sysmem(fastboot_buf_addr, 0);
> +
> if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC))
> - fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr,
> - image_size, response);
> + fastboot_mmc_flash_write(cmd_parameter, buf, image_size,
> + response);
>
> if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
> - fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr,
> - image_size, response);
> + fastboot_nand_flash_write(cmd_parameter, buf, image_size,
> + response);
> }
>
> /**
> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
> index 3576b0677299..07f5946d9ed1 100644
> --- a/drivers/fastboot/fb_common.c
> +++ b/drivers/fastboot/fb_common.c
> @@ -20,7 +20,7 @@
> /**
> * fastboot_buf_addr - base address of the fastboot download buffer
> */
> -void *fastboot_buf_addr;
> +ulong fastboot_buf_addr;
>
> /**
> * fastboot_buf_size - size of the fastboot download buffer
> @@ -154,7 +154,7 @@ void fastboot_boot(void)
> };
>
> snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
> - "0x%p", fastboot_buf_addr);
> + "%lx", fastboot_buf_addr);
> printf("Booting kernel at %s...\n\n\n", boot_addr_start);
>
> do_bootm(NULL, 0, 2, bootm_args);
> @@ -214,16 +214,9 @@ void fastboot_set_progress_callback(void
> (*progress)(const char *msg))
> fastboot_progress_callback = progress;
> }
>
> -/*
> - * fastboot_init() - initialise new fastboot protocol session
> - *
> - * @buf_addr: Pointer to download buffer, or NULL for default
> - * @buf_size: Size of download buffer, or zero for default
> - */
> -void fastboot_init(void *buf_addr, u32 buf_size)
> +void fastboot_init(ulong buf_addr, u32 buf_size)
> {
> - fastboot_buf_addr = buf_addr ? buf_addr :
> - (void *)CONFIG_FASTBOOT_BUF_ADDR;
> + fastboot_buf_addr = buf_addr ? buf_addr : CONFIG_FASTBOOT_BUF_ADDR;
> fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
> fastboot_set_progress_callback(NULL);
> }
> diff --git a/include/fastboot-internal.h b/include/fastboot-internal.h
> index bf2f2b3c8914..d3e1c106e23f 100644
> --- a/include/fastboot-internal.h
> +++ b/include/fastboot-internal.h
> @@ -6,7 +6,7 @@
> /**
> * fastboot_buf_addr - base address of the fastboot download buffer
> */
> -extern void *fastboot_buf_addr;
> +extern ulong fastboot_buf_addr;
>
> /**
> * fastboot_buf_size - size of the fastboot download buffer
> diff --git a/include/fastboot.h b/include/fastboot.h
> index 296451f89d44..744ab61cc18a 100644
> --- a/include/fastboot.h
> +++ b/include/fastboot.h
> @@ -103,13 +103,13 @@ int fastboot_set_reboot_flag(enum
> fastboot_reboot_reason reason);
> */
> void fastboot_set_progress_callback(void (*progress)(const char *msg));
>
> -/*
> +/**
> * fastboot_init() - initialise new fastboot protocol session
> *
> - * @buf_addr: Pointer to download buffer, or NULL for default
> + * @buf_addr: Address of download buffer, or 0 for default
> * @buf_size: Size of download buffer, or zero for default
> */
> -void fastboot_init(void *buf_addr, u32 buf_size);
> +void fastboot_init(ulong buf_addr, u32 buf_size);
>
> /**
> * fastboot_boot() - Execute fastboot boot command
> --
> 2.43.0.rc2.451.g8631bc7472-goog
>
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address
2023-12-04 0:31 ` [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address Simon Glass
2023-12-05 3:00 ` Dmitrii Merkurev
@ 2023-12-05 9:16 ` Mattijs Korpershoek
2023-12-06 3:54 ` Simon Glass
1 sibling, 1 reply; 29+ messages in thread
From: Mattijs Korpershoek @ 2023-12-05 9:16 UTC (permalink / raw)
To: Simon Glass, U-Boot Mailing List
Cc: Tom Rini, Simon Glass, Dmitrii Merkurev, Heiko Schocher,
Marek Vasut, Patrick Delaunay, Ramon Fried, Samuel Holland,
Sean Anderson
Hi Simon,
Thank you for your patch.
On dim., déc. 03, 2023 at 17:31, Simon Glass <sjg@chromium.org> wrote:
> Given the name of this variable, it should be an address, not a
> pointer. Update this, to make it easier to use with sandbox.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Tested that I could reflash AOSP on the Khadas VIM 3 board.
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Some small nit/question below.
> ---
>
> cmd/fastboot.c | 2 +-
> drivers/fastboot/fb_command.c | 13 ++++++++-----
> drivers/fastboot/fb_common.c | 15 ++++-----------
> include/fastboot-internal.h | 2 +-
> include/fastboot.h | 6 +++---
> 5 files changed, 17 insertions(+), 21 deletions(-)
>
> diff --git a/cmd/fastboot.c b/cmd/fastboot.c
> index c3c19231c988..792e83d372c3 100644
> --- a/cmd/fastboot.c
> +++ b/cmd/fastboot.c
> @@ -159,7 +159,7 @@ NXTARG:
> return CMD_RET_USAGE;
> }
>
> - fastboot_init((void *)buf_addr, buf_size);
> + fastboot_init(buf_addr, buf_size);
>
> if (!strcmp(argv[1], "udp"))
> return do_fastboot_udp(argc, argv, buf_addr, buf_size);
> diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
> index 5fcadcdf503d..ec030886dbb8 100644
> --- a/drivers/fastboot/fb_command.c
> +++ b/drivers/fastboot/fb_command.c
> @@ -10,6 +10,7 @@
> #include <fastboot-internal.h>
> #include <fb_mmc.h>
> #include <fb_nand.h>
> +#include <mapmem.h>
> #include <part.h>
> #include <stdlib.h>
> #include <linux/printk.h>
> @@ -252,7 +253,7 @@ void fastboot_data_download(const void *fastboot_data,
> return;
> }
> /* Download data to fastboot_buf_addr */
> - memcpy(fastboot_buf_addr + fastboot_bytes_received,
> + memcpy(map_sysmem(fastboot_buf_addr, 0) + fastboot_bytes_received,
> fastboot_data, fastboot_data_len);
I'm a little confused on why there is no call of unmap_sysmem() here but
that seems to be the case for plenty other callers of map_sysmem().
From what I've seen, in the sandbox unmap_sysmem() is a no-oop, but what
about other architectures ?
>
> pre_dot_num = fastboot_bytes_received / BYTES_PER_DOT;
> @@ -296,13 +297,15 @@ void fastboot_data_complete(char *response)
> */
> static void __maybe_unused flash(char *cmd_parameter, char *response)
> {
> + void *buf = map_sysmem(fastboot_buf_addr, 0);
> +
> if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC))
> - fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr,
> - image_size, response);
> + fastboot_mmc_flash_write(cmd_parameter, buf, image_size,
> + response);
>
> if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
> - fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr,
> - image_size, response);
> + fastboot_nand_flash_write(cmd_parameter, buf, image_size,
> + response);
Same here.
> }
>
> /**
> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
> index 3576b0677299..07f5946d9ed1 100644
> --- a/drivers/fastboot/fb_common.c
> +++ b/drivers/fastboot/fb_common.c
> @@ -20,7 +20,7 @@
> /**
> * fastboot_buf_addr - base address of the fastboot download buffer
> */
> -void *fastboot_buf_addr;
> +ulong fastboot_buf_addr;
>
> /**
> * fastboot_buf_size - size of the fastboot download buffer
> @@ -154,7 +154,7 @@ void fastboot_boot(void)
> };
>
> snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
> - "0x%p", fastboot_buf_addr);
> + "%lx", fastboot_buf_addr);
> printf("Booting kernel at %s...\n\n\n", boot_addr_start);
>
> do_bootm(NULL, 0, 2, bootm_args);
> @@ -214,16 +214,9 @@ void fastboot_set_progress_callback(void (*progress)(const char *msg))
> fastboot_progress_callback = progress;
> }
>
> -/*
> - * fastboot_init() - initialise new fastboot protocol session
> - *
> - * @buf_addr: Pointer to download buffer, or NULL for default
> - * @buf_size: Size of download buffer, or zero for default
> - */
> -void fastboot_init(void *buf_addr, u32 buf_size)
> +void fastboot_init(ulong buf_addr, u32 buf_size)
> {
> - fastboot_buf_addr = buf_addr ? buf_addr :
> - (void *)CONFIG_FASTBOOT_BUF_ADDR;
> + fastboot_buf_addr = buf_addr ? buf_addr : CONFIG_FASTBOOT_BUF_ADDR;
> fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
> fastboot_set_progress_callback(NULL);
> }
> diff --git a/include/fastboot-internal.h b/include/fastboot-internal.h
> index bf2f2b3c8914..d3e1c106e23f 100644
> --- a/include/fastboot-internal.h
> +++ b/include/fastboot-internal.h
> @@ -6,7 +6,7 @@
> /**
> * fastboot_buf_addr - base address of the fastboot download buffer
> */
> -extern void *fastboot_buf_addr;
> +extern ulong fastboot_buf_addr;
>
> /**
> * fastboot_buf_size - size of the fastboot download buffer
> diff --git a/include/fastboot.h b/include/fastboot.h
> index 296451f89d44..744ab61cc18a 100644
> --- a/include/fastboot.h
> +++ b/include/fastboot.h
> @@ -103,13 +103,13 @@ int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason);
> */
> void fastboot_set_progress_callback(void (*progress)(const char *msg));
>
> -/*
> +/**
> * fastboot_init() - initialise new fastboot protocol session
> *
> - * @buf_addr: Pointer to download buffer, or NULL for default
> + * @buf_addr: Address of download buffer, or 0 for default
> * @buf_size: Size of download buffer, or zero for default
> */
> -void fastboot_init(void *buf_addr, u32 buf_size);
> +void fastboot_init(ulong buf_addr, u32 buf_size);
>
> /**
> * fastboot_boot() - Execute fastboot boot command
> --
> 2.43.0.rc2.451.g8631bc7472-goog
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address
2023-12-05 9:16 ` Mattijs Korpershoek
@ 2023-12-06 3:54 ` Simon Glass
2023-12-06 13:25 ` Mattijs Korpershoek
0 siblings, 1 reply; 29+ messages in thread
From: Simon Glass @ 2023-12-06 3:54 UTC (permalink / raw)
To: Mattijs Korpershoek
Cc: U-Boot Mailing List, Tom Rini, Dmitrii Merkurev, Heiko Schocher,
Marek Vasut, Patrick Delaunay, Ramon Fried, Samuel Holland,
Sean Anderson
Hi Mattijs,
On Tue, 5 Dec 2023 at 02:16, Mattijs Korpershoek
<mkorpershoek@baylibre.com> wrote:
>
> Hi Simon,
>
> Thank you for your patch.
>
> On dim., déc. 03, 2023 at 17:31, Simon Glass <sjg@chromium.org> wrote:
>
> > Given the name of this variable, it should be an address, not a
> > pointer. Update this, to make it easier to use with sandbox.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Tested that I could reflash AOSP on the Khadas VIM 3 board.
>
> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3
>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
>
> Some small nit/question below.
>
> > ---
> >
> > cmd/fastboot.c | 2 +-
> > drivers/fastboot/fb_command.c | 13 ++++++++-----
> > drivers/fastboot/fb_common.c | 15 ++++-----------
> > include/fastboot-internal.h | 2 +-
> > include/fastboot.h | 6 +++---
> > 5 files changed, 17 insertions(+), 21 deletions(-)
> >
> > diff --git a/cmd/fastboot.c b/cmd/fastboot.c
> > index c3c19231c988..792e83d372c3 100644
> > --- a/cmd/fastboot.c
> > +++ b/cmd/fastboot.c
> > @@ -159,7 +159,7 @@ NXTARG:
> > return CMD_RET_USAGE;
> > }
> >
> > - fastboot_init((void *)buf_addr, buf_size);
> > + fastboot_init(buf_addr, buf_size);
> >
> > if (!strcmp(argv[1], "udp"))
> > return do_fastboot_udp(argc, argv, buf_addr, buf_size);
> > diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
> > index 5fcadcdf503d..ec030886dbb8 100644
> > --- a/drivers/fastboot/fb_command.c
> > +++ b/drivers/fastboot/fb_command.c
> > @@ -10,6 +10,7 @@
> > #include <fastboot-internal.h>
> > #include <fb_mmc.h>
> > #include <fb_nand.h>
> > +#include <mapmem.h>
> > #include <part.h>
> > #include <stdlib.h>
> > #include <linux/printk.h>
> > @@ -252,7 +253,7 @@ void fastboot_data_download(const void *fastboot_data,
> > return;
> > }
> > /* Download data to fastboot_buf_addr */
> > - memcpy(fastboot_buf_addr + fastboot_bytes_received,
> > + memcpy(map_sysmem(fastboot_buf_addr, 0) + fastboot_bytes_received,
> > fastboot_data, fastboot_data_len);
>
> I'm a little confused on why there is no call of unmap_sysmem() here but
> that seems to be the case for plenty other callers of map_sysmem().
>
> From what I've seen, in the sandbox unmap_sysmem() is a no-oop, but what
> about other architectures ?
Yes it is always a nop. It is designed such that address 0 can be used
as RAM in sandbox.
For PCI the mapping can in fact do something special, so that
memory-mapped peripherals can expose their registers. See
drivers/misc/swap_case.c for an example of that. But we have not ended
up with lots of tests.
>
> >
> > pre_dot_num = fastboot_bytes_received / BYTES_PER_DOT;
> > @@ -296,13 +297,15 @@ void fastboot_data_complete(char *response)
> > */
> > static void __maybe_unused flash(char *cmd_parameter, char *response)
> > {
> > + void *buf = map_sysmem(fastboot_buf_addr, 0);
> > +
> > if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC))
> > - fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr,
> > - image_size, response);
> > + fastboot_mmc_flash_write(cmd_parameter, buf, image_size,
> > + response);
> >
> > if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
> > - fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr,
> > - image_size, response);
> > + fastboot_nand_flash_write(cmd_parameter, buf, image_size,
> > + response);
>
> Same here.
>
> > }
> >
[..]
Regards,
Simon
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address
2023-12-06 3:54 ` Simon Glass
@ 2023-12-06 13:25 ` Mattijs Korpershoek
0 siblings, 0 replies; 29+ messages in thread
From: Mattijs Korpershoek @ 2023-12-06 13:25 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Tom Rini, Dmitrii Merkurev, Heiko Schocher,
Marek Vasut, Patrick Delaunay, Ramon Fried, Samuel Holland,
Sean Anderson
On Tue, Dec 05, 2023 at 20:54, Simon Glass <sjg@chromium.org> wrote:
> Hi Mattijs,
>
> On Tue, 5 Dec 2023 at 02:16, Mattijs Korpershoek
> <mkorpershoek@baylibre.com> wrote:
>>
>> Hi Simon,
>>
>> Thank you for your patch.
>>
>> On dim., déc. 03, 2023 at 17:31, Simon Glass <sjg@chromium.org> wrote:
>>
>> > Given the name of this variable, it should be an address, not a
>> > pointer. Update this, to make it easier to use with sandbox.
>> >
>> > Signed-off-by: Simon Glass <sjg@chromium.org>
>>
>> Tested that I could reflash AOSP on the Khadas VIM 3 board.
>>
>> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3
>>
>> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
>>
>> Some small nit/question below.
>>
>> > ---
>> >
>> > cmd/fastboot.c | 2 +-
>> > drivers/fastboot/fb_command.c | 13 ++++++++-----
>> > drivers/fastboot/fb_common.c | 15 ++++-----------
>> > include/fastboot-internal.h | 2 +-
>> > include/fastboot.h | 6 +++---
>> > 5 files changed, 17 insertions(+), 21 deletions(-)
>> >
>> > diff --git a/cmd/fastboot.c b/cmd/fastboot.c
>> > index c3c19231c988..792e83d372c3 100644
>> > --- a/cmd/fastboot.c
>> > +++ b/cmd/fastboot.c
>> > @@ -159,7 +159,7 @@ NXTARG:
>> > return CMD_RET_USAGE;
>> > }
>> >
>> > - fastboot_init((void *)buf_addr, buf_size);
>> > + fastboot_init(buf_addr, buf_size);
>> >
>> > if (!strcmp(argv[1], "udp"))
>> > return do_fastboot_udp(argc, argv, buf_addr, buf_size);
>> > diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
>> > index 5fcadcdf503d..ec030886dbb8 100644
>> > --- a/drivers/fastboot/fb_command.c
>> > +++ b/drivers/fastboot/fb_command.c
>> > @@ -10,6 +10,7 @@
>> > #include <fastboot-internal.h>
>> > #include <fb_mmc.h>
>> > #include <fb_nand.h>
>> > +#include <mapmem.h>
>> > #include <part.h>
>> > #include <stdlib.h>
>> > #include <linux/printk.h>
>> > @@ -252,7 +253,7 @@ void fastboot_data_download(const void *fastboot_data,
>> > return;
>> > }
>> > /* Download data to fastboot_buf_addr */
>> > - memcpy(fastboot_buf_addr + fastboot_bytes_received,
>> > + memcpy(map_sysmem(fastboot_buf_addr, 0) + fastboot_bytes_received,
>> > fastboot_data, fastboot_data_len);
>>
>> I'm a little confused on why there is no call of unmap_sysmem() here but
>> that seems to be the case for plenty other callers of map_sysmem().
>>
>> From what I've seen, in the sandbox unmap_sysmem() is a no-oop, but what
>> about other architectures ?
>
> Yes it is always a nop. It is designed such that address 0 can be used
> as RAM in sandbox.
>
> For PCI the mapping can in fact do something special, so that
> memory-mapped peripherals can expose their registers. See
> drivers/misc/swap_case.c for an example of that. But we have not ended
> up with lots of tests.
Understood, thank you for clarifying !
>
>>
>> >
>> > pre_dot_num = fastboot_bytes_received / BYTES_PER_DOT;
>> > @@ -296,13 +297,15 @@ void fastboot_data_complete(char *response)
>> > */
>> > static void __maybe_unused flash(char *cmd_parameter, char *response)
>> > {
>> > + void *buf = map_sysmem(fastboot_buf_addr, 0);
>> > +
>> > if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC))
>> > - fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr,
>> > - image_size, response);
>> > + fastboot_mmc_flash_write(cmd_parameter, buf, image_size,
>> > + response);
>> >
>> > if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
>> > - fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr,
>> > - image_size, response);
>> > + fastboot_nand_flash_write(cmd_parameter, buf, image_size,
>> > + response);
>>
>> Same here.
>>
>> > }
>> >
>
> [..]
>
> Regards,
> Simon
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 08/14] fastboot: Remove dependencies on CMDLINE
2023-12-04 10:27 ` Alex Kiernan
@ 2023-12-09 18:20 ` Tom Rini
0 siblings, 0 replies; 29+ messages in thread
From: Tom Rini @ 2023-12-09 18:20 UTC (permalink / raw)
To: Alex Kiernan
Cc: Simon Glass, U-Boot Mailing List, Dmitrii Merkurev,
Heiko Schocher, Mattijs Korpershoek, Patrick Delaunay,
Ramon Fried, Samuel Holland, Sean Anderson
[-- Attachment #1: Type: text/plain, Size: 3302 bytes --]
On Mon, Dec 04, 2023 at 10:27:53AM +0000, Alex Kiernan wrote:
> On Mon, Dec 4, 2023 at 1:31 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > It is possible to boot a kernel without CMDLINE being enabled. Update
> > the implementation to handle this, and drop the condition from the
> > FASTBOOT config.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > drivers/fastboot/Kconfig | 1 -
> > drivers/fastboot/fb_common.c | 26 ++++++++++++--------------
> > 2 files changed, 12 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
> > index 11fc0fe1c800..837c6f1180da 100644
> > --- a/drivers/fastboot/Kconfig
> > +++ b/drivers/fastboot/Kconfig
> > @@ -1,5 +1,4 @@
> > menu "Fastboot support"
> > - depends on CMDLINE
> >
> > config FASTBOOT
> > bool
> > diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
> > index 07f5946d9ed1..85935380e79d 100644
> > --- a/drivers/fastboot/fb_common.c
> > +++ b/drivers/fastboot/fb_common.c
> > @@ -11,6 +11,7 @@
> > */
> >
> > #include <bcb.h>
> > +#include <bootm.h>
> > #include <common.h>
> > #include <command.h>
> > #include <env.h>
> > @@ -144,20 +145,17 @@ void fastboot_boot(void)
> > {
> > char *s;
> >
> > - s = env_get("fastboot_bootcmd");
> > - if (s) {
> > - run_command(s, CMD_FLAG_ENV);
> > - } else if (IS_ENABLED(CONFIG_CMD_BOOTM)) {
> > - static char boot_addr_start[20];
> > - static char *const bootm_args[] = {
> > - "bootm", boot_addr_start, NULL
> > - };
> > -
> > - snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
> > - "%lx", fastboot_buf_addr);
> > - printf("Booting kernel at %s...\n\n\n", boot_addr_start);
> > -
> > - do_bootm(NULL, 0, 2, bootm_args);
> > + if (IS_ENABLED(CONFIG_CMDLINE)) {
> > + s = env_get("fastboot_bootcmd");
> > + if (s) {
> > + run_command(s, CMD_FLAG_ENV);
> > + return;
> > + }
> > + } else if (IS_ENABLED(CONFIG_BOOTM)) {
> > + int ret;
> > +
> > + printf("Booting kernel at %lx...\n\n\n", fastboot_buf_addr);
> > + ret = bootm_boot_start(fastboot_buf_addr, NULL);
> >
> > /*
> > * This only happens if image is somehow faulty so we start
> > --
>
> Doesn't this change the logic? Previously if you didn't set
> fastboot_bootcmd you'd fall into the bootm path (if CONFIG_BOOTM was
> enabled), with this, if CONFIG_CMDLINE is enabled then you will never
> hit the bootm path.
It's a subtle change in logic I think, yes. And also, we should
document (perhaps as a follow-up) what does and doesn't work in fastboot
today that depends on CMDLINE and parsing / executing commands as set in
environment variables. As with this patch yes, fastboot does not require
CMDLINE but it is also not as functional given that as I understand it
anyhow "fastboot_bootcmd" isn't just "bootm ..." but can handle various
state things and LED flashing and so on.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 01/14] boot: Reorder FIT and BOOTSTD to be first
2023-12-04 0:31 ` [PATCH 01/14] boot: Reorder FIT and BOOTSTD to be first Simon Glass
@ 2023-12-09 18:39 ` Tom Rini
2023-12-11 17:52 ` Simon Glass
0 siblings, 1 reply; 29+ messages in thread
From: Tom Rini @ 2023-12-09 18:39 UTC (permalink / raw)
To: Simon Glass; +Cc: U-Boot Mailing List, Eddie James
[-- Attachment #1: Type: text/plain, Size: 459 bytes --]
On Sun, Dec 03, 2023 at 05:31:25PM -0700, Simon Glass wrote:
> The boot menu shows Android first and then a timestamp option. Move
> these later since they are less commonly used.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> boot/Kconfig | 36 ++++++++++++++++++------------------
> 1 file changed, 18 insertions(+), 18 deletions(-)
Meh? Maybe this should be alphabetical instead, and some menu's added as
needed.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 02/14] bootm: Add a Kconfig option for bootm functionality
2023-12-04 0:31 ` [PATCH 02/14] bootm: Add a Kconfig option for bootm functionality Simon Glass
@ 2023-12-09 18:39 ` Tom Rini
2023-12-11 17:52 ` Simon Glass
0 siblings, 1 reply; 29+ messages in thread
From: Tom Rini @ 2023-12-09 18:39 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, AKASHI Takahiro, Abdellatif El Khlifi,
Alexey Brodkin, Bin Meng, Eddie James, Eric Nelson,
Heinrich Schuchardt, Marcel Ziswiler, Michal Simek, Sean Edmond,
Tobias Waldekranz
[-- Attachment #1: Type: text/plain, Size: 651 bytes --]
On Sun, Dec 03, 2023 at 05:31:26PM -0700, Simon Glass wrote:
> Create a separate Kconfig option which enables the bootm logic,
> separate from the 'bootm' command. This will eventually allow booting
> without CMDLINE enabled.
>
> Update boards which disable CMD_BOOTM to disable BOOTM instead, since
> CMD_BOOTM now depends on BOOTM
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
This is fine, to start with. But I wonder if it shouldn't be an
unprompted option and select'd by functionality as needed. That might be
clearer to the user going through menus, but we can see better once the
whole picture is available.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 03/14] bootm: Make OS booting dependent on BOOTM
2023-12-04 0:31 ` [PATCH 03/14] bootm: Make OS booting dependent on BOOTM Simon Glass
@ 2023-12-09 18:39 ` Tom Rini
0 siblings, 0 replies; 29+ messages in thread
From: Tom Rini @ 2023-12-09 18:39 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, AKASHI Takahiro, Abdellatif El Khlifi,
Eddie James, Heinrich Schuchardt, Sean Edmond, Tobias Waldekranz
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
On Sun, Dec 03, 2023 at 05:31:27PM -0700, Simon Glass wrote:
> Booting an OS does not require the 'bootm' command, so change the
> condition for these options.
>
> Move them into boot/ so they don't depend on CMDLINE
>
> Note that CMD_BOOTM_PRE_LOAD has been put directly into the bootm code
> so will need some additional refactoring (and a test!) to allow it to
> change over.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 07/14] bootm: Make cmdline optional with bootm_boot_start()
2023-12-04 0:31 ` [PATCH 07/14] bootm: Make cmdline optional with bootm_boot_start() Simon Glass
@ 2023-12-09 18:39 ` Tom Rini
0 siblings, 0 replies; 29+ messages in thread
From: Tom Rini @ 2023-12-09 18:39 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Eddie James, Ilias Apalodimas,
Mattijs Korpershoek, Safae Ouajih
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
On Sun, Dec 03, 2023 at 05:31:31PM -0700, Simon Glass wrote:
> Allow the default command line to be used when booting the OS. This is
> needed by fastboot.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> boot/bootm.c | 10 ++++++----
> include/bootm.h | 2 +-
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/boot/bootm.c b/boot/bootm.c
> index f630b8c1a9c3..4a5da2a3bebf 100644
> --- a/boot/bootm.c
> +++ b/boot/bootm.c
> @@ -1187,10 +1187,12 @@ int bootm_boot_start(ulong addr, const char *cmdline)
>
> snprintf(addr_str, sizeof(addr_str), "%lx", addr);
>
> - ret = env_set("bootargs", cmdline);
> - if (ret) {
> - printf("Failed to set cmdline\n");
> - return ret;
> + if (cmdline) {
> + ret = env_set("bootargs", cmdline);
> + if (ret) {
> + printf("Failed to set cmdline\n");
> + return ret;
> + }
> }
> memset(&bmi, '\0', sizeof(bmi));
> bmi.addr_fit = addr_str;
env_set handles NULL today. If there's some problem with fastboot with
CMDLINE=n without this patch I worry there's a functional problem being
obscured here. Or it's not a problem at this point in the code to set
bootargs to empty and we need to allow for that in general.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 09/14] pxe: Refactor to reduce the size of label_boot()
2023-12-04 0:31 ` [PATCH 09/14] pxe: Refactor to reduce the size of label_boot() Simon Glass
@ 2023-12-09 18:39 ` Tom Rini
0 siblings, 0 replies; 29+ messages in thread
From: Tom Rini @ 2023-12-09 18:39 UTC (permalink / raw)
To: Simon Glass
Cc: U-Boot Mailing List, Manuel Traut, Marek Vasut, Neil Armstrong,
Patrick Delaunay
[-- Attachment #1: Type: text/plain, Size: 466 bytes --]
On Sun, Dec 03, 2023 at 05:31:33PM -0700, Simon Glass wrote:
> This function is far too long and complicated. Split out the part
> which actually calls the boot commands into a separate function.
>
> Change a strncpy() to strlcpy() to keep checkpatch happy.
>
> No functional change is intended.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Please split strncpy -> strlcpy in to its own patch so it can be
reviewed easily, thanks.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 01/14] boot: Reorder FIT and BOOTSTD to be first
2023-12-09 18:39 ` Tom Rini
@ 2023-12-11 17:52 ` Simon Glass
0 siblings, 0 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-11 17:52 UTC (permalink / raw)
To: Tom Rini; +Cc: U-Boot Mailing List, Eddie James
Hi Tom,
On Sat, 9 Dec 2023 at 11:39, Tom Rini <trini@konsulko.com> wrote:
>
> On Sun, Dec 03, 2023 at 05:31:25PM -0700, Simon Glass wrote:
>
> > The boot menu shows Android first and then a timestamp option. Move
> > these later since they are less commonly used.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > boot/Kconfig | 36 ++++++++++++++++++------------------
> > 1 file changed, 18 insertions(+), 18 deletions(-)
>
> Meh? Maybe this should be alphabetical instead, and some menu's added as
> needed.
I like to see common things first...although I agree if you know
nothing then alpha can be useful.
But when I look at 'make menuconfig' it seems much better with this patch.
Regards,
Simon
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 02/14] bootm: Add a Kconfig option for bootm functionality
2023-12-09 18:39 ` Tom Rini
@ 2023-12-11 17:52 ` Simon Glass
0 siblings, 0 replies; 29+ messages in thread
From: Simon Glass @ 2023-12-11 17:52 UTC (permalink / raw)
To: Tom Rini
Cc: U-Boot Mailing List, AKASHI Takahiro, Abdellatif El Khlifi,
Alexey Brodkin, Bin Meng, Eddie James, Eric Nelson,
Heinrich Schuchardt, Marcel Ziswiler, Michal Simek, Sean Edmond,
Tobias Waldekranz
Hi Tom,
On Sat, 9 Dec 2023 at 11:39, Tom Rini <trini@konsulko.com> wrote:
>
> On Sun, Dec 03, 2023 at 05:31:26PM -0700, Simon Glass wrote:
>
> > Create a separate Kconfig option which enables the bootm logic,
> > separate from the 'bootm' command. This will eventually allow booting
> > without CMDLINE enabled.
> >
> > Update boards which disable CMD_BOOTM to disable BOOTM instead, since
> > CMD_BOOTM now depends on BOOTM
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
>
> This is fine, to start with. But I wonder if it shouldn't be an
> unprompted option and select'd by functionality as needed. That might be
> clearer to the user going through menus, but we can see better once the
> whole picture is available.
Perhaps. As you imply, it will likely become clearer later.
Regards,
Simon
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 04/14] treewide: Make arch-specific bootm code depend on BOOTM
2023-12-04 0:31 ` [PATCH 04/14] treewide: Make arch-specific bootm code depend " Simon Glass
@ 2023-12-23 7:09 ` Angelo Dureghello
0 siblings, 0 replies; 29+ messages in thread
From: Angelo Dureghello @ 2023-12-23 7:09 UTC (permalink / raw)
To: Simon Glass, U-Boot Mailing List; +Cc: Tom Rini
Hi Simon,
Acked-by: Angelo Dureghello <angelo@kernel-space.org>
On 04/12/23 1:31 AM, Simon Glass wrote:
> Allow these functions to be compiled in when CONFIG_BOOTM is enabled,
> even if CONFIG_CMD_BOOTM is not.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> arch/arc/lib/Makefile | 2 +-
> arch/arm/lib/Makefile | 2 +-
> arch/m68k/lib/Makefile | 2 +-
> arch/microblaze/lib/Makefile | 2 +-
> arch/mips/lib/Makefile | 2 +-
> arch/nios2/lib/Makefile | 2 +-
> arch/powerpc/lib/Makefile | 2 +-
> arch/riscv/lib/Makefile | 2 +-
> arch/sandbox/lib/Makefile | 2 +-
> arch/sh/lib/Makefile | 2 +-
> arch/x86/lib/Makefile | 2 +-
> arch/xtensa/lib/Makefile | 2 +-
> 12 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arc/lib/Makefile b/arch/arc/lib/Makefile
> index 0eb44bcf33d0..bde1c3d8af3a 100644
> --- a/arch/arc/lib/Makefile
> +++ b/arch/arc/lib/Makefile
> @@ -12,6 +12,6 @@ obj-y += reset.o
> obj-y += ints_low.o
> obj-y += init_helpers.o
>
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
>
> lib-$(CONFIG_USE_PRIVATE_LIBGCC) += _millicodethunk.o libgcc2.o
> diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
> index b1bcd3746625..b20a467f684c 100644
> --- a/arch/arm/lib/Makefile
> +++ b/arch/arm/lib/Makefile
> @@ -31,7 +31,7 @@ endif
> obj-$(CONFIG_CPU_V7M) += cmd_boot.o
> obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
> obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
> else
> obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
> diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile
> index 6e1fd938f526..5ccd9545cb5c 100644
> --- a/arch/m68k/lib/Makefile
> +++ b/arch/m68k/lib/Makefile
> @@ -8,7 +8,7 @@
> lib-$(CONFIG_USE_PRIVATE_LIBGCC) += lshrdi3.o muldi3.o ashldi3.o ashrdi3.o
>
> obj-y += bdinfo.o
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-y += cache.o
> obj-y += interrupts.o
> obj-y += time.o
> diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile
> index dfd8135f4f25..2f234825f804 100644
> --- a/arch/microblaze/lib/Makefile
> +++ b/arch/microblaze/lib/Makefile
> @@ -3,6 +3,6 @@
> # (C) Copyright 2003-2006
> # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
>
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-$(CONFIG_CMD_BDI) += bdinfo.o
> obj-y += muldi3.o
> diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
> index 9ee1fcb5c702..f8e162c53b58 100644
> --- a/arch/mips/lib/Makefile
> +++ b/arch/mips/lib/Makefile
> @@ -10,7 +10,7 @@ obj-y += reloc.o
> obj-y += stack.o
> obj-y += traps.o
>
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-$(CONFIG_CMD_GO) += boot.o
> obj-$(CONFIG_SPL_BUILD) += spl.o
>
> diff --git a/arch/nios2/lib/Makefile b/arch/nios2/lib/Makefile
> index a9f3c7100e72..68a5ca007d55 100644
> --- a/arch/nios2/lib/Makefile
> +++ b/arch/nios2/lib/Makefile
> @@ -4,5 +4,5 @@
> # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
>
> obj-y += cache.o
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-y += libgcc.o
> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
> index bb819dcbb6cc..dcce9834927d 100644
> --- a/arch/powerpc/lib/Makefile
> +++ b/arch/powerpc/lib/Makefile
> @@ -34,7 +34,7 @@ obj-y += ticks.o
> endif
> obj-y += reloc.o
>
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-y += cache.o
> obj-y += extable.o
> obj-y += interrupts.o
> diff --git a/arch/riscv/lib/Makefile b/arch/riscv/lib/Makefile
> index 9a05b662fd63..0b2c88db6bad 100644
> --- a/arch/riscv/lib/Makefile
> +++ b/arch/riscv/lib/Makefile
> @@ -6,7 +6,7 @@
> # Copyright (C) 2017 Andes Technology Corporation
> # Rick Chen, Andes Technology Corporation <rick@andestech.com>
>
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
> obj-$(CONFIG_CMD_GO) += boot.o
> obj-y += cache.o
> diff --git a/arch/sandbox/lib/Makefile b/arch/sandbox/lib/Makefile
> index a2bc5a7ee60f..c4924b23c832 100644
> --- a/arch/sandbox/lib/Makefile
> +++ b/arch/sandbox/lib/Makefile
> @@ -7,5 +7,5 @@
>
> obj-y += fdt_fixup.o interrupts.o sections.o
> obj-$(CONFIG_PCI) += pci_io.o
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-$(CONFIG_CMD_BOOTZ) += bootm.o
> diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
> index e7520a328d54..8c3c30293a3c 100644
> --- a/arch/sh/lib/Makefile
> +++ b/arch/sh/lib/Makefile
> @@ -6,7 +6,7 @@
> extra-y += start.o
>
> obj-y += board.o
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> obj-y += time.o
> obj-$(CONFIG_CMD_SH_ZIMAGEBOOT) += zimageboot.o
>
> diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
> index 8fc35e1b51ea..94aa335ede4c 100644
> --- a/arch/x86/lib/Makefile
> +++ b/arch/x86/lib/Makefile
> @@ -16,7 +16,7 @@ obj-$(CONFIG_X86_32BIT_INIT) += string.o
> endif
>
> ifndef CONFIG_SPL_BUILD
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
> endif
> obj-y += cmd_boot.o
> obj-$(CONFIG_$(SPL_)COREBOOT_SYSINFO) += coreboot/
> diff --git a/arch/xtensa/lib/Makefile b/arch/xtensa/lib/Makefile
> index ad4fe32cb699..bb9157f30f0f 100644
> --- a/arch/xtensa/lib/Makefile
> +++ b/arch/xtensa/lib/Makefile
> @@ -3,6 +3,6 @@
> # (C) Copyright 2007 - 2013 Tensilica Inc.
> # (C) Copyright 2014 - 2016 Cadence Design Systems Inc.
>
> -obj-$(CONFIG_CMD_BOOTM) += bootm.o
> +obj-$(CONFIG_BOOTM) += bootm.o
>
> obj-y += cache.o misc.o relocate.o time.o
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2023-12-23 7:09 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-04 0:31 [PATCH 00/14] pxe: Allow extlinux booting without CMDLINE enabled Simon Glass
2023-12-04 0:31 ` [PATCH 01/14] boot: Reorder FIT and BOOTSTD to be first Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-11 17:52 ` Simon Glass
2023-12-04 0:31 ` [PATCH 02/14] bootm: Add a Kconfig option for bootm functionality Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-11 17:52 ` Simon Glass
2023-12-04 0:31 ` [PATCH 03/14] bootm: Make OS booting dependent on BOOTM Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-04 0:31 ` [PATCH 04/14] treewide: Make arch-specific bootm code depend " Simon Glass
2023-12-23 7:09 ` Angelo Dureghello
2023-12-04 0:31 ` [PATCH 05/14] boot: Update SYS_BOOTM_LEN to " Simon Glass
2023-12-04 0:31 ` [PATCH 06/14] fastboot: Change fastboot_buf_addr to an address Simon Glass
2023-12-05 3:00 ` Dmitrii Merkurev
2023-12-05 9:16 ` Mattijs Korpershoek
2023-12-06 3:54 ` Simon Glass
2023-12-06 13:25 ` Mattijs Korpershoek
2023-12-04 0:31 ` [PATCH 07/14] bootm: Make cmdline optional with bootm_boot_start() Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-04 0:31 ` [PATCH 08/14] fastboot: Remove dependencies on CMDLINE Simon Glass
2023-12-04 10:27 ` Alex Kiernan
2023-12-09 18:20 ` Tom Rini
2023-12-04 0:31 ` [PATCH 09/14] pxe: Refactor to reduce the size of label_boot() Simon Glass
2023-12-09 18:39 ` Tom Rini
2023-12-04 0:31 ` [PATCH 10/14] pxe: Refactor to avoid over-using bootm_argv Simon Glass
2023-12-04 0:31 ` [PATCH 11/14] pxe: Move calculation of FDT file into a function Simon Glass
2023-12-04 0:31 ` [PATCH 12/14] pxe: Allow booting without CMDLINE for bootm methods Simon Glass
2023-12-04 0:31 ` [PATCH 13/14] pxe: Allow booting without CMDLINE for the zboot method Simon Glass
2023-12-04 0:31 ` [PATCH 14/14] x86: Drop message about features being missing with 64-bit Simon Glass
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.