跳到主要內容

臺灣博碩士論文加值系統

(3.231.230.177) 您好!臺灣時間:2021/08/04 03:31
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

: 
twitterline
研究生:張原豪
研究生(外文):Yuan-Hao Chang
論文名稱:以NORFLASH記憶體為磁碟系統之嵌入式LINUX實作
論文名稱(外文):Implementation of Embedded LINUX with NOR Flash Memory
指導教授:林俊宏林俊宏引用關係
指導教授(外文):Chun-Hung Richard Lin
學位類別:碩士
校院名稱:國立中山大學
系所名稱:資訊工程學系研究所
學門:工程學門
學類:電資工程學類
論文種類:學術論文
論文出版年:2004
畢業學年度:92
語文別:英文
論文頁數:84
中文關鍵詞:檔案系統嵌入式系統
外文關鍵詞:CFIFilesystemJFFS2LinuxMTDFlash disk
相關次數:
  • 被引用被引用:5
  • 點閱點閱:523
  • 評分評分:
  • 下載下載:96
  • 收藏至我的研究室書目清單書目收藏:3
近來,手持式裝置越來越普及,它們大多趨向低價格、小體積、高運算能力且擁有強大的軟體功能;嵌入式作業系統因之變成迫切性的需求。目前市面上有已有許多不同的嵌入式作業系統,然而,Linux因有許多優點使其脫穎而出並廣泛地被使用。例如,它沒有授權金問題、容易移植且容易發展新應用程式,而最大的優點是它公開原始碼。

嵌入式系統通常是無磁碟系統,為了讓嵌入式Linux儲存永久性資料,使用Flash磁碟系統是一個普遍的策略。我使用MTD(記憶體技術裝置)系統來模擬Flash記憶體為Flash磁碟,並掛載到Linux的檔案系統。這使得存取Flash記憶體的資料只須使用標準的輸出(入)程序,不需要任保額外的作業。MTD系統包括兩個不同種類的模組:使用者模組及驅動程式模組。在驅動程式模組,我使用CFI(通用Flash介面)來偵測Flash晶片並分割它;在使用者模組,使用MTD BLOCK來模擬這些分割成為區塊裝置,並使用JFFS2檔案系統型態把這些區塊裝置掛載為Linux的檔案系統,其中JFFS2是專為Flash裝置特性所設計的檔案系統型態。

本篇論文的目的是在韓國三星公司發展的SMDK2410(以ARM微處理器為主CPU核心)發展板上,使用MTD系統來模擬Flash晶片(型號Am29LV320DB)成為嵌入式Linux的Flash磁碟,期望此實作能有助於其他進階應用的發展及為嵌入式系統研究提供實驗平臺。
Recently, Handheld devices are more and more popular. Most of them aim at the low price, small size, high computing power, and powerful functionalities. Therefore, the need for embedded operating systems in the market is absolutely vital. There are many embedded systems in the market, but embedded Linux has some advantages to be outstanding and widely accepted. For example, it has no proprietary problem and high portability, and is comparatively easy to be reconstructed and to develop new applications. Best of them all, it is open source software.

Embedded systems are usually diskless systems. In order to keep permanent data in embedded Linux, using flash disk as its disk system is a widely adapted strategy. We use MTD (Memory Technology Devices) system to emulate flash memory as flash disk mounted into Linux virtual file system. This allows accessing flash memory with standard I/O operations without any extra effort. MTD system contains, “user” and driver”, two different modules. In driver modules, we use CFI (Common Flash Interface) to probe the flash chip and then partition it, while we use MTD BLOCK to emulate the flash partitions as block devices in user modules, and then mount them into Linux’s virtual file system with JFFS2 (Journaling Flash File System version 2) type, which is a file system type specifically designed for flash devices according to the features of flash devices.

