booti.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. .. SPDX-License-Identifier: GPL-2.0+:
  2. booti command
  3. =============
  4. Synopsis
  5. --------
  6. ::
  7. booti [<addr> [<initrd>[:<size>]] [<fdt>]]
  8. Description
  9. -----------
  10. The booti command is used to boot a Linux kernel in flat or compressed
  11. 'Image' format. Which compressed formats are supported is configurable.
  12. addr
  13. address of kernel image, defaults to CONFIG_SYS_LOAD_ADDR.
  14. initrd
  15. address of the initial RAM disk. Use '-' to boot a kernel with a device
  16. tree but without an initial RAM disk.
  17. size
  18. size of the initial RAM disk. This parameter must be specified for raw
  19. initial RAM disks.
  20. fdt
  21. address of the device tree.
  22. To support compressed Image files the following environment variables must be
  23. set:
  24. kernel_comp_addr_r
  25. start of memory area used for decompression
  26. kernel_comp_size
  27. size of the compressed file. The value has to be at least the size of
  28. loaded image for decompression to succeed. For the booti command the
  29. maximum decompressed size is 10 times this value.
  30. Example
  31. -------
  32. This is the boot log of an Odroid C2 board:
  33. ::
  34. => load mmc 0:1 $fdt_addr_r dtb-5.10.0-3-arm64
  35. 27530 bytes read in 7 ms (3.7 MiB/s)
  36. => load mmc 0:1 $kernel_addr_r vmlinuz-5.10.0-3-arm64
  37. 26990448 bytes read in 1175 ms (21.9 MiB/s)
  38. => load mmc 0:1 $ramdisk_addr_r initrd.img-5.10.0-3-arm64
  39. 27421776 bytes read in 1209 ms (21.6 MiB/s)
  40. => booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdt_addr_r
  41. Moving Image from 0x8080000 to 0x8200000, end=9c60000
  42. ## Flattened Device Tree blob at 08008000
  43. Booting using the fdt blob at 0x8008000
  44. Loading Ramdisk to 7a52a000, end 7bf50c50 ... OK
  45. Loading Device Tree to 000000007a520000, end 000000007a529b89 ... OK
  46. Starting kernel ...
  47. The kernel can be compressed with gzip:
  48. .. code-block:: bash
  49. cd /boot
  50. gzip -k vmlinuz-5.10.0-3-arm64
  51. Here is the boot log for the compressed kernel:
  52. ::
  53. => setenv kernel_comp_addr_r 0x50000000
  54. => setenv kernel_comp_size 0x04000000
  55. => load mmc 0:1 $fdt_addr_r dtb-5.10.0-3-arm64
  56. 27530 bytes read in 6 ms (4.4 MiB/s)
  57. => load mmc 0:1 $kernel_addr_r vmlinuz-5.10.0-3-arm64.gz
  58. 9267730 bytes read in 402 ms (22 MiB/s)
  59. => load mmc 0:1 $ramdisk_addr_r initrd.img-5.10.0-3-arm64
  60. 27421776 bytes read in 1181 ms (22.1 MiB/s)
  61. => booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdt_addr_r
  62. Uncompressing Kernel Image
  63. Moving Image from 0x8080000 to 0x8200000, end=9c60000
  64. ## Flattened Device Tree blob at 08008000
  65. Booting using the fdt blob at 0x8008000
  66. Loading Ramdisk to 7a52a000, end 7bf50c50 ... OK
  67. Loading Device Tree to 000000007a520000, end 000000007a529b89 ... OK
  68. Starting kernel ...
  69. Configuration
  70. -------------
  71. The booti command is only available if CONFIG_CMD_BOOTI=y.
  72. Which compression types are supported depends on:
  73. * CONFIG_BZIP2
  74. * CONFIG_GZIP
  75. * CONFIG_LZ4
  76. * CONFIG_LZMA
  77. * CONFIG_LZO
  78. * CONFIG_ZSTD
  79. Return value
  80. ------------
  81. Normally this command does not return. If an error occurs, the return value $?
  82. is set to 1 (false). If the operating system returns to U-Boot, the system is
  83. reset.