s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
nand: device found, Manufacturer ID: 0xec, Chip ID: 0xda
nand: Samsung NAND 256MiB 3,3V 8-bit
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
Creating 5 MTD partitions on "nand":
0x000000000000-0x000000040000 : "supervivi"
__nand_correct_data: uncorrectable ECC error
0x000000040000-0x000000060000 : "param"
ftl_cs: FTL header not found.
0x000000060000-0x000000560000 : "Kernel"
ftl_cs: FTL header not found.
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "nand" -- size truncated to 0xfaa0000
ftl_cs: FTL header not found.
0x000000000000-0x000040000000 : "nand"
mtd: partition "nand" extends beyond the end of device "nand" -- size truncated to 0x10000000
__nand_correct_data: uncorrectable ECC error
It is found that the development board can already recognize the information of nand flash, but prints the following information:
ftl_cs: FTL header not found.
The solution is as follows: execute make menuconfig in the kernel root directory and enter
Device Drivers ->
Memory Technology Devices (MTD) ->
Remove the following options
<>FTL (Flash Translation Layer) support
<> NFTL (NAND Flash Translation Layer) support
<>INFTL (Inverse NAND Flash Translation Layer) support
Save and recompile.
1.6 has completed the support for nand flash so far, but the kernel still cannot boot normally due to the lack of a root file system. Next we will add support for yaffs2 to the kernel.
Execute #git clone git://www.aleph1.co.uk/yaffs2 in the terminal to obtain the latest yaffs2 source code. After synchronization, enter the yaffs2 directory and execute # ./patch-ker.sh cm kernel source code path to apply the yaffs2 patch to the kernel. Enter the kernel directory and execute make menuconfig
Select File systems --->
[*] Miscellaneous filesystems --->
│ yaffs2 file system support
After saving, exit and recompile. You will encounter several errors at this time. Because the new version of the Linux kernel has modified some functions for file operations, we need to modify them one by one according to the errors. According to the errors:
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_readpage_nolock':
fs/yaffs2/yaffs_vfs.c:286: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_hold_space':
fs/yaffs2/yaffs_vfs.c:484: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_release_space':
fs/yaffs2/yaffs_vfs.c:502: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_file_write':
fs/yaffs2/yaffs_vfs.c:594: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c:606: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_file_flush':
fs/yaffs2/yaffs_vfs.c:730: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c:741: error: too few arguments to function 'yaffs_flush_file'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_sync_object':
fs/yaffs2/yaffs_vfs.c:771: error: too few arguments to function 'yaffs_flush_file'
fs/yaffs2/yaffs_vfs.c: At top level:
fs/yaffs2/yaffs_vfs.c:781: error: 'generic_file_aio_read' undeclared here (not in a function)
fs/yaffs2/yaffs_vfs.c:782: error: 'generic_file_aio_write' undeclared here (not in a function)
fs/yaffs2/yaffs_vfs.c:787: error: 'generic_file_splice_write' undeclared here (not in a function)
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_iterate':
fs/yaffs2/yaffs_vfs.c:1719: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_flush_inodes':
fs/yaffs2/yaffs_vfs.c:2190: error: too few arguments to function 'yaffs_flush_file'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_flush_super':
fs/yaffs2/yaffs_vfs.c:2203: error: too few arguments to function 'yaffs_flush_whole_cache'
Open /fs/yaffs2/yaffs_vfs.c, use the replace function to replace all f_dentry in the code with f_path.dentry, replace all yaffs_flush_file(obj, 1, 0); with yaffs_flush_file(obj, 1, 0,1); replace yaffs_flush_file(obj, 1, datasync); with yaffs_flush_file(obj, 1, datasync,1); replace yaffs_flush_file(obj, 1, 0); with yaffs_flush_file(obj, 1, 0,1); replace yaffs_flush_whole_cache(dev); with yaffs_flush_whole_cache(dev,1);
Near 718 lines
-.read = do_sync_read,
-.write = do_sync_write,
+.read = new_sync_read,
+.write = new_sync_write,
-.aio_read = generic_file_aio_read,
-.aio_write = generic_file_aio_write,
+ .read_iter =generic_file_read_iter,
+ .write_iter =generic_file_write_iter,
-.splice_write = generic_file_splice_write,
+.splice_write = iter_file_splice_write,
After saving, recompile, download the kernel to the development board, and burn the file system (for the convenience of testing, this time I first use the friendly file system root_qtopia.img provided by the developer. In future tutorials, we will also make our own file system), restart the development board, and see the following boot information
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 3.19.3 (root@ginger-virtual-machine) (gcc version 4.4.3 (ctng-1.6.1) ) #6 Sat Apr 25 13:37:14 CST 2015
Previous article:mini2440 u-boot linux kernel boot, u-boot.2012.10——mini2440 (II. Boot process analysis)
Next article:uboot-2012.04.01 ported to mini2440 (I) Preliminary analysis of boot process, memory distribution and relocation
- Popular Resources
- Popular amplifiers
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- About MOS tube recommendation
- How to keep the AD schematic synchronized with the PCB after it is split?
- TI Signal Chain and Power Q&A Series Live Broadcast - Gate Driver Special Live Broadcast with Prizes in Progress!
- Main application categories of millimeter wave radar
- pybL development board pinout
- Npn tube, Iceo is the reverse cutoff current, C and E are both N, where does the reverse come from, what does the reverse here mean...
- Children's Day is coming, what do you want to reminisce about?
- 【Running posture training shoes】No.009-Work submission
- 【Chuanglong TL570x-EVM】HDMI data cable adapter
- Newcomer Report