歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> Linux之TQ2440通過nfs掛載根文件系統

Linux之TQ2440通過nfs掛載根文件系統

日期:2017/3/1 11:18:02   编辑:Linux編程

准備:首先在你的Linux上確定nfs掛載沒問題,然後設置好你要掛載nfs的目錄,我的設置如下:

/opt/EmbedSky/root_nfs *(rw,sync,no_root_squash)

其次,你要把TQ2440制作的根文件系統root_qtopia_2.2.0_2.6.30.4_20100601.tar.bz2解壓到root_nfs目錄下(如果高手的話,自己制作根目錄也行)。

TQ2440制作的根文件系統要修改一個地方,

修改文件系統/etc/init.d/rcS
#net_set & //注釋掉

1.OK,接下來要弄開發板了,首先連接好開發板,接上電源,然後把開發板撥到nfs啟動。通過超級終端可以看到下面內容:

##### EmbedSky BIOS for SKY2440/TQ2440 #####
Press Space key to Download Mode !

##### Boot for Nor Flash Main Menu #####
##### EmbedSky USB download mode #####


[1] Download u-boot or STEPLDR.nb1 or other bootloader to Nand Flash
[2] Download Eboot (eboot.nb0) to Nand Flash
[3] Download Linux Kernel (zImage.bin) to Nand Flash
[5] Download CRAMFS image to Nand Flash
[6] Download YAFFS image (root.bin) to Nand Flash
[7] Download Program (uCOS-II or TQ2440_Test) to SDRAM and Run it
[8] Boot the system
[9] Format the Nand Flash
[0] Set the boot parameters
[a] Download User Program (eg: uCOS-II or TQ2440_Test)
[b] Download LOGO Picture (.bin) to Nand Flash
[l] Set LCD Parameters
[n] Enter TFTP download mode menu
[o] Download u-boot to Nor Flash
[r] Reboot u-boot
[t] Test Linux Image (zImage)
[q] quit from menu
Enter your selection:

2.接著我們選擇0,設置啟動參數。按0選項後,進入如下:

##### Parameter Menu #####
[1] Set NFS boot parameter
[2] Set Yaffs boot parameter
[3] Set parameter
[4] View the parameters
[d] Delete parameter
[s] Save the parameters to Nand Flash
[q] Return main Menu
Enter your selection:


我們選1,進入NFS參數設置。

設置內容如下:

Enter your selection: 1
Enter the PC IP address:(xxx.xxx.xxx.xxx)
192.168.1.133 //你的linux上的IP
Enter the SKY2440/TQ2440 IP address:(xxx.xxx.xxx.xxx)
192.168.1.6 //你的開發板IP
Enter the Mask IP address:(xxx.xxx.xxx.xxx)
255.255.255.0 //子網掩碼
Enter NFS directory:(eg: /opt/EmbedSky/root_nfs)
/opt/EmbedSky/root_nfs //你的linux上設置的nfs掛載目錄


然手確定,選s保存,然後再選q退出。接著按8啟動系統。呵呵,接著你就可以看到系統進入一個你熟悉的界面了。

-------------------------

注意問題:1.首先要確定能ping的通;2.確定nfs有啟動;3.確定nfs掛載的目錄沒寫錯。

Copyright © Linux教程網 All Rights Reserved