Hi, I'm doing kernel porting to arm926 based FPGA board,very minimal setup (uart + timer only) I'm getting kernel panic after cramfs root file system is mounted,I am expecting to enter login prompt after root file system is mounted. Below are the details #define PLAT_PHYS_OFFSET 0x80000000 (with 128 MB SDRAM) #define CONFIG_PAGE_OFFSET 0xc0000000 Physical memory : 128MB (0x80000000 to 88000000) ZRELADDR = 0x80008000 PARAMS_PHYS = 0x80000100 INITRD_PHYS = 0x80800000 Kernel cmd line : mem=32M console=ttySAC0,115200 root=/dev/ram0 rootfstype=cramfs init=/linuxrc initrd=0x80800000,8M user_debug=31 executables in cramfs (/bin) are built with busy box with all libraries statically linked. *linuxrc init script* #!/bin/sh** /bin/echo "mount /etc as ramfs" /bin/mount -n -t ramfs ramfs /etc /bin/mount -n -t tmpfs tmpfs /tmp exec /sbin/init I tried with this init script,but kernel is hanging without any message.. I changed it a bit as below, to see if it reads the init script #!/bin/sh /bin/echo "Entering Init script" with this changes,I am expect to get print message "Entering Init script" after cramfs is mounted,but I am getting panic message which is attached below. Can some one suggest how to fix this.. *Kernel message:* *memory layout:* Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xffc00000 - 0xffe00000 ( 2 MB) vmalloc : 0xc2800000 - 0xf6000000 ( 824 MB) lowmem : 0xc0000000 - 0xc2000000 ( 32 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .text : 0xc0008000 - 0xc0169000 (1412 kB) .init : 0xc0169000 - 0xc017d000 ( 80 kB) .data : 0xc017e000 - 0xc018b720 ( 54 kB) .bss : 0xc018b744 - 0xc019c6fc ( 68 kB) RAMDISK: cramfs filesystem found at block 0 RAMDISK: Loading 5868KiB [1 disk] into ram disk... - done. VFS: Mounted root (cramfs filesystem) readonly on device 1:0. Freeing init memory: 80K *Panic message:* Kernel panic - not syncing: Attempted to kill init! Backtrace: [<c000c378>] (dump_backtrace+0x0/0x10c) from [<c000c49c>] (dump_stack+0x18/0x1c) r6:c1822000 r5:c018bb40 r4:c018bb60 r3:60000013 [<c000c484>] (dump_stack+0x0/0x1c) from [<c0017d3c>] (panic+0x64/0x1b0) [<c0017cd8>] (panic+0x0/0x1b0) from [<c001b5d8>] (do_exit+0x2b8/0x6b4) r3:c0184294 r2:00000000 r1:00000001 r0:c014f394 r7:c1822000 [<c001b320>] (do_exit+0x0/0x6b4) from [<c001bd3c>] (do_group_exit+0xd8/0xe0) r7:000000f8 [<c001bc64>] (do_group_exit+0x0/0xe0) from [<c001bd5c>] (sys_exit_group+0x18/0x20) r4:0008eba4 r3:00000000 [<c001bd44>] (sys_exit_group+0x0/0x20) from [<c0009460>] (ret_fast_syscall+0x0/0x2c)
On 2012-04-11 19:03:42 (+0530), pcuser p <pcuser.mails@gmail.com> wrote:
I'm getting kernel panic after cramfs root file system is mounted,I am expecting to enter login prompt after root file system is mounted.
Kernel cmd line : mem=32M console=ttySAC0,115200 root=/dev/ram0 rootfstype=cramfs init=/linuxrc initrd=0x80800000,8M user_debug=31
*linuxrc init script* #!/bin/sh** /bin/echo "mount /etc as ramfs" /bin/mount -n -t ramfs ramfs /etc /bin/mount -n -t tmpfs tmpfs /tmp exec /sbin/init
I tried with this init script,but kernel is hanging without any message.. I changed it a bit as below, to see if it reads the init script
#!/bin/sh /bin/echo "Entering Init script"
Init isn't allowed to exit. That's probably why you're seeing the panic. Try starting a shell after the /bin/echo, or just using /bin/sh as init.
with this changes,I am expect to get print message "Entering Init script" after cramfs is mounted,but I am getting panic message which is attached below.
Probably because the system panics before the stdout buffers make it to the console. Regards, Kristof
I am trying to create a root file systems using busybox for ARM926EJ-s based board. I'm using linaro tool chain 4.6.1(arm-linux-gnueabi-) in ubuntu 10.04 First step,I started with make defconfig CFLAGS=-march=armv5te make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig enabled only static binary option CFLAGS=-march=armv5te make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- CONFIG_PREFIX=$ROOTFS install when I do readelf on the busybox binary,I'm getting below messages File Attributes Tag_CPU_name: "7-A" Tag_CPU_arch: v7 Tag_CPU_arch_profile: Application Tag_ARM_ISA_use: Yes Tag_THUMB_ISA_use: Thumb-2 Tag_FP_arch: VFPv3-D16 Tag_ABI_PCS_wchar_t: 4 Tag_ABI_FP_denormal: Needed Tag_ABI_FP_exceptions: Needed Tag_ABI_FP_number_model: IEEE 754 Tag_ABI_align_needed: 8-byte Tag_ABI_align_preserved: 8-byte, except leaf SP Tag_ABI_enum_size: int Tag_ABI_HardFP_use: SP and DP Tag_DIV_use: Not allowed If i use this binary in for root file system,with init=/linuxrc I'm getting undefined instruction error and kernel panics init (1): undefined instruction: pc=40047930 Code: 0000aa80 00000714 e3e00000 e1a0f00e (eca0420c) Kernel panic - not syncing: Attempted to kill init! I see that the busybox is compiled for different arm architecture, other than the one i specified (armv5te) To identify the issue is with busybox or toolchain or configuration,I tried with hello program (hello world) as init (init =/sbin/hello). arm-linux-gnueabi-gcc -march=armv5te -o hello hello.c Failed to execute /sbin/hello. Attempting defaults... init (1): undefined instruction: pc=0006f7b2 Code: 2001 2000 f85d fb08 (bf00) f84d 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. kindly help me in clearing this problem On Wed, Apr 11, 2012 at 7:34 PM, Kristof Provost <kristof@sigsegv.be> wrote:
On 2012-04-11 19:03:42 (+0530), pcuser p <pcuser.mails@gmail.com> wrote:
I'm getting kernel panic after cramfs root file system is mounted,I am expecting to enter login prompt after root file system is mounted.
Kernel cmd line : mem=32M console=ttySAC0,115200 root=/dev/ram0 rootfstype=cramfs init=/linuxrc initrd=0x80800000,8M user_debug=31
*linuxrc init script* #!/bin/sh** /bin/echo "mount /etc as ramfs" /bin/mount -n -t ramfs ramfs /etc /bin/mount -n -t tmpfs tmpfs /tmp exec /sbin/init
I tried with this init script,but kernel is hanging without any message.. I changed it a bit as below, to see if it reads the init script
#!/bin/sh /bin/echo "Entering Init script"
Init isn't allowed to exit. That's probably why you're seeing the panic. Try starting a shell after the /bin/echo, or just using /bin/sh as init.
with this changes,I am expect to get print message "Entering Init script" after cramfs is mounted,but I am getting panic message which is attached below.
Probably because the system panics before the stdout buffers make it to the console.
Regards, Kristof
participants (2)
-
Kristof Provost -
pcuser p