1.安装
sudo apt-get install bison flex build-essential patch libncurses5-dev
2.理解
交叉编译的库库文件lib路径:
arm-2010.09/arm-none-linux-gnueabi/libc/armv4t/lib 一些.so文件
我们需要的头文件
arm-2010.09/arm-none-linux-gnueabi/libc/usr/include 一些 .h 文件
注意:我们在建立文件系统时,需要拷贝交叉编译的lib文件到 自己的文件系统 /lib/
arm-none-linux-gnueabi/libc/armv4t/usr/lib/*.so* 到 文件系统/lib下
arm-none-linux-gnueabi/libc/armv4t/lib/ 到lib下
具体可以参考 移植手册
3.内核关于S3C2440的头文件
arch/arm/mach-s3c2410/include
arch/arm/mach-s3c2440
arch/arm/plat-s3c24xx/include
arch/arm/plat-samsung/include 不知道这个有没有用 ??
arch/arm/plat-s3c/
接下去的步骤与
TQ2440+2.6.30.4 步骤差不多1.添加对ARM的支持
vim Makefile 第189行
ARCH = arm
CROSS_COMPILE=arm-linux-
2.修改输入平台时钟
arch/arm/mach-s3c2440/mach-smdk2440.c
第163 行,修改 16934400 为 12000000
3.修改机器码
TQ板子使用的168 机器码
arch/arm/tools/mach-types
第379行 将362 为 168
补充:在 移植 自己的uboot 中,2010.06 时,吧 机器码修改为了 362 4.修改nand flash ,这步,与手册上一样
arch/arm/plat-s3c24xx/common-smdk.c
没有 修改 nand flash 的读写匹配时间 ,commmon-smdk.c的文件大概140 行的
smdk_nand_info 结构体
5.支持 yaffs文件系统
./patch-ker.sh c /opt/me_linux/linux-2.6.33
6.busybox-1.18.4 下载了这个
在这个版本,make过程中没有错误,以前自己在2.6.30.4+busybox1.13 文件系统出现错误,
可能是这个版本修改了bug了
7.建立文件系统 完全参考了 TQ移植手册10年版
就是在/home/yu 建立了自己名字的文件
相应的在passwd 修改为自己的名字 yu
mkyaffs2image 工具使用:
1.cp mkxxxxximage_toos.tar.bz2 /home/ywx/yu/src/
2.tar jxfv mkxxxxximage_tools.tar.bz2 生成了usr文件目录
3.sudo cp usr/local/sbin/* /usr/local/sbin
因为根目录/usr/local/sbin/ 已经添加到了 环境变量/etc/environmet下,所以我们可以直接使用
8.内核配置 make menuconfig
这部分可以参考
TQ2440+2.6.30.4 初级移植 (一)
就是改了一个地方: 这次修改了没有错误出现了
- general setup->
- [-yuweixian]local version.......
9.这样子就可以了 ,下载板子
- ##### EmbedSky BIOS for SKY2440/TQ2440 #####
-
Press Space key to Download Mode !
-
Booting Linux ...
-
Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00200000 ... Copy Kernel to SDRAM done,NOW, Booting Linux......
-
Uncompressing Linux... done, booting the kernel.
-
Linux version 2.6.33-yuweixian (root@yuweixian) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #6 Tue Apr 5 14:53:53 CST 2011
-
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
-
CPU: VIVT data cache, VIVT instruction cache
-
Machine: SMDK2440
-
ATAG_INITRD is deprecated; please update your bootloader.
-
Memory policy: ECC disabled, Data cache writeback
-
CPU S3C2440A (id 0x32440001)
-
S3C24XX Clocks, Copyright 2004 Simtec Electronics
-
S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 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/mtdblock2 init=/linuxrc console=ttySAC0
-
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: 61048KB available (3272K code, 304K data, 120K init, 0K highmem)
-
Hierarchical RCU implementation.
-
NR_IRQS:85
-
irq: clearing pending ext status 00080000
-
irq: clearing subpending status 00000002
-
Console: colour dummy device 80x30
-
console [ttySAC0] enabled
-
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
-
Mount-cache hash table entries: 512
-
CPU: Testing write buffer coherency: ok
-
NET: Registered protocol family 16
-
S3C Power Management, Copyright 2004 Simtec Electronics
-
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
-
SCSI subsystem initialized
-
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 97 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.
-
NetWinder Floating Point Emulator V0.97 (extended precision)
-
ROMFS MTD (C) 2007 Red Hat, Inc.
-
yaffs Apr 5 2011 12:09:55 Installing.
-
msgmni has been set to 119
-
io scheduler noop registered
-
io scheduler deadline registered
-
io scheduler cfq registered (default)
-
Console: switching to colour frame buffer device 30x40
-
fb0: s3c2410fb frame buffer device
-
lp: driver loaded but no devices found
-
ppdev: user-space parallel port driver
-
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
-
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
-
loop: module loaded
-
Uniform Multi-Platform E-IDE driver
-
ide-gd driver 1.18
-
ide-cd driver 5.00
-
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
-
s3c24xx-nand s3c2440-nand: Tacls=2, 20ns Twrph0=6 60ns, Twrph1=2 20ns
-
s3c24xx-nand s3c2440-nand: NAND hardware ECC
-
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
-
Scanning device for bad blocks
-
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
-
0x000000000000-0x000000040000 : "ywx-boot"
-
0x000000200000-0x000000400000 : "ywx-kernel"
-
0x000000400000-0x00000ff80000 : "ywx-yaffs2"
-
dm9000 Ethernet Driver, V1.31
-
usbmon: debugfs is not available
-
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
-
usbcore: registered new interface driver usbserial
-
USB Serial support registered for generic
-
usbcore: registered new interface driver usbserial_generic
-
usbserial: USB Serial Driver core
-
USB Serial support registered for FTDI USB Serial Device
-
usbcore: registered new interface driver ftdi_sio
-
ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
-
USB Serial support registered for pl2303
-
usbcore: registered new interface driver pl2303
-
pl2303: Prolific PL2303 USB to serial adaptor driver
-
mice: PS/2 mouse device common for all mice
-
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
-
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
-
ALSA device list:
-
No soundcards found.
-
TCP cubic registered
-
NET: Registered protocol family 17
-
end_request: I/O error, dev mtdblock2, sector 256
-
isofs_fill_super: bread failed, dev=mtdblock2, iso_blknum=64, block=128
-
yaffs: dev is 32505858 name is "mtdblock2"
-
yaffs: passed flags ""
-
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
-
yaffs: auto selecting yaffs2
-
yaffs_read_super: isCheckpointed 0
-
VFS: Mounted root (yaffs filesystem) on device 31:2.
-
Freeing init memory: 120K
-
-
Please press Enter to activate this console.
-
[root@yuweixian /]# ls
-
bin home lost+found proc sys var
-
dev lib mnt root tmp web
-
etc linuxrc opt sbin usr
-
[root@yuweixian /]# clear
-
-
[root@yuweixian /]# ls
-
bin home lost+found proc sys var
-
dev lib mnt root tmp web
-
etc linuxrc opt sbin usr
-
[root@yuweixian /]#
这次 [root/yuweixian /]# 成功显示了 !!!!!
错误处理:
1.板子执行到这里就停止了,没有继续向下执行了
- ##### EmbedSky BIOS for SKY2440/TQ2440 #####
-
Press Space key to Download Mode !
-
Booting Linux ...
-
Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00200000 ... Copy Kernel to SDRAM done,NOW, Booting Linux......
-
Uncompressing Linux...
分析:
1.当时我仅仅制作了2.6.33 内核,下载到板子中,但是文件系统还是 TQ2440+2.6.30.4这个文件系统,出现了上面的错误。我想是文件系统匹配问题。
2.所以,我继续做了文件系统arm-linux-gcc4.5.1,但是还是出现了上面的问题。一直没有解决
网上说的是:
主要是串口问题:
出现如下提示后停住 Uncompressing Linux done, booting the kernel 但是,还是没有解决,
自己又下了一遍内核+文件系统 到板子中,就成功启动了,乖乖。
以后还是要一步一步小心的处理过程!!!!
阅读(945) | 评论(0) | 转发(0) |