aboutsummaryrefslogtreecommitdiff
path: root/boot
AgeCommit message (Collapse)AuthorFilesLines
2023-10-13bootstd: Scan all bootdevs in a boot_targets entrySimon Glass2-3/+21
When the boot_targets environment variable is used with the distro-boot scripts, each device is included individually. For example, if there are three mmc devices, then we will have something like: boot_targets="mmc0 mmc1 mmc2" In contrast, standard boot supports specifying just the uclass, i.e.: boot_targets="mmc" The intention is that this should scan all MMC devices, but in fact it currently only scans the first. Update the logic to handle this case, without required BOOTSTD_FULL to be enabled. I believe at least three people reported this, but I found two. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Date Huang <tjjh89017@hotmail.com> Reported-by: Vincent Stehlé <vincent.stehle@arm.com>
2023-10-11expo: Support building an expo with a textlineSimon Glass1-0/+45
Add textline to the list of objects which tthe expo builder can build. This allows them to be provided in the description. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Plumb in textline to ceditSimon Glass1-1/+59
Support textlines in the configuration editor. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Support handling any key in ceditSimon Glass1-1/+1
At present cedit only supports menu keys. For textline objects we need to insert normal ASCII characters. We also need to handle backspace, which is ASCII 9. In fact, expo does not make use of all the menu keys, so partition them accordingly and update the logic to support normal ASCII characters, too. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Plumb in textlines to a sceneSimon Glass2-2/+112
Provide an implementation for textlines in the scene code, so that they are displayed correctly. Provide a way to have a border around the textline, with the internal part being the same colour as the background. This looks more natural. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Support opening a textlineSimon Glass3-5/+54
This object needs special handling when it is opened, to set up the CLI and the vidconsole context. Add special support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Add basic support for textline objectsSimon Glass2-1/+236
A textline is a line of text which can be edited by the user. It has a maximum length (in chracters) but otherwise there are no restrictions. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Add some scene fields needed for text entrySimon Glass1-0/+10
Add the CLI state, a buffer to hold the old value of the text being edited and a place to save vidconsole entry context. These will be use by the textline object. Set an upper limit on the maximum number of characters in a textline object supported by expo, at least for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Allow rendering the background of any objectSimon Glass3-37/+39
So far only menus have a background. When other object types are rendered, they may have a background too. Make this code more generic so it will be usable by new object types. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Make calculation of an object bounding box genericSimon Glass3-36/+87
We want to support this for any object, not just menus. Move the code around to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Add a function to write a property to a devicetreeSimon Glass1-12/+26
When the devicetree is too small for the property being written, we need to expand the devicetree and retry the write. Put this logic into a function so it can be reused. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Allow highlighting other scene-object typesSimon Glass1-7/+4
So far only menus can be highlighted. With the coming addition of text lines we need to be able to highlight other objects. Add a function to determine whether an object can be highlighted. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Correct the logic for duplicate-ID detectionSimon Glass1-1/+2
Update scene_txt_str() to account for the possibility that the passed-in str_id may be 0 Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Correct some swallowed errors in sceneSimon Glass1-3/+3
Return the reported error, rather than assuming it is -ENOMEM Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Use switch statements more for object typesSimon Glass2-43/+83
In a lot of cases menus are the only objects which are have their own behaviour in the cedit, e.g. to move between menus. With expo expanding to support text, this is no-longer true. Use a switch() statement so that we can simply insert a new 'case' for the new object types. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Fix up comments for get_cur_menuitem_text() et alSimon Glass2-1/+11
This internal function could use a comment. Add one. Also tidy up a few other comments. Signed-off-by: Simon Glass <sjg@chromium.org> fixup: comments
2023-10-11expo: Add better error reportingSimon Glass1-12/+45
When building an expo fails, show some information about which node caused the problem. Use -ENOENT consistently when the ID is missing. This makes it easier for the user to debug things. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-09bootstd: use ARCH_DMA_MINALIGN in memalign() when allocating memoryTony Dinh1-1/+1
Use ARCH_DMA_MINALIGN in memalign() when allocating memory to read the script from the media. Ref: https://lore.kernel.org/u-boot/CAJaLiFy05F3Cr4X4G2mVkppXnBEFZrHQ+5CngYN8eJPg8ENWkg@mail.gmail.com/T/#m26daadc2463fe653b814a94e6309e5e6bb6be1d1 Note: this patch depends on the previous patch https://patchwork.ozlabs.org/project/uboot/patch/20230917230649.30357-1-mibodhi@gmail.com/ Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-06command: Include a required header in command.hSimon Glass1-1/+1
This uses ARRAY_SIZE() but does not include the header file which declares it. Fix this, so that command.h can be included without common.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-10-06dm: core: Reverse the argument order in ofnode_copy_props()Simon Glass2-2/+2
Follow the order used by memcpy() as it may be less confusing. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-02Merge branch 'next'Tom Rini23-271/+3681
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-09-22bootstd: Keep track of use of usb stopSimon Glass1-0/+27
When 'usb stop' is run, doing 'bootflow scan' does not run the USB hunter again so does not see any devices. Fix this by telling bootstd about the state of USB. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-09-22x86: pxeboot: bugfix: Set variable for size of initrdThomas Mittelstaedt1-1/+1
The problem was, that zboot() didn't work because of missing ramdisc size. Signed-off-by: Thomas Mittelstaedt <thomas.mittelstaedt@de.bosch.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-09-20tools: mkimage: Add StarFive SPL image supportHeinrich Schuchardt1-0/+1
The StarFive JH7110 base boards require a header to be prefixed to the SPL binary image. This has previously done with a vendor tool 'spl_tool' published under a GPL-2-or-later license. Integrate this capability into mkimage. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: Chanho Park <chanho61.park@samsung.com> Tested-by: Milan P. Stanić <mps@arvanta.net>
2023-09-19boot: Join ARCH_FIXUP_FDT_MEMORY with related optionsWIP/2023-09-19-tidy-up-some-kconfig-optionsSimon Glass1-8/+8
Move this to be with the other devicetree-fixup options. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19boot: Drop CMD_MTDPARTS condition for FDT_FIXUP_PARTITIONSSimon Glass1-2/+1
This is not needed, so drop it. Also use a capital 'O' for the option, while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19boot: Join FDT_FIXUP_PARTITIONS with related optionsSimon Glass1-0/+8
Move this to be with the other devicetree-fixup options. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19Make ARCH_FIXUP_FDT_MEMORY depend on OF_LIBFDTSimon Glass1-1/+1
We need CONFIG_OF_LIBFDT to be able to do fdt fixups, so add that condition. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19Mark DISTRO_DEFAULTS as deprecatedSimon Glass1-1/+5
Standard boot has been in place for a while now. Quite a few problems have been found and fixed. It seems like a good time to mark the script-based approach as deprecated and encourage people to use standard boot. Update the DISTRO_DEFAULTS Kconfig to encourage people to move to standard boot, which is able to boot Linux distributions automatically. Add a short migration guide to make this easier. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19Kconfig: Move TEXT_BASE et al under general setupSimon Glass1-65/+0
These don't relate to booting. Move them out of there and into the same place as the other related settings. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19boot: Make standard boot a menuSimon Glass1-5/+5
Collect these options into a menu for easier viewing. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19Kconfig: Move SPL_FIT under FITSimon Glass1-5/+4
This option already depends on FIT, so put it under the same umbrella, so that it appears in the FIT menu. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19spl: Drop SPL/TPL_RAM_SUPPORT option for SPL_LOAD_FIT_ADDRESSSimon Glass1-1/+1
All boards which actually define this address enable SPL_LOAD_FIT, or at least just rely on the default value of 0. So drop the dependency. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19Kconfig: Create a menu for FITSimon Glass1-20/+18
This is a major feature with a lot of options. Give it its own menu to tidy up the 'make menuconfig' display. Drop the 'depends on FIT' pieces which are now unnecessary, since they are now bracketed by an 'if FIT'. Leave CONFIG_TIMESTAMP out since it affects legacy images too. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19boot: Rename Android-boot textSimon Glass1-1/+1
Phrases like 'Enable support for' are pointless since this is an option which enables things. Drop that part so it is easier to follow. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19boot: Move some other fdt-fixup options to the same menuSimon Glass1-29/+26
Move more options relating to fixing up a device tree into the new devicetree-fixup menu. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19Move fdt_simplefb to boot/Simon Glass3-0/+133
This relates to booting, so move it there. Create a new Kconfig menu for things related to devicetree fixup. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-19boot: Move fdt_support to boot/Simon Glass2-0/+2153
This relates to booting since it fixes up the devicetree for the OS. Move it into the boot/ directory. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-16expo: Fix documentation referenceMassimo Pegorer1-3/+3
Fix typo: doc/develop/expo.rst instead of doc/developer/expo.rst Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-09-14image: Remove unused NEEDS_MANUAL_RELOC code bitsMarek Vasut1-5/+5
The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-09-14boot: Remove unused NEEDS_MANUAL_RELOC code bitsMarek Vasut2-42/+0
The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-09-04Merge tag 'v2023.10-rc4' into nextTom Rini3-3/+5
Prepare v2023.10-rc4
2023-08-31event: Rename EVENT_SPY to EVENT_SPY_FULLSimon Glass2-2/+2
The new name makes it clearer that this is for a full spy, with access to the context and the event data. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-28bootstd: Adjust the default bootmeth orderSimon Glass2-2/+4
The existing distro scripts check extlinux and scripts before EFI. Adjust the default ordering to do the same, to avoid breaking existing flows. Add some documentation, mentioning that this order will likely change in future. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Da Xue <da@libre.computer>
2023-08-28boot: Fix reference to bootmenu docPeter Robinson1-1/+1
The Kconfig references a readme file that's moved and converted to rst so update the reference. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-26bootstd: cros: Allow detection of any kernel partitionSimon Glass2-18/+33
The existing ChromiumOS bootmeth only supports reading a single kernel partition, either 2 or 4. In fact there are normally two options available. Use the GUID to detect kernel partitions, with the BOOTMETHF_ANY_PART flag, so that bootstd does not require a valid filesystem before calling the bootmeth. Tidy up and improve the logging while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> [trini: Add missing select of PARTITION_TYPE_GUID] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-08-25bootstd: Support bootmeths which can scan any partitionSimon Glass1-3/+14
Some bootmeths support scanning a partition without a filesystem on it. Add a flag to support this. This will allow the ChromiumOS bootmeth to find kernel partition, which are stored in a special format, without a filesystem. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25part: Add an accessor for struct disk_partition sys_indSimon Glass1-4/+3
This field is only present when a CONFIG is set. To avoid annoying #ifdefs in the source code, add an accessor. Update the only usage. Note that the accessor is optional. It can be omitted if it is known that the option is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support reading settings from CMOS RAMSimon Glass3-0/+127
Add a command to read edit settings from CMOS RAM, using the cedit definition to indicate which registers and bits are used. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: cedit: Support writing settings to CMOS RAMSimon Glass2-2/+142
Add a command to write cedit settings to CMOS RAM so that it can be preserved across a reboot. This uses a simple bit-encoding, where each field has a 'bit position' and a 'bit length' in the schema. Signed-off-by: Simon Glass <sjg@chromium.org>