]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd: spl: Remove ATAG support from this command
authorTom Rini <trini@konsulko.com>
Mon, 15 Sep 2025 19:05:48 +0000 (13:05 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 3 Oct 2025 22:55:44 +0000 (16:55 -0600)
While we continue to have some systems which support extremely legacy
OS booting methods, we do not have use cases for supporting this in
Falcon mode anymore. Remove this support and references from the
documentation.

Co-developed-by: Anshul Dalal <anshuld@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
arch/arm/lib/spl.c
arch/powerpc/lib/spl.c
cmd/spl.c
doc/README.commands.spl
doc/develop/falcon.rst
include/cmd_spl.h

index c43a63f1819e700e2773e648d8fcc7683ca016ae..6c7d1fb5629b19fa900359029ca67cf0177f0995 100644 (file)
@@ -46,8 +46,7 @@ void __weak board_init_f(ulong dummy)
 }
 
 /*
- * This function jumps to an image with argument. Normally an FDT or ATAGS
- * image.
+ * This function jumps to an image with argument, usually an FDT.
  */
 #if CONFIG_IS_ENABLED(OS_BOOT)
 #ifdef CONFIG_ARM64
index 3a24cbfff3bcfed25e601f34686de427fd9241ce..a2bf52c5adcab9defb74fb3aa645af1bfe44bf6b 100644 (file)
@@ -9,8 +9,7 @@
 #include <linux/compiler.h>
 
 /*
- * This function jumps to an image with argument. Normally an FDT or ATAGS
- * image.
+ * This function jumps to an image with argument, usually an FDT.
  */
 #ifdef CONFIG_SPL_OS_BOOT
 void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
index 379b512f1ffd19d57bb6d1bdeff99f0cb42209a2..f591dc07fb66c4689aadcc27f9f245dbc5a49e7b 100644 (file)
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -27,19 +27,6 @@ static const char **subcmd_list[] = {
                "cmdline",
                "bdt",
                "prep",
-#endif
-               NULL,
-       },
-       [SPL_EXPORT_ATAGS] = (const char * []) {
-#ifdef CONFIG_SUPPORT_PASSING_ATAGS
-               "start",
-               "loados",
-#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
-               "ramdisk",
-#endif
-               "cmdline",
-               "bdt",
-               "prep",
 #endif
                NULL,
        },
