x86: zboot: Move command code into its own file

Much of the code in zimage.c deals with the zboot command. Move it into
a sepatate zboot.c file within the cmd/ directory. This will eventually
allow use of the zimage logic without the command being enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-12-03 17:29:27 -07:00
committed by Tom Rini
parent e4255f45c9
commit bade0ac04b
4 changed files with 239 additions and 195 deletions

View File

@@ -71,6 +71,37 @@ struct zboot_state {
extern struct zboot_state state;
/**
* zimage_dump() - Dump information about a zimage
*
* @base_ptr: Pointer to the boot parameters
* @show_cmdline: true to show the kernel command line
*/
void zimage_dump(struct boot_params *base_ptr, bool show_cmdline);
/**
* zboot_load() - Load a zimage
*
* Load the zimage into the correct place
*
* Return: 0 if OK, -ve on error
*/
int zboot_load(void);
/**
* zboot_setup() - Set up the zboot image reeady for booting
*
* Return: 0 if OK, -ve on error
*/
int zboot_setup(void);
/**
* zboot_go() - Start the image
*
* Return: 0 if OK, -ve on error
*/
int zboot_go(void);
/**
* load_zimage() - Load a zImage or bzImage
*