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
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- "Cross-chip" quantum entanglement helps build more powerful quantum computing capabilities
- Ultrasound patch can continuously and noninvasively monitor blood pressure
- Ultrasound patch can continuously and noninvasively monitor blood pressure
- Europe's three largest chip giants re-examine their supply chains
- Europe's three largest chip giants re-examine their supply chains
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- Design of automotive LIN communication simulator based on Renesas MCU
- When will solid-state batteries become popular?
- Adding solid-state batteries, CATL wants to continue to be the "King of Ning"
- Identify the memory number
- Here it comes, here comes the weekly review information~~
- MS5192T replaces AD7792
- Why does the output voltage of a power amplifier have errors? (Part 2)
- [Unmanned driving smart car based on ESP32 road sign identification] Unboxing ESP32-S2-KALUGA-1+K210Sipeed M1 docking station kit
- Challenge and collect cards | Light electric vehicles and power tools are just the right time, Infineon invites you to join the fun!
- E13C diesel engine helps Hino Profia achieve 2015 fuel efficiency standards ahead of schedule
- Pingtouge RISC-V Low Power Board-RVB2601 Development Board Quick Start Guide
- [Ateli Development Board AT32F421 Review] -1
- Analyze the faults in the resistor parallel circuit