arm linux-2.6.24.3 移植
2008-04-22 20:50
417 查看
现在可以用制作好的交叉编译工具来编译内核,下面简要介绍:
1、下载linux-2.6.24.3.tar.bz2
2、tar -jxvf linux-2.6.24.3.tar.bz2
3、下载需要的补丁, 打补丁,
下载yaffs2
export CVSROOT=:pserver:anonymous@cvs.aleph1.co.uk:/home/aleph1/cvs cvs
logon
(Hit return when asked for a password)
cvs checkout yaffs2
cd yaffs2
打补丁: patch-ker.sh -c kernelpath
系统中制作cramfs时单文件支持大于16M的更改
修改内核中的include/linux/cramfs_fs.h中的
---#define CRAMFS_SIZE_WIDTH 24
+++#define CRAMFS_SIZE_WIDTH 25
make ARCH=arm menuconfig 配置
make ARCH=arm CROSS_COMPILE=arm-linux-
4、制作cramfs的工具作相应更改:
修改mkcramfs原文件中的cramfs_fs.h
---#define CRAMFS_SIZE_WIDTH 24
+++#define CRAMFS_SIZE_WIDTH 25
经过以上步骤,可以在arch/arm/boot下生成zImage文件,下载到系统中,运行,
系统大小大约1.3M,
启动开始加载内核的时间大概有1~2秒。
linux启动时间 3.885秒,其中udev启动时间比较长,如果不需要udev支持,而是
改用静态的dev的话,
linux启动时间启动时间应该可以缩小到2秒以内。
启动过程如下:
Uncompressing Linux.............................................................
Linux version 2.6.24.3 (zjein@localhost.localdomain) (gcc version 4.2.3) #21 PR8
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: IPAQ-H1940
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 266.000 MHz, memory 133.000 MHz, peripheral 66.500 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
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 in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=31:3 console=ttySAC0 time
[ 0.000000] The 'time' option is deprecated and is scheduled for removal in
8
[ 0.000000] Use 'printk.time=<value>' instead
[ 0.000000] irq: clearing subpending status 00000002
[ 0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[ 0.000000] timer tcon=00000000, tcnt d877, tcfg 00000200,00000000, usec
0009
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [ttySAC0] enabled
[ 0.005000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.010000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.025000] Memory: 64MB = 64MB total
[ 0.025000] Memory: 62128KB available (2412K code, 236K data, 84K init)
[ 0.030000] SLUB: Genslabs=11, HWalign=32, Order=0-1, MinObjects=4, CPUs=1,
1
[ 0.145000] Mount-cache hash table entries: 512
[ 0.145000] CPU: Testing write buffer coherency: ok
[ 0.150000] net_namespace: 64 bytes
[ 0.160000] NET: Registered protocol family 16
[ 0.165000] S3C2410: Initialising architecture
[ 0.170000] S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
[ 0.175000] DMA channel 0 at c4800000, irq 33
[ 0.180000] DMA channel 1 at c4800040, irq 34
[ 0.185000] DMA channel 2 at c4800080, irq 35
[ 0.190000] DMA channel 3 at c48000c0, irq 36
[ 0.200000] SCSI subsystem initialized
[ 0.200000] usbcore: registered new interface driver usbfs
[ 0.205000] usbcore: registered new interface driver hub
[ 0.210000] usbcore: registered new device driver usb
[ 0.250000] NET: Registered protocol family 2
[ 0.300000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.305000] TCP established hash table entries: 2048 (order: 2, 16384
bytes)
[ 0.310000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.315000] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.320000] TCP reno registered
[ 0.360000] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.365000] yaffs Mar 21 2008 14:05:28 Installing.
[ 0.370000] io scheduler noop registered
[ 0.375000] io scheduler deadline registered (default)
[ 0.405000] Console: switching to colour frame buffer device 106x43
[ 0.445000] s3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70)
is0
[ 0.455000] s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73)
is0
[ 0.460000] s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76)
is0
[ 0.465000] loop: module loaded
[ 0.465000] PPP generic driver version 2.4.2
[ 0.470000] PPP Deflate Compression module registered
[ 0.475000] usbcore: registered new interface driver zd1201
[ 0.480000] usbcore: registered new interface driver rtl8187
[ 0.485000] Linux video capture interface: v2.00
[ 0.490000] Driver 'sd' needs updating - please use bus_type methods
[ 0.495000] S3C24XX NAND Driver, (c) 2004 Simtec Electronics
[ 0.500000] s3c2410-nand s3c2410-nand: Tacls=1, 7ns Twrph0=2 15ns, Twrph1=1
s
[ 0.505000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x79 (Samsung
NAND )
[ 0.510000] Scanning device for bad blocks
[ 1.040000] Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[ 1.045000] 0x00200000-0x00400000 : "boot"
[ 1.050000] 0x00400000-0x02400000 : "rootfs"
[ 1.055000] 0x02400000-0x03000000 : "config"
[ 1.060000] 0x03000000-0x08000000 : "program"
[ 1.065000] usbmon: debugfs is not available
[ 1.070000] s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
[ 1.075000] s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus
1
[ 1.080000] s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
[ 1.145000] usb usb1: configuration #1 chosen from 1 choice
[ 1.150000] hub 1-0:1.0: USB hub found
[ 1.150000] hub 1-0:1.0: 2 ports detected
[ 1.260000] Initializing USB Mass Storage driver...
[ 1.260000] usbcore: registered new interface driver usb-storage
[ 1.265000] USB Mass Storage support registered.
[ 1.270000] usbcore: registered new interface driver usbserial
[ 1.275000] drivers/usb/serial/usb-serial.c: USB Serial support registered
fc
[ 1.280000] usbcore: registered new interface driver usbserial_generic
[ 1.285000] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[ 1.290000] drivers/usb/serial/usb-serial.c: USB Serial support registered
f3
[ 1.295000] usbcore: registered new interface driver pl2303
[ 1.300000] drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial
adaptr
[ 1.305000] mice: PS/2 mouse device common for all mice
[ 1.310000] input: s3c2410-kbd as /devices/virtual/input/input0
[ 1.345000] S3C24XX RTC, (c) 2004,2006 Simtec Electronics
[ 1.345000] s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
[ 1.350000] s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
[ 1.355000] S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
[ 1.360000] s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq
d
[ 1.365000] usbcore: registered new interface driver hiddev
[ 1.370000] usbcore: registered new interface driver usbhid
[ 1.375000] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[ 1.380000] TCP cubic registered
[ 1.385000] Initializing XFRM netlink socket
[ 1.385000] NET: Registered protocol family 1
[ 1.390000] NET: Registered protocol family 17
[ 1.395000] NET: Registered protocol family 15
[ 1.400000] ieee80211: 802.11 data/management/control stack, git-1.1.13
[ 1.405000] ieee80211: Copyright (C) 2004-2005 Intel Corporation
<jketreno@l>
[ 1.410000] s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
[ 1.425000] VFS: Mounted root (cramfs filesystem) readonly.
[ 1.430000] Freeing init memory: 84K
init started: BusyBox v1.9.1 (2008-03-03 10:40:32 CST)
starting pid 16, tty '': '/bin/mount'
starting pid 17, tty '': '/sbin/udevd'
cannot open /dev/null
starting pid 19, tty '': '/sbin/udevadm'
starting pid 65, tty '': '/etc/init.d/rcS'
starting pid 66, tty '': '/bin/sh'
[ 3.755000] yaffs: dev is 32505858 name is "mtdblock2"
[ 3.760000] yaffs: passed flags ""
[ 3.765000] yaffs: Attempting MTD mount on 31.2, "mtdblock2"
[ 3.875000] Atmel at76x USB Wireless LAN Driver 0.17 loading
[ 3.885000] usbcore: registered new interface driver at76_usb
下面将介绍linux rootfs 根文件系统的建立。
1、下载linux-2.6.24.3.tar.bz2
2、tar -jxvf linux-2.6.24.3.tar.bz2
3、下载需要的补丁, 打补丁,
下载yaffs2
export CVSROOT=:pserver:anonymous@cvs.aleph1.co.uk:/home/aleph1/cvs cvs
logon
(Hit return when asked for a password)
cvs checkout yaffs2
cd yaffs2
打补丁: patch-ker.sh -c kernelpath
系统中制作cramfs时单文件支持大于16M的更改
修改内核中的include/linux/cramfs_fs.h中的
---#define CRAMFS_SIZE_WIDTH 24
+++#define CRAMFS_SIZE_WIDTH 25
make ARCH=arm menuconfig 配置
make ARCH=arm CROSS_COMPILE=arm-linux-
4、制作cramfs的工具作相应更改:
修改mkcramfs原文件中的cramfs_fs.h
---#define CRAMFS_SIZE_WIDTH 24
+++#define CRAMFS_SIZE_WIDTH 25
经过以上步骤,可以在arch/arm/boot下生成zImage文件,下载到系统中,运行,
系统大小大约1.3M,
启动开始加载内核的时间大概有1~2秒。
linux启动时间 3.885秒,其中udev启动时间比较长,如果不需要udev支持,而是
改用静态的dev的话,
linux启动时间启动时间应该可以缩小到2秒以内。
启动过程如下:
Uncompressing Linux.............................................................
Linux version 2.6.24.3 (zjein@localhost.localdomain) (gcc version 4.2.3) #21 PR8
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: IPAQ-H1940
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 266.000 MHz, memory 133.000 MHz, peripheral 66.500 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
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 in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=31:3 console=ttySAC0 time
[ 0.000000] The 'time' option is deprecated and is scheduled for removal in
8
[ 0.000000] Use 'printk.time=<value>' instead
[ 0.000000] irq: clearing subpending status 00000002
[ 0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[ 0.000000] timer tcon=00000000, tcnt d877, tcfg 00000200,00000000, usec
0009
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [ttySAC0] enabled
[ 0.005000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.010000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.025000] Memory: 64MB = 64MB total
[ 0.025000] Memory: 62128KB available (2412K code, 236K data, 84K init)
[ 0.030000] SLUB: Genslabs=11, HWalign=32, Order=0-1, MinObjects=4, CPUs=1,
1
[ 0.145000] Mount-cache hash table entries: 512
[ 0.145000] CPU: Testing write buffer coherency: ok
[ 0.150000] net_namespace: 64 bytes
[ 0.160000] NET: Registered protocol family 16
[ 0.165000] S3C2410: Initialising architecture
[ 0.170000] S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
[ 0.175000] DMA channel 0 at c4800000, irq 33
[ 0.180000] DMA channel 1 at c4800040, irq 34
[ 0.185000] DMA channel 2 at c4800080, irq 35
[ 0.190000] DMA channel 3 at c48000c0, irq 36
[ 0.200000] SCSI subsystem initialized
[ 0.200000] usbcore: registered new interface driver usbfs
[ 0.205000] usbcore: registered new interface driver hub
[ 0.210000] usbcore: registered new device driver usb
[ 0.250000] NET: Registered protocol family 2
[ 0.300000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.305000] TCP established hash table entries: 2048 (order: 2, 16384
bytes)
[ 0.310000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.315000] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.320000] TCP reno registered
[ 0.360000] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.365000] yaffs Mar 21 2008 14:05:28 Installing.
[ 0.370000] io scheduler noop registered
[ 0.375000] io scheduler deadline registered (default)
[ 0.405000] Console: switching to colour frame buffer device 106x43
[ 0.445000] s3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70)
is0
[ 0.455000] s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73)
is0
[ 0.460000] s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76)
is0
[ 0.465000] loop: module loaded
[ 0.465000] PPP generic driver version 2.4.2
[ 0.470000] PPP Deflate Compression module registered
[ 0.475000] usbcore: registered new interface driver zd1201
[ 0.480000] usbcore: registered new interface driver rtl8187
[ 0.485000] Linux video capture interface: v2.00
[ 0.490000] Driver 'sd' needs updating - please use bus_type methods
[ 0.495000] S3C24XX NAND Driver, (c) 2004 Simtec Electronics
[ 0.500000] s3c2410-nand s3c2410-nand: Tacls=1, 7ns Twrph0=2 15ns, Twrph1=1
s
[ 0.505000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x79 (Samsung
NAND )
[ 0.510000] Scanning device for bad blocks
[ 1.040000] Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[ 1.045000] 0x00200000-0x00400000 : "boot"
[ 1.050000] 0x00400000-0x02400000 : "rootfs"
[ 1.055000] 0x02400000-0x03000000 : "config"
[ 1.060000] 0x03000000-0x08000000 : "program"
[ 1.065000] usbmon: debugfs is not available
[ 1.070000] s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
[ 1.075000] s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus
1
[ 1.080000] s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
[ 1.145000] usb usb1: configuration #1 chosen from 1 choice
[ 1.150000] hub 1-0:1.0: USB hub found
[ 1.150000] hub 1-0:1.0: 2 ports detected
[ 1.260000] Initializing USB Mass Storage driver...
[ 1.260000] usbcore: registered new interface driver usb-storage
[ 1.265000] USB Mass Storage support registered.
[ 1.270000] usbcore: registered new interface driver usbserial
[ 1.275000] drivers/usb/serial/usb-serial.c: USB Serial support registered
fc
[ 1.280000] usbcore: registered new interface driver usbserial_generic
[ 1.285000] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[ 1.290000] drivers/usb/serial/usb-serial.c: USB Serial support registered
f3
[ 1.295000] usbcore: registered new interface driver pl2303
[ 1.300000] drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial
adaptr
[ 1.305000] mice: PS/2 mouse device common for all mice
[ 1.310000] input: s3c2410-kbd as /devices/virtual/input/input0
[ 1.345000] S3C24XX RTC, (c) 2004,2006 Simtec Electronics
[ 1.345000] s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
[ 1.350000] s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
[ 1.355000] S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
[ 1.360000] s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq
d
[ 1.365000] usbcore: registered new interface driver hiddev
[ 1.370000] usbcore: registered new interface driver usbhid
[ 1.375000] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[ 1.380000] TCP cubic registered
[ 1.385000] Initializing XFRM netlink socket
[ 1.385000] NET: Registered protocol family 1
[ 1.390000] NET: Registered protocol family 17
[ 1.395000] NET: Registered protocol family 15
[ 1.400000] ieee80211: 802.11 data/management/control stack, git-1.1.13
[ 1.405000] ieee80211: Copyright (C) 2004-2005 Intel Corporation
<jketreno@l>
[ 1.410000] s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
[ 1.425000] VFS: Mounted root (cramfs filesystem) readonly.
[ 1.430000] Freeing init memory: 84K
init started: BusyBox v1.9.1 (2008-03-03 10:40:32 CST)
starting pid 16, tty '': '/bin/mount'
starting pid 17, tty '': '/sbin/udevd'
cannot open /dev/null
starting pid 19, tty '': '/sbin/udevadm'
starting pid 65, tty '': '/etc/init.d/rcS'
starting pid 66, tty '': '/bin/sh'
[ 3.755000] yaffs: dev is 32505858 name is "mtdblock2"
[ 3.760000] yaffs: passed flags ""
[ 3.765000] yaffs: Attempting MTD mount on 31.2, "mtdblock2"
[ 3.875000] Atmel at76x USB Wireless LAN Driver 0.17 loading
[ 3.885000] usbcore: registered new interface driver at76_usb
下面将介绍linux rootfs 根文件系统的建立。
相关文章推荐
- ARM linux 移植实验记录
- Hostapd-0.8.x移植到ARM Linux
- Arm linux 内核移植及系统初始化过程分析
- Hostapd-0.8.x移植到ARM Linux
- 将Open SSH Server 移植到ARM Linux成功
- 【引用】Linux应用程序开发(一)---移植thttpd+Sqlite3+PHP5到arm linux(3)
- Linux应用程序开发(一)---移植thttpd+Sqlite3+PHP5到arm linux(1)
- Linux应用程序开发(一)---移植thttpd+Sqlite3+PHP5到arm linux(3)
- openssl-1.0.0b-libssl移植到ARM Linux
- 【原】移植madplay到arm linux
- 移植nginx+php+sqlite到arm linux(一)
- 【引用】Linux应用程序开发(一)---移植thttpd+Sqlite3+PHP5到arm linux(2)
- Netlink Library - libnl-1.1 移植到ARM Linux
- 移植appweb+php5+sqlite3到ARM LINUX
- arm linux串口蓝牙工具移植及使用【转】
- Arm linux 内核移植及系统初始化过程分析
- Openssl移植到Arm linux
- arm linux移植lcd
- arm linux 内核移植及驱动调试-网卡(1)
- libnl-1.1 移植到ARM Linux