linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Booting ML405 (Kernel panic - not syncing: No init found)
@ 2008-07-09  4:54 neeraj garg
  2008-07-09 12:46 ` Marco Stornelli
  2008-07-09 14:33 ` Grant Likely
  0 siblings, 2 replies; 10+ messages in thread
From: neeraj garg @ 2008-07-09  4:54 UTC (permalink / raw)
  To: linuxppc-embedded

Hi,

I am trying to boot ML405 with Linux source code downloaded from 
http://www.git.xilinx.com . My cross compiler tool chain version is 
gcc-3.4.1, glibc-2.3.2 and binutils-2.15. I have also downloaded RAMDISK 
from same url (http://www.git.xilinx.com). When I download 
zImage.initrd.elf using XMD everything goes fine, untill RAMDISK is 
uncompressed, I get following messages :


loaded at:     00400000 008E519C
board data at: 008E3120 008E319C
relocated to:  00404074 004040F0
zimage at:     00404E65 00517841
initrd at:     00518000 008E2B4A
avail ram:     008E6000 02000000   //there is restriction to use 32 MB 
of memory

some of the initial messages, and then

[    0.000000] Zone PFN ranges:
[    0.000000]   DMA             0 ->     8192
[    0.000000]   Normal       8192 ->     8192
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0:        0 ->     8192
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  
Total pages: 8128
[    0.000000] Kernel command line: console=ttyUL0,19200 ip=off 
root=/dev/ram rw init=/sbin/init
[    0.000000] Xilinx INTC #0 at 0x1E000000 mapped to 0xFDFFF000
[    0.000000] PID hash table entries: 128 (order: 7, 512 bytes)
[    0.000116] Console: colour dummy device 80x25
[    0.000285] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000506] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.004931] Memory: 26168k available (1740k kernel code, 576k data, 
104k init, 0k highmem)
[    0.096364] Mount-cache hash table entries: 512

few more messages, and then

[    2.218059] RAMDISK: Compressed image found at block 0
[    3.708864] VFS: Mounted root (ext2 filesystem).
[    3.716225] Freeing unused kernel memory
                                           [    3.736691] Failed to 
execute /sbin/init.  Attempting defaults...
[    3.748073] Kernel panic - not syncing: No init found.  Try passing 
init= option to kernel.
[    3.772040] Rebooting in 180 seconds..[  183.487314]   Signal: 8


