[U-Boot] [PATCH V10 5/7] omap-common/spl: Add linux boot to SPL

Stefano Babic sbabic at denx.de
Thu Dec 15 14:21:05 CET 2011


On 13/12/2011 11:20, Simon Schwarz wrote:
> From: Simon Schwarz <simonschwarzcor at googlemail.com>
> 
> This adds Linux booting to the SPL
> 
> This depends on CONFIG_MACH_TYPE patch by Igor Grinberg
> (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105809)
> 
> Related CONFIGs:
> CONFIG_SPL_OS_BOOT
> 	Activates/Deactivates the OS booting feature
> CONFIG_SPL_OS_BOOT_KEY
> 	defines the IO-pin number u-boot switch - if pressed u-boot is
> 	booted
> CONFIG_SYS_NAND_SPL_KERNEL_OFFS
> 	Offset in NAND of direct boot kernel image to use in SPL
> CONFIG_SYS_SPL_ARGS_ADDR
> 	Address where the kernel boot arguments are expected - this is
> 	normaly RAM-begin + 0x100
> 
> Signed-off-by: Simon Schwarz <simonschwarzcor at gmail.com>
> ---

Hi Simon and Myself (as I will continue Simon's work),

> -
>  void spl_nand_load_image(void)
>  {
>  	struct image_header *header;
> @@ -50,7 +49,7 @@ void spl_nand_load_image(void)
>  	/*use CONFIG_SYS_TEXT_BASE as temporary storage area */
>  	header = (struct image_header *)(CONFIG_SYS_TEXT_BASE);
>  #ifdef CONFIG_SPL_OS_BOOT
> -	if (!spl_uboot_key()) {
> +	if (!spl_start_uboot()) {
>  		/*
>  		 * load parameter image
>  		 * load to temp position since nand_spl_load_image reads
> @@ -74,9 +73,17 @@ void spl_nand_load_image(void)
>  		nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
>  			CONFIG_SYS_NAND_PAGE_SIZE, (void *)header);
>  		spl_parse_image_header(header);
> -		nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
> -			spl_image.size, (void *)spl_image.load_addr);
> -	} else
> +		if (header->ih_os == IH_OS_LINUX) {
> +			/* happy - was a linux */
> +			nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
> +				spl_image.size, (void *)spl_image.load_addr);



More information about the U-Boot mailing list