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