In the previous article, our Linux was able to boot, but when identifying NAND, it failed to obtain the clock source, resulting in the failure of subsequent partitioning.
We found from the startup 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
So I traced the code:
nandflash driver——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 clockn");
err = -ENOENT;
goto exit_error;
}
We found that when we tried to find the "nand" clock source, we could not get it, so we opened S3c2410.c (driversmtdnand)
Then open Clk-s3c64xx.c (driversclksamsung)
I found that there was no Aliases nand in Aliases, so I tried adding the following code: 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"),
};
In this case, there should be no problem when going to clk_get.
This mechanism was added after Linux-3.10, and this problem has stuck me for a long time.
We make uImage and test as follows:
From the above we found the following error information:
[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!
It turns out that the oobsize of our nandflash is 218, but nand_base.c does not include the processing of 218. Therefore, refer to the 6410 driver and modify nand_base.c. Add the following:
1. Add nand_oob_218 definition
2. Add case 218 processing
OK, let's make uImage again, download it to the board, and start it as follows:
[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 Development
[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
[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
Previous article:S3C6410 Embedded Application Platform Construction (VI) - Linux-3.14.4 Ported to OK6410 (Yaffs2 File System Ported)
Next article:S3C6410 Embedded Application Platform Construction (IV) - Linux-3.14.4 Ported to OK6410 (Preliminary Startup)
Recommended ReadingLatest update time:2024-11-15 10:45
- Popular Resources
- Popular amplifiers
- Network Operating System (Edited by Li Zhixi)
- Microgrid Stability Analysis and Control Microgrid Modeling Stability Analysis and Control to Improve Power Distribution and Power Flow Control (
- MATLAB and FPGA implementation of wireless communication
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- Communication between Yitong Chuanglian MODBUS to PROFIBUS gateway and Honeywell DCS system
- Let's take a look
- 【TI Wireless】Micro Dual-Mode Wireless Receiver
- PWM and PFM
- Let’s talk about whether Huawei can survive in the end.
- Can the network cable be directly soldered to the PCB without a crystal plug or can the network cable be plugged into the circuit board with terminals?
- [Revenge RVB2601 creative application development] helloworld_beginner's guide to debugging methods and processes
- What changes will occur if RFID technology is applied to clothing production?
- EEWORLD University Hall----30 Case Studies of MATLAB Intelligent Algorithms
- Flyback Power Supply Magnetic Core Calculation Method