"Das U-Boot" Source Tree

cmd: spl: Remove ATAG support from this command

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>

Tom Rini 601cebc2 70ae44f3

+15 -115
+1 -2
arch/arm/lib/spl.c
··· 46 46 } 47 47 48 48 /* 49 - * This function jumps to an image with argument. Normally an FDT or ATAGS 50 - * image. 49 + * This function jumps to an image with argument, usually an FDT. 51 50 */ 52 51 #if CONFIG_IS_ENABLED(OS_BOOT) 53 52 #ifdef CONFIG_ARM64
+1 -2
arch/powerpc/lib/spl.c
··· 9 9 #include <linux/compiler.h> 10 10 11 11 /* 12 - * This function jumps to an image with argument. Normally an FDT or ATAGS 13 - * image. 12 + * This function jumps to an image with argument, usually an FDT. 14 13 */ 15 14 #ifdef CONFIG_SPL_OS_BOOT 16 15 void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
+2 -21
cmd/spl.c
··· 30 30 #endif 31 31 NULL, 32 32 }, 33 - [SPL_EXPORT_ATAGS] = (const char * []) { 34 - #ifdef CONFIG_SUPPORT_PASSING_ATAGS 35 - "start", 36 - "loados", 37 - #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH 38 - "ramdisk", 39 - #endif 40 - "cmdline", 41 - "bdt", 42 - "prep", 43 - #endif 44 - NULL, 45 - }, 46 33 NULL 47 34 }; 48 35 ··· 96 83 97 84 static struct cmd_tbl cmd_spl_export_sub[] = { 98 85 U_BOOT_CMD_MKENT(fdt, 0, 1, (void *)SPL_EXPORT_FDT, "", ""), 99 - U_BOOT_CMD_MKENT(atags, 0, 1, (void *)SPL_EXPORT_ATAGS, "", ""), 100 86 }; 101 87 102 88 static int spl_export(struct cmd_tbl *cmdtp, int flag, int argc, ··· 128 114 #endif 129 115 break; 130 116 #endif 131 - case SPL_EXPORT_ATAGS: 132 - printf("Argument image is now in RAM at: 0x%p\n", 133 - (void *)gd->bd->bi_boot_params); 134 - break; 135 117 } 136 118 } else { 137 119 /* Unrecognized command */ ··· 176 158 177 159 U_BOOT_CMD( 178 160 spl, 6 , 1, do_spl, "SPL configuration", 179 - "export <img=atags|fdt> [kernel_addr] [initrd_addr] [fdt_addr]\n" 180 - "\timg\t\t\"atags\" or \"fdt\"\n" 161 + "export fdt [kernel_addr] [initrd_addr] [fdt_addr]\n" 181 162 "\tkernel_addr\taddress where a kernel image is stored.\n" 182 163 "\t\t\tkernel is loaded as part of the boot process, but it is not started.\n" 183 164 "\tinitrd_addr\taddress of initial ramdisk\n" 184 165 "\t\t\tcan be set to \"-\" if fdt_addr without initrd_addr is used.\n" 185 - "\tfdt_addr\tin case of fdt, the address of the device tree.\n" 166 + "\tfdt_addr\tthe address of the device tree.\n" 186 167 );
+3 -11
doc/README.commands.spl
··· 5 5 To execute the command everything has to be in place as if bootm should be 6 6 used. (kernel image, initrd-image, fdt-image etc.) 7 7 8 - export has two subcommands: 9 - atags: exports the ATAGS 8 + export has one subcommand: 10 9 fdt: exports the FDT 11 10 12 11 Call is: 13 - spl export <fdt|atags> [kernel_addr] [initrd_addr] [fdt_addr if fdt] 12 + spl export fdt [kernel_addr] [initrd_addr] [fdt_addr if fdt] 14 13 15 14 16 15 TYPICAL CALL 17 16 18 - on OMAP3: 19 - nandecc hw 20 - nand read 0x82000000 0x280000 0x400000 /* Read kernel image from NAND*/ 21 - spl export atags /* export ATAGS */ 22 - nand erase 0x680000 0x20000 /* erase - one page */ 23 - nand write 0x80000100 0x680000 0x20000 /* write the image - one page */ 24 - 25 - call with FDT: 17 + on OMAP3 with FDT: 26 18 nandecc hw 27 19 nand read 0x82000000 0x280000 0x400000 /* Read kernel image from NAND*/ 28 20 tftpboot 0x80000100 devkit8000.dtb /* Read fdt */
+7 -77
doc/develop/falcon.rst
··· 22 22 23 23 The Falcon Mode extends this way allowing to start the Linux kernel directly 24 24 from SPL. A new command is added to U-Boot to prepare the parameters that SPL 25 - must pass to the kernel, using ATAGS or Device Tree. 25 + must pass to the kernel using a Device Tree. 26 26 27 27 In normal mode, these parameters are generated each time before 28 28 loading the kernel, passing to Linux the address in memory where ··· 117 117 118 118 Usage:: 119 119 120 - spl export <img=atags|fdt> [kernel_addr] [initrd_addr] [fdt_addr ] 121 - 122 - img 123 - "atags" or "fdt" 120 + spl export fdt [kernel_addr] [initrd_addr] [fdt_addr ] 124 121 125 122 kernel_addr 126 123 kernel is loaded as part of the boot process, but it is not started. ··· 134 131 in case of fdt, the address of the device tree. 135 132 136 133 The *spl export* command does not write to a storage media. The user is 137 - responsible to transfer the gathered information (assembled ATAGS list 138 - or prepared FDT) from temporary storage in RAM into persistent storage 139 - after each run of *spl export*. Unfortunately the position of temporary 140 - storage can not be predicted nor provided at command line, it depends 141 - highly on your system setup and your provided data (ATAGS or FDT). 134 + responsible to transfer the gathered information (prepared FDT) from temporary 135 + storage in RAM into persistent storage after each run of *spl export*. 136 + Unfortunately the position of temporary storage can not be predicted nor 137 + provided at command line, it depends highly on your system setup and your 138 + provided device tree. 142 139 However at the end of an successful *spl export* run it will print the 143 140 RAM address of temporary storage. The RAM address of FDT will also be 144 141 set in the environment variable *fdtargsaddr*, the new length of the ··· 151 148 (CONFIG_CMD_SPL_NAND_OFS in case of NAND). 152 149 The following example shows how to prepare the data for Falcon Mode on 153 150 twister board with ATAGS BLOB. 154 - 155 - The *spl export* command is prepared to work with ATAGS and FDT. However, 156 - using FDT is at the moment untested. The ppc port (see a3m071 example 157 - later) prepares the fdt blob with the fdt command instead. 158 - 159 - 160 - Usage on the twister board 161 - -------------------------- 162 - 163 - Using mtd names with the following (default) configuration 164 - for mtdparts:: 165 - 166 - device nand0 <omap2-nand.0>, # parts = 9 167 - #: name size offset mask_flags 168 - 0: MLO 0x00080000 0x00000000 0 169 - 1: u-boot 0x00100000 0x00080000 0 170 - 2: env1 0x00040000 0x00180000 0 171 - 3: env2 0x00040000 0x001c0000 0 172 - 4: kernel 0x00600000 0x00200000 0 173 - 5: bootparms 0x00040000 0x00800000 0 174 - 6: splashimg 0x00200000 0x00840000 0 175 - 7: mini 0x02800000 0x00a40000 0 176 - 8: rootfs 0x1cdc0000 0x03240000 0 177 - 178 - :: 179 - 180 - twister => nand read 82000000 kernel 181 - 182 - NAND read: device 0 offset 0x200000, size 0x600000 183 - 6291456 bytes read: OK 184 - 185 - Now the kernel is in RAM at address 0x82000000:: 186 - 187 - twister => spl export atags 0x82000000 188 - ## Booting kernel from Legacy Image at 82000000 ... 189 - Image Name: Linux-3.5.0-rc4-14089-gda0b7f4 190 - Image Type: ARM Linux Kernel Image (uncompressed) 191 - Data Size: 3654808 Bytes = 3.5 MiB 192 - Load Address: 80008000 193 - Entry Point: 80008000 194 - Verifying Checksum ... OK 195 - Loading Kernel Image ... OK 196 - OK 197 - cmdline subcommand not supported 198 - bdt subcommand not supported 199 - Argument image is now in RAM at: 0x80000100 200 - 201 - The result can be checked at address 0x80000100:: 202 - 203 - twister => md 0x80000100 204 - 80000100: 00000005 54410001 00000000 00000000 ......AT........ 205 - 80000110: 00000000 00000067 54410009 746f6f72 ....g.....ATroot 206 - 80000120: 65642f3d 666e2f76 77722073 73666e20 =/dev/nfs rw nfs 207 - 208 - The parameters generated with this step can be saved into NAND at the offset 209 - 0x800000 (value for twister for CONFIG_CMD_SPL_NAND_OFS):: 210 - 211 - nand erase.part bootparms 212 - nand write 0x80000100 bootparms 0x4000 213 - 214 - Now the parameters are stored into the NAND flash at the address 215 - CONFIG_CMD_SPL_NAND_OFS (=0x800000). 216 - 217 - Next time, the board can be started into Falcon Mode moving the 218 - setting the GPIO (on twister GPIO 55 is used) to kernel mode. 219 - 220 - The kernel is loaded directly by the SPL without passing through U-Boot. 221 151 222 152 Example with FDT: a3m071 board 223 153 ------------------------------
+1 -2
include/cmd_spl.h
··· 8 8 #define SPL_EXPORT (0x00000001) 9 9 10 10 #define SPL_EXPORT_FDT (0x00000001) 11 - #define SPL_EXPORT_ATAGS (0x00000002) 12 - #define SPL_EXPORT_LAST SPL_EXPORT_ATAGS 11 + #define SPL_EXPORT_LAST SPL_EXPORT_FDT 13 12 14 13 #endif /* _NAND_SPL_H_ */