diff --git a/cmd/bootm.c b/cmd/bootm.c index df0bbe19ca..1eed38ff45 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -104,6 +104,9 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) relocated = 1; } #endif + /* board routines */ + if (board_do_bootm(argc, argv)) + return -EPERM; /* determine if we have a sub command */ argc--; argv++; diff --git a/common/bootm.c b/common/bootm.c index 8fac3f1854..22fa4c6bdb 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -43,6 +43,11 @@ DECLARE_GLOBAL_DATA_PTR; 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, char * const argv[], bootm_headers_t *images, ulong *os_data, ulong *os_len); diff --git a/include/bootm.h b/include/bootm.h index 72ed30da07..19c3ad9d8a 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -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); +int board_do_bootm(int argc, char * const argv[]); + /** * bootm_decomp_image() - decompress the operating system *