Highly improved unbricking method

Bas Wijnen wijnen at debian.org
Tue Oct 12 12:58:39 EDT 2010


Op 12-10-10 04:01, Xiangfu Liu schreef:
> 
> 
> On Tue, Oct 12, 2010 at 12:11 AM, Xiangfu Liu <xiangfu at sharism.cc> wrote:
> 
>     On 10/11/2010 02:18 AM, Bas Wijnen wrote:
>     > Ah, that makes sense. I'm sending stage1 to somewhere very low in
>     memory
>     > (I think 0x80001000), which is probably used by u-boot when it does
>     > software usb-boot mode. So stage1 is overwriting u-boot, which
>     leads to
>     > a crash.
> 
>     Hi Bas
> 
>     the stage1 was send to 0x80002000. I think it's iris.raw problem.
> 
>     I found the iris.raw is base on 0x80000000, can we change the iris
>     to 0x80100000 ?
>     attach is the patch I try to do that. but it not working. did I
>     forget something?
> 
> 
>  by apply this patch the "iris.raw", stop at:
> 
> Serial port initialized
> idle thread is 8011c1b4
> Starting thread 00 at 81ffeea4
> Starting thread 01 at 81ff8ea4
> Starting thread 02 at 81ff2ea4
> 
> then serisl console nothing output.

Ah, that's good. Iris must be started from 0x80000000, because it has
interrupt vectors at the start. Your try crashes as soon as it jumps to
user space, or actually as soon as user space tries to make a system call.

Loading at 0x80000000 is a problem for the nand-boot as well. So I wrote
a wrapper for it, which copies the code after loading and runs it from
its proper location. This wrapper is PIC, so it can be loaded anywhere.
This wrapper is called mips/start.raw (it includes iris.raw). Also, its
entry point is its first byte, which makes booting with xbboot trivial:

xbboot -u 0x80002000 mips/start.raw

It works fine for hardware usb boot; please check if it works from
software as well. I pushed the change to the git repository.

Thanks,
Bas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20101012/6f98612c/attachment.pgp>


More information about the discussion mailing list


interactive