本文是在H9200E开发板上实验,linux为fedora 3.首先将cross-2.95.3.tar.bz2(交叉编译器),linux-2.4.19-rmk7.tar.gz,kernel-h9200-050718.tgz还有u-boot-1.0.0.tar.gz复制到/root下.一.安装交叉编译器 以超级用户身份登录 [root@hostname]# bunzip2 cross-2.95.3.tar.bz2 ;解压 [root@hostname]# tar xvf cross-2.95.3.tar 然后将得到的2.95.3文件夹放到/usr/local/arm下,注意记住这个路径后面要用到.二.配置内核 以H9200E的最小配置为例三.编译内核 解压内核源码包,编辑Makefile 设置 cross_compile:=[编译器的绝对路径] ;这个绝对路径既上面2.95.3放到的路径 进入内核文件夹,执行下面命令 [root@hostname]# make clean[root@hostname]# make dep [root@hostname]# make [root@hostname]# [编译器的绝对路径]/bin/arm-linux-objcopy -O binary -S vmlinux linux.bin ;编译器的绝对路径也是上面说到的路径 [root@hostname]# gzip linux.bin下面的比较重要了,主要是u-boot的安装,这个在H9200的手册上说的很不清楚 [root@hostname]# tar xzvf u-boot-1.0.0.tar.gz ;解压u-boot [root@hostname]# cd u-boot-1.0.0 [root@hostname]# make distclean [root@hostname]# make at91rm9200dk_config [root@hostname]# make all 然后在/usr/local下建立uboot文件夹将u-boot-1.0.0下的所有文件都复制到uboot下 [root@hostname]# [uboot的绝对路径]/tools/mkimage -A arm -O linux -C gzip -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage ;这里的绝对路径是/usr/local/uboot 好了,内核编译好了,可以下到板子里看看了!!!
转载请注明原文地址: https://ibbs.8miu.com/read-30382.html