I am trying to create a root file systems using busybox for ARM926EJ-s based board.<br>I'm using linaro tool chain 4.6.1(arm-linux-gnueabi-) in ubuntu 10.04<br><br>First step,I started with <br>make defconfig<br>CFLAGS=-march=armv5te make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig<br>
enabled only static binary option <br>CFLAGS=-march=armv5te make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- CONFIG_PREFIX=$ROOTFS install<br><br><br>when I do readelf on the busybox binary,I'm getting below messages<br>
File Attributes<br> Tag_CPU_name: "7-A"<br> Tag_CPU_arch: v7<br> Tag_CPU_arch_profile: Application<br> Tag_ARM_ISA_use: Yes<br> Tag_THUMB_ISA_use: Thumb-2<br> Tag_FP_arch: VFPv3-D16<br> Tag_ABI_PCS_wchar_t: 4<br>
Tag_ABI_FP_denormal: Needed<br> Tag_ABI_FP_exceptions: Needed<br> Tag_ABI_FP_number_model: IEEE 754<br> Tag_ABI_align_needed: 8-byte<br> Tag_ABI_align_preserved: 8-byte, except leaf SP<br> Tag_ABI_enum_size: int<br>
Tag_ABI_HardFP_use: SP and DP<br> Tag_DIV_use: Not allowed<br><br>If i use this binary in for root file system,with init=/linuxrc<br>I'm getting undefined instruction error and kernel panics<br>init (1): undefined instruction: pc=40047930<br>
Code: 0000aa80 00000714 e3e00000 e1a0f00e (eca0420c)<br>Kernel panic - not syncing: Attempted to kill init!<br><br><br>I see that the busybox is compiled for different arm architecture, other than the one i specified (armv5te)<br>
<br>To identify the issue is with busybox or toolchain or configuration,I tried with hello program (hello world) as init (init =/sbin/hello).<br>arm-linux-gnueabi-gcc -march=armv5te -o hello hello.c<br>Failed to execute /sbin/hello. Attempting defaults...<br>
init (1): undefined instruction: pc=0006f7b2<br>Code: 2001 2000 f85d fb08 (bf00) f84d<br><br><br><br>I'm trying to get past the root file system for last few days,for this problem i can't clearly get any idea about what the cause is.<br>
kindly help me in clearing this problem<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><div class="gmail_quote">On Wed, Apr 11, 2012 at 7:34 PM, Kristof Provost <span dir="ltr"><<a href="mailto:kristof@sigsegv.be" target="_blank">kristof@sigsegv.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 2012-04-11 19:03:42 (+0530), pcuser p <<a href="mailto:pcuser.mails@gmail.com" target="_blank">pcuser.mails@gmail.com</a>> wrote:<br>
> I'm getting kernel panic after cramfs root file system is mounted,I am<br>
> expecting to enter login prompt after root file system is mounted.<br>
><br>
</div><div>> Kernel cmd line : mem=32M console=ttySAC0,115200 root=/dev/ram0<br>
> rootfstype=cramfs init=/linuxrc initrd=0x80800000,8M user_debug=31<br>
><br>
</div>> *linuxrc init script*<br>
> #!/bin/sh**<br>
<div>> /bin/echo "mount /etc as ramfs"<br>
> /bin/mount -n -t ramfs ramfs /etc<br>
> /bin/mount -n -t tmpfs tmpfs /tmp<br>
> exec /sbin/init<br>
><br>
> I tried with this init script,but kernel is hanging without any message..<br>
> I changed it a bit as below, to see if it reads the init script<br>
><br>
> #!/bin/sh<br>
> /bin/echo "Entering Init script"<br>
><br>
</div>Init isn't allowed to exit.<br>
That's probably why you're seeing the panic. Try starting a shell after<br>
the /bin/echo, or just using /bin/sh as init.<br>
<div><br>
> with this changes,I am expect to get print message "Entering Init script"<br>
> after cramfs is mounted,but I am getting panic message which is attached<br>
> below.<br>
><br>
</div>Probably because the system panics before the stdout buffers make it to<br>
the console.<br>
<br>
Regards,<br>
Kristof<br>
<br>
</blockquote></div><br>