AT91RM9200开发板上成功移植linu2.6.21

来源:互联网 发布:淘宝没有品牌怎么发布 编辑:程序博客网 时间:2024/06/03 21:14
一、获得 linux kernel 源码及相应硬件的 patch
1.下载 linux 2.6.21内核源代码。
在 www.kernel.org 上下载 linux-2.6.21.tar.gz
2.下载 for at91rm9200 patch。
在 www.maxim.org.za/AT91ARM9200/2.6/
下载 2.6.21-at91.patch.gz
二、解压文件并给内核源代码打补丁
在根目录下使用命令:
mkdir  /emmett/2.6
把上面第一个文件拷贝到该目录下
tar zxvf  linux-2.6.21.tar.gz
cd linux-2.6.21
把2.6.21-at91.patch.gz拷贝到linux-2.6.21
zcat  2.6.21-at91.patch.gz|patch p1
三、修改Makefile文件配置并编译内核
 查找到如下:
ARCH               ?= $(SUBARCH)
CROSS_COMPILE?=
 修改为:
ARCH               ?= arm
CROSS_COMPILE   ?= /usr/local/arm/3.4.1/bin/arm-linux-
然后在命令终端运行
# make at91rm9200dk_defconfig
#make menuconfig
添加和裁减相应的配置
#make
后就生成了zImage文件
[root@Linux boot]# pwd
/emmett/2.6/linux-2.6.21/arch/arm/boot
[root@Linux boot]# ls
bootp  compressed  Image  install.sh  Makefile  zImage
[root@Linux boot]#
四、烧写内核到flash即可
在开发板上启动信息也贴出来:
U-Boot 0.4.0 (Apr 27 2005 - 19:26:55)

U-Boot code: 21F00000 -> 21F143A8  BSS: -> 21F22478
DRAM Configuration:
Bank #0: 20000000 32 MB
SST: SST39VF3201 (32Mbit)
SST: SST39VF3201 (32Mbit)
Flash:  8 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Starting application at 0x20008000 ...
Uncompressing Linux............................................................................. done, booting the kernel.
Linux version 2.6.21 (root@Linux) (gcc version 3.4.1) #1 Mon Aug 27 11:49:47 CST 2007
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Atmel AT91RM9200-DK
Warning: bad configuration page, trying to continue
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 179 MHz, master 59 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists.  Total pages: 8128
Kernel command line: mem=32M console=ttyS0,115200 initrd=0x21000000,3145728 root=/dev/ram0 rw
AT91: 128 gpio irqs in 4 banks
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 26896KB available (2164K code, 210K data, 100K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 3072K
NetWinder Floating Point Emulator V0.97 (double precision)
io scheduler noop registered
io scheduler anticipatory registered (default)
at91_spi: Baud rate set to 5990400
AT91 SPI driver loaded
AT91 Watchdog Timer enabled (5 seconds, nowayout)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffc4000 (irq = 7) is a ATMEL_SERIAL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
at91_ether: Your bootloader did not configure a MAC address.
eth0: Link now 100-FullDuplex
eth0: AT91 ethernet at 0xfefbc000 int=24 100-FullDuplex (00:00:00:00:00:00)
eth0: Davicom 9161 PHY (Copper)
physmap platform flash device: 00200000 at 10000000
Found: SST 49LF080A
physmap-flash.0: Found 2 x8 devices at 0x0 in 16-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
at91_cf: irqs det #64, io #0
usbmon: debugfs is not available
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 23, io mem 0x00300000
usb usb1: Product: AT91 OHCI
usb usb1: Manufacturer: Linux 2.6.21 ohci_hcd
usb usb1: SerialNumber: at91
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0
AT91 Real Time Clock driver.
i2c /dev entries driver
at91_i2c at91_i2c: AT91 i2c bus driver.
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
at91_rtc at91_rtc: setting the system clock to 1998-01-01 00:00:19 (883612819)
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 100K
init started:  BusyBox v1.2.1 (2007.07.30-14:37+0000) multi-call binary
eth0: Setting MAC address to 00:0a:1b:7e:bc:20
eth0: Link now 100-FullDuplex


BusyBox v1.2.1 (2007.07.30-14:37+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# Jan  1 00:00:31 (none) syslog.info syslogd started: BusyBox v1.2.1
ls
ls
bin         etc         linuxrc     mnt         sbin        usr
dev         lib         lost+found  proc        tmp         var

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 淘宝后商家页面打不开了怎么办 淘宝遇到职业打假人怎么办 发票被复写上字怎么办 淘宝直播广告图片的商品怎么办 美团商家排名低怎么办 想成为淘宝主播怎么办 用移动流量很卡怎么办 淘宝店铺被恶意刷流量怎么办 一个想要公司权利的人怎么办 淘宝商家短信推广告怎么办 在群里乱发信息怎么办 支付宝扫不了码怎么办 淘宝商家收款不发货怎么办 淘宝申请退款商家拒绝怎么办 一件代发找不到供货商怎么办 淘宝京东兼职上当怎么办 退货时快递丢件怎么办 淘宝店铺代销1688有订单怎么办 供应商已解除合作无法代销怎么办 被代运营骗了怎么办 被淘宝运营骗了怎么办 淘宝运营公司骗了怎么办 被金融公司骗了怎么办 天猫品牌方投诉怎么办 淘宝卖家售假被扣了12分怎么办? 淘宝店被投诉了怎么办 淘宝商品被投诉侵权怎么办 淘宝小二胡乱判怎么办 淘宝卖家不干了怎么办 花呗剩下的钱怎么办 蚂蚁花呗无法使用怎么办 淘宝不能用花呗怎么办 淘宝号给冻结了怎么办 淘宝买家号封了怎么办 拼多多商家盗图怎么办 被拼多多盗图了怎么办 淘宝盗用图片被投诉怎么办 淘宝别人盗用我的图片怎么办 淘宝盗图申诉原图过大怎么办 淘宝别人举报我盗用图片怎么办 淘宝卖家被投诉盗图怎么办