📄 command_syntax_extensions.txt
字号:
Command syntax extensions for the new uImage format===================================================Author: Bartlomiej Sieka <tur@semihalf.com>With the introduction of the new uImage format, bootm command (and othercommands as well) have to understand new syntax of the arguments. This isnecessary in order to specify objects contained in the new uImage, on whichbootm has to operate. This note attempts to first summarize bootm usagescenarios, and then introduces new argument syntax.bootm usage scenarios---------------------Below is a summary of bootm usage scenarios, focused on booting a PowerPCLinux kernel. The purpose of the following list is to document a complete listof supported bootm usages.Note: U-Boot supports two methods of booting a PowerPC Linux kernel: old way,i.e., without passing the Flattened Device Tree (FDT), and new way, where thekernel is passed a pointer to the FDT. The boot method is indicated for eachscenario.1. bootm boot image at the current address, equivalent to 2,3,8Old uImage:2. bootm <addr1> /* single image at <addr1> */3. bootm <addr1> /* multi-image at <addr1> */4. bootm <addr1> - /* multi-image at <addr1> */5. bootm <addr1> <addr2> /* single image at <addr1> */6. bootm <addr1> <addr2> <addr3> /* single image at <addr1> */7. bootm <addr1> - <addr3> /* single image at <addr1> */New uImage:8. bootm <addr1>9. bootm [<addr1>]:<subimg1>10. bootm [<addr1>]#<conf>11. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2>12. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2> [<addr3>]:<subimg3>13. bootm [<addr1>]:<subimg1> [<addr2>]:<subimg2> <addr3>14. bootm [<addr1>]:<subimg1> - [<addr3>]:<subimg3>15. bootm [<addr1>]:<subimg1> - <addr3>Ad. 1. This is equivalent to cases 2,3,8, depending on the type of image atthe current image address.- boot method: see cases 2,3,8Ad. 2. Boot kernel image located at <addr1>.- boot method: non-FDTAd. 3. First and second components of the image at <addr1> are assumed to be akernel and a ramdisk, respectively. The kernel is booted with initrd loadedwith the ramdisk from the image.- boot method: depends on the number of components at <addr1>, and on whether U-Boot is compiled with OF support: | 2 components | 3 components | | (kernel, initrd) | (kernel, initrd, fdt) |---------------------------------------------------------------------#ifdef CONFIG_OF_* | non-FDT | FDT |#ifndef CONFIG_OF_* | non-FDT | non-FDT |Ad. 4. Similar to case 3, but the kernel is booted without initrd. Secondcomponent of the multi-image is irrelevant (it can be a dummy, 1-byte file).- boot method: see case 3Ad. 5. Boot kernel image located at <addr1> with initrd loaded with ramdiskfrom the image at <addr2>.- boot method: non-FDTAd. 6. <addr1> is the address of a kernel image, <addr2> is the address of aramdisk image, and <addr3> is the address of a FDT binary blob. Kernel isbooted with initrd loaded with ramdisk from the image at <addr2>.- boot method: FDTAd. 7. <addr1> is the address of a kernel image and <addr3> is the address ofa FDT binary blob. Kernel is booted without initrd.- boot method: FDTAd. 8. Image at <addr1> is assumed to contain a default configuration, whichis booted.- boot method: FDT or non-FDT, depending on whether the default configuration defines FDTAd. 9. Similar to case 2: boot kernel stored in <subimg1> from the image ataddress <addr1>.- boot method: non-FDTAd. 10. Boot configuration <conf> from the image at <addr1>.- boot method: FDT or non-FDT, depending on whether the configuration given defines FDTAd. 11. Equivalent to case 5: boot kernel stored in <subimg1> from the imageat <addr1> with initrd loaded with ramdisk <subimg2> from the image at<addr2>.- boot method: non-FDTAd. 12. Equivalent to case 6: boot kernel stored in <subimg1> from the imageat <addr1> with initrd loaded with ramdisk <subimg2> from the image at<addr2>, and pass FDT blob <subimg3> from the image at <addr3>.- boot method: FDTAd. 13. Similar to case 12, the difference being that <addr3> is the addressof FDT binary blob that is to be passed to the kernel.- boot method: FDTAd. 14. Equivalent to case 7: boot kernel stored in <subimg1> from the imageat <addr1>, without initrd, and pass FDT blob <subimg3> from the image at<addr3>.- boot method: FDTAd. 15. Similar to case 14, the difference being that <addr3> is the addressof the FDT binary blob that is to be passed to the kernel.- boot method: FDTNew uImage argument syntax--------------------------New uImage support introduces two new forms for bootm arguments, with thefollowing syntax:- new uImage sub-image specification<addr>:<sub-image unit_name>- new uImage configuration specification<addr>#<configuration unit_name>Examples:- boot kernel "kernel@1" stored in a new uImage located at 200000:bootm 200000:kernel@1- boot configuration "cfg@1" from a new uImage located at 200000:bootm 200000#cfg@1- boot "kernel@1" from a new uImage at 200000 with initrd "ramdisk@2" found in some other new uImage stored at address 800000:bootm 200000:kernel@1 800000:ramdisk@2- boot "kernel@2" from a new uImage at 200000, with initrd "ramdisk@1" and FDT "fdt@1", both stored in some other new uImage located at 800000:bootm 200000:kernel@1 800000:ramdisk@1 800000:fdt@1- boot kernel "kernel@2" with initrd "ramdisk@2", both stored in a new uImage at address 200000, with a raw FDT blob stored at address 600000:bootm 200000:kernel@2 200000:ramdisk@2 600000- boot kernel "kernel@2" from new uImage at 200000 with FDT "fdt@1" from the same new uImage:bootm 200000:kernel@2 - 200000:fdt@1Note on current image address-----------------------------When bootm is called without arguments, the image at current image address isbooted. The current image address is the address set most recently by a loadcommand, etc, and is by default equal to CFG_LOAD_ADDR. For example, considerthe following commands:tftp 200000 /tftpboot/kernelbootmLast command is equivalent to:bootm 200000In case of the new uImage argument syntax, the address portion of any argumentcan be omitted. If <addr3> is omitted, then it is assumed that image at<addr2> should be used. Similarly, when <addr2> is omitted, is is assumed thatimage at <addr1> should be used. If <addr1> is omitted, it is assumed that thecurrent image address is to be used. For example, consider the followingcommands:tftp 200000 /tftpboot/uImagebootm :kernel@1Last command is equivalent to:bootm 200000:kernel@1tftp 200000 /tftpboot/uImagebootm 400000:kernel@1 :ramdisk@1Last command is equivalent to:bootm 400000:kernel@1 400000:ramdisk@1tftp 200000 /tftpboot/uImagebootm :kernel@1 400000:ramdisk@1 :fdt@1Last command is equivalent to:bootm 200000:kernel@1 400000:ramdisk@1 400000:fdt@1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -