All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neeraj Garg <neerajg@cdac.in>
To: Ron Sass <rsass@uncc.edu>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Booting ML405 (Kernel panic - not syncing: No init found)
Date: Thu, 17 Jul 2008 20:53:20 +0530	[thread overview]
Message-ID: <487F63E8.2010303@cdac.in> (raw)
In-Reply-To: <200807161447.m6GElde4032109@rsass-homer.uncc.edu>

[-- 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 --]

  reply	other threads:[~2008-07-17 15:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2008-07-10  7:25   ` neeraj garg
2008-07-10 14:21     ` John Linn
2008-07-10 15:54     ` Ron Sass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=487F63E8.2010303@cdac.in \
    --to=neerajg@cdac.in \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=rsass@uncc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.