Booting ML405 (Kernel panic - not syncing: No init found)
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.
Signature · 2 lines
----------------------------------------------------- Neeraj Garg
neeraj garg ha scritto:
Quoted 65 lines
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 memorysome 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: 512few 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!
Quoted 3 lines
--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.
Signature · 7 lines
Marco Stornelli Embedded Software Engineer CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni http://www.coritel.it [email protected] +39 06 72582838
Quoted 9 lines · neeraj garg
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>
Quoted 6 lines
[ 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.
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
Quoted 2 lines
-----Original Message-----
From: [email protected]
[mailto:linuxppc-embedded-
Quoted 7 lines
[email protected]] On Behalf Of Grant Likely
Sent: Wednesday, July 09, 2008 8:33 AM
To: neeraj garg
Cc: [email protected]
Subject: Re: Booting ML405 (Kernel panic - not syncing: No init found) =
Quoted 6 lines
Quoted 5 lines · neeraj garg
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
Quoted 8 lines
Quoted 4 lines
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>
Quoted 3 lines
[ 3.736691] Failed to execute /sbin/init. Attempting defaults... [ 3.748073] Kernel panic - not syncing: No init found. Try
passing
Quoted 6 lines
Quoted 3 lines
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
Quoted 10 lines
what happens.
=g.
=_______________________________________________
Linuxppc-embedded mailing list
[email protected]
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.
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
Quoted 9 lines
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.
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
Quoted 158 lines
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 changexparameter.h, and later made some changed inarch/ppc/boot/simple/embed_config.candxparameters.hfile.
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 inarch/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
simplehelloworld.cusing cross compiler, it says unresolved symbol 'printf' . Is there anything else to install with ELDK ?-------------------------------------------------------------------
Neeraj GargIn 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
Quoted 9 lines
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 inlib/. 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 changexparameter.h, and later made some changed inarch/ppc/boot/simple/embed_config.candxparameters.hfile.<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 ELDK4.1 and installed it. And when I compile simplehelloworld.cusing 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. 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>
> <br>
> Hi,
<br>
> <br>
> Yes I am using ARCH=ppc (actual line is $make ARCH=ppc <br> > CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I have <br>
> placed ramdisk.image.gz inarch/ppc/boot/images. In case of ARCH=powerpc <br>
> I cannot find processor type 405 , in make menuconfig. Thats why i am <br>
> using ARCH=ppc.
<br>
> <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
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
--===============0970715627==--
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
Quoted 167 lines · Ron Sass
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 everythingTwo 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
Quoted 145 lines
Hi,
--Ron,Permissions are -rwxrwxr-x for all and owner is neeraj itself. And
shared libraries are present inlib/. 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 changexparameter.h, and later made some changed inarch/ppc/boot/simple/embed_config.candxparameters.hfile.
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 inarch/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
simplehelloworld.cusing cross compiler, it says unresolved symbol 'printf' . Is there anything else to install with ELDK ?-------------------------------------------------------------------
Neeraj GargIn 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
Quoted 9 lines
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 inlib/. 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 changexparameter.h, and later made some changed inarch/ppc/boot/simple/embed_config.candxparameters.hfile.<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 ELDK4.1 and installed it. And when I compile simplehelloworld.cusing 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. 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>
> <br>
> Hi,
<br>
> <br>
> Yes I am using ARCH=ppc (actual line is $make ARCH=ppc <br> > CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd ) for this I have <br>
> placed ramdisk.image.gz inarch/ppc/boot/images. In case of ARCH=powerpc <br>
> I cannot find processor type 405 , in make menuconfig. Thats why i am <br>
> using ARCH=ppc.
<br>
> <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
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
--===============0970715627==--
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 :
Quoted 1 line
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
Quoted 21 lines · Grant Likely
Quoted 5 lines · neeraj garg
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>
Quoted 6 lines
[ 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: 8Try changing the kernel parameters line to specify init=/bin/sh and see what happens.
g.
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).
Quoted 3 lines
make ARCH=ppc
ml405_defconfigmake 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).
Quoted 5 lines
make ARCH=powerpc mrproper
make ARCH=powerpc
ml405_defconfigmake 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:[email protected]]
Sent: Thursday, July 10, 2008 1:25 AM
To: [email protected]; John Linn; [email protected]
Cc: [email protected]
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 :
Quoted 1 line
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.
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
Quoted 22 lines
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 :
Quoted 1 line
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 ?