(1). CPU: Andes RISC CPU core_N12.
(2). 平台: ADP-XC5FF676 V1.1.
(3). Linux OS: Ubuntu9.04.
(4). Toolchains: AndeSight v1.3.3 for Linux.
(5). Embedded Linux2.6.18
2.目的:使用NFS Server(Network File System)將讓PC與遠端的AndeShape實驗板分享目錄,這樣編譯完成程式後就不用一直插拔實驗板上的SD卡,實驗前請將PC與實驗板的網路線接好.
3. 範例程式_ HelloWorld4:
1. 在桌面新增一個檔案目錄,名稱為〝andeshape〞,檔案目錄內存入一個名稱為〝andes core〞的文字檔,用來測試使用.

A. 以下實驗網路IP,NSF server端:10.0.2.122 ,Client端:10.0.2.180
B. 手動設一個IP輸入〝ifconfig eth0 10.0.2.180〞.
C. 自動設一個IP(建議使用)輸入〝udhcpc eth0〞.
D. 查詢IP值輸入〝ifconfig -a〞.
2. 使用Terminal輸入〝sudo apt-get install nfs-kernel-server〞安裝NFS serve.


增加〝/home/acer/Desktop/andeshape *(rw,sync,no_root_squash)〞參數.

A. 如無法開啟,需設定權限輸入〝sudo chmod -R 777 /etc/exports〞.

rw: read write,可讀寫.
ro: read only,唯讀.
sync: 資料同步寫入到硬碟中.
async: 資料佔存於記憶體中.
no_root_squash: 分享目錄給登入NFS server的使用者,如果是在root下, 使用者也有root權限.
root_squash: 分享目錄給登入NFS server的使用者如果是root時,會變成匿名使用者.
all_squash: 無論任何使用者登入都成為匿名使用者.
4. 使用Terminal輸入〝sudo /etc/init.d/nfs-kernel-server restart〞啟動NFS server.







沒有留言:
張貼留言