uboot2009,增加引导内核功能
(文件参考)
http://www.linuxidc.com/Linux/2011-05/35982.htm
移植环境
主机环境:VMare下 RHLE6,1G内存。
编译编译环境:arm-linux-gcc v4.4.3,arm-none-eabi-gcc v4.5.1。
开发板:fl2440,2M nor flash,128M nand flash。
u-boot版本:u-boot-2009.08
u-boot配置
机器码的确定
通常,在u-boot和kernel中都会有一个机器码(即:MACH_TYPE),只有这两个机器码一致时才能引导内核,否则就会出现如下mach的错误信息或者死机。
打开board/ fl2440/fl2440.c,定位到124行附近,修改如下:
#if defined(CONFIG_S3C2410)
/* arch number of SMDK2410-Board */
gd->bd->bi_arch_number = MACH_TYPE_SMDK2410;
#endif
#if defined(CONFIG_S3C2440)
/* arch number of S3C2440-Board */
gd->bd->bi_arch_number = MACH_TYPE_S3C2440 ;
#endif
对于u-boot-2009.08来说,MACH_TYPE_S3C2440已经在include/asm-arm/mach-types.h 文件的362行附件有定义。
修改u-boot中内核引导参数:
打开/include/configs/fl2440.h,定位到60行附近,修改如下:
#define CONFIG_BOOTDELAY 3
#define CONFIG_SETUP_MEMORY_TAGS 1 //如果没有定义这个参数,则uboot参数必须加入men=内存大小
#define CONFIG_INITRD_TAG 1
#define CONFIG_CMDLINE_TAG 1 //设置bootargs出入内核必须
#define CONFIG_BOOTARGS "noinitrd console=ttySAC0,115200 init=/linuxrc \
root=/dev/mtdblock3 rw rootfstype=yaffs \
ip=192.168.1.15:192.168.1.124:192.168.1.1:255.255.255.0::eth0:off"
/* "noinitrd console=ttySAC0,115200 init=/linuxrc mem=64M \
root=/dev/nfs rw nfsroot=192.168.1.124:/nfsboot \
ip=192.168.1.15:192.168.1.124:192.168.1.1:255.255.255.0::eth0:off"
*/
#define CONFIG_ETHADDR 08:00:3e:26:0a:5b
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 192.168.1.15
#define CONFIG_SERVERIP 192.168.1.124
#define CONFIG_GATEWAYIP 192.168.1.1
#define CONFIG_OVERWRITE_ETHADDR_ONCE
/*#define CONFIG_BOOTFILE "elinos-lart" */
#define CONFIG_BOOTCOMMAND "nand read 0x30200000 0x00500000 0x300000;bootm 0x30200000"
/*"nfs 0x30200000 192.168.1.124:/nfsboot/zImage.img;bootm" */
#define CONFIG_EXTRA_ENV_SETTINGS \
"singleboy=bmp d 70000\0 " \
"stdin=serial\0" \
"stdout=serial\0" \
"stderr=serial\0" \
""
#if defined(CONFIG_CMD_KGDB)
bootargs参数解析:
initrd, noinitrd: 当你没有使用ramdisk启动系统的时候,你需要使用noinitrd这个参数,但是如果使用了的话,就需要指定initrd=r_addr,size, r_addr表示initrd在内存中的位置,size表示initrd的大小。
console: console=tty 使用虚拟串口终端设备 。console=ttyS[,options] 使用特定的串口,options可以是这样的形式bbbbpnx,这里bbbb是指串口的波特率,p是奇偶位(从来没有看过使用过),n是指的bits。console=ttySAC[,options] 同上面。看你当前的环境,有时用ttyS,有时用ttySAC,网上有人说,这是跟内核的版本有关,2.4用ttyS,2.6用ttySAC,但实际情况是官方文档中也是使用ttyS,所以应该是跟内核版本没有关联的。可以查看Documentation/serial-console.txt找到相关描述。
init: 指定的是内核启起来后,进入系统中运行的第一个脚本,一般init=/linuxrc, 或者init=/etc/preinit,preinit的内容一般是创建console,null设备节点,运行init程序,挂载一些文件系统等等操作。请注意,很多初学者以为init=/linuxrc是固定写法,其实不然,/linuxrc指的是/目录下面的linuxrc脚本,一般是一个连接罢了。如果内核找不到linurc文件,将会依搜索/sbin/init, /etc/init,/bin/init,/bin/sh.
mem: 指定内存大小,不是必须的。
root: 用来指定rootfs的位置, 常见的情况有:
root=/dev/ram rw
root=/dev/ram0 rw
请注意上面的这两种设置情况是通用的,我做过测试甚至root=/dev/ram1 rw和root=/dev/ram2 rw也是可以的,网上有人说在某些情况下是不通用的,即必须设置成ram或者ram0,但是目前还没有遇到,还需要进一步确认,遇到不行的时候可以逐一尝试。
root=/dev/mtdx rw
root=/dev/mtdblockx rw
root=/dev/mtdblock/x rw
root=31:0x
上面的这几个在一定情况下是通用的,当然这要看你当前的系统是否支持,不过mtd是字符设备,而mtdblock是块设备,有时候你的挨个的试到底当前的系统支持上面那种情况下,不过root=/dev/mtdblockx rw比较通用。此外,如果直接指定设备名可以的话,那么使用此设备的设备号也是可以的。
root=/dev/nfs,并非真的设备,而是一个告诉内核经由网络取得根文件系统的旗标。 在文件系统为基于nfs的文件系统的时候使用。当然指定root=/dev/nfs之后,还需要指定nfsroot,这个参数告诉内核以哪一台机器,哪个目录以及哪个网络文件系统选项作为根文件系统使用。参数的格式如下:
nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
如果指令列上没有给定 nfsroot 参数,则将使用'/tftpboot/%s'预设值。其它选项如下:
<server-ip> :指定网络文件系统服务端的互联网地址(IP address)。如果没有给定此栏位,则使用由 nfsaddrs 变量(见下面)所决定的值。此参数的用途之一是允许使用不同机器作为反向地址解析协议(RARP)及网络文件系统服务端。通常你可以不管它(设为空白)。
<root-dir> : 服务端上要作为根挂入的目录名称。如果字串中有个'%s' 符记(token),此符记将代换为客户端互联网地址之ASCII 表示法。
<nfs-options> :标准的网络文件系统选项。所有选项都以逗号分开。如果没有给定此选项栏位则使用下列的预设值:
port = as given by server portmap daemon
rsize = 1024
wsize = 1024
timeo = 7
retrans = 3
acregmin = 3
acregmax = 60
acdirmin = 30
acdirmax = 60
flags = hard, nointr, noposix, cto, ac
参数nfsaddrs设定网络通讯所需的各种网络接口地址。如果没有给定这个参数,则内核核会试着使用反向地址解析协议以及或是启动协议(BOOTP)以找出这些参数。下面是U-boot官方文档提供的IP参数解析,其格式如下:
setenv bootargs ${bootargs}
ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname:${netdev}:off
注意,上面换行的地方均有空格。其中 192.168.1.15是开发板的IP,192.168.1.124是PC端(或虚拟机)的IP,上面的IP根据自己的实际情况修改,不要弄错了。参数nfsaddrs格式如下:
nfsaddrs=<my-ip>:<serv-ip>:<gw-ip>:<netmask>:<name>:<dev>:<auto>
<my-ip> :客户端的互联网地址。如果没设,此地址将由反向地址解析协议(RARP)或启动协议来决定。使用何种协议端视配置核心时打开的选项以及 参数而定。如果设定此参数,就不会使用反向地址解析协议或启动协议。
<serv-ip> : 网络文件系统服务端之互联网地址。如果使用反向地址解析协议来决定客户端地址并且设定此参数,则只接受从指定之服务端传来的回应。要使用不同的机器作为反向地址解析与网络文件系统服务端的话,在此指定你的反向地址解析协议服务端(保持空白)并在 nfsroot 参数(见上述)中指定你的网络文件系统服务端。如果此项目空白则使用回答反向地址解析协议或启动协议之服务端的地址。
<gw-ip> :网关(gateway)之互联网地址,若服务端位於不同的子网络上时。如果此项目空白则不使用任何网关并假设服务端在本地的(local)网络上,除非由启动协议接收到值。
<netmask>:本地网络界面的网络掩码。如果为空白,则网络掩码由客户端的互联网地址导出,除非由启动协议接收到值。
<name>:客户端的名称。如果空白,则使用客户端互联网地址之 ASCII-标记法,或由启动协议接收的值。
<dev> : 要使用的网络设备名称。如果为空白,所有设备都会用来发出反向地址解析请求,启动协议请求由最先找到的设备发出。网络文件系统使用接收到反向地址解析协议或启动协议回应的设备。如果你只有一个设备那你可以不管它。
<suto> : 用以作为自动配置的方法。如果是 `rarp' 或是 `bootp' 则使用所指示的协议。如果此值为`both' 或空白,若配置核心时有打开这两种协议则都使用。 `none' 表示不使用自动配置。这种情况下你必须指定前述栏位中所有必要的值。
此参数可以作为 nfsaddrs 的参数单独使用(前面没有任何 `:` 字符),这种情况下会使用自动配置。然而,此种情况不能使用 `none'作为值。
制作能被u-boot直接引导的内核uImage
通常,kernel的启动需要u-boot提供一些参数信息,比如ramdisk在RAM中的地址。经过编译后的u-boot在根目录下的tools目录中,会有个叫做mkimage的工具,他可以给zImage添加一个header,也就是说使得通常我们编译的内核zImage添加一个数据头信息部分,我们把添加头后的image通常叫uImage,uImage是可以被u-boot直接引导的内核镜像。
mkimage工具的使用介绍如下:
使用: 中括号括起来的是可选的
mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
选项:
-A:set architecture to 'arch' //用于指定CPU类型,比如ARM
-O:set operating system to 'os' //用于指定操作系统,比如Linux
-T:set image type to 'type' //用于指定image类型,比如Kernel
-C:set compression type 'comp' //指定压缩类型
-a:set load address to 'addr' (hex) //指定image的载入地址
-e:set entry point to 'ep' (hex) //内核的入口地址,一般为image的载入地址+0x40(信息头的大小)
-n:set image name to 'name' //image在头结构中的命名
-d:use image data from 'datafile' //无头信息的image文件名
-x:set XIP (execute in place) //设置执行位置
先将u-boot下的tools中的mkimage复制到主机的/usr/local/bin目录下,这样就可以在主机的任何目录下使用该工具了。现在我们进入kernel生成目录(一般是arch/arm/boot目录),然后执行如下命令,就会在该目录下生成一个uImage.img的镜像文件,把他复制到tftp目录下,这就是我们所说的uImage。打开终端,现操作如下:
[root@localhost ~]# cd /tftpboot
[root@localhost tftpboot]# mkimage -n 'fl2440_linux' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008040 -d zImage_362 uImage_362
Image Name: fl2440_linux
Created: Thu May 12 11:37:00 2011
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2022348 Bytes = 1974.95 kB = 1.93 MB
Load Address: 30008000
Entry Point: 30008040
[root@localhost tftpboot]#
更改用户执行权限
[root@localhost tftpboot]# ls -a
. .. touch.yaffs uImage_362 zImage_362
[root@localhost tftpboot]# chmod a+x uImage_362
[root@localhost tftpboot]#
把uImage.img用tftp下载到内存中,然后再固化到Nand Flash中
[u-boot@FL2440]# tftp 0x30200000 uImage_362
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 12:34:56:78:9a:bc
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 10.1.0.128; our IP address is 10.1.0.129
Filename 'uImage_T35'.
Load address: 0x30000000
Loading: #################################################################
#################################################################
########
done
Bytes transferred = 2022412 (1edc0c hex)
4.1 设置u-boot引导参数并保存到nand flash
设置启动参数,意思是将nand中0x500000-0x800000(和kernel分区一致)的内容读到内存0x30200000中,然后用bootm命令来执行(如果在第一步中的fl2440.h文件设置是正确的,此步可以不做):
[u-boot@FL2440]# set bootargs noinitrd root=/dev/mtdblock3 console=ttySAC0
[u-boot@FL2440]# set bootcmd nand read 0x30200000 0x00500000 0x00300000 \; bootm 0x30200000
[u-boot@FL2440]# saveenv
Writing to Nand... done
[u-boot@FL2440]#
Bootm命令:
- 根据头部信息加载内核到加载地址
- 启动内核,do_bootm_linux (cmdtp, flag, argc, argv, addr, len_ptr, verify)
- Uboot设置内核参数
#define CONFIG_SETUP_MEMORY_TAGS 1
#define CONFIG_INITRD_TAG 1
#define CONFIG_CMDLINE_TAG 1 //设置bootargs出入内核必须
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
{
bd_t *bd = gd->bd;
char *s;
int machid = bd->bi_arch_number;
void (*theKernel)(int zero, int arch, uint params);
#ifdef CONFIG_CMDLINE_TAG
char *commandline = getenv ("bootargs");
#endif
theKernel = (void (*)(int, int, uint))images->ep;
s = getenv ("machid");
debug ("## Transferring control to Linux (at address %08lx) ...\n",
(ulong) theKernel);
#if defined (CONFIG_SETUP_MEMORY_TAGS) || \
defined (CONFIG_CMDLINE_TAG) || \
defined (CONFIG_INITRD_TAG) || \
defined (CONFIG_SERIAL_TAG) || \
defined (CONFIG_REVISION_TAG) || \
defined (CONFIG_LCD) || \
defined (CONFIG_VFD)
setup_start_tag (bd);
#ifdef CONFIG_SETUP_MEMORY_TAGS
setup_memory_tags (bd);
#endif
#ifdef CONFIG_CMDLINE_TAG
setup_commandline_tag (bd, commandline);
#endif
#ifdef CONFIG_INITRD_TAG
if (images->rd_start && images->rd_end)
setup_initrd_tag (bd, images->rd_start, images->rd_end);
#endif
setup_end_tag (bd);
#endif
/* we assume that the kernel is in place */
printf ("\nStarting kernel ...\n\n");
cleanup_before_linux ();
theKernel (0, machid, bd->bi_boot_params);
/* does not return */
return 1;
}
static void setup_start_tag (bd_t *bd)
{
params = (struct tag *) bd->bi_boot_params;
params->hdr.tag = ATAG_CORE;
params->hdr.size = tag_size (tag_core);
params->u.core.flags = 0;
params->u.core.pagesize = 0;
params->u.core.rootdev = 0;
params = tag_next (params);
}
#ifdef CONFIG_SETUP_MEMORY_TAGS
static void setup_memory_tags (bd_t *bd)
{
int i;
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
params->hdr.tag = ATAG_MEM;
params->hdr.size = tag_size (tag_mem32);
params->u.mem.start = bd->bi_dram[i].start;
params->u.mem.size = bd->bi_dram[i].size;
params = tag_next (params);
}
}
#endif /* CONFIG_SETUP_MEMORY_TAGS */
static void setup_commandline_tag (bd_t *bd, char *commandline)
{
char *p;
/* eat leading white space */
for (p = commandline; *p == ' '; p++);
params->hdr.tag = ATAG_CMDLINE;
params->hdr.size =
(sizeof (struct tag_header) + strlen (p) + 1 + 4) >> 2;
strcpy (params->u.cmdline.cmdline, p);
params = tag_next (params);
}
#ifdef CONFIG_INITRD_TAG
static void setup_initrd_tag (bd_t *bd, ulong initrd_start, ulong initrd_end)
{
/* an ATAG_INITRD node tells the kernel where the compressed
* ramdisk can be found. ATAG_RDIMG is a better name, actually.
*/
params->hdr.tag = ATAG_INITRD2;
params->hdr.size = tag_size (tag_initrd);
params->u.initrd.start = initrd_start;
params->u.initrd.size = initrd_end - initrd_start;
params = tag_next (params);
}
#endif /* CONFIG_INITRD_TAG */
static void setup_end_tag (bd_t *bd)
{
params->hdr.tag = ATAG_NONE;
params->hdr.size = 0;
}
ATAG_NONE |
Size:0 |
bootargs |
Tag: ATAG_CMDLINE |
Size |
Start:0x30000000 |
size :0x4000000 |
Tag:ATAG_MEM |
Size:4 |
Rootdev:0 |
Pagesize:0 |
Flag:0 |
Tag: ATAG_CORE |
Size:5 |
这里少了setup_initrd_tag
- 跳到入口地址,启动内核
theKernel = (void (*)(int, int, uint))images->ep;-------à
theKernel (0, machid, bd->bi_boot_params);
4.2 将内核写入Nand flash,系统上电后自引导:
擦除nand的0x500000-0x800000的内容,并将将内存0x30000000处的内容写入到nand的0x500000处:
[u-boot@FL2440]# nand erase 0x00500000 0x00300000
NAND erase: device 0 offset 0x500000, size 0x300000
Erasing at 0xXXXXXXX -- 0% complete.
OK
[u-boot@FL2440]# nand write 30200000 0x500000 0x300000
NAND write: device 0 offset 0x80000, size 0x300000
Writing at 0xXXXXXXXXXX -- 100% is complete. 3145728 bytes written: OK
[u-boot@FL2440]#
U-Boot 2009.08 (Mar 31 2012 - 14:58:59)
DRAM: 64 MB
Flash: 4 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: dm9000
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x500000, size 0x300000
3145728 bytes read: OK
## Booting kernel from Legacy Image at 30200000 ...
Image Name: linux-2.6.28.7
Created: 2012-03-31 7:38:43 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1819672 Bytes = 1.7 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux..................................................................................................................... done, booting the kernel.
Linux version 2.6.28.7 (root@LinkinPark) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #5 Sat Mar 31 15:12:45 CST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
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 console=ttySAC0
irq: clearing pending ext status 00080800
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57
Console: colour dummy device 80x30
console [ttySAC0] enabled
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: 61024KB available (3372K code, 309K data, 140K init)
Calibrating delay loop... 50.38 BogoMIPS (lpj=125952)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 484 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,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
SCSI subsystem initialized
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: 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
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY) 漏 2001-2006 Red Hat, Inc.
msgmni has been set to 119
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 40x30
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver4 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
dm9000 Ethernet Driver, V1.31
eth0: dm9000a at c487a300,c487e304 IRQ 51 MAC: 00:12:34:56:80:49 (chip)
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ide-cd driver 5.00
st: Version 20080504, fixed bufsize 32768, s/g segs 256
Driver 'st' needs updating - please use bus_type methods
Driver 'sd' needs updating - please use bus_type methods
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 199 at 0x018e0000
Bad eraseblock 783 at 0x061e0000
Creating 5 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00100000 : "Boot"
0x00140000-0x00500000 : "MyApp"
0x00500000-0x00800000 : "Kernel"
0x00800000-0x04400000 : "fs_yaffs"
0x04400000-0x08000000 : "WINCE"
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
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
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.4.3: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
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
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
s3c2410-rtc s3c2410-rtc: setting system clock to 2023-01-28 21:07:46 UTC (1674940066)
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
usb 1-1: new full speed USB device using s3c2410-ohci and address 2
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 140K
init started: BusyBox v1.6.0 (2008-01-09 17:10:28 CST) multi-call binary
starting pid 882, tty '': '/etc/init.d/rcS'
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
mount: mounting none on /dev/pts failed
mount: mounting tmpfs on /dev/shm failed
dm9000 dm9000.0: WARNING: no IRQ resource flags set.
eth0: link down
ifconfig: SIOCSIFADDR: No such device
Please press Enter to activate this console. Can't open framebuffer device /dev/fb0
Can't open framebuffer device /dev/fb0
driver cannot connect
starting pid 893, tty '': '/bin/sh'
# ls
bin lib mnt sbin usr
dev linuxrc proc sys var
etc lost+found sample tmp
#
内核和yaffs2文件系统成功引导起来了。