common: bootm: add board_do_bootm()
There maybe some board routine before do_bootm_states(). The board can override this __weak function. Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Iab6a6742a02dae681e4d3221dc7cfffd2c3df98c
This commit is contained in:
parent
ac459efd10
commit
998aeb5fa7
|
|
@ -104,6 +104,9 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||||
relocated = 1;
|
relocated = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/* board routines */
|
||||||
|
if (board_do_bootm(argc, argv))
|
||||||
|
return -EPERM;
|
||||||
|
|
||||||
/* determine if we have a sub command */
|
/* determine if we have a sub command */
|
||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,11 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
bootm_headers_t images; /* pointers to os/initrd/fdt images */
|
bootm_headers_t images; /* pointers to os/initrd/fdt images */
|
||||||
|
|
||||||
|
__weak int board_do_bootm(int argc, char * const argv[])
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc,
|
static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||||
char * const argv[], bootm_headers_t *images,
|
char * const argv[], bootm_headers_t *images,
|
||||||
ulong *os_data, ulong *os_len);
|
ulong *os_data, ulong *os_len);
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
|
||||||
|
|
||||||
void arch_preboot_os(uint32_t bootm_state);
|
void arch_preboot_os(uint32_t bootm_state);
|
||||||
|
|
||||||
|
int board_do_bootm(int argc, char * const argv[]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bootm_decomp_image() - decompress the operating system
|
* bootm_decomp_image() - decompress the operating system
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue