Hi, I'm relatively new to linux and busybox. I've been having problems with init for a week now.
"Kernel panic - not syncing: Attempted to kill init!" 1. I'm running linux kernel on an ARM target. 2. linux kernel and busybox are built by the Codesourcery tool chain. 3. The root filesystem is mounted via NFS. 4. I put debug statements in the kernel that indicate that it locates init correctly, but something goes wrong. 5. I replaced busybox with a simple statically linked helloworld program as suggested by the busybox faq. I got the same problem. I have an old busybox pre-complied binary that works fine. When I do a readelf, one difference appears to be the OS/ABI which is ARM for the binary that works okay and UNIX (SYSTEM V) for the one that doesn't work. I wonder if this is a problem. Could somebody be good enough to suggest how I may further debug the problem. I'm getting desperate. The readelf outputs follow. Thank you. Salim older binary that works okay ELF Header: Magic: 7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: ARM ABI Version: 0 Type: EXEC (Executable file) Machine: ARM Version: 0x1 Entry point address: 0x80e0 Start of program headers: 52 (bytes into file) Start of section headers: 819736 (bytes into file) Flags: 0x202, has entry point, GNU EABI, software FP Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 3 Size of section headers: 40 (bytes) Number of section headers: 18 Section header string table index: 17 Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .init PROGBITS 000080c0 0000c0 000014 00 AX 0 0 4 [ 2] .text PROGBITS 000080e0 0000e0 0aaa64 00 AX 0 0 16 [ 3] .fini PROGBITS 000b2b44 0aab44 00000c 00 AX 0 0 4 [ 4] .rodata PROGBITS 000b2b50 0aab50 01b8f7 00 A 0 0 4 [ 5] __libc_subfreeres PROGBITS 000ce448 0c6448 00006c 00 A 0 0 4 [ 6] __libc_atexit PROGBITS 000ce4b4 0c64b4 000004 00 A 0 0 4 [ 7] __libc_subinit PROGBITS 000ce4b8 0c64b8 000008 00 A 0 0 4 [ 8] .data PROGBITS 000d64c0 0c64c0 001c88 00 WA 0 0 4 [ 9] .eh_frame PROGBITS 000d8148 0c8148 000004 00 WA 0 0 4 [10] .ctors PROGBITS 000d814c 0c814c 000008 00 WA 0 0 4 [11] .dtors PROGBITS 000d8154 0c8154 000008 00 WA 0 0 4 [12] .jcr PROGBITS 000d815c 0c815c 000004 00 WA 0 0 4 [13] .got PROGBITS 000d8160 0c8160 00001c 04 WA 0 0 4 [14] .sbss PROGBITS 000d817c 0c8180 000000 00 W 0 0 1 [15] .bss NOBITS 000d8180 0c8180 00edd4 00 WA 0 0 32 [16] .note.ABI-tag NOTE 000080a0 0000a0 000020 00 A 0 0 16 [17] .shstrtab STRTAB 00000000 0c8180 000095 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x00008000 0x00008000 0xc64c0 0xc64c0 R E 0x8000 LOAD 0x0c64c0 0x000d64c0 0x000d64c0 0x01cbc 0x10a94 RW 0x8000 NOTE 0x0000a0 0x000080a0 0x000080a0 0x00020 0x00020 R 0x10 Section to Segment mapping: Segment Sections... 00 .init .text .fini .rodata __libc_subfreeres __libc_atexit __libc_subinit .note.ABI-tag 01 .data .eh_frame .ctors .dtors .jcr .got .bss 02 .note.ABI-tag new binary init fails: ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: ARM Version: 0x1 Entry point address: 0xa080 Start of program headers: 52 (bytes into file) Start of section headers: 1975756 (bytes into file) Flags: 0x5000002, has entry point, Version5 EABI Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 6 Size of section headers: 40 (bytes) Number of section headers: 25 Section header string table index: 24 Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .note.ABI-tag NOTE 000080f4 0000f4 000020 00 A 0 0 4 [ 2] .init PROGBITS 00008114 000114 00000c 00 AX 0 0 4 [ 3] .text PROGBITS 00008120 000120 1800e4 00 AX 0 0 16 [ 4] __libc_freeres_fn PROGBITS 00188204 180204 000f10 00 AX 0 0 4 [ 5] __libc_thread_fre PROGBITS 00189114 181114 0000e4 00 AX 0 0 4 [ 6] .fini PROGBITS 001891f8 1811f8 000008 00 AX 0 0 4 [ 7] .rodata PROGBITS 00189200 181200 0581dd 00 A 0 0 8 [ 8] __libc_subfreeres PROGBITS 001e13e0 1d93e0 00005c 00 A 0 0 4 [ 9] __libc_atexit PROGBITS 001e143c 1d943c 000004 00 A 0 0 4 [10] __libc_thread_sub PROGBITS 001e1440 1d9440 000008 00 A 0 0 4 [11] .ARM.extab PROGBITS 001e1448 1d9448 0018e4 00 A 0 0 4 [12] .ARM.exidx ARM_EXIDX 001e2d2c 1dad2c 006d90 00 AL 3 0 4 [13] .tdata PROGBITS 001f1abc 1e1abc 000018 00 WAT 0 0 4 [14] .tbss NOBITS 001f1ad4 1e1ad4 000034 00 WAT 0 0 4 [15] .init_array INIT_ARRAY 001f1ad4 1e1ad4 000004 00 WA 0 0 4 [16] .fini_array FINI_ARRAY 001f1ad8 1e1ad8 000008 00 WA 0 0 4 [17] .jcr PROGBITS 001f1ae0 1e1ae0 000004 00 WA 0 0 4 [18] .data.rel.ro PROGBITS 001f1ae4 1e1ae4 00002c 00 WA 0 0 4 [19] .got PROGBITS 001f1b10 1e1b10 00007c 04 WA 0 0 4 [20] .data PROGBITS 001f1b90 1e1b90 0008f7 00 WA 0 0 8 [21] .bss NOBITS 001f2488 1e2487 004820 00 WA 0 0 8 [22] __libc_freeres_pt NOBITS 001f6ca8 1e2487 00003c 00 WA 0 0 4 [23] .ARM.attributes ARM_ATTRIBUTES 00000000 1e2487 00002b 00 0 0 1 [24] .shstrtab STRTAB 00000000 1e24b2 000118 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x1dad2c 0x001e2d2c 0x001e2d2c 0x06d90 0x06d90 R 0x4 LOAD 0x000000 0x00008000 0x00008000 0x1e1abc 0x1e1abc R E 0x8000 LOAD 0x1e1abc 0x001f1abc 0x001f1abc 0x009cb 0x05228 RW 0x8000 NOTE 0x0000f4 0x000080f4 0x000080f4 0x00020 0x00020 R 0x4 TLS 0x1e1abc 0x001f1abc 0x001f1abc 0x00018 0x0004c R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 .note.ABI-tag .init .text __libc_freeres_fn __libc_thread_freeres_fn .fini .rodata __libc_subfreeres __libc_atexit __libc_thread_subfreeres .ARM.extab .ARM.exidx 02 .tdata .init_array .fini_array .jcr .data.rel.ro .got .data .bss __libc_freeres_ptrs 03 .note.ABI-tag 04 .tdata .tbss 05 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
