1、下載linux內核:linux
地址:www.kernel.orgide
在內核中打補丁:zcat xxx.patch.gz | patch p1 (xxx:表示補丁文件名)get
2、修改Makefile文件的CROSS_COMPILE(第193行)flash
3、make cleanit
make at91rm9200dk_defconfigio
make menuconfig console
一、(device drivers-->memory techmology device (MTD)support--->self_contained MTD device drivers(不選 at91rm9200 data flash at45DB xx)class
二、 進入kernel featuresfile
選取Use the ARM EABI to compile the kernel
三、進入Boot options 終端
修改
(mem=32M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev/ram0 rw) 爲:
(mem=16M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev/ram0 rw)
(修改爲16M)
make zImage
make uImage(生成uImage文件(位於/arch/arm/boot目錄下))
4、燒寫uImage(地址:0x10100000 波特率:115200)
5、超級終端中運行:u-boot->cp.b 0x10100000 0x20080000 0x200000
u-boot->bootm 0x20080000
6、成功!!!
附: 一、在make uImage時有時候會出現錯誤 解決方法:
把u-boot中的mkp_w_picpath文件拷貝到系統文件夾中的Bin文件夾中去
二、在make menuconfig時候出錯的解決辦法:
下載並安裝ncurses-5.6.tar.gz
進入解壓後的文件夾中執行:~$ ./configure
~$ make
~& make install