2008-03-26 13:28:19 Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53068 Hi!
I've seen some topics with kernel panic errors, and here goes mine:
bfin> bootm 0x00400000
## Booting image at 00400000 ...
Image Name: Linux-2.6.24.3-ADI-2008R2-pre-sv
Created: 2008-03-27 0:37:46 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 362069 Bytes = 353.6 kB
Load Address: 00001000
Entry Point: 000a8000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = a8000
Linux version 2.6.24.3-ADI-2008R2-pre-svn4464 (root@ivanok-pc) (gcc version 4.1.2 (ADI svn)) #10 PREEMPT Wed Mar 26 17:37:44 PDT 2008
console [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 15MB due to hardware anomaly 05000263
Board Memory: 16MB
Kernel Managed Memory: 16MB
Memory map:
fixedcode = 0x00000000400-0x00000000490
text = 0x000000001000-0x0000000077280
rodata = 0x0000000077280-0x0000000092918
bss = 0x0000000092920-0x000000009a550
data = 0x000000009a560-0x00000000a8000
stack = 0x00000000a6000-0x00000000a8000
init = 0x00000000a8000-0x00000000b8000
available = 0x00000000b8000-0x00000000eff000
DMA Zone = 0x00000000f00000-0x000000001000000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF531 Rev 0.4
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 400 MHz core clock and 100 MHz System Clock
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 3810
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 64 (order: 6, 256 bytes)
bfin-rtc: invalid date; resetting
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 14332k/16384k RAM, (64k init code, 472k kernel code, 196k data, 1024k dma, 296k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Instruction SRAM: 16 KB (9 KB free)
Mount-cache hash table entries: 512
Blackfin GPIO Controller
Blackfin DMA Controller
generic_board_init(): registering device resources
Serial: Blackfin serial driver
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
Freeing unused kernel memory: 64k freed
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
So, I have some questions:
1) I have just 8Mbyte SDRAM and it is mapped in default 16 Mbyte pretty bad: 2Mbyte active memory followed by 2Mbyte of unavailable, then again 2Mbytes active followed by.... In kernel configuration I chose 16Mbyte sdram. But, I tried to make a very small uclinux memory footprint in order fit into 2Mbyte active memory. The question is, how uclinux work with memory that is "outside" image. (e.g. organizes stack, heap etc). If it is really needed i may fix board to have 8Mbyte active memory followed by 8Mbyte unused(and probably will do this in future).
2) In menuconfig in kernel/library/defaults section is written
Libc is None
is it normal?
3) As i said i reduced footprint and probably missed something important. Can you check attached files?
config.linux-2.6.x
config.vendor-2.6.x
QuoteReplyEditDelete
2008-03-26 15:22:08 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Mike Frysinger (UNITED STATES)
Message: 53073 you're booting a kernel without a root filesystem attached. that means you either need to provide an external filesystem (in say flash), or you need to boot a different kernel image.
it'd be a lot saner to just use 16megs of SDRAM instead of trying to force fit 8megs. if you still want to try to boot 8megs, you'll most likely need to use the memmap= kernel arg as well as only be able to boot out of flash. a kernel image with an attached filesystem will not realistically fit into a two meg chunk. you also will have fragmentation problems probably much worse than normal.
the libc in uclinux-dist should be set to none. that means no library will be built up when you build uclinux-dist -- this is what you want as you already have a C library with the toolchain.
QuoteReplyEditDelete
2008-03-26 15:38:52 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Robin Getz (UNITED STATES)
Message: 53074 Ivan:
have a quick look at:
http://docs.blackfin.uclinux.org/doku.php?id=reduce_kernel_memory_footprint
-Robin
QuoteReplyEditDelete
2008-03-27 16:34:25 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53177 Thanks Robin and Mike.
I've created rootfs.jffs2, vmImage and loaded them to flash. Then i started kernel with setenv bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 mem=6M memmap=2M$2M (to use 4Mbytes of memory 2 at the beginning and 2 at the end). And received the following:
bfin> setenv bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 mem=6M memmap=2M$2M
bfin> bootm 0x20040000
## Booting image at 20040000 ...
Image Name: Linux-2.6.24.3-ADI-2008R2-pre-sv
Created: 2008-03-28 3:56:45 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 550362 Bytes = 537.5 kB
Load Address: 00001000
Entry Point: 000f6000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = f6000
Linux version 2.6.24.3-ADI-2008R2-pre-svn4464 (root@ivanok-pc) (gcc version 4.1.2 (ADI svn)) #33 Thu Mar 27 20:56:41 PDT 2008
Warning: limiting memory to 5MB due to hardware anomaly 05000263
Board Memory: 6MB
Kernel Managed Memory: 6MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x000a4b50
rodata = 0x000a4b50-0x000dd8b0
bss = 0x000dd8c0-0x000e7e24
data = 0x000e7e40-0x000f6000
stack = 0x000f4000-0x000f6000
init = 0x000f6000-0x00106000
available = 0x00106000-0x004ff000
DMA Zone = 0x00500000-0x00600000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF531 Rev 0.4
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 400 MHz core clock and 100 MHz System Clock
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 1270
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 mem=6M memmap=2M$2M
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 32 (order: 5, 128 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 1736k/6144k RAM, (64k init code, 654k kernel code, 326k data, 1024k dma, 2340k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Instruction SRAM: 16 KB (9 KB free)
Mount-cache hash table entries: 512
Blackfin GPIO Controller
Blackfin DMA Controller
generic_board_init(): registering device resources
JFFS2 version 2.2. (NAND) В 2001-2006 Red Hat, Inc.
JFFS2: default compression mode: priority
Serial: Blackfin serial driver
physmap platform flash device: 04000000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Data access CPLB miss
- Used by the MMU to signal a CPLB miss on a data access.
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=swapper PID=1
invalid mm
return address: [0x00093182]; contents of:
0x00093160: 2f47 e121 00f0 3011 c682 8026 4082 564a
0x00093170: 2ff3 320c acea 5a8a 9b10 2f42 320c acea
0x00093180: 5a8a [9710] 2f3d 320c acea 5a8a 9310 2f38
0x00093190: e121 00ff c682 801e 3019 4083 5619 2f4d
SEQUENCER STATUS: Not tainted
SEQSTAT: 0000c026 IPEND: 8030 SYSCFG: 0006
HWERRCAUSE: 0x3
EXCAUSE : 0x26
physical IVG15 asserted : <0xffa08d78> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa08254> { _timer_interrupt + 0x0 }
RETE: <0x00000000> { _run_init_process + 0xfffff000 }
RETN: <0x004e7da8> /* unknown address */
RETX: <0x00093182> { _cfi_probe_chip + 0x286 }
RETS: <0x00092f46> { _cfi_probe_chip + 0x4a }
PC : <0x00093182> { _cfi_probe_chip + 0x286 }
DCPLB_FAULT_ADDR: <0x20400000> /* unknown address */
ICPLB_FAULT_ADDR: <0x00093182> { _cfi_probe_chip + 0x286 }
PROCESSOR STATE:
R0 : 000000f0 R1 : 00000004 R2 : 00020000 R3 : 00000000
R4 : 00400000 R5 : 00000002 R6 : 00000002 R7 : 00000002
P0 : 0015f8e0 P1 : 00400000 P2 : 20400000 P3 : 0015f8c0
P4 : 004e7dfc P5 : 004fb9e4 FP : 004e7dc4 SP : 004e7ccc
LB0: ffa095e4 LT0: ffa095e4 LC0: 00000000
LB1: 000777a4 LT1: 00077798 LC1: 00000000
B0 : 0000001a L0 : 00000000 M0 : 000e8c40 I0 : 0000000f
B1 : 000aca84 L1 : 00000000 M1 : 00000000 I1 : 00000000
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 0000001b
B3 : 0000ffff L3 : 00000000 M3 : 00000000 I3 : 00000014
A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000
USP : 00000000 ASTAT: 02003025
No trace since you do not have CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled
Stack from 004e7cb0:
00000000 ffa08688 000ea3ac 000ea3ac 0000001b 00000000 0000000f 00093182
00008030 0000c026 00000000 004e7da8 00093182 00093182 00092f46 000000f0
02003025 000777a4 ffa095e4 00077798 ffa095e4 00000000 00000000 00000000
00000000 00000000 00000000 0000ffff 00000000 000aca84 0000001a 00000000
00000000 00000000 00000000 00000000 00000000 00000000 000e8c40 00000014
0000001b 00000000 0000000f 00000000 004e7dc4 004fb9e4 004e7dfc 0015f8c0
Call Trace:
[<00020000>] _do_adjtimex+0x468/0x684
[<00092ada>] _cfi_chip_setup+0x4da/0x674
[<0000ffff>] _ksoftirqd+0x1b/0xc8
[<0009f790>] _mtd_do_chip_probe+0x110/0x2dc
[<0005a6a0>] _sysfs_ilookup_test+0x0/0x10
[<0005ab72>] _sysfs_new_dirent+0x42/0xb0
[<000022cb>] _do_rt_sigreturn+0x167/0x270
[<0009fe06>] _physmap_flash_probe+0x166/0x1ec
[<0008ccb2>] _driver_probe_device+0x7a/0x17c
[<0005aad2>] _sysfs_addrm_start+0x3e/0x9c
[<0008c356>] _bus_for_each_drv+0x42/0x68
[<0008c34e>] _bus_for_each_drv+0x3a/0x68
[<0008cdb4>] ___device_attach+0x0/0x4
[<0008ce70>] _device_attach+0x94/0xb0
[<0008c640>] _bus_add_device+0xe4/0x118
[<0008cdb4>] ___device_attach+0x0/0x4
[<0008c2ca>] _bus_attach_device+0x46/0x90
[<0008b626>] _device_add+0x34e/0x4c8
[<0008b67a>] _device_add+0x3a2/0x4c8
[<00077e04>] _snprintf+0x10/0x18
[<0008e428>] _platform_device_add+0xe4/0x160
[<000902ec>] _register_mtd_user+0x14/0x60
[<00100bd8>] _physmap_init+0x24/0x30
[<000f65c8>] _kernel_init+0x88/0x234
[<000f65c8>] _kernel_init+0x88/0x234
[<000f6540>] _kernel_init+0x0/0x234
[<00001496>] _kernel_thread_helper+0x6/0xc
Modules linked in:
Please turn on CONFIG_ACCESS_CHECK
Kernel panic - not syncing: Kernel exception
As i understand there is something wrong with access to CPLB. Did i miss some kernel options?
QuoteReplyEditDelete
2008-03-27 17:34:13 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53180 And one more question:
I am using standard generic_board file. With no my own init code. Can linux start with this configuration?
QuoteReplyEditDelete
2008-03-27 17:36:39 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Mike Frysinger (UNITED STATES)
Message: 53181 you should do what the error message indicates:
No trace since you do not have CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled
enable that option and then you'll get a hardware traceback
QuoteReplyEditDelete
2008-03-27 17:38:41 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Mike Frysinger (UNITED STATES)
Message: 53182 the generic board file does not declare any flash resources, so the physmap flash driver would crash if you attempted to load it. you should be creating your own board resources file and making sure to declare proper physmap resources. please consult the other board definition files which do this properly.
this document also touches on the flash resources at a higher level:
http://docs.blackfin.uclinux.org/doku.php?id=enabling_jffs2
QuoteReplyEditDelete
2008-03-29 14:54:49 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53326 Here is what I did:
1) added configuration file in /boards folder (with physmap, etc.)
2) wrote file rootfs.jffs2 at 0x2010 0000
3) wrote file vmImage at 0x2004 0000 (checked the size for not overlapping)
4) issued setenv bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 memmap=2M$2M mem=6M and get the following
bfin> bootm 0x20040000
## Booting image at 20040000 ...
Image Name: Linux-2.6.24.3-ADI-2008R2-pre-sv
Created: 2008-03-30 2:01:56 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 563504 Bytes = 550.3 kB
Load Address: 00001000
Entry Point: 000fa000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = fa000
Linux version 2.6.24.3-ADI-2008R2-pre-svn4464 (root@ivanok-pc) (gcc version 4.1.2 (ADI svn)) #55 Sat Mar 29 19:01:52 PDT 2008
Warning: limiting memory to 5MB due to hardware anomaly 05000263
Board Memory: 6MB
Kernel Managed Memory: 6MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x000a81c0
rodata = 0x000a81c0-0x000e2634
bss = 0x000e2640-0x000ecbec
data = 0x000ecc00-0x000fa000
stack = 0x000f8000-0x000fa000
init = 0x000fa000-0x0010b000
available = 0x0010b000-0x004ff000
DMA Zone = 0x00500000-0x00600000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF531 Rev 0.4
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 400 MHz core clock and 100 MHz System Clock
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 1270
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 mem=6M memmap=2M$2M
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 32 (order: 5, 128 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 1716k/6144k RAM, (68k init code, 668k kernel code, 328k data, 1024k dma, 2340k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Instruction SRAM: 16 KB (9 KB free)
Mount-cache hash table entries: 512
Blackfin GPIO Controller
Blackfin DMA Controller
sorex_init(): registering device resources
JFFS2 version 2.2. (NAND) В 2001-2006 Red Hat, Inc.
JFFS2: default compression mode: priority
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 21) is a BFIN-UART
physmap platform flash device: 00400000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x00100000 : "Kernel"
0x00100000-0x00400000 : "RootFS"
sysfs: duplicate filename 'physmap-flash.0' can not be created
WARNING: at fs/sysfs/dir.c:424 sysfs_add_one()
Hardware Trace:
Stack from 0015be7c:
004f3324 0005ab36 004eec6c 0015beb8 004f3324 000cabac 000001a8 000ad3f4
0005afd6 004eec6c 000f7554 00105ba4 000f7470 00155000 0005a770 004f3324
00000000 00000000 00000000 0005b056 000f7554 000f6ea8 000f6ea8 000742c2
0010900c 000745e0 0015bee8 004ed9c0 0007465e 0010900c 00000014 000c0c62
0015bf24 0015bf24 0008b420 0010900c 000f74ec 00105ba4 000f6ea8 000f7554
00077ed4 0010900c 000f7574 00105ba4 00000000 00109040 0008e4f8 0010900c
Call Trace:
[<000903bc>] _register_mtd_user+0x14/0x60
[<00104c90>] _physmap_init+0x24/0x30
[<000fa5d4>] _kernel_init+0x88/0x234
[<000fa5d4>] _kernel_init+0x88/0x234
[<000fa54c>] _kernel_init+0x0/0x234
[<00001496>] _kernel_thread_helper+0x6/0xc
kobject_add failed for physmap-flash.0 with -EEXIST, don't try to register things with the same name in the same directory.
Hardware Trace:
Stack from 0015bee4:
0015bee8 000746d4 0010900c ffffffef 00000014 004ed9c0 0000001f 0015bf24
0008b420 0010900c 000f74ec 00105ba4 000f6ea8 000f7554 00077ed4 0010900c
000f7574 00105ba4 00000000 00109040 0008e4f8 0010900c 000f74e4 00105ba4
00000001 00000000 00000000 00000000 00105ba4 000903bc 000c33e8 000c33e8
00000000 00104c90 0010900c 0015a000 00000000 00000000 00109008 000ec9d0
000fa5d4 000fa5d4 00000000 00000000 00000000 00000000 00000000 00000000
Call Trace:
[<000fa54c>] _kernel_init+0x0/0x234
[<00001496>] _kernel_thread_helper+0x6/0xc
m25p80 spi0.2: unrecognized JEDEC id ffffff
m25p80 spi0.2: found UNKNOWN, expected m25p64
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@5
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:00:00 UTC (0)
Freeing unused kernel memory: 68k freed
dma_alloc_init: dma_page @ 0x00109000 - 256 pages at 0x00500000
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
######################################################
With u-boot checked that file /bin/init exists, so i tried
setenv bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 memmap=2M$2M mem=6M init=/bin/init
and the output was almost the same except the last line
dma_alloc_init: dma_page @ 0x00109000 - 256 pages at 0x00500000
Failed to execute /bin/init. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
What solution can be in this situation?
probably i can use any of *.initramfs files from uclinux-dist/images (uImage.initramfs, linux.initramfs)?
There is also an error "sysfs: duplicate filename 'physmap-flash.0' can not be created". (maybe duplicate because i set in kernel options for flash offset and length (and also defined partition in /boards/myproj.c) )
QuoteReplyEditDelete
2008-03-29 15:07:57 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Mike Frysinger (UNITED STATES)
Message: 53328 getting -EEXIST errors from the physmap driver means you declared both board resources as well as setting the sizes in the kernel configuration menu. you should only be using one method. the kernel configuration options are deprecated, so you should stop using that.
for your root filesystem, verify you programmed the image at the same offset that you're declaring. in other words:
0x00100000-0x00400000 : "RootFS"
QuoteReplyEditDelete
2008-03-29 18:38:31 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53329 Did you mean undefine MTD_PHYSMAP? I did this in kernel configuration and programmed new images. Output was:
## Booting image at 20040000 ...
Image Name: Linux-2.6.24.3-ADI-2008R2-pre-sv
Created: 2008-03-30 5:46:59 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 562646 Bytes = 549.5 kB
Load Address: 00001000
Entry Point: 000fa000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = fa000
Linux version 2.6.24.3-ADI-2008R2-pre-svn4464 (root@ivanok-pc) (gcc version 4.1.2 (ADI svn)) #65 Sat Mar 29 22:46:55 PDT 2008
Warning: limiting memory to 5MB due to hardware anomaly 05000263
Board Memory: 6MB
Kernel Managed Memory: 6MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x000a7f30
rodata = 0x000a7f30-0x000e21fc
bss = 0x000e2200-0x000ec7ac
data = 0x000ec7c0-0x000fa000
stack = 0x000f8000-0x000fa000
init = 0x000fa000-0x0010b000
available = 0x0010b000-0x004ff000
DMA Zone = 0x00500000-0x00600000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF531 Rev 0.4
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 400 MHz core clock and 100 MHz System Clock
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 1270
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 memmap=2M$2M mem=6M
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 32 (order: 5, 128 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 1716k/6144k RAM, (68k init code, 667k kernel code, 329k data, 1024k dma, 2340k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Instruction SRAM: 16 KB (9 KB free)
Mount-cache hash table entries: 512
Blackfin GPIO Controller
Blackfin DMA Controller
sorex_init(): registering device resources
JFFS2 version 2.2. (NAND) В 2001-2006 Red Hat, Inc.
JFFS2: default compression mode: priority
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 21) is a BFIN-UART
m25p80 spi0.2: unrecognized JEDEC id ffffff
m25p80 spi0.2: found UNKNOWN, expected m25p64
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@5
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:00:00 UTC (0)
Freeing unused kernel memory: 68k freed
dma_alloc_init: dma_page @ 0x00108000 - 256 pages at 0x00500000
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
###########################
in board configuration file i commented CONFIG_MTD_PHYSMAP and CONFIG_MTD_PHYSMAP_MODULE so that flash would be loaded not depending on them.
//#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
&sorex_flash_device,
//#endif
(and the same for partition definition)
But now I do not even see any partition like in log before....
And here
0x00100000-0x00400000 : "RootFS"
did you mean
0x20100000-0x20400000 : "RootFS"?
Here's what i have:
bfin> md.b 0x2010 0000
20100000: 85 19 01 e0 2b 00 00 00 e6 6e 26 7d 01 00 00 00 ....+....n&}....
20100010: 00 00 00 00 02 00 00 00 f2 31 ef 47 03 04 00 00 .........1.G....
(For test i wrote the same rootfs, starting from 0x00100000)
QuoteReplyEditDelete
2008-03-29 18:49:24 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53330 Here is my partition table as well
//#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
static struct mtd_partition sorex_partitions[] = {
{
.name = "Bootloader",
.size = 0x40000,
.offset = 0,
}, {
.name = "Kernel",
.size = 0xC0000,
.offset = MTDPART_OFS_APPEND,
}, {
.name = "RootFS",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
}
};
static struct physmap_flash_data sorex_flash_data = {
.width = 2,
.parts = sorex_partitions,
.nr_parts = ARRAY_SIZE(sorex_partitions),
};
static struct resource sorex_flash_resource = {
.start = 0x20000000,
.end = 0x203fffff,
.flags = IORESOURCE_MEM,
};
static struct platform_device sorex_flash_device = {
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &sorex_flash_data,
},
.num_resources = 1,
.resource = &sorex_flash_resource,
};
//#endif
QuoteReplyEditDelete
2008-03-31 13:39:40 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Mike Frysinger (UNITED STATES)
Message: 53376 if you disable MTD_PHYSMAP, then you wont have access to the flash. you just want to turn off the length/size in the kernel configuration menu.
QuoteReplyEditDelete
2008-04-01 13:12:58 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53475 I finally get the correct physmap work with enabled MTD_PHYSMAP.
Now, when I boot I do not see any error message. Process just stops (see log1). When I changed /dev/mtdblock2 to /dev/mtdblock1 I've slightly different output(see log 2), according to which I assume that kernel finds rootFS right but can not make any steps forward.
/////////////////////////////////////////////////////////////////////////////////////////////
log1:
## Booting image at 20040000 ...
Image Name: Linux-2.6.24.3-ADI-2008R2-pre-sv
Created: 2008-04-01 17:03:31 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 637185 Bytes = 622.3 kB
Load Address: 00001000
Entry Point: 00118000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 118000
Linux version 2.6.24.3-ADI-2008R2-pre-svn4464 (root@ivanok-pc) (gcc version 4.1.2 (ADI svn)) #14 Tue Apr 1 10:03:23 PDT 2008
Warning: limiting memory to 5MB due to hardware anomaly 05000263
Board Memory: 6MB
Kernel Managed Memory: 6MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x000bdb10
rodata = 0x000bdb10-0x000fe260
bss = 0x000fe260-0x00108e6c
data = 0x00108e80-0x00118000
stack = 0x00116000-0x00118000
init = 0x00118000-0x0012d000
available = 0x0012d000-0x004ff000
DMA Zone = 0x00500000-0x00600000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF531 Rev 0.4
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 400 MHz core clock and 100 MHz System Clock
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 1270
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 memmap=2M$2M mem=6M
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 32 (order: 5, 128 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 1580k/6144k RAM, (84k init code, 754k kernel code, 362k data, 1024k dma, 2340k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Instruction SRAM: 16 KB (9 KB free)
Mount-cache hash table entries: 512
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
JFFS2 version 2.2. В 2001-2006 Red Hat, Inc.
JFFS2: default compression mode: priority
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 21) is a BFIN-UART
physmap platform flash device: 00400000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "Bootloader"
0x00040000-0x00100000 : "Kernel"
0x00100000-0x00400000 : "RootFS"
block2mtd: version $Revision: 3544 $
m25p80 spi0.1: unrecognized JEDEC id ffffff
m25p80 spi0.1: found UNKNOWN, expected m25p64
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@5
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:02:38 UTC (158)
/////////////////////////////////////////////////////////////////////////////////////////////
log2:
....
Kernel command line: root=/dev/mtdblock1 rw rootfstype=jffs2 memmap=2M$2M mem=6M
....
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:02:38 UTC (158)
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x0527 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x64a2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xf247 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x0900 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x1100 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0xdb18 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x1005 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x694c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x2d78 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0x2e36 instead
Further such events for this erase block will not be printed
JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
....
(some more the same blocks)
....
(finally)
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 2, bad_blocks 0, c->nr_blocks 12
VFS: Cannot open root device "mtdblock1" or unknown-block(31,1)
Please append a correct "root=" boot option; here are the available partitions:
1f00 256 mtdblock0 (driver?)
1f01 768 mtdblock1 (driver?)
1f02 3072 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,1)
////////////////////////////////////////////////////////////////////
log3:
bfin> md.b 0x2010 0000 0x20
20100000: 85 19 01 e0 2b 00 00 00 e6 6e 26 7d 01 00 00 00 ....+....n&}....
20100010: 00 00 00 00 02 00 00 00 f2 31 ef 47 03 04 00 00 .........1.G....
QuoteReplyEditDelete
2008-04-01 14:24:13 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Mike Frysinger (UNITED STATES)
Message: 53478 mtdblock2 is clearly what you want ... mtdblock1 is pointing to your kernel, so setting that to your root= doesnt make any sense
if the kernel is getting hung up, this is where you'll need to start debugging due to your non-standard memory setup ...
QuoteReplyEditDelete
2008-04-01 14:42:22 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53481 with changing to mtdblock1 i just checked that it works
QuoteReplyEditDelete
2008-04-01 15:23:50 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53483 With changing to mtdblock1 i just checked kernel starts reading rootfs.
The next message I should see
(after rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:02:38 UTC (158))
VFS: Mounted root (jffs2 filesystem).
Is it right?
QuoteReplyEditDelete
2008-04-01 15:36:13 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Mike Frysinger (UNITED STATES)
Message: 53485 there is no hard order of things. if you want to see a "common" or "normal" boot, you can see (What does a normal Boot Look like?):
http://docs.blackfin.uclinux.org/doku.php?id=faq
it may just be faster/easier if you set up things on a BF537-STAMP board and do the comparisons that way
QuoteReplyEditDelete
2008-04-01 17:27:17 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Ivan Koryakovskiy (RUSSIAN FEDERATION)
Message: 53493 Mounting process hangs up when calling function sys_mount in do_mounts.c. I've checked it using:
printk("Enter mount root\n");
int err = sys_mount(name, "/root", fs, flags, data);
printk("mount error = %d\n", err);
The output was:
Enter mount root
<7>jffs2_get_sb_mtd(): New superblock for device 2 ("RootFS")
It's the first time i see second like(i didnt changed anything in configuration, just added a couple printk).
QuoteReplyEditDelete
2008-04-01 19:09:29 Re: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Robin Getz (UNITED STATES)
Message: 53498 Ivan:
I think the best thing to do is go back, increase memory - and get things working on a STAMP board. and then slowly (one at a time) turn off features until you can replicate things on a STAMP board, and only consume 8Megs.
-Robin