標籤:使用 檔案 os linux 應用 type
1.解壓核心
sudo xz -d linux-3.15.4.tar.xz
sudo tar xvf linux-3.15.4.tar
2.修改核心源碼頂層的Makefile
sudo vim Makefile
arch=arm
CROSS_COMPILE=arm-linux-
3.vim arch/arm/mach-s3c24xx/mach-smdk2440.c
s3c24xx_init_clocks(12000000);
4.make menuconfig命令配置核心,使用預設的設定檔/arch/arm/configs/s3c2410_defconfig,選擇CPU、在配置單中加入自己的資訊、支援EABI(它針對浮點數運算做了最佳化,使用它編譯出來的應用程式效率更高)
註:在Ubuntu下make menuconfig會報錯,錯誤資訊如下:
*** Unable to find the ncurses libraries or the
*** required header files.
*** ‘make menuconfig‘ requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] 錯誤 1
make: *** [menuconfig] 錯誤 2
解決方案:
在命令列中輸入:
sudo apt-get install libncurses5-dev
然後在make menuconfig,成功。
Ncurses是一個能提供功能鍵定義(快速鍵),螢幕繪製以及基於文本終端的圖形互動功能的動態庫。
5.修改機器碼,在arch/arm/tools/mach-types中,將S3C2440對應的機器碼改為Uboot傳進來的一致。