S3C6410嵌入式应用平台构建(五)——linux-3.14.4移植到OK6410-(Nand分区问题)
前一篇文章,我们的Linux能后启动了,只是在识别nand时候,没有获取到时钟源,导致后面的分区没哟进行。
我们从启动的log发现:
[06/08-11:25:41:371]s3c24xx-nand s3c6400-nand: failed to get clock
[06/08-11:25:41:371]s3c24xx-nand: probe of s3c6400-nand failed with error –2
于是追踪到代码:
nandflash驱动中——s3c2410.c中
/* get the clock source and enable it */ info->clk = devm_clk_get(&pdev->dev, "nand");
if (IS_ERR(info->clk)) {
dev_err(&pdev->dev, "failed to get clock\n");
err = -ENOENT;
goto exit_error;
}
发现在去find “nand”clock source时,获取不到,因此,我们打开S3c2410.c (drivers\mtd\nand)
于是打开Clk-s3c64xx.c (drivers\clk\samsung)
发现在Aliases时,并没有Aliases nand,因此我试着加了以下代码:ALIAS(MEM0_NFCON, "s3c6400-nand", "nand"),
/* Aliases for s3c6410-specific clocks. */
static struct samsung_clock_alias s3c6410_clock_aliases[] = {
ALIAS(PCLK_IIC1, "s3c2440-i2c.1", "i2c"),
ALIAS(PCLK_IIS2, "samsung-i2s.2", "iis"),
ALIAS(SCLK_FIMC, "s3c-camif", "fimc"),
ALIAS(SCLK_AUDIO2, "samsung-i2s.2", "audio-bus"),
ALIAS(MEM0_NFCON, "s3c6400-nand", "nand"),
ALIAS(MEM0_SROM, NULL, "srom"),
};
这样的话,当去clk_get时,应该不会有问题了。
这个机制是linux-3.10后才加的,这个问题卡了我好久。
我们make uImage后测试如下:
[06/08-14:18:26:542]U-Boot 2010.03-svn3 (May 06 2014 - 22:13:20) for SMDK6410
[06/08-14:18:26:543]
[06/08-14:18:26:543]*******************************************************
[06/08-14:18:26:553] Welcome to Embedded System
[06/08-14:18:26:553] Base On S3C6410 Devolopment
[06/08-14:18:26:554] Date: 2014/4/15 22:00 PM
[06/08-14:18:26:565]*******************************************************
[06/08-14:18:26:565]
[06/08-14:18:26:565]CPU: S3C6410@533MHz
[06/08-14:18:26:566] Fclk = 533MHz, Hclk = 133MHz, Pclk = 66MHz (ASYNC Mode)
[06/08-14:18:26:566]Board: SMDK6410
[06/08-14:18:26:572]DRAM: 256 MB
[06/08-14:18:26:612]Flash: 0 kB
[06/08-14:18:26:613]NAND Flash: 2048 MB
[06/08-14:18:27:734]********************************************************
[06/08-14:18:27:735]Initial LCD controller
[06/08-14:18:27:748] clk_freq:9 MHz, div_freq:13 ,rea_freq:9 MHz
[06/08-14:18:27:749]
[06/08-14:18:27:749] HBP = 2 HFP = 2 HSW = 41,Hpixs:480
[06/08-14:18:27:749] VBP = 2 VFP = 2 VSW = 10,Vpixs:272
[06/08-14:18:27:766]FrameBuff:57e7a000
[06/08-14:18:27:766] LCD initialization Finished.
[06/08-14:18:27:766]********************************************************
[06/08-14:18:27:787]In: serial
[06/08-14:18:27:787]
[06/08-14:18:27:787]Out: lcd
[06/08-14:18:27:789]
[06/08-14:18:27:789]Err: lcd
[06/08-14:18:27:789]
[06/08-14:18:28:141]Net: DM9000
[06/08-14:18:29:160]Hit any key to stop autoboot: 0
[06/08-14:18:29:160]
[06/08-14:18:29:161]NAND read:
[06/08-14:18:29:161]device 0 offset 0x100000, size 0x500000
[06/08-14:18:29:162]
[06/08-14:18:32:403] 5242880 bytes read: OK
[06/08-14:18:32:403]
[06/08-14:18:32:404]## Booting kernel from Legacy Image at 50008000 ...
[06/08-14:18:32:404]
[06/08-14:18:32:404] Image Name: Linux-3.14.4
[06/08-14:18:32:421]
[06/08-14:18:32:422] Image Type: ARM Linux Kernel Image (uncompressed)
[06/08-14:18:32:441]
[06/08-14:18:32:441] Data Size: 1638504 Bytes = 1.6 MB
[06/08-14:18:32:457]
[06/08-14:18:32:458] Load Address: 50008000
[06/08-14:18:32:474]
[06/08-14:18:32:475] Entry Point: 50008040
[06/08-14:18:32:490]
[06/08-14:18:32:818] Verifying Checksum ... OK
[06/08-14:18:32:836]
[06/08-14:18:32:836] XIP Kernel Image ... OK
[06/08-14:18:32:850]
[06/08-14:18:32:851]OK
[06/08-14:18:32:868]
[06/08-14:18:32:868]
[06/08-14:18:32:868]Starting kernel ...
[06/08-14:18:32:869]
[06/08-14:18:32:879]
[06/08-14:18:32:894]
[06/08-14:18:32:908]
[06/08-14:18:33:199]Uncompressing Linux... done, booting the kernel.
[06/08-14:18:33:995]Booting Linux on physical CPU 0x0
[06/08-14:18:34:006]Linux version 3.14.4 (simiar@Embedded) (gcc version 4.4.3 (ctng-1.6.1) ) #2 Sun Jun 8 14:10:57 CST 2014
[06/08-14:18:34:010]CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387d
[06/08-14:18:34:017]CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[06/08-14:18:34:017]Machine: OK6410
[06/08-14:18:34:018]Ignoring unrecognised tag 0x54410008
[06/08-14:18:34:030]Memory policy: Data cache writeback
[06/08-14:18:34:030]CPU S3C6410 (id 0x36410101)
[06/08-14:18:34:031]CPU: found DTCM0 8k @ 00000000, not enabled
[06/08-14:18:34:032]CPU: moved DTCM0 8k to fffe8000, enabled
[06/08-14:18:34:039]CPU: found DTCM1 8k @ 00000000, not enabled
[06/08-14:18:34:040]CPU: moved DTCM1 8k to fffea000, enabled
[06/08-14:18:34:040]CPU: found ITCM0 8k @ 00000000, not enabled
[06/08-14:18:34:051]CPU: moved ITCM0 8k to fffe0000, enabled
[06/08-14:18:34:051]CPU: found ITCM1 8k @ 00000000, not enabled
[06/08-14:18:34:052]CPU: moved ITCM1 8k to fffe2000, enabled
[06/08-14:18:34:061]Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[06/08-14:18:34:072]Kernel command line: root=/dev/nfs nfsroot=192.168.1.100:/home/simiar/share/myproject/ok6410/filesystem/ok6410_fs ip=192.168.1.50:192.168.1.100:192.168.1.1:255.255.255.0::eth0:off console=ttySAC0,115200
[06/08-14:18:34:084]PID hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:18:34:095]Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[06/08-14:18:34:096]Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[06/08-14:18:34:105]Memory: 256464K/262144K available (2173K kernel code, 175K rwdata, 664K rodata, 118K init, 198K bss, 5680K reserved)
[06/08-14:18:34:108]Virtual kernel memory layout:
[06/08-14:18:34:118] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[06/08-14:18:34:118] DTCM : 0xfffe8000 - 0xfffec000 ( 16 kB)
[06/08-14:18:34:119] ITCM : 0xfffe0000 - 0xfffe4000 ( 16 kB)
[06/08-14:18:34:129] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[06/08-14:18:34:130] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
[06/08-14:18:34:140] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[06/08-14:18:34:140] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[06/08-14:18:34:144] .text : 0xc0008000 - 0xc02cd674 (2838 kB)
[06/08-14:18:34:150] .init : 0xc02ce000 - 0xc02eb99c ( 119 kB)
[06/08-14:18:34:153] .data : 0xc02ec000 - 0xc0317f00 ( 176 kB)
[06/08-14:18:34:162] .bss : 0xc0318000 - 0xc0349ac8 ( 199 kB)
[06/08-14:18:34:162]SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[06/08-14:18:34:163]NR_IRQS:246
[06/08-14:18:34:172]S3C6410 clocks: apll = 533000000, mpll = 533000000
[06/08-14:18:34:173] epll = 24000000, arm_clk = 533000000
[06/08-14:18:34:173]VIC @f6000000: id 0x00041192, vendor 0x41
[06/08-14:18:34:184]VIC @f6010000: id 0x00041192, vendor 0x41
[06/08-14:18:34:185]sched_clock: 32 bits at 33MHz, resolution 30ns, wraps every 128929599457ns
[06/08-14:18:34:185]Console: colour dummy device 80x30
[06/08-14:18:34:194]Calibrating delay loop... 531.66 BogoMIPS (lpj=2658304)
[06/08-14:18:34:195]pid_max: default: 32768 minimum: 301
[06/08-14:18:34:207]Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:18:34:207]Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:18:34:208]CPU: Testing write buffer coherency: ok
[06/08-14:18:34:217]Setting up static identity map for 0x50214f90 - 0x50214fec
[06/08-14:18:34:228]VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[06/08-14:18:34:229]DMA: preallocated 256 KiB pool for atomic coherent allocations
[06/08-14:18:34:230]OK6410: Option string ok6410=0
[06/08-14:18:34:239]OK6410: selected LCD display is 480x272
[06/08-14:18:34:240]S3C6410: Initialising architecture
[06/08-14:18:34:240]bio: create slab <bio-0> at 0
[06/08-14:18:34:252]pl08xdmac dma-pl080s.0: initialized 8 virtual memcpy channels
[06/08-14:18:34:253]pl08xdmac dma-pl080s.0: initialized 16 virtual slave channels
[06/08-14:18:34:263]pl08xdmac dma-pl080s.0: DMA: PL080s rev1 at 0x75000000 irq 73
[06/08-14:18:34:263]pl08xdmac dma-pl080s.1: initialized 8 virtual memcpy channels
[06/08-14:18:34:273]pl08xdmac dma-pl080s.1: initialized 12 virtual slave channels
[06/08-14:18:34:273]pl08xdmac dma-pl080s.1: DMA: PL080s rev1 at 0x75100000 irq 74
[06/08-14:18:34:274]usbcore: registered new interface driver usbfs
[06/08-14:18:34:283]usbcore: registered new interface driver hub
[06/08-14:18:34:284]usbcore: registered new device driver usb
[06/08-14:18:34:296]Switched to clocksource samsung_clocksource_timer
[06/08-14:18:34:296]futex hash table entries: 256 (order: 0, 7168 bytes)
[06/08-14:18:34:296]ROMFS MTD (C) 2007 Red Hat, Inc.
[06/08-14:18:34:297]io scheduler noop registered
[06/08-14:18:34:306]io scheduler deadline registered
[06/08-14:18:34:306]io scheduler cfq registered (default)
[06/08-14:18:34:307]s3c-fb s3c-fb: window 0: fb
[06/08-14:18:34:317]Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[06/08-14:18:34:318]s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 69, base_baud = 0) is a S3C6400/10
[06/08-14:18:34:329]console [ttySAC0] enabled
[06/08-14:18:34:330]s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 70, base_baud = 0) is a S3C6400/10
[06/08-14:18:34:339]s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 71, base_baud = 0) is a S3C6400/10
[06/08-14:18:34:345]s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 72, base_baud = 0) is a S3C6400/10
[06/08-14:18:34:377]brd: module loaded
[06/08-14:18:34:396]loop: module loaded
[06/08-14:18:34:405]------------[ cut here ]------------
[06/08-14:18:34:407]WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:926 __clk_enable+0x94/0xa4()
[06/08-14:18:34:416]Modules linked in:
[06/08-14:18:34:417]CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.4 #2
[06/08-14:18:34:428][<c0014238>] (unwind_backtrace) from [<c0011c74>] (show_stack+0x10/0x14)
[06/08-14:18:34:429][<c0011c74>] (show_stack) from [<c001c6ec>] (warn_slowpath_common+0x68/0x88)
[06/08-14:18:34:439][<c001c6ec>] (warn_slowpath_common) from [<c001c728>] (warn_slowpath_null+0x1c/0x24)
[06/08-14:18:34:439][<c001c728>] (warn_slowpath_null) from [<c0209fe8>] (__clk_enable+0x94/0xa4)
[06/08-14:18:34:450][<c0209fe8>] (__clk_enable) from [<c020a394>] (clk_enable+0x18/0x2c)
[06/08-14:18:34:461][<c020a394>] (clk_enable) from [<c01aafec>] (s3c2410_nand_clk_set_state+0x5c/0x64)
[06/08-14:18:34:462][<c01aafec>] (s3c2410_nand_clk_set_state) from [<c01ab594>] (s3c24xx_nand_probe+0x90/0x520)
[06/08-14:18:34:471][<c01ab594>] (s3c24xx_nand_probe) from [<c0189c78>] (platform_drv_probe+0x1c/0x4c)
[06/08-14:18:34:483][<c0189c78>] (platform_drv_probe) from [<c018873c>] (driver_probe_device+0x7c/0x200)
[06/08-14:18:34:484][<c018873c>] (driver_probe_device) from [<c018894c>] (__driver_attach+0x8c/0x90)
[06/08-14:18:34:494][<c018894c>] (__driver_attach) from [<c01871f0>] (bus_for_each_dev+0x68/0x8c)
[06/08-14:18:34:505][<c01871f0>] (bus_for_each_dev) from [<c0187964>] (bus_add_driver+0x124/0x1d4)
[06/08-14:18:34:505][<c0187964>] (bus_add_driver) from [<c0188ed4>] (driver_register+0x78/0xf8)
[06/08-14:18:34:516][<c0188ed4>] (driver_register) from [<c000878c>] (do_one_initcall+0x30/0x148)
[06/08-14:18:34:516][<c000878c>] (do_one_initcall) from [<c02ce4f8>] (kernel_init_freeable+0xe0/0x1ac)
[06/08-14:18:34:527][<c02ce4f8>] (kernel_init_freeable) from [<c0210b7c>] (kernel_init+0x8/0xec)
[06/08-14:18:34:539][<c0210b7c>] (kernel_init) from [<c000e838>] (ret_from_fork+0x14/0x3c)
[06/08-14:18:34:539]---[ end trace be0198ec65143d7a ]---
[06/08-14:18:34:540]s3c24xx-nand s3c6400-nand: Tacls=4, 30ns Twrph0=8 60ns, Twrph1=6 45ns
[06/08-14:18:34:549]s3c24xx-nand s3c6400-nand: System booted from NAND
[06/08-14:18:34:550]s3c24xx-nand s3c6400-nand: NAND hardware ECC
[06/08-14:18:34:562]nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd5
[06/08-14:18:34:563]nand: Samsung NAND 2GiB 3,3V 8-bit
[06/08-14:18:34:563]nand: 2048MiB, MLC, page size: 4096, OOB size: 218
[06/08-14:18:34:573]nand: No oob scheme defined for oobsize 218
[06/08-14:18:34:573]------------[ cut here ]------------
[06/08-14:18:34:574]kernel BUG at drivers/mtd/nand/nand_base.c:3732!
[06/08-14:18:34:583]Internal error: Oops - BUG: 0 [#1] ARM
[06/08-14:18:34:583]Modules linked in:
[06/08-14:18:34:584]CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.14.4 #2
[06/08-14:18:34:594]task: cf844000 ti: cf836000 task.ti: cf836000
[06/08-14:18:34:594]PC is at nand_scan_tail+0x50c/0x6d0
[06/08-14:18:34:595]LR is at nand_scan_tail+0x50c/0x6d0
[06/08-14:18:34:606]pc : [<c01a4cfc>] lr : [<c01a4cfc>] psr: 60000153
[06/08-14:18:34:606]sp : cf837e30 ip : c030ebe4 fp : c01ab4f8
[06/08-14:18:34:607]r10: cf80a228 r9 : c01aab30 r8 : 00000001
[06/08-14:18:34:616]r7 : cf834780 r6 : cf80a010 r5 : cf80a010 r4 : cf80a228
[06/08-14:18:34:617]r3 : c02fc250 r2 : c02fc250 r1 : 200001d3 r0 : 0000002b
[06/08-14:18:34:627]Flags: nZCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment kernel
[06/08-14:18:34:628]Control: 00c5387d Table: 50004008 DAC: 00000015
[06/08-14:18:34:639]Process swapper (pid: 1, stack limit = 0xcf8361b8)
[06/08-14:18:34:639]Stack: (0xcf837e30 to 0xcf838000)
[06/08-14:18:34:680]7e20: cf90bc10 00000000 cf80a010 c01ab8a4
[06/08-14:18:34:682]7e40: 0000000c 00000001 c02eb874 cfa89000 00000000 c02f8f28 c0313c2c c02f8f28
[06/08-14:18:34:687]7e60: c0313c40 00000055 c02eb874 c02e5a48 00000000 c0189c78 c03491fc c0313c40
[06/08-14:18:34:688]7e80: c02f8f28 c018873c c02f8f28 c0313c40 c02f8f5c 00000000 00000055 c018894c
[06/08-14:18:34:688]7ea0: c0313c40 c01888c0 cf837eb0 c01871f0 cf803278 cf868160 00000000 c0313c40
[06/08-14:18:34:688]7ec0: cfa7f6c0 c030f4f8 00000000 c0187964 c0297ed0 00000007 cf836000 c0313c40
[06/08-14:18:34:691]7ee0: 00000007 cf836000 00000000 c0188ed4 c02e2b88 00000007 cf836000 c000878c
[06/08-14:18:34:694]7f00: c02ffd58 c0216f14 cf830900 c033b7dc cf837f00 60000153 c02fac88 60000153
[06/08-14:18:34:705]7f20: c02eb618 00000000 c02fac88 c02fac88 c02bbf48 cfffcd07 c02bbf58 c0033ccc
[06/08-14:18:34:706]7f40: c029b9e4 c02bba08 00000006 00000006 c02fac4c c02e5a40 00000007 c0318000
[06/08-14:18:34:717]7f60: c02ce5c4 00000055 c02eb874 c02e5a48 00000000 c02ce4f8 00000006 00000006
[06/08-14:18:34:718]7f80: c02ce5c4 c003e9ac 00000000 c0210b74 00000000 00000000 00000000 00000000
[06/08-14:18:34:727]7fa0: 00000000 c0210b7c 00000000 c000e838 00000000 00000000 00000000 00000000
[06/08-14:18:34:738]7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[06/08-14:18:34:739]7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 e5893004 e1a00004
[06/08-14:18:34:749][<c01a4cfc>] (nand_scan_tail) from [<c01ab8a4>] (s3c24xx_nand_probe+0x3a0/0x520)
[06/08-14:18:34:760][<c01ab8a4>] (s3c24xx_nand_probe) from [<c0189c78>] (platform_drv_probe+0x1c/0x4c)
[06/08-14:18:34:761][<c0189c78>] (platform_drv_probe) from [<c018873c>] (driver_probe_device+0x7c/0x200)
[06/08-14:18:34:771][<c018873c>] (driver_probe_device) from [<c018894c>] (__driver_attach+0x8c/0x90)
[06/08-14:18:34:772][<c018894c>] (__driver_attach) from [<c01871f0>] (bus_for_each_dev+0x68/0x8c)
[06/08-14:18:34:782][<c01871f0>] (bus_for_each_dev) from [<c0187964>] (bus_add_driver+0x124/0x1d4)
[06/08-14:18:34:794][<c0187964>] (bus_add_driver) from [<c0188ed4>] (driver_register+0x78/0xf8)
[06/08-14:18:34:795][<c0188ed4>] (driver_register) from [<c000878c>] (do_one_initcall+0x30/0x148)
[06/08-14:18:34:804][<c000878c>] (do_one_initcall) from [<c02ce4f8>] (kernel_init_freeable+0xe0/0x1ac)
[06/08-14:18:34:816][<c02ce4f8>] (kernel_init_freeable) from [<c0210b7c>] (kernel_init+0x8/0xec)
[06/08-14:18:34:817][<c0210b7c>] (kernel_init) from [<c000e838>] (ret_from_fork+0x14/0x3c)
[06/08-14:18:34:832]Code: e3510008 0a000030 e59f019c eb01b180 (e7f001f2)
[06/08-14:18:34:832]---[ end trace be0198ec65143d7b ]---
[06/08-14:18:34:833]Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
从上面我们又发现出错以下信息:
[06/08-14:18:34:573]nand: No oob scheme defined for oobsize 218
[06/08-14:18:34:573]------------[ cut here ]------------
[06/08-14:18:34:574]kernel BUG at drivers/mtd/nand/nand_base.c:3732!
原来是我们的nandflash的oobsize是218,而nand_base.c中并没有加入218的处理,因此参照6410驱动,修改nand_base.c。做如下添加:
1. 添加nand_oob_218定义
static struct nand_ecclayout nand_oob_218 = {
.eccbytes = 104,
.eccpos = {
24,25,26,27,28,29,30,31,32,33,
34,35,36,37,38,39,40,41,42,43,
44,45,46,47,48,49,50,51,52,53,
54,55,56,57,58,59,60,61,62,63,
64,65,66,67,68,69,70,71,72,73,
74,75,76,77,78,79,80,81,82,83,
84,85,86,87,88,89,90,91,92,93,
94,95,96,97,98,99,100,101,102,103,
104,105,106,107,108,109,110,111,112,113,
114,115,116,117,118,119,120,121,122,123,
124,125,126,127},
.oobfree ={
{.offset = 2,
.length = 22} }
};
2. 添加case 218处理
case 128:
ecc->layout = &nand_oob_128;
break;
case 218:
ecc->layout = &nand_oob_218;
break;
default:
pr_warn("No oob scheme defined for oobsize %d\n",
mtd->oobsize);
BUG();
}
好了,我们再次 make uImage后,下载到板子上,启动如下:
[06/08-14:28:27:608]U-Boot 2010.03-svn3 (May 06 2014 - 22:13:20) for SMDK6410
[06/08-14:28:27:608]
[06/08-14:28:27:608]*******************************************************
[06/08-14:28:27:619] Welcome to Embedded System
[06/08-14:28:27:620] Base On S3C6410 Devolopment
[06/08-14:28:27:620] Date: 2014/4/15 22:00 PM
[06/08-14:28:27:630]*******************************************************
[06/08-14:28:27:631]
[06/08-14:28:27:631]CPU: S3C6410@533MHz
[06/08-14:28:27:631] Fclk = 533MHz, Hclk = 133MHz, Pclk = 66MHz (ASYNC Mode)
[06/08-14:28:27:631]Board: SMDK6410
[06/08-14:28:27:636]DRAM: 256 MB
[06/08-14:28:27:678]Flash: 0 kB
[06/08-14:28:27:679]NAND Flash: 2048 MB
[06/08-14:28:28:799]********************************************************
[06/08-14:28:28:799]Initial LCD controller
[06/08-14:28:28:812] clk_freq:9 MHz, div_freq:13 ,rea_freq:9 MHz
[06/08-14:28:28:812]
[06/08-14:28:28:813] HBP = 2 HFP = 2 HSW = 41,Hpixs:480
[06/08-14:28:28:813] VBP = 2 VFP = 2 VSW = 10,Vpixs:272
[06/08-14:28:28:830]FrameBuff:57e7a000
[06/08-14:28:28:830] LCD initialization Finished.
[06/08-14:28:28:831]********************************************************
[06/08-14:28:28:852]In: serial
[06/08-14:28:28:852]
[06/08-14:28:28:852]Out: lcd
[06/08-14:28:28:855]
[06/08-14:28:28:855]Err: lcd
[06/08-14:28:28:856]
[06/08-14:28:29:206]Net: DM9000
[06/08-14:28:30:225]Hit any key to stop autoboot: 0
[06/08-14:28:30:225]
[06/08-14:28:30:226]NAND read:
[06/08-14:28:30:226]device 0 offset 0x100000, size 0x500000
[06/08-14:28:30:226]
[06/08-14:28:33:470] 5242880 bytes read: OK
[06/08-14:28:33:470]
[06/08-14:28:33:470]## Booting kernel from Legacy Image at 50008000 ...
[06/08-14:28:33:470]
[06/08-14:28:33:472] Image Name: Linux-3.14.4
[06/08-14:28:33:486]
[06/08-14:28:33:487] Image Type: ARM Linux Kernel Image (uncompressed)
[06/08-14:28:33:506]
[06/08-14:28:33:508] Data Size: 1638624 Bytes = 1.6 MB
[06/08-14:28:33:522]
[06/08-14:28:33:523] Load Address: 50008000
[06/08-14:28:33:540]
[06/08-14:28:33:540] Entry Point: 50008040
[06/08-14:28:33:555]
[06/08-14:28:33:885] Verifying Checksum ... OK
[06/08-14:28:33:901]
[06/08-14:28:33:902] XIP Kernel Image ... OK
[06/08-14:28:33:915]
[06/08-14:28:33:916]OK
[06/08-14:28:33:933]
[06/08-14:28:33:933]
[06/08-14:28:33:933]Starting kernel ...
[06/08-14:28:33:934]
[06/08-14:28:33:945]
[06/08-14:28:33:959]
[06/08-14:28:33:973]
[06/08-14:28:34:265]Uncompressing Linux... done, booting the kernel.
[06/08-14:28:35:062]Booting Linux on physical CPU 0x0
[06/08-14:28:35:072]Linux version 3.14.4 (simiar@Embedded) (gcc version 4.4.3 (ctng-1.6.1) ) #3 Sun Jun 8 14:27:06 CST 2014
[06/08-14:28:35:076]CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387d
[06/08-14:28:35:092]CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[06/08-14:28:35:092]Machine: OK6410
[06/08-14:28:35:093]Ignoring unrecognised tag 0x54410008
[06/08-14:28:35:097]Memory policy: Data cache writeback
[06/08-14:28:35:097]CPU S3C6410 (id 0x36410101)
[06/08-14:28:35:097]CPU: found DTCM0 8k @ 00000000, not enabled
[06/08-14:28:35:098]CPU: moved DTCM0 8k to fffe8000, enabled
[06/08-14:28:35:106]CPU: found DTCM1 8k @ 00000000, not enabled
[06/08-14:28:35:106]CPU: moved DTCM1 8k to fffea000, enabled
[06/08-14:28:35:107]CPU: found ITCM0 8k @ 00000000, not enabled
[06/08-14:28:35:117]CPU: moved ITCM0 8k to fffe0000, enabled
[06/08-14:28:35:118]CPU: found ITCM1 8k @ 00000000, not enabled
[06/08-14:28:35:118]CPU: moved ITCM1 8k to fffe2000, enabled
[06/08-14:28:35:128]Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[06/08-14:28:35:138]Kernel command line: root=/dev/nfs nfsroot=192.168.1.100:/home/simiar/share/myproject/ok6410/filesystem/ok6410_fs ip=192.168.1.50:192.168.1.100:192.168.1.1:255.255.255.0::eth0:off console=ttySAC0,115200
[06/08-14:28:35:151]PID hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:28:35:161]Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[06/08-14:28:35:162]Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[06/08-14:28:35:171]Memory: 256460K/262144K available (2173K kernel code, 178K rwdata, 664K rodata, 118K init, 198K bss, 5684K reserved)
[06/08-14:28:35:173]Virtual kernel memory layout:
[06/08-14:28:35:184] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[06/08-14:28:35:184] DTCM : 0xfffe8000 - 0xfffec000 ( 16 kB)
[06/08-14:28:35:185] ITCM : 0xfffe0000 - 0xfffe4000 ( 16 kB)
[06/08-14:28:35:197] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[06/08-14:28:35:197] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
[06/08-14:28:35:206] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[06/08-14:28:35:207] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[06/08-14:28:35:208] .text : 0xc0008000 - 0xc02cd674 (2838 kB)
[06/08-14:28:35:217] .init : 0xc02ce000 - 0xc02eb99c ( 119 kB)
[06/08-14:28:35:218] .data : 0xc02ec000 - 0xc0318a00 ( 179 kB)
[06/08-14:28:35:228] .bss : 0xc0319000 - 0xc034aac8 ( 199 kB)
[06/08-14:28:35:229]SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[06/08-14:28:35:229]NR_IRQS:246
[06/08-14:28:35:239]S3C6410 clocks: apll = 533000000, mpll = 533000000
[06/08-14:28:35:240] epll = 24000000, arm_clk = 533000000
[06/08-14:28:35:240]VIC @f6000000: id 0x00041192, vendor 0x41
[06/08-14:28:35:250]VIC @f6010000: id 0x00041192, vendor 0x41
[06/08-14:28:35:251]sched_clock: 32 bits at 33MHz, resolution 30ns, wraps every 128929599457ns
[06/08-14:28:35:251]Console: colour dummy device 80x30
[06/08-14:28:35:261]Calibrating delay loop... 531.66 BogoMIPS (lpj=2658304)
[06/08-14:28:35:262]pid_max: default: 32768 minimum: 301
[06/08-14:28:35:273]Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:28:35:273]Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[06/08-14:28:35:274]CPU: Testing write buffer coherency: ok
[06/08-14:28:35:283]Setting up static identity map for 0x50214fa0 - 0x50214ffc
[06/08-14:28:35:295]VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[06/08-14:28:35:296]DMA: preallocated 256 KiB pool for atomic coherent allocations
[06/08-14:28:35:296]OK6410: Option string ok6410=0
[06/08-14:28:35:308]OK6410: selected LCD display is 480x272
[06/08-14:28:35:308]S3C6410: Initialising architecture
[06/08-14:28:35:309]bio: create slab <bio-0> at 0
[06/08-14:28:35:317]pl08xdmac dma-pl080s.0: initialized 8 virtual memcpy channels
[06/08-14:28:35:318]pl08xdmac dma-pl080s.0: initialized 16 virtual slave channels
[06/08-14:28:35:328]pl08xdmac dma-pl080s.0: DMA: PL080s rev1 at 0x75000000 irq 73
[06/08-14:28:35:329]pl08xdmac dma-pl080s.1: initialized 8 virtual memcpy channels
[06/08-14:28:35:340]pl08xdmac dma-pl080s.1: initialized 12 virtual slave channels
[06/08-14:28:35:340]pl08xdmac dma-pl080s.1: DMA: PL080s rev1 at 0x75100000 irq 74
[06/08-14:28:35:341]usbcore: registered new interface driver usbfs
[06/08-14:28:35:350]usbcore: registered new interface driver hub
[06/08-14:28:35:351]usbcore: registered new device driver usb
[06/08-14:28:35:362]Switched to clocksource samsung_clocksource_timer
[06/08-14:28:35:362]futex hash table entries: 256 (order: 0, 7168 bytes)
[06/08-14:28:35:363]ROMFS MTD (C) 2007 Red Hat, Inc.
[06/08-14:28:35:363]io scheduler noop registered
[06/08-14:28:35:373]io scheduler deadline registered
[06/08-14:28:35:373]io scheduler cfq registered (default)
[06/08-14:28:35:374]s3c-fb s3c-fb: window 0: fb
[06/08-14:28:35:384]Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[06/08-14:28:35:385]s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 69, base_baud = 0) is a S3C6400/10
[06/08-14:28:35:395]console [ttySAC0] enabled
[06/08-14:28:35:395]s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 70, base_baud = 0) is a S3C6400/10
[06/08-14:28:35:406]s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 71, base_baud = 0) is a S3C6400/10
[06/08-14:28:35:414]s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 72, base_baud = 0) is a S3C6400/10
[06/08-14:28:35:443]brd: module loaded
[06/08-14:28:35:462]loop: module loaded
[06/08-14:28:35:471]------------[ cut here ]------------
[06/08-14:28:35:471]WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:926 __clk_enable+0x94/0xa4()
[06/08-14:28:35:482]Modules linked in:
[06/08-14:28:35:483]CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.4 #3
[06/08-14:28:35:493][<c0014238>] (unwind_backtrace) from [<c0011c74>] (show_stack+0x10/0x14)
[06/08-14:28:35:494][<c0011c74>] (show_stack) from [<c001c6ec>] (warn_slowpath_common+0x68/0x88)
[06/08-14:28:35:505][<c001c6ec>] (warn_slowpath_common) from [<c001c728>] (warn_slowpath_null+0x1c/0x24)
[06/08-14:28:35:505][<c001c728>] (warn_slowpath_null) from [<c0209ffc>] (__clk_enable+0x94/0xa4)
[06/08-14:28:35:515][<c0209ffc>] (__clk_enable) from [<c020a3a8>] (clk_enable+0x18/0x2c)
[06/08-14:28:35:526][<c020a3a8>] (clk_enable) from [<c01ab000>] (s3c2410_nand_clk_set_state+0x5c/0x64)
[06/08-14:28:35:527][<c01ab000>] (s3c2410_nand_clk_set_state) from [<c01ab5a8>] (s3c24xx_nand_probe+0x90/0x520)
[06/08-14:28:35:538][<c01ab5a8>] (s3c24xx_nand_probe) from [<c0189c78>] (platform_drv_probe+0x1c/0x4c)
[06/08-14:28:35:549][<c0189c78>] (platform_drv_probe) from [<c018873c>] (driver_probe_device+0x7c/0x200)
[06/08-14:28:35:550][<c018873c>] (driver_probe_device) from [<c018894c>] (__driver_attach+0x8c/0x90)
[06/08-14:28:35:560][<c018894c>] (__driver_attach) from [<c01871f0>] (bus_for_each_dev+0x68/0x8c)
[06/08-14:28:35:571][<c01871f0>] (bus_for_each_dev) from [<c0187964>] (bus_add_driver+0x124/0x1d4)
[06/08-14:28:35:571][<c0187964>] (bus_add_driver) from [<c0188ed4>] (driver_register+0x78/0xf8)
[06/08-14:28:35:582][<c0188ed4>] (driver_register) from [<c000878c>] (do_one_initcall+0x30/0x148)
[06/08-14:28:35:583][<c000878c>] (do_one_initcall) from [<c02ce4f8>] (kernel_init_freeable+0xe0/0x1ac)
[06/08-14:28:35:593][<c02ce4f8>] (kernel_init_freeable) from [<c0210b90>] (kernel_init+0x8/0xec)
[06/08-14:28:35:604][<c0210b90>] (kernel_init) from [<c000e838>] (ret_from_fork+0x14/0x3c)
[06/08-14:28:35:605]---[ end trace dc167f7c7b1d8ad1 ]---
[06/08-14:28:35:606]s3c24xx-nand s3c6400-nand: Tacls=4, 30ns Twrph0=8 60ns, Twrph1=6 45ns
[06/08-14:28:35:618]s3c24xx-nand s3c6400-nand: System booted from NAND
[06/08-14:28:35:619]s3c24xx-nand s3c6400-nand: NAND hardware ECC
[06/08-14:28:35:627]nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd5
[06/08-14:28:35:628]nand: Samsung NAND 2GiB 3,3V 8-bit
[06/08-14:28:35:630]nand: 2048MiB, MLC, page size: 4096, OOB size: 218
[06/08-14:28:35:634]Scanning device for bad blocks
[06/08-14:28:35:721]Bad eraseblock 985 at 0x00001ecff000
[06/08-14:28:35:746]Bad eraseblock 1295 at 0x0000287ff000
[06/08-14:28:35:913]Bad eraseblock 3218 at 0x00006497f000
[06/08-14:28:35:994]Creating 4 MTD partitions on "nand":
[06/08-14:28:35:995]0x000000000000-0x000000100000 : "Bootloader"
[06/08-14:28:36:006]0x000000100000-0x000000600000 : "Linux Kernel"
[06/08-14:28:36:007]0x000000600000-0x00000ce00000 : "File System"
[06/08-14:28:36:008]0x00000ce00000-0x000080000000 : "User"
[06/08-14:28:36:018]ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[06/08-14:28:36:018]ohci-s3c2410: OHCI S3C2410 driver
[06/08-14:28:36:019]s3c2410-ohci s3c2410-ohci: OHCI Host Controller
[06/08-14:28:36:031]s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
[06/08-14:28:36:032]s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
[06/08-14:28:36:088]s3c2410-ohci s3c2410-ohci: init err (00000000 0000)
[06/08-14:28:36:089]s3c2410-ohci s3c2410-ohci: can't start
[06/08-14:28:36:099]s3c2410-ohci s3c2410-ohci: startup error -75
[06/08-14:28:36:099]s3c2410-ohci s3c2410-ohci: USB bus 1 deregistered
[06/08-14:28:36:100]s3c2410-ohci: probe of s3c2410-ohci failed with error -75
[06/08-14:28:36:109]mousedev: PS/2 mouse device common for all mice
[06/08-14:28:36:109]i2c /dev entries driver
[06/08-14:28:36:110]sdhci: Secure Digital Host Controller Interface driver
[06/08-14:28:36:119]sdhci: Copyright(c) Pierre Ossman
[06/08-14:28:36:120]s3c-sdhci s3c-sdhci.0: clock source 0: mmc_busclk.0 (133250000 Hz)
[06/08-14:28:36:128]s3c-sdhci s3c-sdhci.0: clock source 2: mmc_busclk.2 (24000000 Hz)
[06/08-14:28:36:166]mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
[06/08-14:28:36:181]s3c-sdhci s3c-sdhci.1: clock source 0: mmc_busclk.0 (133250000 Hz)
[06/08-14:28:36:181]s3c-sdhci s3c-sdhci.1: clock source 2: mmc_busclk.2 (24000000 Hz)
[06/08-14:28:36:216]mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
[06/08-14:28:36:229]usbcore: registered new interface driver usbhid
[06/08-14:28:36:229]usbhid: USB HID core driver
[06/08-14:28:36:245]drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[06/08-14:28:36:246]VFS: Cannot open root device "nfs" or unknown-block(0,255): error -6
[06/08-14:28:36:251]Please append a correct "root=" boot option; here are the available partitions:
[06/08-14:28:36:253]Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
[06/08-14:28:36:263]CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.14.4 #3
[06/08-14:28:36:264][<c0014238>] (unwind_backtrace) from [<c0011c74>] (show_stack+0x10/0x14)
[06/08-14:28:36:273][<c0011c74>] (show_stack) from [<c021115c>] (panic+0x8c/0x1dc)
[06/08-14:28:36:274][<c021115c>] (panic) from [<c02cf0a4>] (mount_block_root+0x220/0x2e8)
[06/08-14:28:36:284][<c02cf0a4>] (mount_block_root) from [<c02cf330>] (prepare_namespace+0x160/0x1b8)
[06/08-14:28:36:295][<c02cf330>] (prepare_namespace) from [<c02ce580>] (kernel_init_freeable+0x168/0x1ac)
[06/08-14:28:36:295][<c02ce580>] (kernel_init_freeable) from [<c0210b90>] (kernel_init+0x8/0xec)
[06/08-14:28:36:306][<c0210b90>] (kernel_init) from [<c000e838>] (ret_from_fork+0x14/0x3c)
上面红色部分,代表nandflash已经可以识别并可以读写,已经看到分区信息。只是会有cut here,不过这个bug不影响我们的启动,如果不想看到该打印信息,我们只需要这make menucong中配置kernel hacking中设置printk level为7,默认为4即可。
后面我们就开始做yaffs2文件系统了,并配置内核支持yaffs2文件系统。
S3C6410嵌入式应用平台构建(五)——linux-3.14.4移植到OK6410-(Nand分区问题)的更多相关文章
- S3C6410嵌入式应用平台构建(四)——linux-3.14.4移植到OK6410-(初步启动)
这次,还是把基本的基于我目前最新的Linux源码进行移植到OK6410吧,同时也写下我移植过程中遇到的问题及解决方法,不过有些方法是借鉴网上的,有些是自己加的,会有一些小bug. 一.基本工作 1. ...
- S3C6410嵌入式应用平台构建(一)
[2014-4/8~4/10]目前我们已经积累一定的嵌入式相关知识,对嵌入式的架构及开发过程有了大体了解,唯一缺的就是实践,通过自己的分析搭建自己的嵌入式系统.下面,我将从此处开始记录我和我同学一起分 ...
- S3C6410嵌入式应用平台构建(六)——linux-3.14.4移植到OK6410-(Yaffs2文件制作)
本文主要讲怎用利用yaffs2工具和busybox制作yaffs2文件系统镜像.大多数都是参照网上的,目的在于记录学习,不做任何用途. 一.制作mkyaffs2image工具 进入yaffs2源码目录 ...
- S3C6410嵌入式应用平台构建(三)
构建了好久的系统,由于工作原因,没有及时写记录,目前我已经进展到构建yaffs2文件系统,启动Linux内核了.Uboot移植基本功能已经完成. 由于Uboot移植方法大致是一样的,我主要参考这位博友 ...
- S3C6410嵌入式应用平台构建(二)
[2014-4/11~4/14]经过之前的实验,对Uboot已经有了大体的了解,前我们已经把led灯给点亮,但这不是我们的根本目的,我们是要进入boot启动,经过两天的分析代码和反复的实验,终于可以进 ...
- KTL 一个支持C++14编辑公式的K线技术工具平台 - 第五版,支持sqlite3,全新sqlite3zz语法超简单使用sqlite3; 添加方差等统计函数。
K,K线,Candle蜡烛图. T,技术分析,工具平台 L,公式Language语言使用c++14,Lite小巧简易. 项目仓库:https://github.com/bbqz007/KTL 国内仓库 ...
- Unity跨平台C/CPP动态库编译---可靠UDP网络库kcp基于CMake的各平台构建实践
1.为什么需要动态库 a)提供原生代码(native code)的支持,也叫原生插件,但是我实践的是c/cpp跨平台动态库,这里不具体涉及安卓平台java库和ios平台的objectc库构建. b)某 ...
- Unity3D跨平台动态库编译---记kcp基于CMake的各平台构建实践
一 为什么需要动态库 1)提供原生代码(native code)的支持,也叫原生插件,但是我实践的是c/cpp跨平台动态库,这里不具体涉及安卓平台java库和ios平台的objectc库构建. 2)某 ...
- SharpGL学习笔记(一) 平台构建与Opengl的hello World (转)
(一)平台构建与Opengl的hello World OpenGL就是3d绘图的API,微软针和它竞争推出D3D,也就是玩游戏时最常见的DirectorX组件中的3d功能. 所以不要指望windows ...
随机推荐
- Hibernate实现分页
转自:http://blog.csdn.net/huqiub/article/details/4329541 分页在任何系统中都是非常头疼的事情,有的数据库在语法上支持分页,而有的数据库则需要使用可滚 ...
- listview及adapter
http://blog.csdn.net/shaojie519/article/details/6595720 http://blog.csdn.net/liuhe688/article/detail ...
- GDI+简单现实文字旋转
原文 http://www.cnblogs.com/kaixiangbb/p/3301272.html 题记 入职新公司已快有两月了,试用期已快结束,项目却迟迟还未正式启动.安排给我的多是些琐事,一直 ...
- MySQL RR隔离 读一致性
MySQL RR 模式下 事务隔离问题: Session 1: mysql> select * from test; +------+------+ | id | name | +------+ ...
- Codeforces 325D
#include <cstdio> #include <algorithm> #include <cstring> #include <cstdlib> ...
- printdir-deldir-bmp
#include<unistd.h> #include<stdio.h> #include<dirent.h> #include<string.h> # ...
- poj1007 qsort快排
这道题比较简单,但通过这个题我学会了使用c++内置的qsort函数用法,收获还是很大的! 首先简要介绍一下qsort函数. 1.它是快速排序,所以就是不稳定的.(不稳定意思就是张三.李四成绩都是90, ...
- instance variables may not be placed in categories
Avoid Properties in Categories Objective-C分类中是不允许增加成员变量的(Instance variables may not be placed in cat ...
- 简述Linq中.ToList(), .AsEnumerable(), AsQueryable()的区别和用法
[TOC] 这3个方法的功能完全不同, 应按照具体业务场景使用. AsQueryable() 先说说什么是 IQueryable IQueryable 是当前的 data provider 返回的类型 ...
- 【整理】Ajax异步实现的几种方式总结
AJAX = Asynchronous JavaScript and XML(异步的 JavaScript 和 XML)AJAX 是一种在无需重新加载整个网页的情况下,能够更新部分网页的技术.GET ...