@@ -96,7 +83,6 @@ static int call_bootm(int argc, char *const argv[], const char *subcommand[])
 
 static struct cmd_tbl cmd_spl_export_sub[] = {
        U_BOOT_CMD_MKENT(fdt, 0, 1, (void *)SPL_EXPORT_FDT, "", ""),
-       U_BOOT_CMD_MKENT(atags, 0, 1, (void *)SPL_EXPORT_ATAGS, "", ""),
 };
 
 static int spl_export(struct cmd_tbl *cmdtp, int flag, int argc,
@@ -128,10 +114,6 @@ static int spl_export(struct cmd_tbl *cmdtp, int flag, int argc,
 #endif
                        break;
 #endif
-               case SPL_EXPORT_ATAGS:
-                       printf("Argument image is now in RAM at: 0x%p\n",
-                               (void *)gd->bd->bi_boot_params);
-                       break;
                }
        } else {
                /* Unrecognized command */
@@ -176,11 +158,10 @@ static int do_spl(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 
 U_BOOT_CMD(
        spl, 6 , 1, do_spl, "SPL configuration",
-       "export <img=atags|fdt> [kernel_addr] [initrd_addr] [fdt_addr]\n"
-       "\timg\t\t\"atags\" or \"fdt\"\n"
+       "export fdt [kernel_addr] [initrd_addr] [fdt_addr]\n"
        "\tkernel_addr\taddress where a kernel image is stored.\n"
        "\t\t\tkernel is loaded as part of the boot process, but it is not started.\n"
        "\tinitrd_addr\taddress of initial ramdisk\n"
        "\t\t\tcan be set to \"-\" if fdt_addr without initrd_addr is used.\n"
-       "\tfdt_addr\tin case of fdt, the address of the device tree.\n"
+       "\tfdt_addr\tthe address of the device tree.\n"
        );
index ecfd3ca9ee589a0f76a15bc580391c2d79c8cf68..54cc5b1ec421b13abada4d3ff712a4e527722432 100644 (file)
@@ -5,24 +5,16 @@ SUBCOMMAND EXPORT
 To execute the command everything has to be in place as if bootm should be
 used. (kernel image, initrd-image, fdt-image etc.)
 
-export has two subcommands:
-       atags: exports the ATAGS
+export has one subcommand:
        fdt: exports the FDT
 
 Call is:
-spl export <fdt|atags> [kernel_addr] [initrd_addr] [fdt_addr if fdt]
+spl export fdt [kernel_addr] [initrd_addr] [fdt_addr if fdt]
 
 
 TYPICAL CALL
 
-on OMAP3:
-nandecc hw
-nand read 0x82000000 0x280000 0x400000 /* Read kernel image from NAND*/
-spl export atags                       /* export ATAGS */
-nand erase 0x680000 0x20000            /* erase - one page */
-nand write 0x80000100 0x680000 0x20000 /* write the image - one page */
-
-call with FDT:
+on OMAP3 with FDT:
 nandecc hw
 nand read 0x82000000 0x280000 0x400000 /* Read kernel image from NAND*/
 tftpboot 0x80000100 devkit8000.dtb /* Read fdt */
index 244b4ccb5c2e4e24f8716deded28946bcc3bb548..5689d5b93a7b171a9a2ece18f3c52713e009eff4 100644 (file)
@@ -22,7 +22,7 @@ copies U-Boot image into the memory.
 
 The Falcon Mode extends this way allowing to start the Linux kernel directly
 from SPL. A new command is added to U-Boot to prepare the parameters that SPL
-must pass to the kernel, using ATAGS or Device Tree.
+must pass to the kernel using a Device Tree.
 
 In normal mode, these parameters are generated each time before
 loading the kernel, passing to Linux the address in memory where
@@ -117,10 +117,7 @@ spl - SPL configuration
 
 Usage::
 
-    spl export <img=atags|fdt> [kernel_addr] [initrd_addr] [fdt_addr ]
-
-img
-    "atags" or "fdt"
+    spl export fdt [kernel_addr] [initrd_addr] [fdt_addr ]
 
 kernel_addr
     kernel is loaded as part of the boot process, but it is not started.
@@ -134,11 +131,11 @@ fdt_addr
     in case of fdt, the address of the device tree.
 
 The *spl export* command does not write to a storage media. The user is
-responsible to transfer the gathered information (assembled ATAGS list
-or prepared FDT) from temporary storage in RAM into persistent storage
-after each run of *spl export*. Unfortunately the position of temporary
-storage can not be predicted nor provided at command line, it depends
-highly on your system setup and your provided data (ATAGS or FDT).
+responsible to transfer the gathered information (prepared FDT) from temporary
+storage in RAM into persistent storage after each run of *spl export*.
+Unfortunately the position of temporary storage can not be predicted nor
+provided at command line, it depends highly on your system setup and your
+provided device tree.
 However at the end of an successful *spl export* run it will print the
 RAM address of temporary storage. The RAM address of FDT will also be
 set in the environment variable *fdtargsaddr*, the new length of the
@@ -152,73 +149,6 @@ to the pre-defined address in persistent storage
 The following example shows how to prepare the data for Falcon Mode on
 twister board with ATAGS BLOB.
 
-The *spl export* command is prepared to work with ATAGS and FDT. However,
-using FDT is at the moment untested. The ppc port (see a3m071 example
-later) prepares the fdt blob with the fdt command instead.
-
-
-Usage on the twister board
---------------------------
-
-Using mtd names with the following (default) configuration
-for mtdparts::
-
-    device nand0 <omap2-nand.0>, # parts = 9
-     #: name        size        offset      mask_flags
-     0: MLO                 0x00080000      0x00000000      0
-     1: u-boot              0x00100000      0x00080000      0
-     2: env1                0x00040000      0x00180000      0
-     3: env2                0x00040000      0x001c0000      0
-     4: kernel              0x00600000      0x00200000      0
-     5: bootparms           0x00040000      0x00800000      0
-     6: splashimg           0x00200000      0x00840000      0
-     7: mini                0x02800000      0x00a40000      0
-     8: rootfs              0x1cdc0000      0x03240000      0
-
-::
-
-    twister => nand read 82000000 kernel
-
-    NAND read: device 0 offset 0x200000, size 0x600000
-    6291456 bytes read: OK
-
-Now the kernel is in RAM at address 0x82000000::
-
-    twister => spl export atags 0x82000000
-    ## Booting kernel from Legacy Image at 82000000 ...
-       Image Name:   Linux-3.5.0-rc4-14089-gda0b7f4
-       Image Type:   ARM Linux Kernel Image (uncompressed)
-       Data Size:    3654808 Bytes = 3.5 MiB
-       Load Address: 80008000
-       Entry Point:  80008000
-       Verifying Checksum ... OK
-       Loading Kernel Image ... OK
-    OK
-    cmdline subcommand not supported
-    bdt subcommand not supported
-    Argument image is now in RAM at: 0x80000100
-
-The result can be checked at address 0x80000100::
-
-    twister => md 0x80000100
-    80000100: 00000005 54410001 00000000 00000000    ......AT........
-    80000110: 00000000 00000067 54410009 746f6f72    ....g.....ATroot
-    80000120: 65642f3d 666e2f76 77722073 73666e20    =/dev/nfs rw nfs
-
-The parameters generated with this step can be saved into NAND at the offset
-0x800000 (value for twister for CONFIG_CMD_SPL_NAND_OFS)::
-
-    nand erase.part bootparms
-    nand write 0x80000100 bootparms 0x4000
-
-Now the parameters are stored into the NAND flash at the address
-CONFIG_CMD_SPL_NAND_OFS (=0x800000).
-
-Next time, the board can be started into Falcon Mode moving the
-setting the GPIO (on twister GPIO 55 is used) to kernel mode.
-
-The kernel is loaded directly by the SPL without passing through U-Boot.
-
 Example with FDT: a3m071 board
 ------------------------------
 
index 51ec12edb90639e5bd09a28d968e304a67c9edd2..45ea91e9bce6bd06c9f5e3202e43988a0f6746cc 100644 (file)
@@ -8,7 +8,6 @@
 #define SPL_EXPORT     (0x00000001)
 
 #define SPL_EXPORT_FDT         (0x00000001)
-#define SPL_EXPORT_ATAGS       (0x00000002)
-#define SPL_EXPORT_LAST                SPL_EXPORT_ATAGS
+#define SPL_EXPORT_LAST                SPL_EXPORT_FDT
 
 #endif /* _NAND_SPL_H_ */