2410上移植yaffs2檔案系統過程

來源:互聯網
上載者:User

 

2410上移植yaffs2檔案系統過程

 

1)下載YAFFS檔案系統代碼,下載網址:
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/
點擊頁面左下角的Download tarball即可下載全部相關代碼。也可在此處下載


檔案: yaffs2.tar.gz
大小: 110KB
下載: 下載

當然如果你的NAND FLASH只是512+16B的,可以只移植yaffs,因為即使你移植了yaffs2,它也會自動選擇掛載yaffs1的。
 
#cd /public
#tar zxf yaffs2.tar.gz

則/public/yaff2/ 目錄之下即是yaffs2的源碼。

(2)在要移植的核心目錄下建立yaffs2檔案夾,並將需要的檔案拷貝過來:
#cd /public/linux-2.6.11.7-2410/

# cd fs
# mkdir yaffs2
# cd yaffs2
 
# cp /public/yaffs2/*.h .
# cp /public/yaffs2/*.c .
# cp /public/yaffs2/Makefile-kernel Makefile
# cp /public/yaffs2/Kconfig .

(3)修改 /public/linux-2.6.11.7-2410/fs/Makefile 和 Kconfig檔案。

# cd  /public/linux-2.6.11.7-2410/fs/
# vi Makefile  (將下面一行添加到Makefile中)
   obj-$(CONFIG_YAFFS_FS) += yaffs2/
  
# vi Kconfig (將下面一行添加到Kconfig中)
   source "fs/yaffs2/Kconfig

(4)cd /public/linux-2.6.11.7-2410/
   make menuconfig
在編譯核心時選擇:
<*> YAFFS2 file system support
  <*> 512 byte / page devices
   <*> Lets Yaffs do its own

ECC
        <*> 2048 byte (or larger) / page devices
   <*> Autoselect yaffs2 format
   <*> Disable lazy loading
   <*> Turn off wide tnodes
  <*> Turn off debug chunk erase check
 
(5) 編譯核心make zImage
  看網上有人編譯過程中出現了問題, 我沒有碰到任何問題,很順利。
  By the way : 編譯yaffs時出現了問題,編譯通過不了, 這也是我選擇yaff2 而沒有選yaffs的一大原因。
 
(6)現在板子上跑的是2.4的核心,將板子上的根檔案系統換為yaffs檔案系統。具體過程參見文檔。
    然後在vivi >param set linux_cmd_line "noinitrd root=/dev/mtdblock/3  init=/linuxrc console=ttySAC0"
    修改啟動參數,然後燒寫剛才產生的2.6的核心。
   
(7) 啟動成功。
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
IrCOMM protocol (Dag Brattli)
yaffs: dev is 7939 name is "1f:03"
VFS: Mounted root (yaffs filesystem).
Mounted devfs on /dev
Freeing init memory: 76K
hub.c: USB new device connect on bus1/2, assigned device number 2
usb.c: USB device not accepting new address=2 (error=-110)
hub.c: USB new device connect on bus1/2, assigned device number 3
usb.c: USB device not accepting new address=3 (error=-110)
mount /etc as ramfs
re-create the /etc/mtab entries
/lib/yaffs.o: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invsyaffs: dev is 7940 name is "1f:04"
console=/dev/coconsole=/dev/co?sole
init started:  BusyBox v0.60.3 (2002.05.13-08:36+0000) multi-c?ll binary
Starting pid 20, console /dev/console: '/etc/init.d/rcS'
Waiting for enter to start '/bin/sh' (pid 25, terminal /dev/console)
                                                                               
Please press Enter to activate this console.
Starting pid 25, console /dev/console: '/bin/sh'
                                                                               

                                                                               
BusyBox v0.60.3 (2002.05.13-08:36+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.