[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclinux-dev
Subject:    [uClinux-dev] Re: 5272 custom board can load elf image,
From:       "Bin Liu" <liubinw () gmail ! com>
Date:       2007-04-26 14:40:04
Message-ID: 2644e6d90704260740w1f8a42f2v8ff8948bbed12ee4 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I think I know what happened here, my bootloader was not loading the
whole binary and the romfs part got truncated.

Bin



On 4/16/07, Bin Liu <liubinw@gmail.com> wrote:
>
> Hi,
> After ported uClinux 2.4.17 to a 5272 custom board, elf image was built
> with romfs
> and up and running fine, then I converted the image to binary format,
> with:
>   #m68k-elf-objcopy -O binary images/image.elf image.bin
>
> the binary was loaded and booted with error message:
>   Kernel panic: No init found.  Try passing init= option to kernel
>
> This seems to me the romfs issue, since at the end of init, it was
> "Warning: unable to open an initial console."
> and then can not execute /bin/init and finally fell through to Kernel
> panic.
>
> then I looked into the init message, the ROMFS was actually there:
>   0: 8020000-80203FF [VIRTUAL 8020000-80203FF] (RO) <NONE>
>   1: 400F6E70-40180A6F [VIRTUAL 400F6E70-40180A6F] (RO) <ROMFS>
>
> and I tried to dump the first couple bytes of romfs, looks ok too:
> +++++++++++++++++++++ Dump buffer [400f6e70/32] +++++++++++++++++++
>   0000:  2d 72 6f 6d 31 66 73 2d 00 08 98 30 f4 ed 0e e5
>   0000:   -  r  o  m  1  f  s  -  .  .  .  0  .  .  .  .
>   0010:  52 4f 4d 64 69 73 6b 00 00 00 00 00 00 00 00 00
>   0010:   R  O  M  d  i  s  k  .  .  .  .  .  .  .  .  .
> exactly the same as the working elf image.
>
> anybody could shed some light on this for me would be much appreciated.
>
> Thanks,
> Bin
>
>
>
>
>
>

[Attachment #5 (text/html)]

<div>I think I know what happened here, my bootloader&nbsp;was not loading the </div>
<div>whole binary and the romfs part got truncated.</div>
<div>&nbsp;</div>
<div>Bin</div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 4/16/07, <b class="gmail_sendername">Bin Liu</b> \
&lt;<a href="mailto:liubinw@gmail.com">liubinw@gmail.com</a>&gt; wrote:</span> \
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; \
BORDER-LEFT: #ccc 1px solid"> <div style="DIRECTION: ltr">Hi,</div>
<div>After ported uClinux 2.4.17 to&nbsp;a 5272 custom board, elf image was built \
with romfs </div> <div>and up and running fine, then I converted the image to binary \
format, with:</div> <div>&nbsp; #m68k-elf-objcopy -O binary images/image.elf \
image.bin</div> <div>&nbsp;</div>
<div>the binary was loaded and booted with error message:</div>
<div>&nbsp; Kernel panic: No init found.&nbsp; Try passing init= option to \
kernel</div> <div>&nbsp;</div>
<div>This seems to me the romfs issue, since at the end of init, it was </div>
<div>&quot;Warning: unable to open an initial console.&quot;</div>
<div>and then can not execute /bin/init and finally fell through to Kernel \
panic.</div> <div>&nbsp;</div>
<div>then I looked into the init message, the ROMFS was actually there:</div>
<div>&nbsp; 0: 8020000-80203FF [VIRTUAL 8020000-80203FF] (RO) &lt;NONE&gt;<br>&nbsp; \
1: 400F6E70-40180A6F [VIRTUAL 400F6E70-40180A6F] (RO) &lt;ROMFS&gt;</div> \
<div>&nbsp;</div> <div>and I tried to dump the&nbsp;first couple bytes of romfs, \
looks ok too:</div> <div>+++++++++++++++++++++ Dump buffer [400f6e70/32] \
+++++++++++++++++++<br>&nbsp; 0000:&nbsp; 2d 72 6f 6d 31 66 73 2d 00 08 98 30 f4 ed \
0e e5<br>&nbsp; 0000:&nbsp;&nbsp; -&nbsp; r&nbsp; o&nbsp; m&nbsp; 1&nbsp; f&nbsp; \
s&nbsp; -&nbsp; .&nbsp; .&nbsp; .&nbsp; 0&nbsp; .&nbsp; .&nbsp; .&nbsp; .<br>&nbsp; \
0010:&nbsp; 52 4f 4d 64 69 73 6b 00 00 00 00 00 00 00 00 00  <br>&nbsp; \
0010:&nbsp;&nbsp; R&nbsp; O&nbsp; M&nbsp; d&nbsp; i&nbsp; s&nbsp; k&nbsp; .&nbsp; \
.&nbsp; .&nbsp; .&nbsp; .&nbsp; .&nbsp; .&nbsp; .&nbsp; .</div> <div>exactly the same \
as the working elf image.</div> <div>&nbsp;</div>
<div>anybody could shed some light on this for me would be much appreciated.</div>
<div>&nbsp;</div>
<div>Thanks,</div><span class="sg">
<div>Bin </div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><br>&nbsp;</div><br></span></blockquote></div><br>



_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic