使用ELDK4.1版本編譯的核心加載ELDK4.2編譯的根檔案系統root422以NFS方式啟動遇到錯誤資訊:
IP-Config: Complete:
device=eth0, addr=192.168.1.244, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.1.244, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.1.200, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.200
eth0: link up (10/Half)
eth0: link down
Looking up port of RPC 100005/1 on 192.168.1.200
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 124K
Kernel panic - not syncing: Attempted to kill init!
而這個問題在用ELDK4.1作為交叉編譯工具鍊編譯得到根檔案系統root400時沒有出現,
說這是核心編譯時EABI的選項沒有選中所導緻的。
想起來,用ELDK4.1編譯時,當将核心中的EABI選項選中,編譯時會提示錯誤;
查了下ELDK4.1和ELDK4.2的差別,從ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/eldk/4.2/arm-linux-x86/distribution/README.html
中知道從ELDK4.2版本起開始支援EABI。
是以,ELDK4.1編譯核心選中EABI時,自然會出現編譯錯誤。
在menuconfig中選中EABI選項:
Kernel Features --->
[*] Use the ARM EABI to compile the kernel
[*] Allow old ABI binaries to run with this kernel (EXPERIMENTA)
使用ELDK4.2版本重新編譯,将編譯完的uImage燒寫到NAND Flash中,重新開機目标闆,能夠進入shell界面了。
在U-Boot指令行模式,将根檔案系統換成使用ELDK4.1版本編譯生成的root400,照樣可以通過NFS成功加載根檔案系統,正常進入shell界面。
這應該是核心編譯選項Allow old ABI binaries to run with this kernel (EXPERIMENTA)的作用。
為了驗證是否确實是核心編譯選項Allow old ABI binaries to run with this kernel (EXPERIMENTA)的作用,重新運作make menuconfig,将EABI的選項更改為:
[ ] Allow old ABI binaries to run with this kernel (EXPERIMENTA)
編譯,将編譯完的uImage燒寫到Flash中,重新開機目标闆,發現核心在成功挂載根檔案系統并釋放初始化記憶體後,始終不能進入shell界面,雖然,console口還能響應鍵盤輸入的Enter鍵。
Freeing init memory: 120K
停在此處始終不能進入shell界面。
也就是,不相容OABI(Old Application Binary Interface)所造成的後果。
是以,安全期間,不管是多少版本的核心,為了相容舊的版本的編譯器編譯出的根檔案系統,一定要将
同時選中。