[  183.487322]   Code:   0
[  183.487329]   Addr:   c0010540
[  183.488000] Oops: Exception in kernel mode, sig: 8 [#1]
[  183.488000] NIP: c0010540 LR: 00029030 CTR: c0246cec
[  183.488000] REGS: c1c17dd0 TRAP: 2007e90   Not tainted  (2.6.25-xlnx)
[  183.488000] MSR: 00000000 <>  CR: c022e764  XER: c024c0e8
[  183.488000] TASK = c1c14850[1] 'init' THREAD: c1c16000
[  183.488000] GPR00: 00000000 00000000 c0240000 c0246cec 00000000 
00000000 c0240000 c0246cec
[  183.488000] GPR08: c0250000 0002bf20 c022e764 c0250000 c1c17e80 
c0018e44 c1c14850 00000000
[  183.488000] GPR16: 0000002a b8a199a2 0000002a b87fa729 c000bc58 
b8a199a2 b873dc16 0000002a
[  183.488000] GPR24: b87fa729 c0018e44 c022e764 000000b4 c1c17e70 
00029030 00000000 00000000
[  183.488000] NIP [c0010540] cpu_clock+0x44/0x6c
[  183.488000] LR [00029030] 0x29030
[  183.488000] Call Trace:
[  183.488000] [c1c17ca0] [c0008ad8] show_stack+0x58/0x180 (unreliable)
[  183.488000] [c1c17cd0] [c0008dec] show_regs+0x1e0/0x2cc
[  183.488000] [c1c17d00] [c00031d0] die+0x6c/0x88
[  183.488000] [c1c17d20] [c000323c] _exception+0x50/0xe0
[  183.488000] [c1c17dc0] [c0002d90] ret_from_except_full+0x0/0x4c
[  183.488000] Instruction dump:
[  183.488000] XXXXXXXX XXXXXXXX XXXXXXXX 38800000 XXXXXXXX XXXXXXXX 
XXXXXXXX 7c000124
[  183.488000] XXXXXXXX XXXXXXXX XXXXXXXX 4bfffef1 XXXXXXXX XXXXXXXX 
XXXXXXXX 7d234b78
[  183.488000] Kernel panic - not syncing: Attempted to kill init!
       

--I was doubtful  about busybox version used in RAMDISK provided at git 
site. So I compiled my own busybox-1.10.3 with my cross compiler tool 
chain still I am facing the same problem. Can anybody guide me.

-- 
-----------------------------------------------------
Neeraj Garg

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-09  4:54 Booting ML405 (Kernel panic - not syncing: No init found) neeraj garg
@ 2008-07-09 12:46 ` Marco Stornelli
  2008-07-09 14:33 ` Grant Likely
  1 sibling, 0 replies; 10+ messages in thread
From: Marco Stornelli @ 2008-07-09 12:46 UTC (permalink / raw)
  To: neeraj garg; +Cc: linuxppc-embedded

neeraj garg ha scritto:
> Hi,
> 
> I am trying to boot ML405 with Linux source code downloaded from 
> http://www.git.xilinx.com . My cross compiler tool chain version is 
> gcc-3.4.1, glibc-2.3.2 and binutils-2.15. I have also downloaded RAMDISK 
> from same url (http://www.git.xilinx.com). When I download 
> zImage.initrd.elf using XMD everything goes fine, untill RAMDISK is 
> uncompressed, I get following messages :
> 
> 
> loaded at:     00400000 008E519C
> board data at: 008E3120 008E319C
> relocated to:  00404074 004040F0
> zimage at:     00404E65 00517841
> initrd at:     00518000 008E2B4A
> avail ram:     008E6000 02000000   //there is restriction to use 32 MB 
> of memory
> 
> some of the initial messages, and then
> 
> [    0.000000] Zone PFN ranges:
> [    0.000000]   DMA             0 ->     8192
> [    0.000000]   Normal       8192 ->     8192
> [    0.000000] Movable zone start PFN for each node
> [    0.000000] early_node_map[1] active PFN ranges
> [    0.000000]     0:        0 ->     8192
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  
> Total pages: 8128
> [    0.000000] Kernel command line: console=ttyUL0,19200 ip=off 
> root=/dev/ram rw init=/sbin/init
> [    0.000000] Xilinx INTC #0 at 0x1E000000 mapped to 0xFDFFF000
> [    0.000000] PID hash table entries: 128 (order: 7, 512 bytes)
> [    0.000116] Console: colour dummy device 80x25
> [    0.000285] Dentry cache hash table entries: 4096 (order: 2, 16384 
> bytes)
> [    0.000506] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
> [    0.004931] Memory: 26168k available (1740k kernel code, 576k data, 
> 104k init, 0k highmem)
> [    0.096364] Mount-cache hash table entries: 512
> 
> few more messages, and then
> 
> [    2.218059] RAMDISK: Compressed image found at block 0
> [    3.708864] VFS: Mounted root (ext2 filesystem).
> [    3.716225] Freeing unused kernel memory
>                                           [    3.736691] Failed to 
> execute /sbin/init.  Attempting defaults...
> [    3.748073] Kernel panic - not syncing: No init found.  Try passing 
> init= option to kernel.
> [    3.772040] Rebooting in 180 seconds..[  183.487314]   Signal: 8
> 
> 
> [  183.487322]   Code:   0
> [  183.487329]   Addr:   c0010540
> [  183.488000] Oops: Exception in kernel mode, sig: 8 [#1]
> [  183.488000] NIP: c0010540 LR: 00029030 CTR: c0246cec
> [  183.488000] REGS: c1c17dd0 TRAP: 2007e90   Not tainted  (2.6.25-xlnx)
> [  183.488000] MSR: 00000000 <>  CR: c022e764  XER: c024c0e8
> [  183.488000] TASK = c1c14850[1] 'init' THREAD: c1c16000
> [  183.488000] GPR00: 00000000 00000000 c0240000 c0246cec 00000000 
> 00000000 c0240000 c0246cec
> [  183.488000] GPR08: c0250000 0002bf20 c022e764 c0250000 c1c17e80 
> c0018e44 c1c14850 00000000
> [  183.488000] GPR16: 0000002a b8a199a2 0000002a b87fa729 c000bc58 
> b8a199a2 b873dc16 0000002a
> [  183.488000] GPR24: b87fa729 c0018e44 c022e764 000000b4 c1c17e70 
> 00029030 00000000 00000000
> [  183.488000] NIP [c0010540] cpu_clock+0x44/0x6c
> [  183.488000] LR [00029030] 0x29030
> [  183.488000] Call Trace:
> [  183.488000] [c1c17ca0] [c0008ad8] show_stack+0x58/0x180 (unreliable)
> [  183.488000] [c1c17cd0] [c0008dec] show_regs+0x1e0/0x2cc
> [  183.488000] [c1c17d00] [c00031d0] die+0x6c/0x88
> [  183.488000] [c1c17d20] [c000323c] _exception+0x50/0xe0
> [  183.488000] [c1c17dc0] [c0002d90] ret_from_except_full+0x0/0x4c
> [  183.488000] Instruction dump:
> [  183.488000] XXXXXXXX XXXXXXXX XXXXXXXX 38800000 XXXXXXXX XXXXXXXX 
> XXXXXXXX 7c000124
> [  183.488000] XXXXXXXX XXXXXXXX XXXXXXXX 4bfffef1 XXXXXXXX XXXXXXXX 
> XXXXXXXX 7d234b78
> [  183.488000] Kernel panic - not syncing: Attempted to kill init!
>      
> --I was doubtful  about busybox version used in RAMDISK provided at git 
> site. So I compiled my own busybox-1.10.3 with my cross compiler tool 
> chain still I am facing the same problem. Can anybody guide me.
> 
The problem is that the kernel can't find the init program. Check out 
it, does it exist? You can use init= kernel option to specify a new 
position other than the default one, if it's in a specific folder.

-- 
Marco Stornelli
Embedded Software Engineer
CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni
http://www.coritel.it

marco.stornelli@coritel.it
+39 06 72582838

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-09  4:54 Booting ML405 (Kernel panic - not syncing: No init found) neeraj garg
  2008-07-09 12:46 ` Marco Stornelli
@ 2008-07-09 14:33 ` Grant Likely
  2008-07-09 16:06   ` John Linn
  2008-07-10  7:25   ` neeraj garg
  1 sibling, 2 replies; 10+ messages in thread
From: Grant Likely @ 2008-07-09 14:33 UTC (permalink / raw)
  To: neeraj garg; +Cc: linuxppc-embedded

On Wed, Jul 09, 2008 at 10:24:13AM +0530, neeraj garg wrote:
> Hi,
>
> I am trying to boot ML405 with Linux source code downloaded from  
> http://www.git.xilinx.com . My cross compiler tool chain version is  
> gcc-3.4.1, glibc-2.3.2 and binutils-2.15. I have also downloaded RAMDISK  
> from same url (http://www.git.xilinx.com). When I download  
> zImage.initrd.elf using XMD everything goes fine, untill RAMDISK is  
> uncompressed, I get following messages :
>
<snip>
>                                           [    3.736691] Failed to  
> execute /sbin/init.  Attempting defaults...
> [    3.748073] Kernel panic - not syncing: No init found.  Try passing  
> init= option to kernel.
> [    3.772040] Rebooting in 180 seconds..[  183.487314]   Signal: 8
>

Try changing the kernel parameters line to specify init=/bin/sh and see
what happens.

g.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-09 14:33 ` Grant Likely
@ 2008-07-09 16:06   ` John Linn
  2008-07-15  6:26     ` Neeraj Garg
  2008-07-10  7:25   ` neeraj garg
  1 sibling, 1 reply; 10+ messages in thread
From: John Linn @ 2008-07-09 16:06 UTC (permalink / raw)
  To: Grant Likely, neeraj garg; +Cc: linuxppc-embedded

The only difference I see is the tools, we are using ELDK 4.1 for now.

I have tested this on the ML405 in the past, not for a bit as our
automated testing uses an NFS root.

Since this is arch/ppc (it appears, no boot line), we have stopped work
on this architecture and are now encouraging (maybe a stronger word is
needed) you to move to arch/powerpc.

The arch/ppc was last stable at git tag last-arch-ppc and I know it
started getting more unstable after I started pulling in 2.6.26-rcx.  We
won't be doing any more changes to arch/ppc.

-- John

> -----Original Message-----
> From: linuxppc-embedded-bounces+john.linn=3Dxilinx.com@ozlabs.org
[mailto:linuxppc-embedded-
> bounces+john.linn=3Dxilinx.com@ozlabs.org] On Behalf Of Grant Likely
> Sent: Wednesday, July 09, 2008 8:33 AM
> To: neeraj garg
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: Booting ML405 (Kernel panic - not syncing: No init found)
> =

> On Wed, Jul 09, 2008 at 10:24:13AM +0530, neeraj garg wrote:
> > Hi,
> >
> > I am trying to boot ML405 with Linux source code downloaded from
> > http://www.git.xilinx.com . My cross compiler tool chain version is
> > gcc-3.4.1, glibc-2.3.2 and binutils-2.15. I have also downloaded
RAMDISK
> > from same url (http://www.git.xilinx.com). When I download
> > zImage.initrd.elf using XMD everything goes fine, untill RAMDISK is
> > uncompressed, I get following messages :
> >
> <snip>
> >                                           [    3.736691] Failed to
> > execute /sbin/init.  Attempting defaults...
> > [    3.748073] Kernel panic - not syncing: No init found.  Try
passing
> > init=3D option to kernel.
> > [    3.772040] Rebooting in 180 seconds..[  183.487314]   Signal: 8
> >
> =

> Try changing the kernel parameters line to specify init=3D/bin/sh and
see
> what happens.
> =

> g.
> =

> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded


This email and any attachments are intended for the sole use of the named r=
ecipient(s) and contain(s) confidential information that may be proprietary=
, privileged or copyrighted under applicable law. If you are not the intend=
ed recipient, do not read, copy, or forward this email message or any attac=
hments. Delete this email message and any attachments immediately.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-09 14:33 ` Grant Likely
  2008-07-09 16:06   ` John Linn
@ 2008-07-10  7:25   ` neeraj garg
  2008-07-10 14:21     ` John Linn
  2008-07-10 15:54     ` Ron Sass
  1 sibling, 2 replies; 10+ messages in thread
From: neeraj garg @ 2008-07-10  7:25 UTC (permalink / raw)
  To: Grant Likely, John.Linn, marco.stornelli; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]

Hi,

Yes I am using ARCH=ppc (actual line is $make ARCH=ppc 
CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I have 
placed ramdisk.image.gz in arch/ppc/boot/images. In case of ARCH=powerpc 
I cannot find processor type 405 , in make menuconfig. Thats why i am 
using ARCH=ppc.

And when I give kernel command string as init=/bin/sh , it says :
 >Failed to execute /bin/sh.  Attempting defaults...
[    3.744035] Kernel panic - not syncing: No init found.  Try passing 
init= option to kernel.
[    3.768073] Rebooting in 30 seconds..

--init is present in sbin/init which is a soft link to ../bin/busybox

--I used powepc-405-gnu-readelf -h bin/sh to verify that it is compiled 
for powerpc itself.

Any other suggestions ?

-----------------------------------------------------
Neeraj Garg




Grant Likely wrote:
> On Wed, Jul 09, 2008 at 10:24:13AM +0530, neeraj garg wrote:
>   
>> Hi,
>>
>> I am trying to boot ML405 with Linux source code downloaded from  
>> http://www.git.xilinx.com . My cross compiler tool chain version is  
>> gcc-3.4.1, glibc-2.3.2 and binutils-2.15. I have also downloaded RAMDISK  
>> from same url (http://www.git.xilinx.com). When I download  
>> zImage.initrd.elf using XMD everything goes fine, untill RAMDISK is  
>> uncompressed, I get following messages :
>>
>>     
> <snip>
>   
>>                                           [    3.736691] Failed to  
>> execute /sbin/init.  Attempting defaults...
>> [    3.748073] Kernel panic - not syncing: No init found.  Try passing  
>> init= option to kernel.
>> [    3.772040] Rebooting in 180 seconds..[  183.487314]   Signal: 8
>>
>>     
>
> Try changing the kernel parameters line to specify init=/bin/sh and see
> what happens.
>
> g.
>   

[-- Attachment #2: Type: text/html, Size: 2500 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-10  7:25   ` neeraj garg
@ 2008-07-10 14:21     ` John Linn
  2008-07-10 15:54     ` Ron Sass
  1 sibling, 0 replies; 10+ messages in thread
From: John Linn @ 2008-07-10 14:21 UTC (permalink / raw)
  To: neeraj garg, grant.likely, marco.stornelli; +Cc: lorenzo, linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 4478 bytes --]

With regards to arch/ppc:

 

I just built and tested it from the Xilinx Git tree (with ELDK 4.1) and
don't see the problem you see.  You shouldn't need anything on the
command line for the init, but I tried it matching yours without any
issue.  

 

I noticed that you are using a UART Lite and I test with 16550.  We have
a reference design available for the 405 also to help you get a baseline
before you make changes, you can see where to get it at
http://git.xilinx.com <http://git.xilinx.com/>  also.   Getting a good
solid baseline before you make changes can make life easier, and maybe
you already did this and I don't realize it ;).

 

I can't tell how your kernel is configured, so I would use the Xilinx
provided default kernel configuration, then make changes from there
(like from 8250 UART and console to UART Lite).

 

>make ARCH=ppc ml405_defconfig

>make ARCH=ppc zImage.initrd

 

Since you pulled from the Xilinx Git tree, you should be able to get the
ML405 running easily (assuming I have done my job right).

 

You should be able to use arch/powerpc and it would be best to do that
as arch/ppc is not well supported now.  If you use the Xilinx default
kernel configuration you shouldn't need to do anything (such as finding
405 in the menuconfig)  if you use our reference design for the board
(bit stream).

 

I just tested from the Xilinx Git tree on the ML405 with arch/powerpc
and it looked good (using ELDK 4.1 tools).  The following commands
should build a kernel that runs on it. You might want to update if you
haven't pulled from the Xilinx Git tree in a while (git pull, or clone
the tree again in a new directory).

 

>make ARCH=powerpc mrproper

>make ARCH=powerpc ml405_defconfig

>make ARCH=powerpc zImage.initrd

 

With regards to the fact that you're restricting the memory to 32 Meg,
you might get try not doing this to get the kernel running properly,
then make that change.

 

Hope that helps,

John

 

 

________________________________

From: neeraj garg [mailto:neerajg@cdac.in] 
Sent: Thursday, July 10, 2008 1:25 AM
To: grant.likely@secretlab.ca; John Linn; marco.stornelli@coritel.it
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Booting ML405 (Kernel panic - not syncing: No init found)

 

Hi,

Yes I am using ARCH=ppc (actual line is $make ARCH=ppc
CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I have
placed ramdisk.image.gz in arch/ppc/boot/images. In case of ARCH=powerpc
I cannot find processor type 405 , in make menuconfig. Thats why i am
using ARCH=ppc.

And when I give kernel command string as init=/bin/sh , it says : 
>Failed to execute /bin/sh.  Attempting defaults...
[    3.744035] Kernel panic - not syncing: No init found.  Try passing
init= option to kernel.
[    3.768073] Rebooting in 30 seconds..

--init is present in sbin/init which is a soft link to ../bin/busybox

--I used powepc-405-gnu-readelf -h bin/sh to verify that it is compiled
for powerpc itself.

Any other suggestions ?




-----------------------------------------------------
Neeraj Garg
 



Grant Likely wrote: 

On Wed, Jul 09, 2008 at 10:24:13AM +0530, neeraj garg wrote:
  

	Hi,
	 
	I am trying to boot ML405 with Linux source code downloaded from

	http://www.git.xilinx.com . My cross compiler tool chain version
is  
	gcc-3.4.1, glibc-2.3.2 and binutils-2.15. I have also downloaded
RAMDISK  
	from same url (http://www.git.xilinx.com). When I download  
	zImage.initrd.elf using XMD everything goes fine, untill RAMDISK
is  
	uncompressed, I get following messages :
	 
	    

<snip>
  

	                                          [    3.736691] Failed
to  
	execute /sbin/init.  Attempting defaults...
	[    3.748073] Kernel panic - not syncing: No init found.  Try
passing  
	init= option to kernel.
	[    3.772040] Rebooting in 180 seconds..[  183.487314]
Signal: 8
	 
	    

 
Try changing the kernel parameters line to specify init=/bin/sh and see
what happens.
 
g.
  


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.


[-- Attachment #2: Type: text/html, Size: 21633 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-10  7:25   ` neeraj garg
  2008-07-10 14:21     ` John Linn
@ 2008-07-10 15:54     ` Ron Sass
  1 sibling, 0 replies; 10+ messages in thread
From: Ron Sass @ 2008-07-10 15:54 UTC (permalink / raw)
  To: neeraj garg; +Cc: linuxppc-embedded, John.Linn, marco.stornelli


In addition to what John wrote, I would also investigate your ramdisk.
I would be sure to check that you have the permissions/owner set correctly
on bin/busybox.  Also, I would double check that, if you compiled busybox
with shared libraries, the shared libraries are in the right place
on your ramdisk.

Ron

> 
> Hi,
> 
> Yes I am using ARCH=ppc (actual line is $make ARCH=ppc 
> CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I have 
> placed ramdisk.image.gz in arch/ppc/boot/images. In case of ARCH=powerpc 
> I cannot find processor type 405 , in make menuconfig. Thats why i am 
> using ARCH=ppc.
> 
> And when I give kernel command string as init=/bin/sh , it says :
>  >Failed to execute /bin/sh.  Attempting defaults...
> [    3.744035] Kernel panic - not syncing: No init found.  Try passing 
> init= option to kernel.
> [    3.768073] Rebooting in 30 seconds..
> 
> --init is present in sbin/init which is a soft link to ../bin/busybox
> 
> --I used powepc-405-gnu-readelf -h bin/sh to verify that it is compiled 
> for powerpc itself.
> 
> Any other suggestions ?
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-09 16:06   ` John Linn
@ 2008-07-15  6:26     ` Neeraj Garg
  2008-07-16 14:47       ` Ron Sass
  0 siblings, 1 reply; 10+ messages in thread
From: Neeraj Garg @ 2008-07-15  6:26 UTC (permalink / raw)
  To: John Linn; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 2137 bytes --]

Hi,

--Ron,Permissions are -rwxrwxr-x for all and owner is neeraj itself. And 
shared libraries are present in lib/ . Now I have placed helloworld.elf 
(using printf to print helloworld, and linked with -static option) in 
bin/ and changed init=/bin/helloworld , again it says cannot execute 
/bin/helloworld.

--John, we are using our custom hardware board, not exactly ML405 but 
its more or less similar to ML405, so I cannot use bit file provided for 
ML405. Till now we were using xilkernel, but now onward we are planning 
to use Linux. For serial console I have no option other than uartlite. 
This is how I compiled kernel :

1) make ARCH=ppc ml405_defconfig
2) patched kernel src with EDK(10.1) , so as to change xparameter.h, and 
later made some changed in arch/ppc/boot/simple/embed_config.c and 
xparameters.h file.
3) make ARCH=ppc menuconfig , and selected uartlite to be console and 
ramdisk as file system.
4) Created ramdisk (as per Building embedded linux, Karim Yaghmour, 
however major and minor number for device nodes is similar to ramdisk 
provided at git.xilinx.com)
5) I have placed this ramdisk in arch/ppc/boot/images
6) And then issued $make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu- 
zImge.initrd


--I have downloaded   ELDK4.1 and installed it. And when I compile 
simple helloworld.c using cross compiler, it says unresolved symbol 
'printf' . Is there anything else to install with ELDK ?


-------------------------------------------------------------------
Neeraj Garg



In addition to what John wrote, I would also investigate your ramdisk.
I would be sure to check that you have the permissions/owner set correctly
on bin/busybox.  Also, I would double check that, if you compiled busybox
with shared libraries, the shared libraries are in the right place
on your ramdisk.


Ron

 >
 > Hi,
 >
 > Yes I am using ARCH=ppc (actual line is $make ARCH=ppc
 > CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I have
 > placed ramdisk.image.gz in arch/ppc/boot/images. In case of ARCH=powerpc
 > I cannot find processor type 405 , in make menuconfig. Thats why i am
 > using ARCH=ppc.
 >

[-- Attachment #2: Type: text/html, Size: 2695 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-15  6:26     ` Neeraj Garg
@ 2008-07-16 14:47       ` Ron Sass
  2008-07-17 15:23         ` Neeraj Garg
  0 siblings, 1 reply; 10+ messages in thread
From: Ron Sass @ 2008-07-16 14:47 UTC (permalink / raw)
  To: Neeraj Garg; +Cc: John Linn, linuxppc-embedded


Hmmm... I think you've got a problem with your ramdisk.  There are
a couple of issues but these alone don't explain your helloworld test.

1.  busybox should be set to root not neeraj 
2.  you need to setuid busybox for some apps to run
    (chmod 4775 bin/busybox so that it is srwxrwxr-x-r)
3.  I would be wary of Yaghmour's text... it is a little dated
    and if I remember correctly, he uses some regular expressions
    to copy "just" the libraries you need to lib; but with
    newer versions of gcc/glibc these regular expressions
    don't catch everything

Two questions:

Can you tell me exactly what your cross-compile command-line looks
like?  How are compiling helloworld?

How are you creating the ramdisk?  How do you go from directory
structure to ramdisk.image.gz?

Ron

> 
> Hi,
> 
> --Ron,Permissions are -rwxrwxr-x for all and owner is neeraj itself. And 
> shared libraries are present in lib/ . Now I have placed helloworld.elf 
> (using printf to print helloworld, and linked with -static option) in 
> bin/ and changed init=/bin/helloworld , again it says cannot execute 
> /bin/helloworld.
> 
> --John, we are using our custom hardware board, not exactly ML405 but 
> its more or less similar to ML405, so I cannot use bit file provided for 
> ML405. Till now we were using xilkernel, but now onward we are planning 
> to use Linux. For serial console I have no option other than uartlite. 
> This is how I compiled kernel :
> 
> 1) make ARCH=ppc ml405_defconfig
> 2) patched kernel src with EDK(10.1) , so as to change xparameter.h, and 
> later made some changed in arch/ppc/boot/simple/embed_config.c and 
> xparameters.h file.
> 3) make ARCH=ppc menuconfig , and selected uartlite to be console and 
> ramdisk as file system.
> 4) Created ramdisk (as per Building embedded linux, Karim Yaghmour, 
> however major and minor number for device nodes is similar to ramdisk 
> provided at git.xilinx.com)
> 5) I have placed this ramdisk in arch/ppc/boot/images
> 6) And then issued $make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu- 
> zImge.initrd
> 
> 
> --I have downloaded   ELDK4.1 and installed it. And when I compile 
> simple helloworld.c using cross compiler, it says unresolved symbol 
> 'printf' . Is there anything else to install with ELDK ?
> 
> 
> -------------------------------------------------------------------
> Neeraj Garg
> 
> 
> 
> In addition to what John wrote, I would also investigate your ramdisk.
> I would be sure to check that you have the permissions/owner set correctly
> on bin/busybox.  Also, I would double check that, if you compiled busybox
> with shared libraries, the shared libraries are in the right place
> on your ramdisk.
> 
> 
> Ron
> 
>  >
>  > Hi,
>  >
>  > Yes I am using ARCH=ppc (actual line is $make ARCH=ppc
>  > CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I have
>  > placed ramdisk.image.gz in arch/ppc/boot/images. In case of ARCH=powerpc
>  > I cannot find processor type 405 , in make menuconfig. Thats why i am
>  > using ARCH=ppc.
>  >
> 
> --------------060307000300070002040802
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
>   <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
> </head>
> <body bgcolor="#ffffff" text="#000000">
> Hi,<br>
> <br>
> --Ron,Permissions are -rwxrwxr-x for all and owner is neeraj itself.
> And shared libraries are present in lib/ . Now I have placed
> helloworld.elf (using printf to print helloworld, and linked with
> -static option) in bin/ and changed init=/bin/helloworld , again it
> says cannot execute /bin/helloworld. <br>
> <br>
> --John, we are using our custom hardware board, not exactly ML405 but
> its more or less similar to ML405, so I cannot use bit file provided
> for ML405. Till now we were using xilkernel, but now onward we are
> planning to use Linux. For serial console I have no option other than
> uartlite. This is how I compiled kernel :<br>
> <br>
> 1) make ARCH=ppc ml405_defconfig<br>
> 2) patched kernel src with EDK(10.1) , so as to change xparameter.h,
> and later made some changed in arch/ppc/boot/simple/embed_config.c and
> xparameters.h file.<br>
> 3) make ARCH=ppc menuconfig , and selected uartlite to be console and
> ramdisk as file system.<br>
> 4) Created ramdisk (as per Building embedded linux, Karim Yaghmour,
> however major and minor number for device nodes is similar to ramdisk
> provided at git.xilinx.com)<br>
> 5) I have placed this ramdisk in arch/ppc/boot/images<br>
> 6) And then issued $make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu-
> zImge.initrd<br>
> <br>
> <br>
> --I have downloaded &nbsp; ELDK4.1 and installed it. And when I compile
> simple helloworld.c using cross compiler, it says unresolved symbol
> 'printf' . Is there anything else to install with ELDK ?<br>
> <br>
> <br>
> <div class="moz-signature">
> <pre>-------------------------------------------------------------------
> Neeraj Garg
> </pre>
> </div>
> <br>
> <br>
> In addition to what John wrote, I would also investigate your ramdisk.
> <br>
> I would be sure to check that you have the permissions/owner set
> correctly
> <br>
> on bin/busybox. &nbsp;Also, I would double check that, if you compiled
> busybox
> <br>
> with shared libraries, the shared libraries are in the right place
> <br>
> on your ramdisk.<br>
> <br>
> <br>
> Ron
> <br>
> <br>
> &gt; <br>
> &gt; Hi,
> <br>
> &gt; <br>
> &gt; Yes I am using ARCH=ppc (actual line is $make ARCH=ppc <br>
> &gt; CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I
> have <br>
> &gt; placed ramdisk.image.gz in arch/ppc/boot/images. In case of
> ARCH=powerpc <br>
> &gt; I cannot find processor type 405 , in make menuconfig. Thats why i
> am <br>
> &gt; using ARCH=ppc.
> <br>
> &gt; <br>
> <font color="navy" face="Arial" size="2"><span
>  style="font-size: 10pt; font-family: Arial; color: navy;"></span></font>
> </body>
> </html>
> 
> --------------060307000300070002040802--
> 
> 
> --===============0970715627==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> --===============0970715627==--
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Booting ML405 (Kernel panic - not syncing: No init found)
  2008-07-16 14:47       ` Ron Sass
@ 2008-07-17 15:23         ` Neeraj Garg
  0 siblings, 0 replies; 10+ messages in thread
From: Neeraj Garg @ 2008-07-17 15:23 UTC (permalink / raw)
  To: Ron Sass; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 8074 bytes --]