The purpose of this thesis is to use MTD system to emulate Am29LV320DB flash chip as a flash disk in embedded Linux running on an ARM-based developing board, SMDK2410, designed by Samsung. I hope this porting can help the development of other advanced applications and provide an empirical platform for the research of embedded systems.
CHAPTER 1. INTRODUCTION 1
1.1 MOTIVATION 1
1.2 CONTRIBUTION 2
1.3 THESIS STRUCTURE 2
CHAPTER 2. PLATFORM ARCHITECTURE 3
2.1 SYSTEM OVERVIEW 3
2.2 SMDK2410 OVERVIEW 3
2.3 SMDK2410 BLOCK DIAGRAMS 4
2.4 MEMORY CONTROLLER 6
2.5 FLASH MEMORY 7
2.5.1 NAND Flash Controller 8
2.5.1.1 Overview 8
2.5.1.2 Boot Sequence 9
2.5.1.3 Special Function Registers 9
2.5.1.4 Read/Write Data via NAND Flash Controller 10
2.5.1.5 Drawbacks of NAND Flash Memory 11
2.5.2 Onboard NOR Flash, Am29LV320DB 11
2.5.2.1 Boot Sector Addresses 11
2.5.2.2 Command Definitions 13
2.5.2.2.1 Reading Array Data 14
2.5.2.2.2 Reset Command 14
2.5.2.2.3 Program Command Sequence 15
2.5.2.2.4 Chip Erase Command Sequence 15
2.5.2.2.5 Sector Erase Command Sequence 15
2.5.3 The Comparison of NOR Flash and NAND Flash 16
2.5.3.1 NOR Cell 16
2.5.3.2 NAND Cell 16
2.5.3.3 Features Summary 17
2.6 PROGRAMMER’S MODEL OF S3C2410X MICROPROCESSOR 17
2.6.1 Exceptions 18
2.6.1.1 Exception Vectors 18
2.6.1.2 Exception Priorities 18
2.6.2 Registers 19
CHAPTER 3. THE DEVELOPMENT OF EMBEDDED LINUX 21
3.1 TOOL CHAIN 21
3.2 BOOTLOADER 22
3.3 LINUX KERNEL 23
3.3.1 Booting Sequence in the very Beginning 23
3.3.1.1 start_kernel Function 24
3.3.1.1.1 Configure Kernel Command String 24
3.3.1.1.2 setup_arch Function 25
3.3.1.1.3 trap_init Function 26
3.3.2 Add a Device Driver into Kernel’s Source Tree and Build Kernel 26
3.3.3 Enable Flash Memory Devices as Linux’s Disk Systems 27
3.3.3.1 Memory Technology Device 27
3.3.3.1.1 MTD Block 30
3.3.3.1.2 JFFS version 2 32
3.3.3.1.3 Common Flash Interface (CFI) 33
3.3.4 Ram Disk 34
CHAPTER 4. PORTING LINUX TO NOR FLASH WITH FLASH DISK 35
4.1 THE REQUIRED FILES BEFORE GETTING START 35
4.2 INSTALL CROSS COMPILER 36
4.3 PORTING BOOTLOADER TO BOOT FROM NOR FLASH 36
4.3.1 Some Important Addresses and Labels in Linux Kernel 37
4.3.2 Our Bootloader Solution 38
4.4 PORTING LINUX KERNEL 40
4.4.1 Resolve the Interrupt of Keyboard that Causes System Panic 40
4.4.2 Enable MTD to Support Am29LV320DB Flash Chip 41
4.4.2.1 Important Files in This Porting 41
4.4.2.1.1 Important C Files: 41
4.4.2.1.2 Important Header Files 42
4.4.2.2 How the MTD System Probes NOR Flash and Partitions it 44
4.4.2.3 Porting MTD to Probe Am29LV320DB Chip and Partition it 46
4.4.2.4 Configure and Build Linux Kernel 47
4.5 REBUILD RAM DISK IMAGE TO MOUNT FLASH DISK 48
4.6 BUILD FLASH DISK IMAGE (JFFS2 IMAGE) 49
4.7 BUILD DOWNLOAD IMAGE 49
CHAPTER 5. VERIFICATION 51
5.1 SIMPLE TESTING 51
5.2 BRUTE FORCE TESTING 51
CHAPTER 6. FUTURE WORK 53
CHAPTER 7. CONCLUSION 54
REFERENCES 56
APPENDIX A. BUILD TOOL CHAIN FOR ARM MICROPROCESSOR 57
A.1 DOWNLOAD AND INSTALL PRE-BUILT TOOL CHAIN 57
A.2 BUILD TOOL CHAIN BY YOURSELF 57
A.2.1 binutils 58
A.2.2 gcc 58
A.2.3 glibc 60
A.2.4 Make gcc Supporting Threads 61
APPENDIX B. ADD A DEVICE DRIVER IN KERNEL AND BUILD IT 62
B.1 EXAMPLE DRIVER - SCULL 62
B.2 TRACE THE PROCEDURE OF BUILDING THE KERNEL AND MODULES 62
B.2.1 make mrproper 63
B.2.2 make menuconfig 64
B.2.2.1 arch/i386/config.in 64
B.2.2.2 .config 65
B.2.3 make dep 66
B.2.4 make clean 66
B.2.5 make bzImage 66
B.2.6 make modules 68
B.2.7 make modules_install 68
B.2.8 Rules.make 68
B.3 CONFIGURE PROCEDURE 69
B.3.1 Define the Variable for SCULL Driver 69
B.3.2 Add SCULL Module into Menuconfig 70
B.3.3 Add SCULL Driver into the Source Tree 71
B.3.4 Setting the Makefile of SCULL 71
APPENDIX C. INSTALLATION GUIDE OF THIS IMPLEMENTATION 73
C.1 REVISION HISTORY 73
C.2 INSTALL CROSS COMPILER 73
C.3 GENERATE RAMDISK IMAGE 73
C.4 GENERATE FLASH DISK’S IMAGE (JFFS2 IMAGE) 75
C.5 COMPILE BOOTLOADER 76
C.6 CONFIGURE MTD PARTITION 76
C.7 COMPILE LINUX KERNEL 78
C.8 GENERATE THE 4MB IMAGE FILE FOR AM29LV320DB 79
C.9 DOWNLOAD THE 4MB IMAGE FILE INTO AM29LV320DB 80
C.10 TEST THE FLASH DISK 81
APPENDIX D. USE BUSYBOX TO CREATE ROOT FILE SYSTEM 83
D.1 DOWNLOAD AND COMPILE THE BUSYBOX 83
D.2 CONFIGURE SYSTEM FILES 83
D.3 CREATE THE RAM DISK IMAGE 83
[1]“Am29LV320DB Data Sheet”, AMD Technology,
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/23579.pdf
[2]“Application Note S3C2410XX 32-Bit RISC Microprocessor Revision 1,” Samsung Electronics,
http://www.samsung.com/Products/Semiconductor/SystemLSI/MobileSolutions/MobileASSP/MobileComputing/S3C2410X/S3C2410X.htm
[3]“Cross-Referencing Linux”, Linux-Reference Project Team,
http://lxr.linux.no/source/
[4]“Flash Memory Technology”, Integrated Circuit Engineering Corporation,
http://smithsonianchips.si.edu/ice/cd/MEMORY97/SEC10.PDF
[5]“JFFS – Journaling Flash File System,” Axis Communications,
http://developer.axis.com/software/jffs/doc/jffs.shtml
[6]“Memory Technology Device (MTD) Subsystem for Linux”, The Linux Memory Technology Device Project, http://www.linux-mtd.infradead.org/
[7]“S3C2410X01 Linux Kernel Install Guide,” Samsung, SMDK2410 developing CD.
[8]“User’s Manual S3C2410XX 32-Bit RISC Microprocessor Revision 1.2,” Samsung Electronics,
http://www.samsung.com/Products/Semiconductor/SystemLSI/MobileSolutions/MobileASSP/MobileComputing/S3C2410X/S3C2410X.htm
[9]A. Oran and S. Talbott, “Managing Projects with make,” O’reilly, January 1996
[10]A. Rubini, and J. Corbet, “Linux Device Drivers, Second Edition,” O’reilly, June 2001
[11]C. Hollabaugh, “Embedded Linux – Hardware, Software, and Interfacing,” Pearson Education, January 2002
[12]D. Jaggar, “ARM Architecture Reference Manual”, Prentice Hall, July 1996
[13]D. P. Bovet and M. Cesati, “Understanding the Linux Kernel,” O’reilly, January 2001.
[14]D. Woodhouse, “JFFS: The Journaling Flash File System,” Ottawa Linux Symposium 2001
[15]S. Furber, “ARM system-on-chip architecture second edition”, Addison Wesley, 2000
QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top