Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
| 3 | bootflow command |
| 4 | ================ |
| 5 | |
| 6 | Synopis |
| 7 | ------- |
| 8 | |
| 9 | :: |
| 10 | |
Simon Glass | 736612e | 2023-01-17 10:48:19 -0700 | [diff] [blame] | 11 | bootflow scan [-abelGH] [bootdev] |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 12 | bootflow list [-e] |
| 13 | bootflow select [<num|name>] |
Simon Glass | 5495aaf | 2023-07-30 11:17:00 -0600 | [diff] [blame^] | 14 | bootflow info [-ds] |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 15 | bootflow boot |
Simon Glass | cd91e99 | 2023-07-12 09:04:42 -0600 | [diff] [blame] | 16 | bootflow cmdline [set|get|clear|delete|auto] <param> [<value>] |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 17 | |
| 18 | Description |
| 19 | ----------- |
| 20 | |
| 21 | The `bootflow` command is used to manage bootflows. It can scan bootdevs to |
| 22 | locate bootflows, list them and boot them. |
| 23 | |
| 24 | See :doc:`../../develop/bootstd` for more information. |
| 25 | |
| 26 | |
| 27 | bootflow scan |
| 28 | ~~~~~~~~~~~~~ |
| 29 | |
| 30 | Scans for available bootflows, optionally booting the first valid one it finds. |
| 31 | This operates in two modes: |
| 32 | |
| 33 | - If no bootdev is selected (see `bootdev select`) it scans bootflows one |
| 34 | by one, extracting all the bootdevs from each |
| 35 | - If a bootdev is selected, it just scans that one bootflow |
| 36 | |
| 37 | Flags are: |
| 38 | |
| 39 | -a |
| 40 | Collect all bootflows, even those that cannot be loaded. Normally if a file |
| 41 | is not where it is expected, then the bootflow fails and so is dropped |
| 42 | during the scan. With this option you can see why each bootflow would be |
| 43 | dropped. |
| 44 | |
| 45 | -b |
| 46 | Boot each valid bootflow as it is scanned. Typically only the first bootflow |
| 47 | matters, since by then the system boots in the OS and U-Boot is no-longer |
| 48 | running. `bootflow scan -b` is a quick way to boot the first available OS. |
| 49 | A valid bootflow is one that made it all the way to the `loaded` state. |
| 50 | |
| 51 | -e |
| 52 | Used with -l to also show errors for each bootflow. The shows detailed error |
| 53 | information for each bootflow that failed to make it to the `loaded` state. |
| 54 | |
| 55 | -l |
| 56 | List bootflows while scanning. This is helpful when you want to see what |
| 57 | is happening during scanning. Use it with the `-b` flag to see which |
| 58 | bootdev and bootflows are being tried. |
| 59 | |
Simon Glass | 736612e | 2023-01-17 10:48:19 -0700 | [diff] [blame] | 60 | -G |
| 61 | Skip global bootmeths when scanning. By default these are tried first, but |
| 62 | this flag disables them. |
| 63 | |
| 64 | -H |
| 65 | Don't use bootdev hunters. By default these are used before each boot |
| 66 | priority or label is tried, to see if more bootdevs can be discovered, but |
| 67 | this flag disables that process. |
| 68 | |
| 69 | |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 70 | The optional argument specifies a particular bootdev to scan. This can either be |
| 71 | the name of a bootdev or its sequence number (both shown with `bootdev list`). |
| 72 | Alternatively a convenience label can be used, like `mmc0`, which is the type of |
| 73 | device and an optional sequence number. Specifically, the label is the uclass of |
| 74 | the bootdev's parent followed by the sequence number of that parent. Sequence |
| 75 | numbers are typically set by aliases, so if you have 'mmc0' in your devicetree |
| 76 | alias section, then `mmc0` refers to the bootdev attached to that device. |
| 77 | |
| 78 | |
| 79 | bootflow list |
| 80 | ~~~~~~~~~~~~~ |
| 81 | |
| 82 | Lists the previously scanned bootflows. You must use `bootflow scan` before this |
| 83 | to see anything. |
| 84 | |
| 85 | If you scanned with -a and have bootflows with errors, -e can be used to show |
| 86 | those errors. |
| 87 | |
| 88 | The list looks something like this: |
| 89 | |
| 90 | === ====== ====== ======== ==== =============================== ================ |
| 91 | Seq Method State Uclass Part Name Filename |
| 92 | === ====== ====== ======== ==== =============================== ================ |
| 93 | 0 distro ready mmc 2 mmc\@7e202000.bootdev.part_2 /boot/extlinux/extlinux.conf |
| 94 | 1 pxe ready ethernet 0 smsc95xx_eth.bootdev.0 rpi.pxe/extlinux/extlinux.conf |
| 95 | === ====== ====== ======== ==== =============================== ================ |
| 96 | |
| 97 | The fields are as follows: |
| 98 | |
| 99 | Seq: |
| 100 | Sequence number in the scan, used to reference the bootflow later |
| 101 | |
| 102 | Method: |
| 103 | The boot method (bootmeth) used to find the bootflow. Several methods are |
| 104 | included in U-Boot. |
| 105 | |
| 106 | State: |
| 107 | Current state of the bootflow, indicating how far the bootdev got in |
| 108 | obtaining a valid one. See :ref:`BootflowStates` for a list of states. |
| 109 | |
| 110 | Uclass: |
| 111 | Name of the media device's Uclass. This indicates the type of the parent |
| 112 | device (e.g. MMC, Ethernet). |
| 113 | |
| 114 | Part: |
| 115 | Partition number being accesseed, numbered from 1. Normally a device will |
| 116 | have a partition table with a small number of partitions. For devices |
| 117 | without partition tables (e.g. network) this field is 0. |
| 118 | |
| 119 | Name: |
| 120 | Name of the bootflow. This is generated from the bootdev appended with |
| 121 | the partition information |
| 122 | |
| 123 | Filename: |
| 124 | Name of the bootflow file. This indicates where the file is on the |
| 125 | filesystem or network device. |
| 126 | |
| 127 | |
| 128 | bootflow select |
| 129 | ~~~~~~~~~~~~~~~ |
| 130 | |
| 131 | Use this to select a particular bootflow. You can select it by the sequence |
| 132 | number or name, as shown in `bootflow list`. |
| 133 | |
| 134 | Once a bootflow is selected, you can use `bootflow info` and `bootflow boot`. |
| 135 | |
| 136 | If no bootflow name or number is provided, then any existing bootflow is |
| 137 | unselected. |
| 138 | |
| 139 | |
| 140 | bootflow info |
| 141 | ~~~~~~~~~~~~~ |
| 142 | |
| 143 | This shows information on the current bootflow, with the format looking like |
| 144 | this: |
| 145 | |
| 146 | ========= =============================== |
| 147 | Name mmc\@7e202000.bootdev.part_2 |
| 148 | Device mmc\@7e202000.bootdev |
| 149 | Block dev mmc\@7e202000.blk |
| 150 | Type distro |
Simon Glass | b71d7f7 | 2023-05-10 16:34:46 -0600 | [diff] [blame] | 151 | Method: extlinux |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 152 | State ready |
| 153 | Partition 2 |
| 154 | Subdir (none) |
| 155 | Filename /extlinux/extlinux.conf |
| 156 | Buffer 3db7ad48 |
| 157 | Size 232 (562 bytes) |
Simon Glass | 736612e | 2023-01-17 10:48:19 -0700 | [diff] [blame] | 158 | FDT: <NULL> |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 159 | Error 0 |
| 160 | ========= =============================== |
| 161 | |
| 162 | Most of the information is the same as `bootflow list` above. The new fields |
| 163 | are: |
| 164 | |
| 165 | Device |
| 166 | Name of the bootdev |
| 167 | |
| 168 | Block dev |
| 169 | Name of the block device, if any. Network devices don't have a block device. |
| 170 | |
| 171 | Subdir |
| 172 | Subdirectory used for retrieving files. For network bootdevs this is the |
| 173 | directory of the 'bootfile' parameter passed from DHCP. All file retrievals |
| 174 | when booting are relative to this. |
| 175 | |
| 176 | Buffer |
| 177 | Buffer containing the bootflow file. You can use the :doc:`md` to look at |
| 178 | it, or dump it with `bootflow info -d`. |
| 179 | |
| 180 | Size |
| 181 | Size of the bootflow file |
| 182 | |
Simon Glass | 736612e | 2023-01-17 10:48:19 -0700 | [diff] [blame] | 183 | FDT: |
| 184 | Filename of the device tree, if supported. The EFI bootmeth uses this to |
| 185 | remember the filename to load. If `<NULL>` then there is none. |
| 186 | |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 187 | Error |
| 188 | Error number returned from scanning for the bootflow. This is 0 if the |
| 189 | bootflow is in the 'loaded' state, or a negative error value on error. You |
| 190 | can look up Linux error codes to find the meaning of the number. |
| 191 | |
| 192 | Use the `-d` flag to dump out the contents of the bootfile file. |
| 193 | |
Simon Glass | 5495aaf | 2023-07-30 11:17:00 -0600 | [diff] [blame^] | 194 | The `-s` flag shows any x86 setup block, instead of the above. |
| 195 | |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 196 | |
| 197 | bootflow boot |
| 198 | ~~~~~~~~~~~~~ |
| 199 | |
| 200 | This boots the current bootflow. |
| 201 | |
Simon Glass | 55a2da3 | 2023-07-12 09:04:39 -0600 | [diff] [blame] | 202 | |
| 203 | bootflow cmdline |
| 204 | ~~~~~~~~~~~~~~~~ |
| 205 | |
| 206 | Some bootmeths can obtain the OS command line since it is stored with the OS. |
| 207 | In that case, you can use `bootflow cmdline` to adjust this. The command line |
| 208 | is assumed to be in the format used by Linux, i.e. a space-separated set of |
| 209 | parameters with optional values, e.g. "noinitrd console=/dev/tty0". |
| 210 | |
| 211 | To change or add a parameter, use:: |
| 212 | |
| 213 | bootflow cmdline set <param> <value> |
| 214 | |
| 215 | To clear a parameter value to empty you can use "" for the value, or use:: |
| 216 | |
| 217 | bootflow cmdline clear <param> |
| 218 | |
| 219 | To delete a parameter entirely, use:: |
| 220 | |
| 221 | bootflow cmdline delete <param> |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 222 | |
Simon Glass | cd91e99 | 2023-07-12 09:04:42 -0600 | [diff] [blame] | 223 | Automatic parameters are available in a very few cases. You can use these to |
| 224 | add parmeters where the value is known by U-Boot. For example:: |
| 225 | |
| 226 | bootflow cmdline auto earlycon |
| 227 | bootflow cmdline auto console |
| 228 | |
| 229 | can be used to set the early console (or console) to a suitable value so that |
| 230 | output appears on the serial port. This is only supported by the 16550 serial |
| 231 | driver so far. |
| 232 | |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 233 | Example |
| 234 | ------- |
| 235 | |
| 236 | Here is an example of scanning for bootflows, then listing them:: |
| 237 | |
| 238 | U-Boot> bootflow scan -l |
| 239 | Scanning for bootflows in all bootdevs |
| 240 | Seq Type State Uclass Part Name Filename |
| 241 | --- ----------- ------ -------- ---- ------------------------ ---------------- |
| 242 | Scanning bootdev 'mmc@7e202000.bootdev': |
| 243 | 0 distro ready mmc 2 mmc@7e202000.bootdev.p /extlinux/extlinux.conf |
| 244 | Scanning bootdev 'sdhci@7e300000.bootdev': |
| 245 | Card did not respond to voltage select! : -110 |
| 246 | Scanning bootdev 'smsc95xx_eth.bootdev': |
| 247 | Waiting for Ethernet connection... done. |
| 248 | BOOTP broadcast 1 |
| 249 | DHCP client bound to address 192.168.4.30 (4 ms) |
| 250 | Using smsc95xx_eth device |
| 251 | TFTP from server 192.168.4.1; our IP address is 192.168.4.30 |
| 252 | Filename 'rpi.pxe/'. |
| 253 | Load address: 0x200000 |
| 254 | Loading: * |
| 255 | TFTP error: 'Is a directory' (0) |
| 256 | Starting again |
| 257 | |
| 258 | missing environment variable: pxeuuid |
| 259 | Retrieving file: rpi.pxe/pxelinux.cfg/01-b8-27-eb-a6-61-e1 |
| 260 | Waiting for Ethernet connection... done. |
| 261 | Using smsc95xx_eth device |
| 262 | TFTP from server 192.168.4.1; our IP address is 192.168.4.30 |
| 263 | Filename 'rpi.pxe/pxelinux.cfg/01-b8-27-eb-a6-61-e1'. |
| 264 | Load address: 0x2500000 |
| 265 | Loading: ################################################## 566 Bytes |
| 266 | 45.9 KiB/s |
| 267 | done |
| 268 | Bytes transferred = 566 (236 hex) |
| 269 | 1 distro ready ethernet 0 smsc95xx_eth.bootdev.0 rpi.pxe/extlinux/extlinux.conf |
| 270 | No more bootdevs |
| 271 | --- ----------- ------ -------- ---- ------------------------ ---------------- |
| 272 | (2 bootflows, 2 valid) |
| 273 | U-Boot> bootflow l |
| 274 | Showing all bootflows |
| 275 | Seq Type State Uclass Part Name Filename |
| 276 | --- ----------- ------ -------- ---- ------------------------ ---------------- |
| 277 | 0 distro ready mmc 2 mmc@7e202000.bootdev.p /extlinux/extlinux.conf |
| 278 | 1 pxe ready ethernet 0 smsc95xx_eth.bootdev.0 rpi.pxe/extlinux/extlinux.conf |
| 279 | --- ----------- ------ -------- ---- ------------------------ ---------------- |
| 280 | (2 bootflows, 2 valid) |
| 281 | |
| 282 | |
| 283 | The second one is then selected by name (we could instead use `bootflow sel 0`), |
| 284 | displayed and booted:: |
| 285 | |
| 286 | U-Boot> bootflow info |
| 287 | No bootflow selected |
| 288 | U-Boot> bootflow sel mmc@7e202000.bootdev.part_2 |
| 289 | U-Boot> bootflow info |
| 290 | Name: mmc@7e202000.bootdev.part_2 |
| 291 | Device: mmc@7e202000.bootdev |
| 292 | Block dev: mmc@7e202000.blk |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 293 | Method: distro |
| 294 | State: ready |
| 295 | Partition: 2 |
| 296 | Subdir: (none) |
| 297 | Filename: extlinux/extlinux.conf |
| 298 | Buffer: 3db7ae88 |
| 299 | Size: 232 (562 bytes) |
Simon Glass | 3392752 | 2023-07-12 09:04:34 -0600 | [diff] [blame] | 300 | OS: Fedora-Workstation-armhfp-31-1.9 (5.3.7-301.fc31.armv7hl) |
| 301 | Cmdline: (none) |
| 302 | Logo: (none) |
| 303 | FDT: <NULL> |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 304 | Error: 0 |
| 305 | U-Boot> bootflow boot |
| 306 | ** Booting bootflow 'smsc95xx_eth.bootdev.0' |
| 307 | Ignoring unknown command: ui |
| 308 | Ignoring malformed menu command: autoboot |
| 309 | Ignoring malformed menu command: hidden |
| 310 | Ignoring unknown command: totaltimeout |
| 311 | 1: Fedora-Workstation-armhfp-31-1.9 (5.3.7-301.fc31.armv7hl) |
| 312 | Retrieving file: rpi.pxe/initramfs-5.3.7-301.fc31.armv7hl.img |
| 313 | get 2700000 rpi.pxe/initramfs-5.3.7-301.fc31.armv7hl.img |
| 314 | Waiting for Ethernet connection... done. |
| 315 | Using smsc95xx_eth device |
| 316 | TFTP from server 192.168.4.1; our IP address is 192.168.4.30 |
| 317 | Filename 'rpi.pxe/initramfs-5.3.7-301.fc31.armv7hl.img'. |
| 318 | Load address: 0x2700000 |
| 319 | Loading: ###################################T ############### 57.7 MiB |
| 320 | 1.9 MiB/s |
| 321 | done |
| 322 | Bytes transferred = 60498594 (39b22a2 hex) |
| 323 | Retrieving file: rpi.pxe//vmlinuz-5.3.7-301.fc31.armv7hl |
| 324 | get 80000 rpi.pxe//vmlinuz-5.3.7-301.fc31.armv7hl |
| 325 | Waiting for Ethernet connection... done. |
| 326 | Using smsc95xx_eth device |
| 327 | TFTP from server 192.168.4.1; our IP address is 192.168.4.30 |
| 328 | Filename 'rpi.pxe//vmlinuz-5.3.7-301.fc31.armv7hl'. |
| 329 | Load address: 0x80000 |
| 330 | Loading: ################################################## 7.2 MiB |
| 331 | 2.3 MiB/s |
| 332 | done |
| 333 | Bytes transferred = 7508480 (729200 hex) |
| 334 | append: ro root=UUID=9732b35b-4cd5-458b-9b91-80f7047e0b8a rhgb quiet LANG=en_US.UTF-8 cma=192MB cma=256MB |
| 335 | Retrieving file: rpi.pxe//dtb-5.3.7-301.fc31.armv7hl/bcm2837-rpi-3-b.dtb |
| 336 | get 2600000 rpi.pxe//dtb-5.3.7-301.fc31.armv7hl/bcm2837-rpi-3-b.dtb |
| 337 | Waiting for Ethernet connection... done. |
| 338 | Using smsc95xx_eth device |
| 339 | TFTP from server 192.168.4.1; our IP address is 192.168.4.30 |
| 340 | Filename 'rpi.pxe//dtb-5.3.7-301.fc31.armv7hl/bcm2837-rpi-3-b.dtb'. |
| 341 | Load address: 0x2600000 |
| 342 | Loading: ################################################## 13.8 KiB |
| 343 | 764.6 KiB/s |
| 344 | done |
| 345 | Bytes transferred = 14102 (3716 hex) |
| 346 | Kernel image @ 0x080000 [ 0x000000 - 0x729200 ] |
| 347 | ## Flattened Device Tree blob at 02600000 |
| 348 | Booting using the fdt blob at 0x2600000 |
| 349 | Using Device Tree in place at 02600000, end 02606715 |
| 350 | |
| 351 | Starting kernel ... |
| 352 | |
| 353 | [ OK ] Started Show Plymouth Boot Screen. |
| 354 | [ OK ] Started Forward Password R…s to Plymouth Directory Watch. |
| 355 | [ OK ] Reached target Local Encrypted Volumes. |
| 356 | [ OK ] Reached target Paths. |
| 357 | .... |
| 358 | |
| 359 | |
| 360 | Here we scan for bootflows and boot the first one found:: |
| 361 | |
| 362 | U-Boot> bootflow scan -bl |
| 363 | Scanning for bootflows in all bootdevs |
| 364 | Seq Method State Uclass Part Name Filename |
| 365 | --- ----------- ------ -------- ---- ---------------------- ---------------- |
| 366 | Scanning bootdev 'mmc@7e202000.bootdev': |
| 367 | 0 distro ready mmc 2 mmc@7e202000.bootdev.p /extlinux/extlinux.conf |
| 368 | ** Booting bootflow 'mmc@7e202000.bootdev.part_2' |
| 369 | Ignoring unknown command: ui |
| 370 | Ignoring malformed menu command: autoboot |
| 371 | Ignoring malformed menu command: hidden |
| 372 | Ignoring unknown command: totaltimeout |
| 373 | 1: Fedora-KDE-armhfp-31-1.9 (5.3.7-301.fc31.armv7hl) |
| 374 | Retrieving file: /initramfs-5.3.7-301.fc31.armv7hl.img |
| 375 | getfile 2700000 /initramfs-5.3.7-301.fc31.armv7hl.img |
| 376 | Retrieving file: /vmlinuz-5.3.7-301.fc31.armv7hl |
| 377 | getfile 80000 /vmlinuz-5.3.7-301.fc31.armv7hl |
| 378 | append: ro root=UUID=b8781f09-e2dd-4cb8-979b-7df5eeaaabea rhgb LANG=en_US.UTF-8 cma=192MB console=tty0 console=ttyS1,115200 |
| 379 | Retrieving file: /dtb-5.3.7-301.fc31.armv7hl/bcm2837-rpi-3-b.dtb |
| 380 | getfile 2600000 /dtb-5.3.7-301.fc31.armv7hl/bcm2837-rpi-3-b.dtb |
| 381 | Kernel image @ 0x080000 [ 0x000000 - 0x729200 ] |
| 382 | ## Flattened Device Tree blob at 02600000 |
| 383 | Booting using the fdt blob at 0x2600000 |
| 384 | Using Device Tree in place at 02600000, end 02606715 |
| 385 | |
| 386 | Starting kernel ... |
| 387 | |
| 388 | [ 0.000000] Booting Linux on physical CPU 0x0 |
| 389 | |
| 390 | |
| 391 | Here is am example using the -e flag to see all errors:: |
| 392 | |
| 393 | U-Boot> bootflow scan -a |
| 394 | Card did not respond to voltage select! : -110 |
| 395 | Waiting for Ethernet connection... done. |
| 396 | BOOTP broadcast 1 |
| 397 | DHCP client bound to address 192.168.4.30 (4 ms) |
| 398 | Using smsc95xx_eth device |
| 399 | TFTP from server 192.168.4.1; our IP address is 192.168.4.30 |
| 400 | Filename 'rpi.pxe/'. |
| 401 | Load address: 0x200000 |
| 402 | Loading: * |
| 403 | TFTP error: 'Is a directory' (0) |
| 404 | Starting again |
| 405 | |
| 406 | missing environment variable: pxeuuid |
| 407 | Retrieving file: rpi.pxe/pxelinux.cfg/01-b8-27-eb-a6-61-e1 |
| 408 | Waiting for Ethernet connection... done. |
| 409 | Using smsc95xx_eth device |
| 410 | TFTP from server 192.168.4.1; our IP address is 192.168.4.30 |
| 411 | Filename 'rpi.pxe/pxelinux.cfg/01-b8-27-eb-a6-61-e1'. |
| 412 | Load address: 0x2500000 |
| 413 | Loading: ################################################## 566 Bytes |
| 414 | 49.8 KiB/s |
| 415 | done |
| 416 | Bytes transferred = 566 (236 hex) |
| 417 | U-Boot> bootflow l -e |
| 418 | Showing all bootflows |
| 419 | Seq Type State Uclass Part Name Filename |
| 420 | --- ----------- ------ -------- ---- --------------------- ---------------- |
| 421 | 0 distro fs mmc 1 mmc@7e202000.bootdev.p /extlinux/extlinux.conf |
| 422 | ** File not found, err=-2 |
| 423 | 1 distro ready mmc 2 mmc@7e202000.bootdev.p /extlinux/extlinux.conf |
| 424 | 2 distro fs mmc 3 mmc@7e202000.bootdev.p /extlinux/extlinux.conf |
| 425 | ** File not found, err=-1 |
| 426 | 3 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 427 | ** No partition found, err=-2 |
| 428 | 4 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 429 | ** No partition found, err=-2 |
| 430 | 5 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 431 | ** No partition found, err=-2 |
| 432 | 6 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 433 | ** No partition found, err=-2 |
| 434 | 7 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 435 | ** No partition found, err=-2 |
| 436 | 8 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 437 | ** No partition found, err=-2 |
| 438 | 9 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 439 | ** No partition found, err=-2 |
| 440 | a distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 441 | ** No partition found, err=-2 |
| 442 | b distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 443 | ** No partition found, err=-2 |
| 444 | c distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 445 | ** No partition found, err=-2 |
| 446 | d distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 447 | ** No partition found, err=-2 |
| 448 | e distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 449 | ** No partition found, err=-2 |
| 450 | f distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 451 | ** No partition found, err=-2 |
| 452 | 10 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 453 | ** No partition found, err=-2 |
| 454 | 11 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 455 | ** No partition found, err=-2 |
| 456 | 12 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 457 | ** No partition found, err=-2 |
| 458 | 13 distro media mmc 0 mmc@7e202000.bootdev.p <NULL> |
| 459 | ** No partition found, err=-2 |
| 460 | 14 distro ready ethernet 0 smsc95xx_eth.bootdev.0 rpi.pxe/extlinux/extlinux.conf |
| 461 | --- ----------- ------ -------- ---- --------------------- ---------------- |
| 462 | (21 bootflows, 2 valid) |
| 463 | U-Boot> |
| 464 | |
Simon Glass | cd91e99 | 2023-07-12 09:04:42 -0600 | [diff] [blame] | 465 | Here is an example of booting ChromeOS, adjusting the console beforehand. Note that |
| 466 | the cmdline is word-wrapped here and some parts of the command line are elided:: |
| 467 | |
| 468 | => bootfl list |
| 469 | Showing all bootflows |
| 470 | Seq Method State Uclass Part Name Filename |
| 471 | --- ----------- ------ -------- ---- ------------------------ ---------------- |
| 472 | 0 cros ready nvme 0 5.10.153-20434-g98da1eb2c <NULL> |
| 473 | 1 efi ready nvme c nvme#0.blk#1.bootdev.part efi/boot/bootia32.efi |
| 474 | 2 efi ready usb_mass_ 2 usb_mass_storage.lun0.boo efi/boot/bootia32.efi |
| 475 | --- ----------- ------ -------- ---- ------------------------ ---------------- |
| 476 | (3 bootflows, 3 valid) |
| 477 | => bootfl sel 0 |
| 478 | => bootfl inf |
| 479 | Name: 5.10.153-20434-g98da1eb2cf9d (chrome-bot@chromeos-release-builder-us-central1-b-x32-12-xijx) #1 SMP PREEMPT Tue Jan 24 19:38:23 PST 2023 |
| 480 | Device: nvme#0.blk#1.bootdev |
| 481 | Block dev: nvme#0.blk#1 |
| 482 | Method: cros |
| 483 | State: ready |
| 484 | Partition: 0 |
| 485 | Subdir: (none) |
| 486 | Filename: <NULL> |
| 487 | Buffer: 737a1400 |
| 488 | Size: c47000 (12873728 bytes) |
| 489 | OS: ChromeOS |
| 490 | Cmdline: console= loglevel=7 init=/sbin/init cros_secure drm.trace=0x106 |
| 491 | root=/dev/dm-0 rootwait ro dm_verity.error_behavior=3 |
| 492 | dm_verity.max_bios=-1 dm_verity.dev_wait=1 |
| 493 | dm="1 vroot none ro 1,0 6348800 |
| 494 | verity payload=PARTUUID=799c935b-ae62-d143-8493-816fa936eef7/PARTNROFF=1 |
| 495 | hashtree=PARTUUID=799c935b-ae62-d143-8493-816fa936eef7/PARTNROFF=1 |
| 496 | hashstart=6348800 alg=sha256 |
| 497 | root_hexdigest=78cc462cd45aecbcd49ca476587b4dee59aa1b00ba5ece58e2c29ec9acd914ab |
| 498 | salt=8dec4dc80a75dd834a9b3175c674405e15b16a253fdfe05c79394ae5fd76f66a" |
| 499 | noinitrd vt.global_cursor_default=0 |
| 500 | kern_guid=799c935b-ae62-d143-8493-816fa936eef7 add_efi_memmap boot=local |
| 501 | noresume noswap i915.modeset=1 ramoops.ecc=1 tpm_tis.force=0 |
| 502 | intel_pmc_core.warn_on_s0ix_failures=1 i915.enable_guc=3 i915.enable_dc=4 |
| 503 | xdomain=0 swiotlb=65536 intel_iommu=on i915.enable_psr=1 |
| 504 | usb-storage.quirks=13fe:6500:u |
| 505 | X86 setup: 742e3400 |
| 506 | Logo: (none) |
| 507 | FDT: <NULL> |
| 508 | Error: 0 |
| 509 | => bootflow cmdline auto earlycon |
| 510 | => bootflow cmd auto console |
| 511 | => print bootargs |
| 512 | bootargs=console=ttyS0,115200n8 loglevel=7 ... |
| 513 | usb-storage.quirks=13fe:6500:u earlycon=uart8250,mmio32,0xfe03e000,115200n8 |
| 514 | => bootflow cmd del console |
| 515 | => print bootargs |
| 516 | bootargs=loglevel=7 ... earlycon=uart8250,mmio32,0xfe03e000,115200n8 |
| 517 | => bootfl boot |
| 518 | ** Booting bootflow '5.10.153-20434-g98da1eb2cf9d (chrome-bot@chromeos-release-builder-us-central1-b-x32-12-xijx) #1 SMP PREEMPT Tue Jan 24 19:38:23 PST 2023' with cros |
| 519 | Kernel command line: "loglevel=7 ... earlycon=uart8250,mmio32,0xfe03e000,115200n8" |
| 520 | |
| 521 | Starting kernel ... |
| 522 | |
| 523 | [ 0.000000] Linux version 5.10.153-20434-g98da1eb2cf9d (chrome-bot@chromeos-release-builder-us-central1-b-x32-12-xijx) (Chromium OS 15.0_pre465103_p20220825-r4 clang version 15.0.0 (/var/tmp/portage/sys-devel/llvm-15.0_pre465103_p20220825-r4/work/llvm-15.0_pre465103_p20220825/clang db1978b67431ca3462ad8935bf662c15750b8252), LLD 15.0.0) #1 SMP PREEMPT Tue Jan 24 19:38:23 PST 2023 |
| 524 | [ 0.000000] Command line: loglevel=7 ... usb-storage.quirks=13fe:6500:u earlycon=uart8250,mmio32,0xfe03e000,115200n8 |
| 525 | [ 0.000000] x86/split lock detection: warning about user-space split_locks |
| 526 | |
Simon Glass | 5495aaf | 2023-07-30 11:17:00 -0600 | [diff] [blame^] | 527 | This shows looking at x86 setup information:: |
| 528 | |
| 529 | => bootfl sel 0 |
| 530 | => bootfl i -s |
| 531 | Setup located at 77b56010: |
| 532 | |
| 533 | ACPI RSDP addr : 0 |
| 534 | E820: 2 entries |
| 535 | Addr Size Type |
| 536 | 0 1000 RAM |
| 537 | fffff000 1000 Reserved |
| 538 | Setup sectors : 1e |
| 539 | Root flags : 1 |
| 540 | Sys size : 63420 |
| 541 | RAM size : 0 |
| 542 | Video mode : ffff |
| 543 | Root dev : 0 |
| 544 | Boot flag : 0 |
| 545 | Jump : 66eb |
| 546 | Header : 53726448 |
| 547 | Kernel V2 |
| 548 | Version : 20d |
| 549 | Real mode switch : 0 |
| 550 | Start sys seg : 1000 |
| 551 | Kernel version : 38cc |
| 552 | @00003acc: |
| 553 | Type of loader : ff |
| 554 | unknown |
| 555 | Load flags : 1 |
| 556 | : loaded-high |
| 557 | Setup move size : 8000 |
| 558 | Code32 start : 100000 |
| 559 | Ramdisk image : 0 |
| 560 | Ramdisk size : 0 |
| 561 | Bootsect kludge : 0 |
| 562 | Heap end ptr : 5160 |
| 563 | Ext loader ver : 0 |
| 564 | Ext loader type : 0 |
| 565 | Command line ptr : 735000 |
| 566 | Initrd addr max : 7fffffff |
| 567 | Kernel alignment : 200000 |
| 568 | Relocatable kernel : 1 |
| 569 | Min alignment : 15 |
| 570 | : 200000 |
| 571 | Xload flags : 3 |
| 572 | : 64-bit-entry can-load-above-4gb |
| 573 | Cmdline size : 7ff |
| 574 | Hardware subarch : 0 |
| 575 | HW subarch data : 0 |
| 576 | Payload offset : 26e |
| 577 | Payload length : 612045 |
| 578 | Setup data : 0 |
| 579 | Pref address : 1000000 |
| 580 | Init size : 1383000 |
| 581 | Handover offset : 0 |
Simon Glass | cd91e99 | 2023-07-12 09:04:42 -0600 | [diff] [blame] | 582 | |
Simon Glass | 83b9be6 | 2022-04-24 23:31:26 -0600 | [diff] [blame] | 583 | |
| 584 | Return value |
| 585 | ------------ |
| 586 | |
| 587 | On success `bootflow boot` normally boots into the Operating System and does not |
| 588 | return to U-Boot. If something about the U-Boot processing fails, then the |
| 589 | return value $? is 1. If the boot succeeds but for some reason the Operating |
| 590 | System returns, then $? is 0, indicating success. |
| 591 | |
| 592 | For other subcommands, the return value $? is always 0 (true). |
| 593 | |
| 594 | |
| 595 | .. BootflowStates_: |