Hi,

I changed the owner of the busybox, and used chmod as you told me for 
bin/busybox but its permission are -rwsrwxr-x not srwxrwxr-x-r.

--for compiling helloworld I used $powerpc-405-linux-gnu-gcc -static 
helloworld.c -o helloworld

--For ramdisk creation I followed the following steps:

mkdir tmp/initrd
dd if=/dev/zero of=images/initrd.img bs=1k count=8192
/sbin/mke2fs -F -v -m0 images/initrd.img
mount -o loop images/initrd.img tmp/initrd
cp -av ramdisk/* tmp/initrd

//here ramdisk holds directory structure.. I copied directory structure 
from git, linux support ...but I changed lib and bin contents (bin
contents with busybox-1.10.3 installation, and lib contents with lib of 
my cross-compiler setup ,crosstool-0.28-rc35)

umount tmp/initrd
gzip < images/initrd.img > images/ramdisk.image.gz

----For making directory structure of ramdisk I followed following steps
for file in libc libcrypt libdl libm libpthread libresolv libutil
do
cp $file-*.so /home/neeraj/kerneldev/rootfs0.1/lib
cp -d $file.so.[*0-9] /home/neeraj/kerneldev/rootfs0.1/lib
done
cp -d ld*.so* /home/neeraj/kerneldev/rootfs0.1/lib

----And in menuconfig I selected filesystem as ramdisk with following 
settings
<*>   RAM block device support 
(16)    Default number of RAM disks
(32768) Default RAM disk size (kbytes) 

// I think here can be the issue

-------------------------------------------------------------------
Neeraj Garg




Ron Sass wrote:
> Hmmm... I think you've got a problem with your ramdisk.  There are
> a couple of issues but these alone don't explain your helloworld test.
>
> 1.  busybox should be set to root not neeraj 
> 2.  you need to setuid busybox for some apps to run
>     (chmod 4775 bin/busybox so that it is srwxrwxr-x-r)
> 3.  I would be wary of Yaghmour's text... it is a little dated
>     and if I remember correctly, he uses some regular expressions
>     to copy "just" the libraries you need to lib; but with
>     newer versions of gcc/glibc these regular expressions
>     don't catch everything
>
> Two questions:
>
> Can you tell me exactly what your cross-compile command-line looks
> like?  How are compiling helloworld?
>
> How are you creating the ramdisk?  How do you go from directory
> structure to ramdisk.image.gz?
>
> Ron
>
>   
>> Hi,
>>
>> --Ron,Permissions are -rwxrwxr-x for all and owner is neeraj itself. And 
>> shared libraries are present in lib/ . Now I have placed helloworld.elf 
>> (using printf to print helloworld, and linked with -static option) in 
>> bin/ and changed init=/bin/helloworld , again it says cannot execute 
>> /bin/helloworld.
>>
>> --John, we are using our custom hardware board, not exactly ML405 but 
>> its more or less similar to ML405, so I cannot use bit file provided for 
>> ML405. Till now we were using xilkernel, but now onward we are planning 
>> to use Linux. For serial console I have no option other than uartlite. 
>> This is how I compiled kernel :
>>
>> 1) make ARCH=ppc ml405_defconfig
>> 2) patched kernel src with EDK(10.1) , so as to change xparameter.h, and 
>> later made some changed in arch/ppc/boot/simple/embed_config.c and 
>> xparameters.h file.
>> 3) make ARCH=ppc menuconfig , and selected uartlite to be console and 
>> ramdisk as file system.
>> 4) Created ramdisk (as per Building embedded linux, Karim Yaghmour, 
>> however major and minor number for device nodes is similar to ramdisk 
>> provided at git.xilinx.com)
>> 5) I have placed this ramdisk in arch/ppc/boot/images
>> 6) And then issued $make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu- 
>> zImge.initrd
>>
>>
>> --I have downloaded   ELDK4.1 and installed it. And when I compile 
>> simple helloworld.c using cross compiler, it says unresolved symbol 
>> 'printf' . Is there anything else to install with ELDK ?
>>
>>
>> -------------------------------------------------------------------
>> Neeraj Garg
>>
>>
>>
>> In addition to what John wrote, I would also investigate your ramdisk.
>> I would be sure to check that you have the permissions/owner set correctly
>> on bin/busybox.  Also, I would double check that, if you compiled busybox
>> with shared libraries, the shared libraries are in the right place
>> on your ramdisk.
>>
>>
>> Ron
>>
>>  >
>>  > Hi,
>>  >
>>  > Yes I am using ARCH=ppc (actual line is $make ARCH=ppc
>>  > CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I have
>>  > placed ramdisk.image.gz in arch/ppc/boot/images. In case of ARCH=powerpc
>>  > I cannot find processor type 405 , in make menuconfig. Thats why i am
>>  > using ARCH=ppc.
>>  >
>>
>> --------------060307000300070002040802
>> Content-Type: text/html; charset=ISO-8859-1
>> Content-Transfer-Encoding: 7bit
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>> <html>
>> <head>
>>   <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
>> </head>
>> <body bgcolor="#ffffff" text="#000000">
>> Hi,<br>
>> <br>
>> --Ron,Permissions are -rwxrwxr-x for all and owner is neeraj itself.
>> And shared libraries are present in lib/ . Now I have placed
>> helloworld.elf (using printf to print helloworld, and linked with
>> -static option) in bin/ and changed init=/bin/helloworld , again it
>> says cannot execute /bin/helloworld. <br>
>> <br>
>> --John, we are using our custom hardware board, not exactly ML405 but
>> its more or less similar to ML405, so I cannot use bit file provided
>> for ML405. Till now we were using xilkernel, but now onward we are
>> planning to use Linux. For serial console I have no option other than
>> uartlite. This is how I compiled kernel :<br>
>> <br>
>> 1) make ARCH=ppc ml405_defconfig<br>
>> 2) patched kernel src with EDK(10.1) , so as to change xparameter.h,
>> and later made some changed in arch/ppc/boot/simple/embed_config.c and
>> xparameters.h file.<br>
>> 3) make ARCH=ppc menuconfig , and selected uartlite to be console and
>> ramdisk as file system.<br>
>> 4) Created ramdisk (as per Building embedded linux, Karim Yaghmour,
>> however major and minor number for device nodes is similar to ramdisk
>> provided at git.xilinx.com)<br>
>> 5) I have placed this ramdisk in arch/ppc/boot/images<br>
>> 6) And then issued $make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu-
>> zImge.initrd<br>
>> <br>
>> <br>
>> --I have downloaded &nbsp; ELDK4.1 and installed it. And when I compile
>> simple helloworld.c using cross compiler, it says unresolved symbol
>> 'printf' . Is there anything else to install with ELDK ?<br>
>> <br>
>> <br>
>> <div class="moz-signature">
>> <pre>-------------------------------------------------------------------
>> Neeraj Garg
>> </pre>
>> </div>
>> <br>
>> <br>
>> In addition to what John wrote, I would also investigate your ramdisk.
>> <br>
>> I would be sure to check that you have the permissions/owner set
>> correctly
>> <br>
>> on bin/busybox. &nbsp;Also, I would double check that, if you compiled
>> busybox
>> <br>
>> with shared libraries, the shared libraries are in the right place
>> <br>
>> on your ramdisk.<br>
>> <br>
>> <br>
>> Ron
>> <br>
>> <br>
>> &gt; <br>
>> &gt; Hi,
>> <br>
>> &gt; <br>
>> &gt; Yes I am using ARCH=ppc (actual line is $make ARCH=ppc <br>
>> &gt; CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I
>> have <br>
>> &gt; placed ramdisk.image.gz in arch/ppc/boot/images. In case of
>> ARCH=powerpc <br>
>> &gt; I cannot find processor type 405 , in make menuconfig. Thats why i
>> am <br>
>> &gt; using ARCH=ppc.
>> <br>
>> &gt; <br>
>> <font color="navy" face="Arial" size="2"><span
>>  style="font-size: 10pt; font-family: Arial; color: navy;"></span></font>
>> </body>
>> </html>
>>
>> --------------060307000300070002040802--
>>
>>
>> --===============0970715627==
>> Content-Type: text/plain; charset="us-ascii"
>> MIME-Version: 1.0
>> Content-Transfer-Encoding: 7bit
>> Content-Disposition: inline
>>
>> _______________________________________________
>> Linuxppc-embedded mailing list
>> Linuxppc-embedded@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>> --===============0970715627==--
>>
>>     

[-- Attachment #2: Type: text/html, Size: 8871 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-07-17 15:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-09  4:54 Booting ML405 (Kernel panic - not syncing: No init found) neeraj garg
2008-07-09 12:46 ` Marco Stornelli
2008-07-09 14:33 ` Grant Likely
2008-07-09 16:06   ` John Linn
2008-07-15  6:26     ` Neeraj Garg
2008-07-16 14:47       ` Ron Sass
2008-07-17 15:23         ` Neeraj Garg
2008-07-10  7:25   ` neeraj garg
2008-07-10 14:21     ` John Linn
2008-07-10 15:54     ` Ron Sass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).