Chinaunix首页 | 论坛 | 博客
  • 博客访问: 111990
  • 博文数量: 57
  • 博客积分: 629
  • 博客等级: 上士
  • 技术积分: 405
  • 用 户 组: 普通用户
  • 注册时间: 2011-10-15 10:49
文章分类

全部博文(57)

文章存档

2012年(25)

2011年(32)

分类:

2011-10-27 08:17:53

快速编译Linux2.6.33.3 for mini2440
  由于Linux-2.6.29开始Linux内核原生支持mini2440,所以现在移植Linux到mini2440基本只需要修正一些小BUG了。
 
  一、打上补丁
     修正:MMC的配置结构体(去除__initdata标志)、增加针对DM9000的总线配置
     修改:nand 分区表
 
文件:linux-2.6.33.3_tekkaman4mini2440_0.patch.tar.bz2
大小:1KB
下载:下载


tekkaman@MAGI-Linux:~/development/linux-2.6.33.3$ patch -p1 <../linux-2.6.33.3_tekkaman4mini2440_0.patch
patching file arch/arm/mach-s3c2440/mach-mini2440.c


二、增加Yaffs2文件系统的支持
 1、下载Yaffs2
     
 2、解压Yaffs2并将其加入Linux内核(打补丁的方式)
       #cd yaffs2
       #./patch-ker.sh c <内核源码路径>

tekkaman@MAGI-Linux:~/development/yaffs2$ ./patch-ker.sh c ../linux-2.6.33.3/
Updating ../linux-2.6.33.3//fs/Kconfig
Updating ../linux-2.6.33.3//fs/Makefile


三、编译
  
请先确保系统可以找到你的编译工具链

make ARCH=arm CROSS_COMPILE=arm-tekkaman-linux-gnueabi- mini2440_defconfig
make ARCH=arm CROSS_COMPILE=arm-tekkaman-linux-gnueabi- menuconfig

增加Yaffs2支持。

File systems -->
      Miscellaneous filesystems -->
       <*> YAFFS2 file system support

make ARCH=arm CROSS_COMPILE=arm-tekkaman-linux-gnueabi-


四、使用U-boot的mkimage来处理zImage:

mkimage -n 'tekkaman' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008040 -d zImage zImage.img


五、测试zImage.img:

U-Boot 2010.03 ( 4月 18 2010 - 21:39:25)

 modified by tekkamanninja (tekkamanninja@163.com)
 Love Linux

I2C: ready
DRAM: 64 MB
Flash: 2 MB
NAND: 128 MiB
Video: 240x320x16 20kHz 62Hz
In: serial
Out: serial
Err: serial
USB slave is
Net: dm9000
U-Boot 2010.03 ( 4月 18 2010 - 21:39:25)
modified by tekkamanninja
(tekkamanninja@163.com)
Love Linux
Hit any key to stop autoboot: 0
[u-boot@MINI2440]# tftp zImage.img
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:08:11:18:12:27
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 192.168.1.100; our IP address is 192.168.1.101
Filename 'zImage.img'.
Load address: 0x30008000
Loading: T #################################################################
     #################################################################
     ################
done
Bytes transferred = 2141940 (20aef4 hex)
[u-boot@MINI2440]# nand erase 0x80000 0x500000;nand write 0x30008000 0x80000 0x300000

NAND erase: device 0 offset 0x80000, size 0x500000
Erasing at 0x56000002800000 -- 0% complete.
OK

NAND write: device 0 offset 0x80000, size 0x300000
Writing at 0x36000000020000 -- 100% is complete. 3145728 bytes written: OK
[u-boot@MINI2440]# boot

NAND read: device 0 offset 0x80000, size 0x500000
 5242880 bytes read: OK
## Booting kernel from Legacy Image at 30008000 ...
   Image Name: tekkaman
   Created: 2010-04-28 16:30:31 UTC
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 2141876 Bytes = 2 MB
   Load Address: 30008000
   Entry Point: 30008040
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.33.3 (tekkaman@MAGI-Linux) (gcc version 4.3.2 (crosstool-NG-1.6.1-tekkaman) ) #1 Thu Apr 29 00:28:12 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock3 rootfstype=yaffs2 rw console=ttySAC0,115200 init=/linuxrc mem=64M
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60432KB available (3768K code, 412K data, 140K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:85
irq: clearing pending status 02000000
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MINI2440: Option string mini2440=0t
MINI2440: 't' ignored, touchscreen not compiled in
MINI2440: LCD [0:240x320] 1:800x480 2:1024x768
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
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: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.21.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) &#169; 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs Apr 29 2010 00:16:46 Installing.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
at24 0-0050: 1024 byte 24c08 EEPROM (writable)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000060000 : "u-boot"
ftl_cs: FTL header not found.
0x000000060000-0x000000080000 : "u-boot-env"
ftl_cs: FTL header not found.
0x000000080000-0x000000580000 : "kernel"
ftl_cs: FTL header not found.
0x000000580000-0x000008000000 : "root"
ftl_cs: FTL header not found.
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c486e300,c4872304 IRQ 51 MAC: 08:08:11:18:12:27 (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
mice: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
Registered led device: led1
Registered led device: led2
Registered led device: led3
Registered led device: led4
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: setting system clock to 2010-04-29 00:25:10 UTC (1272500710)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: restored from checkpoint
yaffs_read_super: isCheckpointed 1
VFS: Mounted root (yaffs2 filesystem) on device 31:3.
Freeing init memory: 140K
----------mount all
----------Starting mdev......
********************************************
 Tekkaman Ninja mini2440 Rootfs(nfs) 2010.3
 Love Linux ! ! @@ Love Ke Ke ! !
********************************************
(none) login:


阅读(725) | 评论(0) | 转发(0) |
0

上一篇:Linux内核配置系统浅析

下一篇:关于休眠

给主人留下些什么吧!~~