mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 17:52:07 +02:00
arm: init: save previous bootloader data
When u-boot is used as a chain-loaded bootloader (replacing OS kernel), previous bootloader leaves data in RAM, that can be reused. For example, on recent arm linux system, when chainloading u-boot, there are initramfs and fdt in RAM prepared for OS booting. Initramfs may be modified to store u-boot's payload, thus providing the ability to use chainloaded u-boot to boot OS without any storage support. Two config options added: - SAVE_PREV_BL_INITRAMFS_START_ADDR saves initramfs start address to 'prevbl_initrd_start_addr' environment variable - SAVE_PREV_BL_FDT_ADDR saves fdt address to 'prevbl_fdt_addr' environment variable Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Cc: Tom Rini <trini@konsulko.com>
This commit is contained in:
committed by
Tom Rini
parent
5c9b420ada
commit
12a3e1ada0
@@ -155,6 +155,19 @@ int arch_setup_bdinfo(void);
|
||||
*/
|
||||
int setup_bdinfo(void);
|
||||
|
||||
#if defined(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) || \
|
||||
defined(CONFIG_SAVE_PREV_BL_FDT_ADDR)
|
||||
/**
|
||||
* save_prev_bl_data - Save prev bl data in env vars.
|
||||
*
|
||||
* When u-boot is chain-loaded, save previous bootloader data,
|
||||
* like initramfs address to environment variables.
|
||||
*
|
||||
* Return: 0 if ok; -ENODATA on error
|
||||
*/
|
||||
int save_prev_bl_data(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* cpu_secondary_init_r() - CPU-specific secondary initialization
|
||||
*
|
||||
|
Reference in New Issue
Block a user