mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
bootm: Create bootm_final() for pre-boot cleanup
There are various functions which announce that booting is imminent and do related preparation. Most of these are arch-specific. In practice, most archs do a similar thing. It would be better to have a common function, with perhaps some events for things that are really arch- and board-specific. Create a new bootm_final() function with the common pre-boot steps: printing the "Starting kernel" message, recording bootstage data, optionally writing bootstage to the FDT and printing a report, and removing active devices. Be careful to avoid using BIT() macros which are not available with host tools. Signed-off-by: Simon Glass <simon.glass@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -321,4 +321,14 @@ void zimage_dump(struct boot_params *base_ptr, bool show_cmdline);
|
||||
*/
|
||||
int bootm_boot_start(ulong addr, const char *cmdline);
|
||||
|
||||
/**
|
||||
* bootm_final() - Announce and do cleanup before boot
|
||||
*
|
||||
* This performs the common pre-boot steps: printing the "Starting kernel"
|
||||
* message, recording bootstage data, and removing active devices.
|
||||
*
|
||||
* @flag: Boot state flags (BOOTM_STATE_OS_FAKE_GO prints a fake-run message)
|
||||
*/
|
||||
void bootm_final(int flag);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user