From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 24 Aug 2012 12:56:17 +0200 Subject: [U-Boot] [PATCH 3/6] SPL: Port SPL framework to powerpc In-Reply-To: <503754D6.1050405@denx.de> References: <1345709565-28862-1-git-send-email-sr@denx.de> <1345709565-28862-4-git-send-email-sr@denx.de> <503663EE.9000902@ti.com> <50367371.7080206@denx.de> <50368523.4080107@ti.com> <50373883.5090601@denx.de> <503754D6.1050405@denx.de> Message-ID: <50375DD1.80508@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 Hi Heiko, On 08/24/2012 12:17 PM, Heiko Schocher wrote: >> BTW: There also seems to be a bug in some of the SPL loaders: >> >> For example in drivers/mtd/nand/nand_spl_load.c: >> >> ... >> 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); >> >> The problem here is that the last 64 bytes of the image are not >> copied to SDRAM. Since the header is copied which is not included >> in the spl_image.size variable. Okay. I just noticed that it's not a bug. spl_image.size is set to header->ih_size + header_size. So 64 is added and the complete payload is copied. I still would like to move to my suggestion to not copy the header and use the mkimage header values ih_load and ih_ep directly. Right now I don't see any showstopper for doing it this way. I'll send a patch to change this shortly (if everything works out). Stay tuned... Thanks, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de