]> git.dujemihanovic.xyz Git - u-boot.git/commit
arm: init: save previous bootloader data
authorDzmitry Sankouski <dsankouski@gmail.com>
Tue, 22 Feb 2022 18:49:52 +0000 (21:49 +0300)
committerTom Rini <trini@konsulko.com>
Mon, 4 Apr 2022 18:53:26 +0000 (14:53 -0400)
commit12a3e1ada06c702c403cf1eebb063ef7a34688cd
treed58972054d39b90b0b0a92d5c9b093d0547264a6
parent5c9b420ada3b4f2a08da4789571f0ea373881565
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>
arch/arm/lib/Makefile
arch/arm/lib/save_prev_bl_data.c [new file with mode: 0644]
boot/Kconfig
common/board_r.c
include/init.h