1、Hosting environment:VMare Ubuntu10.04 2、Cross-compiling environment:arm-2009q3.tar.bz23、Development board:QT64104、nanflash:K9F2G08(256M) 5、linux -version:Linux-2.6.396、uboot-version:u-boot-2010.06 一、下载并解压内核源码a)在命令行终端中可以通过下列方式下载,当然用其它下载工具下载root@bootloader:/home/eilian/development/Android#cd ../Linux root@bootloader:/home/eilian/development/Linux# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.gzb)解压源码root@bootloader:/home/eilian/development/Linux# root@bootloader:/home/eilian/development/Linux# tar zxvf linux-2.6.39.tar.gz root@bootloader:/home/eilian/development/Linux# ls linux-2.6.32.2 linux-2.6.39 linux-2.6.36.2 linux-2.6.39.tar.bz2 linux-2.6.36.2.tar.gz linux-2.6.39.tar.gz root@bootloader:/home/eilian/development/Linux# cd linux-2.6.39 root@bootloader:/home/eilian/development/Linux/linux-2.6.39# c)指定交叉编译器移植目的让 Linux-2.6.39 可以在QT6410 上运行。首先,使得Linux-2.6.39的缺省目标平台成为ARM 的平台,修改主目录下的Makefile。用vi打开Makefile,定位到196行,修改如下:root@bootloader:/home/eilian/development/Linux/linux-2.6.39# vi Makefile # Default value for CROSS_COMPILE is not to prefix executables # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile export KBUILD_BUILDHOST := $(SUBARCH) ARCH ?= arm CROSS_COMPILE ?= arm-linux-
In: serial Out: serial Err: serial Net: dm9000 Hit any key to stop autoboot: 0 QT6410# tftp 50018000 uImage dm9000 i/o: 0x18000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 00:40:5c:26:0a:5b operating at unknown: 15 mode Using dm9000 device TFTP from server 211.67.217.136; our IP address is 211.67.217.138 Filename "uImage". Load address: 0x50018000 Loading: T ################################################################# ################################################################# ################################################################# ##################################################### done Bytes transferred = 1266508 (13534c hex) QT6410# bootm 50018000 ## Booting kernel from Legacy Image at 50018000 ... Image Name: Linux-2.6.39 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1266444 Bytes = 1.2 MiB Load Address: 50008000 Entry Point: 50008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel. Linux version 2.6.39 (root@bootloader) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #1 Mon Dec 12 20:29:17 CST 2011 CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387f CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache Machine: QT6410 development board Memory policy: ECC disabled, Data cache writeback CPU S3C6410 (id 0x36410101) S3C24XX Clocks, Copyright 2004 Simtec Electronics camera: no parent clock specified S3C64XX: PLL settings, A=667000000, M=533000000, E=24000000 S3C64XX: HCLK2=266500000, HCLK=133250000, PCLK=66625000 mout_apll: source is fout_apll (1), rate is 667000000 mout_epll: source is epll (1), rate is 24000000 mout_mpll: source is mpll (1), rate is 533000000 mmc_bus: source is mout_epll (0), rate is 24000000 mmc_bus: source is mout_epll (0), rate is 24000000 mmc_bus: source is mout_epll (0), rate is 24000000 usb-bus-host: source is clk_48m (0), rate is 48000000 uclk1: source is mout_epll (0), rate is 24000000 spi-bus: source is mout_epll (0), rate is 24000000 spi-bus: source is mout_epll (0), rate is 24000000 audio-bus: source is mout_epll (0), rate is 24000000 audio-bus: source is mout_epll (0), rate is 24000000 audio-bus: source is mout_epll (0), rate is 24000000 irda-bus: source is mout_epll (0), rate is 24000000 camera: no parent clock specified Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 Kernel command line: root=/dev/mtdblock2 rootfstype=yaffs2 init=/linuxrc nconsole=tty1 console=ttySAC0,115200 PID hash table entries: 512 (order: -1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 128MB = 128MB total Memory: 127192k/127192k available, 3880k reserved, 0K highmem Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xff600000 - 0xffe00000 ( 8 MB) vmalloc : 0xc8800000 - 0xf6000000 ( 728 MB) lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .init : 0xc0008000 - 0xc0022000 ( 104 kB) .text : 0xc0022000 - 0xc024dc88 (2224 kB) .data : 0xc024e000 - 0xc0271200 ( 141 kB) SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 NR_IRQS:246 VIC @f6000000: id 0x00041192, vendor 0x41 VIC @f6010000: id 0x00041192, vendor 0x41 Console: colour dummy device 80x30 console [ttySAC0] enabled Calibrating delay loop... 666.41 BogoMIPS (lpj=3332096) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok s3c64xx_dma_init: Registering DMA channels PL080: IRQ 73, at c8808000, channels 0..8 PL080: IRQ 74, at c880c000, channels 8..16 S3C6410: Initialising architecture bio: create slab <bio-0> at 0 usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb s3c-i2c s3c2440-i2c.0: slave address 0x10 s3c-i2c s3c2440-i2c.0: bus frequency set to 65 KHz s3c-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter ROMFS MTD (C) 2007 Red Hat, Inc. io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) start plist test end plist test s3c-fb s3c-fb: window 0: fb Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled s3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10 s3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10 s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 24) is a S3C6400/10 s3c6400-uart.3: ttySAC3 at MMIO 0x7f005c00 (irq = 28) is a S3C6400/10 brd: module loaded