diff options
| author | Wolfgang Denk <wd@denx.de> | 2011-12-23 20:53:58 +0100 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2011-12-23 20:53:58 +0100 | 
| commit | bfcc40bb09b05c90cc3b1496abb270eb8aa72134 (patch) | |
| tree | c551fbe329411533b80f0298f6f0ff5afb48cee7 /arch/x86/lib/bootm.c | |
| parent | cba9a894fdb1cb49b60fcd1d1d6919cbd7995dd5 (diff) | |
| parent | 1895420b2ef7358014b355aa4f4f2c348267a6d9 (diff) | |
| download | olio-uboot-2014.01-bfcc40bb09b05c90cc3b1496abb270eb8aa72134.tar.xz olio-uboot-2014.01-bfcc40bb09b05c90cc3b1496abb270eb8aa72134.zip | |
Merge branch 'next' of ../next
* 'next' of ../next:
  mkenvimage: Add version info switch (-V)
  mkenvimage: Fix getopt() error handling
  mkenvimage: Fix some typos
  phy: add Micrel KS8721BL phy definition
  net: introduce per device index
  mvgbe: remove setting of ethaddr within the driver
  x86: Add support for specifying an initrd with the zboot command
  x86: Refactor the zboot innards so they can be reused with a vboot image
  x86: Add infrastructure to extract an e820 table from the coreboot tables
  x86: Add support for booting Linux using the 32 bit boot protocol
  x86: Clean up the x86 zimage code in preparation to extend it
  x86: Import code from coreboot's libpayload to parse the coreboot table
  x86: Initial commit for running as a coreboot payload
  CHECKPATCH: ./board/esd/hh405/logo_320_240_8bpp.c
  CHECKPATCH: ./board/esd/hh405/logo_1024_768_8bpp.c
  CHECKPATCH: ./board/esd/hh405/logo_320_240_4bpp.c
  CHECKPATCH: ./board/esd/hh405/logo_640_480_24bpp.c
  CHECKPATCH: ./board/esd/apc405/logo_640_480_24bpp.c
  CHECKPATCH: ./board/esd/voh405/logo_320_240_4bpp.c
  CHECKPATCH: ./board/esd/voh405/logo_640_480_24bpp.c
  CHECKPATCH: ./board/esd/hh405/fpgadata.c
  CHECKPATCH: ./board/esd/pci405/fpgadata.c
  CHECKPATCH: ./board/esd/tasreg/fpgadata.c
  CHECKPATCH: ./board/esd/apc405/fpgadata.c
  CHECKPATCH: ./board/esd/voh405/fpgadata.c
  CHECKPATCH: ./board/esd/ash405/fpgadata.c
  CHECKPATCH: ./board/esd/dasa_sim/fpgadata.c
  CHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c
  CHECKPATCH: ./board/esd/ar405/fpgadata.c
  CHECKPATCH: ./board/esd/plu405/fpgadata.c
  CHECKPATCH: ./board/esd/wuh405/fpgadata.c
  CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c
  CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c
  CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c
  CHECKPATCH: ./board/esd/canbt/fpgadata.c
  CHECKPATCH: ./board/esd/du405/fpgadata.c
  CHECKPATCH: ./board/esd/cpciiser4/fpgadata.c
  CHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c
  avr32:mmu.c: fix printf() length modifier
  fat.c: fix printf() length modifier
  cmd_sf.c: fix printf() length modifier
  Make printf and vprintf safe from buffer overruns
  vsprintf: Move function documentation into header file
  Add safe vsnprintf and snprintf library functions
  Move vsprintf functions into their own header
Conflicts:
	tools/mkenvimage.c
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'arch/x86/lib/bootm.c')
| -rw-r--r-- | arch/x86/lib/bootm.c | 21 | 
1 files changed, 15 insertions, 6 deletions
| diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index bac7b4f0c..83caf6bdb 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -28,16 +28,20 @@  #include <command.h>  #include <image.h>  #include <u-boot/zlib.h> +#include <asm/bootparam.h>  #include <asm/byteorder.h>  #include <asm/zimage.h> +#define COMMAND_LINE_OFFSET 0x9000 +  /*cmd_boot.c*/  int do_bootm_linux(int flag, int argc, char * const argv[],  		bootm_headers_t *images)  { -	void		*base_ptr = NULL; -	ulong		os_data, os_len; -	image_header_t	*hdr; +	struct boot_params *base_ptr = NULL; +	ulong os_data, os_len; +	image_header_t *hdr; +	void *load_address;  #if defined(CONFIG_FIT)  	const void	*data; @@ -74,14 +78,19 @@ int do_bootm_linux(int flag, int argc, char * const argv[],  	}  #ifdef CONFIG_CMD_ZBOOT -	base_ptr = load_zimage((void *)os_data, os_len, -			images->rd_start, images->rd_end - images->rd_start, 0); +	base_ptr = load_zimage((void *)os_data, os_len, &load_address);  #endif  	if (NULL == base_ptr) {  		printf("## Kernel loading failed ...\n");  		goto error; +	} +	if (setup_zimage(base_ptr, (char *)base_ptr + COMMAND_LINE_OFFSET, +			0, images->rd_start, +			images->rd_end - images->rd_start)) { +		printf("## Setting up boot parameters failed ...\n"); +		goto error;  	}  #ifdef DEBUG @@ -92,7 +101,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[],  	/* we assume that the kernel is in place */  	printf("\nStarting kernel ...\n\n"); -	boot_zimage(base_ptr); +	boot_zimage(base_ptr, load_address);  	/* does not return */  error: |