From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Thu, 15 Dec 2011 14:21:05 +0100 Subject: [U-Boot] [PATCH V10 5/7] omap-common/spl: Add linux boot to SPL In-Reply-To: <1323771648-31042-6-git-send-email-simonschwarzcor@gmail.com> References: <1323196478-14254-1-git-send-email-simonschwarzcor@gmail.com> <1323771648-31042-1-git-send-email-simonschwarzcor@gmail.com> <1323771648-31042-6-git-send-email-simonschwarzcor@gmail.com> Message-ID: <4EE9F441.50107@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 13/12/2011 11:20, Simon Schwarz wrote: > From: Simon Schwarz > > 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 > --- 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);