From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 19 Jul 2013 11:16:33 +0200 Subject: [U-Boot] [U-boot] failed to boot an compressed u-boot.bin In-Reply-To: References: Message-ID: <20130719111633.32c8745a@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi TigerLiu at viatech.com.cn, On Fri, 19 Jul 2013 14:59:47 +0800, wrote: > Hi, Albert: > I found new u-boot source code had some PIC related question. > I succeeded to boot self-uncompressed u-boot.bin now. > > I reviewed self-uncompressed header code (similar with Linux kernel > piggy header), found: > The header code would de-compress compressed uboot.bin to 0x0000 8000 > dram location, and then jump to run it. No wonder it did not work... The decompressing code should decompress at the expected location (and be careful that the decompressed code not overwrite the compressed one or the decompressing code), not at a fixed one. > Because i compiled uboot with "SYS_TEXT_BASE=0x03F80000" in board.cfg > before. > So boot failed. Yes, clearly the board config and decompressor settings are incompatible. However: > Now, I changed SYS_TEXT_BASE=0x08000000 in boards.cfg. > So, boot the compressed u-boot.bin successfully! I don't think this is a clean fix, for two reasons: 1) Barring any typos, the address you changed the board config to, 0x80000000, is different from the address at which the decompressor apparently writes to, 0x00008000. 1) Be it 0x00008000 or 0x80000000, neither of these addresses is the one where U-Boot on your board is supposed to run; it only works for sure at the original SYS_TEXT_BASE, 0x03F80000. Can you not change the decompressor's target address to the board's SYS_TEXT_BASE? > Best wishes, Amicalement, -- Albert.