1ee2b2434SSimon Glassmenu "Boot timing" 2ee2b2434SSimon Glass 3ee2b2434SSimon Glassconfig BOOTSTAGE 4ee2b2434SSimon Glass bool "Boot timing and reporting" 5ee2b2434SSimon Glass help 6ee2b2434SSimon Glass Enable recording of boot time while booting. To use it, insert 7ee2b2434SSimon Glass calls to bootstage_mark() with a suitable BOOTSTAGE_ID from 8ee2b2434SSimon Glass bootstage.h. Only a single entry is recorded for each ID. You can 9ee2b2434SSimon Glass give the entry a name with bootstage_mark_name(). You can also 10ee2b2434SSimon Glass record elapsed time in a particular stage using bootstage_start() 11ee2b2434SSimon Glass before starting and bootstage_accum() when finished. Bootstage will 12ee2b2434SSimon Glass add up all the accumated time and report it. 13ee2b2434SSimon Glass 14ee2b2434SSimon Glass Normally, IDs are defined in bootstage.h but a small number of 15ee2b2434SSimon Glass additional 'user' IDs can be used but passing BOOTSTAGE_ID_ALLOC 16ee2b2434SSimon Glass as the ID. 17ee2b2434SSimon Glass 18ee2b2434SSimon Glass Calls to show_boot_progress() wil also result in log entries but 19ee2b2434SSimon Glass these will not have names. 20ee2b2434SSimon Glass 21ee2b2434SSimon Glassconfig BOOTSTAGE_REPORT 22ee2b2434SSimon Glass bool "Display a detailed boot timing report before booting the OS" 23ee2b2434SSimon Glass depends on BOOTSTAGE 24ee2b2434SSimon Glass help 25ee2b2434SSimon Glass Enable output of a boot time report just before the OS is booted. 26ee2b2434SSimon Glass This shows how long it took U-Boot to go through each stage of the 27ee2b2434SSimon Glass boot process. The report looks something like this: 28ee2b2434SSimon Glass 29ee2b2434SSimon Glass Timer summary in microseconds: 30ee2b2434SSimon Glass Mark Elapsed Stage 31ee2b2434SSimon Glass 0 0 reset 32ee2b2434SSimon Glass 3,575,678 3,575,678 board_init_f start 33ee2b2434SSimon Glass 3,575,695 17 arch_cpu_init A9 34ee2b2434SSimon Glass 3,575,777 82 arch_cpu_init done 35ee2b2434SSimon Glass 3,659,598 83,821 board_init_r start 36ee2b2434SSimon Glass 3,910,375 250,777 main_loop 37ee2b2434SSimon Glass 29,916,167 26,005,792 bootm_start 38ee2b2434SSimon Glass 30,361,327 445,160 start_kernel 39ee2b2434SSimon Glass 40ee2b2434SSimon Glassconfig BOOTSTAGE_USER_COUNT 41ee2b2434SSimon Glass hex "Number of boot ID numbers available for user use" 42ee2b2434SSimon Glass default 20 43ee2b2434SSimon Glass help 44ee2b2434SSimon Glass This is the number of available user bootstage records. 45ee2b2434SSimon Glass Each time you call bootstage_mark(BOOTSTAGE_ID_ALLOC, ...) 46ee2b2434SSimon Glass a new ID will be allocated from this stash. If you exceed 47ee2b2434SSimon Glass the limit, recording will stop. 48ee2b2434SSimon Glass 49ee2b2434SSimon Glassconfig BOOTSTAGE_FDT 50ee2b2434SSimon Glass bool "Store boot timing information in the OS device tree" 51ee2b2434SSimon Glass depends on BOOTSTAGE 52ee2b2434SSimon Glass help 53ee2b2434SSimon Glass Stash the bootstage information in the FDT. A root 'bootstage' 54ee2b2434SSimon Glass node is created with each bootstage id as a child. Each child 55ee2b2434SSimon Glass has a 'name' property and either 'mark' containing the 56ee2b2434SSimon Glass mark time in microsecond, or 'accum' containing the 57ee2b2434SSimon Glass accumulated time for that bootstage id in microseconds. 58ee2b2434SSimon Glass For example: 59ee2b2434SSimon Glass 60ee2b2434SSimon Glass bootstage { 61ee2b2434SSimon Glass 154 { 62ee2b2434SSimon Glass name = "board_init_f"; 63ee2b2434SSimon Glass mark = <3575678>; 64ee2b2434SSimon Glass }; 65ee2b2434SSimon Glass 170 { 66ee2b2434SSimon Glass name = "lcd"; 67ee2b2434SSimon Glass accum = <33482>; 68ee2b2434SSimon Glass }; 69ee2b2434SSimon Glass }; 70ee2b2434SSimon Glass 71ee2b2434SSimon Glass Code in the Linux kernel can find this in /proc/devicetree. 72ee2b2434SSimon Glass 73ee2b2434SSimon Glassconfig BOOTSTAGE_STASH 74ee2b2434SSimon Glass bool "Stash the boot timing information in memory before booting OS" 75ee2b2434SSimon Glass depends on BOOTSTAGE 76ee2b2434SSimon Glass help 77ee2b2434SSimon Glass Some OSes do not support device tree. Bootstage can instead write 78ee2b2434SSimon Glass the boot timing information in a binary format at a given address. 79ee2b2434SSimon Glass This happens through a call to bootstage_stash(), typically in 80ee2b2434SSimon Glass the CPU's cleanup_before_linux() function. You can use the 81ee2b2434SSimon Glass 'bootstage stash' and 'bootstage unstash' commands to do this on 82ee2b2434SSimon Glass the command line. 83ee2b2434SSimon Glass 84ee2b2434SSimon Glassconfig BOOTSTAGE_STASH_ADDR 85ee2b2434SSimon Glass hex "Address to stash boot timing information" 86ee2b2434SSimon Glass default 0 87ee2b2434SSimon Glass help 88ee2b2434SSimon Glass Provide an address which will not be overwritten by the OS when it 89ee2b2434SSimon Glass starts, so that it can read this information when ready. 90ee2b2434SSimon Glass 91ee2b2434SSimon Glassconfig BOOTSTAGE_STASH_SIZE 92ee2b2434SSimon Glass hex "Size of boot timing stash region" 93ee2b2434SSimon Glass default 4096 94ee2b2434SSimon Glass help 95ee2b2434SSimon Glass This should be large enough to hold the bootstage stash. A value of 96ee2b2434SSimon Glass 4096 (4KiB) is normally plenty. 97ee2b2434SSimon Glass 98ee2b2434SSimon Glassendmenu 99ee2b2434SSimon Glass 100d14739ffSPeng Fanmenu "Boot media" 101d14739ffSPeng Fan 102d14739ffSPeng Fanconfig NOR_BOOT 103d14739ffSPeng Fan bool "Support for booting from NOR flash" 104d14739ffSPeng Fan depends on NOR 105d14739ffSPeng Fan help 106d14739ffSPeng Fan Enabling this will make a U-Boot binary that is capable of being 107d14739ffSPeng Fan booted via NOR. In this case we will enable certain pinmux early 108d14739ffSPeng Fan as the ROM only partially sets up pinmux. We also default to using 109d14739ffSPeng Fan NOR for environment. 110d14739ffSPeng Fan 111*faaef73fSPeng Fanconfig NAND_BOOT 112*faaef73fSPeng Fan bool "Support for booting from NAND flash" 113*faaef73fSPeng Fan default n 114*faaef73fSPeng Fan help 115*faaef73fSPeng Fan Enabling this will make a U-Boot binary that is capable of being 116*faaef73fSPeng Fan booted via NAND flash. This is not a must, some SoCs need this, 117*faaef73fSPeng Fan somes not. 118*faaef73fSPeng Fan 119*faaef73fSPeng Fanconfig ONENAND_BOOT 120*faaef73fSPeng Fan bool "Support for booting from ONENAND" 121*faaef73fSPeng Fan default n 122*faaef73fSPeng Fan help 123*faaef73fSPeng Fan Enabling this will make a U-Boot binary that is capable of being 124*faaef73fSPeng Fan booted via ONENAND. This is not a must, some SoCs need this, 125*faaef73fSPeng Fan somes not. 126*faaef73fSPeng Fan 127*faaef73fSPeng Fanconfig QSPI_BOOT 128*faaef73fSPeng Fan bool "Support for booting from QSPI flash" 129*faaef73fSPeng Fan default n 130*faaef73fSPeng Fan help 131*faaef73fSPeng Fan Enabling this will make a U-Boot binary that is capable of being 132*faaef73fSPeng Fan booted via QSPI flash. This is not a must, some SoCs need this, 133*faaef73fSPeng Fan somes not. 134*faaef73fSPeng Fan 135*faaef73fSPeng Fanconfig SATA_BOOT 136*faaef73fSPeng Fan bool "Support for booting from SATA" 137*faaef73fSPeng Fan default n 138*faaef73fSPeng Fan help 139*faaef73fSPeng Fan Enabling this will make a U-Boot binary that is capable of being 140*faaef73fSPeng Fan booted via SATA. This is not a must, some SoCs need this, 141*faaef73fSPeng Fan somes not. 142*faaef73fSPeng Fan 143*faaef73fSPeng Fanconfig SD_BOOT 144*faaef73fSPeng Fan bool "Support for booting from SD/EMMC" 145*faaef73fSPeng Fan default n 146*faaef73fSPeng Fan help 147*faaef73fSPeng Fan Enabling this will make a U-Boot binary that is capable of being 148*faaef73fSPeng Fan booted via SD/EMMC. This is not a must, some SoCs need this, 149*faaef73fSPeng Fan somes not. 150*faaef73fSPeng Fan 151*faaef73fSPeng Fanconfig SPI_BOOT 152*faaef73fSPeng Fan bool "Support for booting from SPI flash" 153*faaef73fSPeng Fan default n 154*faaef73fSPeng Fan help 155*faaef73fSPeng Fan Enabling this will make a U-Boot binary that is capable of being 156*faaef73fSPeng Fan booted via SPI flash. This is not a must, some SoCs need this, 157*faaef73fSPeng Fan somes not. 158*faaef73fSPeng Fan 159d14739ffSPeng Fanendmenu 160d14739ffSPeng Fan 161bb597c0eSHeiko Schocherconfig BOOTDELAY 162bb597c0eSHeiko Schocher int "delay in seconds before automatically booting" 1635e4e8741STom Rini default 2 16441598c82SMasahiro Yamada depends on AUTOBOOT 165bb597c0eSHeiko Schocher help 166bb597c0eSHeiko Schocher Delay before automatically running bootcmd; 167bb597c0eSHeiko Schocher set to -1 to disable autoboot. 168bb597c0eSHeiko Schocher set to -2 to autoboot with no delay and not check for abort 169bb597c0eSHeiko Schocher (even when CONFIG_ZERO_BOOTDELAY_CHECK is defined). 170bb597c0eSHeiko Schocher 1719854a874SSimon Glassconfig CONSOLE_RECORD 1729854a874SSimon Glass bool "Console recording" 1739854a874SSimon Glass help 1749854a874SSimon Glass This provides a way to record console output (and provide console 1759854a874SSimon Glass input) through cirular buffers. This is mostly useful for testing. 1769854a874SSimon Glass Console output is recorded even when the console is silent. 1779854a874SSimon Glass To enable console recording, call console_record_reset_enable() 1789854a874SSimon Glass from your code. 1799854a874SSimon Glass 1809854a874SSimon Glassconfig CONSOLE_RECORD_OUT_SIZE 1819854a874SSimon Glass hex "Output buffer size" 1829854a874SSimon Glass depends on CONSOLE_RECORD 1839854a874SSimon Glass default 0x400 if CONSOLE_RECORD 1849854a874SSimon Glass help 1859854a874SSimon Glass Set the size of the console output buffer. When this fills up, no 1869854a874SSimon Glass more data will be recorded until some is removed. The buffer is 1879854a874SSimon Glass allocated immediately after the malloc() region is ready. 1889854a874SSimon Glass 1899854a874SSimon Glassconfig CONSOLE_RECORD_IN_SIZE 1909854a874SSimon Glass hex "Input buffer size" 1919854a874SSimon Glass depends on CONSOLE_RECORD 1929854a874SSimon Glass default 0x100 if CONSOLE_RECORD 1939854a874SSimon Glass help 1949854a874SSimon Glass Set the size of the console input buffer. When this contains data, 1959854a874SSimon Glass tstc() and getc() will use this in preference to real device input. 1969854a874SSimon Glass The buffer is allocated immediately after the malloc() region is 1979854a874SSimon Glass ready. 198