summaryrefslogtreecommitdiff
path: root/boot/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* bootstd: Rename distro and syslinux to extlinuxSimon Glass2023-05-131-2/+2
| | | | | | | | | | | | | | We use the terms 'distro' to mean extlinux but they are not really the same. 'Distro' could refer to any method of booting a distribution, whereas extlinux is a particular method. Also we sometimes use syslinux, but it is better to use the same term in all cases. Rename distro to syslinux and also update bootstd uses of syslinux to use extlinux instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* boot: Add Kconfigs for BOOTMETH_VBE_REQUESTSimon Glass2023-03-021-1/+2
| | | | | | | Allow this to be enabled separately in U-Boot proper and in SPL, since it is not needed in SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Disable QFW bootmeth in SPLSimon Glass2023-03-021-1/+1
| | | | | | | Move this Makefile line into the non-SPL area so we don't have to repy on the SPL_TPL_ macro. Signed-off-by: Simon Glass <sjg@chromium.org>
* Correct SPL uses of CMD_BOOTEFI_BOOTMGRSimon Glass2023-02-101-1/+2
| | | | | | | | This converts 3 usages of this option to the non-SPL form, since there is no SPL_CMD_BOOTEFI_BOOTMGR defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* qemu: Add a bootmeth for qfwSimon Glass2023-02-061-0/+1
| | | | | | | | | | | This supports reading a kernel and ramdisk from qfw, then loading it with either the booti or bootz commands. For now this uses the existing booti and bootz commands, rather than trying to call that functionality directly (e.g. do_bootm_states()). It does not require the HUSH parser though, which helps a little with size. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Allow enabling BOOTSTD_FULL without needing EXPOSimon Glass2023-02-061-2/+2
| | | | | | | | | | | It is sometimes useful to have one without the other, e.g. on a device without a display, since at present the expo feature requires CONFIG_VIDEO to be enabled. Update the Makefile and bootflow command to support this, as well as the EXPO dependency. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Support creating a boot menuSimon Glass2023-01-161-0/+1
| | | | | | | Create an expo to handle the boot menu. For now this is quite simple, with just a header, some menu items and a pointer to show the current one. Signed-off-by: Simon Glass <sjg@chromium.org>
* expo: Add support for scene menusSimon Glass2023-01-161-0/+2
| | | | | | | | | A menu is a key part of the expo design. It consists of a number of items which the user can select from. Add the initial implementation of this. Signed-off-by: Simon Glass <sjg@chromium.org>
* vbe: Move OS implementation into a separate fileSimon Glass2022-10-311-0/+1
| | | | | | Move this into its own file so it can be built only by U-Boot proper. Signed-off-by: Simon Glass <sjg@chromium.org>
* vbe: Support reading the next SPL phase via VBESimon Glass2022-10-311-0/+1
| | | | | | | Add an SPL loader to obtain the next-phase binary from a FIT provided by the VBE driver. Signed-off-by: Simon Glass <sjg@chromium.org>
* vbe: Rename vbe_fixup to vbe_requestSimon Glass2022-10-311-1/+1
| | | | | | | The vbe_fixup file handles device tree fixups, but these are called OS requests in VBE. Rename the file to reflect its wider purpose. Signed-off-by: Simon Glass <sjg@chromium.org>
* vbe: Add fixups for a basic set of OS requestsSimon Glass2022-10-171-1/+1
| | | | | | | | As a starting point, add support for providing random data, if requested by the OS. Also add ASLR, as a placeholder for now. Signed-off-by: Simon Glass <sjg@chromium.org> (fixed up to use uclass_first_device_err() instead)
* vbe: Support VBE simpleSimon Glass2022-08-121-0/+1
| | | | | | | Add support for VBE simple, which permits firmware update of a single image stored in MMC or another block device. Signed-off-by: Simon Glass <sjg@chromium.org>
* vbe: Add initial support for VBESimon Glass2022-08-121-0/+2
| | | | | | | Create a new bootmeth for VBE along with a library to handle finding the VBE methods. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Drop the system bootdevSimon Glass2022-08-121-1/+1
| | | | | | | | | | | This was a work-around for the fact that global bootmeths such as EFI bootmgr and VBE don't use a particular bootdev, or at least select it themselves so that we don't need to scan all bootdevs when using that bootmeth. Drop the system bootdev entirely. Signed-off-by: Simon Glass <sjg@chromium.org>
* boot: allow bootmeth-distro without CONFIG_NETJohn Keeping2022-08-101-2/+1
| | | | | | | | | | | | | Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add an implementation of script bootSimon Glass2022-04-251-0/+1
| | | | | | | | Add a bootmeth driver which handles distro boot from a disk via a U-Boot script, so we can boot a bootflow using this commonly used mechanism. This is required by Armbian, for example. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add a sandbox bootmeth driverSimon Glass2022-04-251-0/+1
| | | | | | Add a bootmeth driver for sandbox, used for testing. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add an implementation of EFI bootmgrSimon Glass2022-04-251-0/+3
| | | | | | | | | | | | | Add a bootmeth driver which handles EFI boot manager, using EFI_LOADER. In effect, this provides the same functionality as the 'bootefi bootmgr' command and shares the same code. But the interface into it is via a bootmeth, so it does not require any special scripts, etc. For now this requires the 'bootefi' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add a system bootdev for strange boot methodsSimon Glass2022-04-251-1/+1
| | | | | | | | Some boot methods don't act on a single bootdev but instead do their own thing. An example is EFI bootmgr which scan various devices using its own logic. Add a bootdev to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add an implementation of EFI bootSimon Glass2022-04-251-0/+1
| | | | | | | | | | | | | | | | Add a bootmeth driver which handles EFI boot, using EFI_LOADER. In effect, this provides the same functionality as the 'bootefi' command and shares the same code. But the interface into it is via a bootmeth, so it does not require any special scripts, etc. For now this requires the 'bootefi' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. There was much discussion about whether this is needed, but it seems that it is, at least for now. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add an implementation of distro PXE bootSimon Glass2022-04-251-0/+1
| | | | | | | | | | | | | Add a bootmeth driver which handles distro boot from a network device, so we can boot a bootflow using this commonly used mechanism. In effect, this provides the same functionality as the 'pxe' command and shares the same code. But the interface into it is via a bootmeth. For now this requires the 'pxe' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add an implementation of distro bootSimon Glass2022-04-251-0/+2
| | | | | | | | | | | | | Add a bootmeth driver which handles distro boot from a disk, so we can boot a bootflow using this commonly used mechanism. In effect, this provides the same functionality as the 'sysboot' command and shares the same code. But the interface into it is via a bootmeth. For now this requires the 'pxe' command be enabled. Future work may tidy this up so that it can be used without CONFIG_CMDLINE being enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add support for bootflowsSimon Glass2022-04-251-0/+1
| | | | | | | Add support for bootflows, including maintaining a list of them and iterating to find them. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add the bootmeth uclass and helpersSimon Glass2022-04-251-0/+1
| | | | | | | | | | | A bootmeth is a method of locating an operating system. For now, just add the uclass itself. Drivers for particular bootmeths are added later. If no bootmeths devices are included in the devicetree, create them automatically. This avoids the need for boilerplate in the devicetree files. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add the bootdev uclassSimon Glass2022-04-251-0/+1
| | | | | | | | | | | A 'bootdev' is a device which can be used to boot an operating system. It is a child of the media device (e.g. MMC) which handles reading files from that device, such as a bootflow file. Add a uclass for bootdev and the various helpers needed to make it work. Also add a binding file, empty for now. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstd: Add the bootstd uclass and core implementationSimon Glass2022-04-251-0/+3
| | | | | | | | | | The 'bootstd' device provides the central information about U-Boot standard boot. Add a uclass for bootstd and the various helpers needed to make it work. Also add a binding file. Signed-off-by: Simon Glass <sjg@chromium.org>
* boot: image: add a stage pre-loadPhilippe Reynes2022-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a stage pre-load that could check or modify an image. For the moment, only a header with a signature is supported. This header has the following format: - magic : 4 bytes - version : 4 bytes - header size : 4 bytes - image size : 4 bytes - offset image signature : 4 bytes - flags : 4 bytes - reserved0 : 4 bytes - reserved1 : 4 bytes - sha256 of the image signature : 32 bytes - signature of the first 64 bytes : n bytes - image signature : n bytes - padding : up to header size The stage uses a node /image/pre-load/sig to get some informations: - algo-name (mandatory) : name of the algo used to sign - padding-name : name of padding used to sign - signature-size : size of the signature (in the header) - mandatory : set to yes if this sig is mandatory - public-key (madatory) : value of the public key Before running the image, the stage pre-load checks the signature provided in the header. This is an initial support, later we could add the support of: - ciphering - uncompressing - ... Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* Convert CONFIG_BOOT_RETRY_TIME et al to KconfigTom Rini2022-03-181-5/+1
| | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_BOOT_RETRY_TIME CONFIG_BOOT_RETRY_MIN CONFIG_RESET_TO_RETRY We also introduce CONFIG_BOOT_RETRY to gate these options, and clean up the associated Makefile entry and C code for picking default values of CONFIG_BOOT_RETRY_MIN. Signed-off-by: Tom Rini <trini@konsulko.com>
* pxe: Move pxe_utils filesSimon Glass2021-11-111-0/+3
| | | | | | | | | | | Move the header file into the main include/ directory so we can use it from the bootmethod code. Move the C file into boot/ since it relates to booting. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
* Create a new boot/ directorySimon Glass2021-11-111-0/+34
Quite a lot of the code in common/relates to booting and images. Before adding more it seems like a good time to move the code into its own directory. Most files with 'boot' or 'image' in them are moved, except: - autoboot.c which relates to U-Boot automatically running a script - bootstage.c which relates to U-Boot timing Drop the removal of boot* files from the output directory, since this interfers with the symlinks created by tools and there does not appear to be any such file from my brief testing. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com>