mini2440编译2.6.39.4内核

[root@localhost linux-2.6.39.4]# cat /proc/version 
Linux version 2.6.40.3-0.fc15.i686.PAE (mockbuild@x86-16.phx2.fedoraproject.org) (gcc version 4.6.0 20110603 (Red Hat 4.6.0-10) (GCC) ) #1 SMP Tue Aug 16 04:17:30 UTC 2011
//the host version is 2.6.40.3,fedora 15
//the kernel vision used to compiled is 2.6.39.4 
[root@localhost linux-2.6.39.4]# arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/lite-respin/linux/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2008q3-72' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) 

[root@localhost linux-2.6.39.4]# make mrproper
//clean all
[root@localhost linux-2.6.39.4]# make mini2440_defconfig ARCH=arm
//ARCH=arm用于指定用arch/arm/configs/mini2440_defconfig生成.config
[root@localhost linux-2.6.39.4]# make menuconfig ARCH=arm
/*如需要,配置一下内核
由于Makefile中ARCH默认不是arm而是x86,CROSS_COMPILE默认也不是arm-linux-
或者在Makefile中改一下ARCH为arm,或者在make命令中显示指定ARCH
这样弹出来的menu中才是arm系列的cpu
即在system type里会出现ARM sesytem type,然后再进入子菜单选cpu的具体型号
*/
[root@localhost linux-2.6.39.4]# make zImage ARCH=arm CROSS_COMPILE=arm-linux-
//编译
编译成功,下到mini2440里面却启动不了系统
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00500000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing Linux... done, booting the kernel.
停在这里了
搜索源代码的Uncompressing,在documentation\ia64\Serial.txt里找到以下解决办法
TROUBLESHOOTING SERIAL CONSOLE PROBLEMS
    No kernel output after elilo prints "Uncompressing Linux... done":
	- You specified "console=ttyS0" but Linux changed the device to which ttyS0 refers.  Configure exactly one EFI console
	  device[3] and remove the "console=" option.
	- The EFI console path contains both a VGA device and a UART. EFI and elilo use both, but Linux defaults to VGA.  Remove
	  the VGA device from the EFI console path[3].
	- Multiple UARTs selected as EFI console devices.  EFI and elilo use all selected devices, but Linux uses only one.
	  Make sure only one UART is selected in the EFI console
	  path[3].
	- You're connected to an HP MP port[2] but have a non-MP UART selected as EFI console device.  EFI uses the MP as a
	  console device even when it isn't explicitly selected.
	  Either move the console cable to the non-MP UART, or change
	  the EFI console path[3] to the MP UART.
    Long pause (60+ seconds) between "Uncompressing Linux... done" and start of kernel output:
	- No early console because you used "console=ttyS<n>".  Remove the "console=" option if your firmware supplies an HCDP.
	- If you don't have an HCDP, the kernel doesn't know where your console lives until the driver discovers serial
	  devices.  Use "console=uart, io,0x3f8" (or appropriate
	  address for your machine). 

记录一下http://www.cnblogs.com/hnrainll/archive/2011/05/21/2052979.html


2011年10月7日12:26
上面使用supervivi引导的内核,可能就是supervivi传递给内核的某些参数不对造成(机器码肯定可以对应,都是1999),由于supervivi不开放源码,便没深究
后来用uboot来引导同样的内核,却可以顺利通过。
即使用了内核自带的mini2440.c和mini2440.h编译,在移植中仍然需要修改nand分区表和添加yaffs2文件系统的支持和添加lcd的背光驱动等等,否则进入不了终端和屏幕漆黑一片,这个还算简单,
详见http://blog.csdn.net/songqqnew/article/details/6848680
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值