作者:彭東林
郵箱:pengdonglin137@163.com
QQ:405728433
開發板
TQ2440 + 64MB 內存 + 256MB Nand
軟件
Linux: Linux-4.9 (https://github.com/pengdonglin137/linux-4.9 )
u-boot:U-Boot 2015.04 (http://www.cnblogs.com/pengdonglin137/p/4541705.html 以及 https://github.com/pengdonglin137/u-boot )
busybox:1.25.0
工具鏈:
編譯內核使用的是arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2(下載)
編譯busybox使用的是EABI-4.3.3_EmbedSky_20100610.tar.bz2 (開發板自帶的工具鏈),因爲發現,如果用跟編譯kernel同樣的那個工具鏈的話,啓動init進程啓動會有問題
概述
以往TQ2440上移植Linux內核都沒有支持設備樹,而設備樹纔是潮流,tq2440沒用上設備樹這件事我心裏糾結了很長時間,所以特意花了一天時間搞一搞,同時爲想研究學習設備樹的同志鋪一鋪路。好在Samsung已經做了很多工作,最後我發現,需要我們修改的基本都是設備樹文件,而kernel代碼幾乎不用怎麼大動。
在移植的時候,需要對Linux下的中斷子系統、時鐘子系統有一些認識。
目前這個版本支持:
1. serial0
2. rtc
3. watchdog (如果沒有這個的話,reboot的時候板子不會自動復位)
4. DM9000 (有了這個,就可以用nfs掛載遠程目錄,對於調試工作很有益處)
下面是下載代碼的鏈接:
git clone git@github.com:pengdonglin137/linux-4.9.git -b tq2440_dt
使用方法:
下載代碼後,修改Makefile文件,設置ARCH和CROSS_COMPILE
make tq2440_dt_defconfig
編譯uImage,然後將uImage拷貝到/tftpboot下: make uImage -j4
編譯設備樹,然後將s3c2440-tq2440-dt.dtb拷貝到/tftpboot下:make dtbs
製作ramdisk:下載tq2440_ramdisk.tar.gz,解壓後,執行下面的腳本mk_ramdisk.sh,會生成一個ramdisk.img文件
進入u-boot:注意:後下載的鏡像不要把前面的鏡像覆蓋了
下載uImage:tftp 0x30008000 uImage;
下載ramdisk:tftp 0x31000000 ramdisk.img;
下載設備樹文件:tftp 0x33000000 s3c2440-tq2440-dt.dtb;
啓動:bootm 0x30008000 0x31000000 0x33000000
正文
在移植的時候參考了s3c2416的代碼,因爲目前s3c2416採用的就是設備樹,但是畢竟跟s3c2440不同,無法直接使用,需要修改設備樹配置。
在移植初期,kernel啓動的時候會在很多地方卡住,臨時的處理辦法是先把卡住的函數注掉,把出問題的模塊先從內核配置中拿掉。最後,板子起來後,再回頭分析前面模塊被卡住的原因。目前我是在tq2440上面移植的,由於mini2440跟tq2440基本一樣(初期我使用的內核配置文件copy的就是mini2440_defconfig,然後在此基礎上修改),所以理論上使用上面的鏡像也可以將mini2440啓動起來。
下面的移植記錄不會很全,詳細的代碼改動請參考上面我上傳到github上的代碼。
一、添加設備樹文件,我仿照s3c2416-smdk2416.dts的結構添加了tq2440的設備樹需要的文件,下面是設備樹的結構
s3c2440-tq2440-dt.dts
----> s3c2440.dtsi
----> s3c24xx.dtsi
----> skeleton.dtsi
----> s3c2440-pinctrl.dtsi
我們大概介紹一下上面的幾個文件:
skeleton.dtsi 存放的是一個設備樹必備的一些基本屬性
s3c24xx.dtsi 中存放的是整個s3c24xx系列SoC公共的一些屬性,如中斷控制器、串口、看門狗、RTC、I2C控制器等等
s3c2440-pinctrl.dtsi 存放的是s3c2440這款SoC中GPIO控制器、外部中斷控制器、引腳複用等信息的配置
s3c2440.dtsi 存放的是s3c2440這個SoC跟其他s3c24xx系列不同的一些硬件信息,如clock控制器、串口等等
s3c2440-tq2440-dt.dts 存放的是tq2440的硬件信息
設備樹這樣一層層包含的好處是: 在同名節點中,後出現的屬性會覆蓋前面出現的同名屬性,不同的屬性將來會合併到所隸屬的同名的節點下面。
然後修改arch/arm/boot/dts/Makefile:
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index c558ba7..28381c0
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -, +, @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
rk3288-veyron-pinky.dtb \
rk3288-veyron-speedy.dtb
dtb-$(CONFIG_ARCH_S3C24XX) += \
- s3c2416-smdk2416.dtb
+ s3c2416-smdk2416.dtb \
+ s3c2440-tq2440-dt.dtb
dtb-$(CONFIG_ARCH_S3C64XX) += \
s3c6410-mini6410.dtb \
s3c6410-smdk6410.dtb
這樣在make dtbs編譯設備樹的時候就會編譯s3c2440-tq2440-dt.dts,在arch/arm/boot/dts/下生成s3c2440-tq2440-dt.dtb
二、修改Makefile和Kconfig,添加tq2440板子的信息,以便在kernel啓動的時候能夠用從設備樹鏡像中解析到的信息匹配到tq2440板子
修改arch/arm/mach-s3c24xx/Kconfig
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 4b1690a..5b2e34f
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -, +, @@ config MACH_MINI2440
Say Y here to select support for the MINI2440. Is a 10cm x 10cm board
available via various sources. It can come with a 3.5" or 7" touch LCD. +config MACH_TQ2440_DT
+ bool "TQ2440 development board using device tree"
+ select CLKSRC_OF
+ select USE_OF
+ select PINCTRL
+ select PINCTRL_S3C24XX
+ help
+ Say Y here to select support for the TQ2440.
+
config MACH_NEXCODER_2440
bool "NexVision NEXCODER 2440 Light Board"
select S3C2440_XTAL_12000000
這樣在make menuconfig的時候,選擇上這個配置。選擇這個配置的時候,CONFIG_CLKSRC_OF/CONFIG_USE_OF/CONFIG_PINCTRL/CONFIG_S3C24XX都會被配置上。
修改arch/arm/mach-s3c24xx/Makefile
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 8ac2f58..2be494d100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@-,+,@@ obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o
obj-$(CONFIG_MACH_TCT_HAMMER) += mach-tct_hammer.o
obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o
+obj-$(CONFIG_MACH_TQ2440_DT) += mach-tq2440-dt.o
+
obj-$(CONFIG_MACH_JIVE) += mach-jive.o
obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o
obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o
在Kconfig配置上CONFIG_MACH_TQ2440_DT後,在make uImage的時候就會編譯mach-tq2440-dt.c
添加arch/arm/mach-s3c24xx/mach-tq2440-dt.c
#include <linux/clocksource.h>
#include <linux/irqchip.h>
#include <linux/serial_s3c.h>
#include <asm/mach/arch.h>
#include <mach/map.h>
#include <plat/cpu.h>
#include <plat/pm.h>
#include "common.h"
static void __init tq2440_dt_map_io(void)
{
s3c24xx_init_io(NULL, );
}
static void __init tq2440_dt_machine_init(void)
{
s3c_pm_init();
}
static const char *const tq2440_dt_compat[] __initconst = {
"samsung,s3c2440",
"samsung,tq2440",
NULL
};
DT_MACHINE_START(TQ2440_DT, "Samsung S3C2440 (Flattened Device Tree)")
.dt_compat = tq2440_dt_compat,
.map_io = tq2440_dt_map_io,
.init_irq = irqchip_init,
.init_machine = tq2440_dt_machine_init,
MACHINE_END
第11行會對一些常用的內存進行靜態映射。
這裏我們需要注意的是第30行的dt_compat數組,其中的值要跟設備樹中的compatible匹配,如arch/arm/boot/dts/s3c2440-tq2440-dt.dts:
/dts-v1/;
#include "s3c2440.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/s3c2410.h>
/ {
model = "TQ2440";
compatible = "samsung,s3c2440", "samsung,tq2440";
memory {
reg = <0x30000000 0x34000000>;
};
如上面的第7行,跟tq2440_dt_compat是相匹配的。
三、打開內核調試開關
如果uboot中設置了bootargs屬性的話,在boot的之前它會修改設備樹鏡像,覆蓋其中chosen節點中的bootargs屬性,爲了便於調試,我在uboot中執行setenv bootargs命令,這樣就可以刪除uboot中bootargs環境變量。
在啓動kernel的時候最煩人的是,uboot打印出"Starting kernel ..."後,整個系統就沒有任何動靜了,此時,就需要打開內核早期的調試log,方法如下:
爲了能夠儘量看到更多內核啓動早期的log,一定要在內核配置文件中把內核早期的log配置打開:
Kernel hacking --->
[*] Kernel low-level debugging functions (read help!)
Kernel low-level debugging port (Use Samsung S3C UART 0 for low-level debug) --->
[*] Early printk
除了上面的配置,還必須在bootargs中添加一個earlyprintk字符串,否則這些log還是打印不出來,此外,建議再在bootargs中添加一個ignore_loglevel參數,防止有些模塊的log由於loglevel的問題無法輸出log
下面是設備樹(s3c2440-tq2440-dt.dts)中chosen節點的定義:
chosen {
bootargs = "root=/dev/ram0 rw rootfstype=ext2 console=ttySAC0,115200n8 init=/linuxrc ignore_loglevel earlyprintk";
};
四、剩下的工作就是修改設備樹了
這也是導致kernel無法啓動的原因,當然前期並不確定問題是出在設備樹還是kernel,下面提示幾個比較關鍵的點。
fixed-clock時鐘配置
在移植以前不支持設備樹的內核代碼的時候(https://github.com/pengdonglin137/linux-3-14-y/tree/transplant_to_tq2440 )在mach-tq2440.c中:
static void __init tq2440_map_io(void)
{
s3c24xx_init_io(tq2440_iodesc, ARRAY_SIZE(tq2440_iodesc));
s3c24xx_init_clocks();
s3c24xx_init_uarts(tq2440_uartcfgs, ARRAY_SIZE(tq2440_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}
第4行設置了XTI的時鐘是12MKHz,但是有了設備樹後,就不能這樣做了,你可以看看在linux-4.9下面s3c24xx_init_clocks函數的實現,由於cpu->init_clocks爲NULL,會導致kernel panic。
那爲什麼是12M呢?在TQ2440的核心板上可以看到XTIpll上接了一個12M的晶振:
對應在設備樹中的配置(s3c2440-tq2440-dt.dts)是:
clocks {
compatible = "simple-bus";
#address-cells = <>;
#size-cells = <>;
xti: oscillator@ {
compatible = "fixed-clock";
reg = <>;
clock-frequency = <>;
clock-output-names = "xti";
#clock-cells = <>;
};
};
這個還是比較關鍵的,s3c2416並沒有這個節點,如果這個沒有配置的話,會導致很多問題,如後面的在bootconsole被disable後,由於時鐘問題,串口輸出會出問題,此外,也會導致很多內核除0異常。
clock控制器配置
這個也非常關鍵,在某個模塊在get_clk的時候就會用到,此外,在某個節點的屬性中配置了clocks和clock-names屬性的時候也會用到它,如果配置有問題,也會出現很多問題。
對應的設備樹配置(s3c2440.dtsi)如下:
clocks: clock-controller@4c000000 {
compatible = "samsung,s3c2440-clock";
reg = <0x4c000000 0x20>;
#clock-cells = <>;
};
關於clock這部分可以參考內核文檔:Documentation/devicetree/bindings/clock/samsung,s3c2410-clock.txt
串口引用clocks節點(s3c2440-tq2440-dt.dts):
serial@ {
status = "okay";
clock-names = "uart";
clocks = <&clocks PCLK_UART0>;
pinctrl-names = "default";
pinctrl- = <&uart0_data>;
};
其中PCLK_UART0參考arch/arm/boot/dts/include/dt-bindings/clock/s3c2410.h或者這個clock控制器驅動的實現
watchdog配置(s3c2440.dtsi)
這個是在使用時發現執行reboot命令後,系統沒有啓動復位重啓,而是提示進入halt狀態,原因是watchdog的硬件信息不完整而且其status默認是disabled狀態。
watchdog: watchdog@ {
interrupts = < >;
clocks = <&clocks PCLK>;
clock-names = "watchdog";
};
從S3C2440的芯片手冊上面看,看門狗的clock直接接到PCLK上面了,並沒有加什麼開關,所以這裏clocks傳PCLK參數。
然後將watchdog使能的配置最好放到s3c2440-tq2440-dt.dts中,這樣很符合邏輯。
&uart0 {
status = "okay";
};
標號uart0是在s3c24xx.dtsi中,有了標號,在引用一個節點的時候會很方面。
RTC配置(s3c2440.dtsi)
默認這個模塊也是disabled的,需要在s3c2440-tq2440-dt.dts將其使能,同時在s3c2440.dtsi中爲其配置一下時鐘。
DM9000配置
先看設備樹配置:
srom-cs4@ {
compatible = "simple-bus";
#address-cells = <>;
#size-cells = <>;
reg = <0x20000000 0x8000000>;
ranges;
ethernet@ {
compatible = "davicom,dm9000";
reg = <0x20000000 0x2 0x20000004 0x2>;
interrupt-parent = <&gpf>;
interrupts = < IRQ_TYPE_EDGE_RISING>;
local-mac-address = [ de ad be ef];
davicom,no-eeprom;
};
};
DM9000接到了CS4上面,其地址範圍是:0x20000000 --> 0x28000000
看一下底板原理圖:
這裏關注幾點:
1. EINT7中斷: DM9000會臉道s3c2440的外部中斷7上,配置見第11和12行
2. LADDR2:接到了DM9000的CMD上,這個是用於區分發送給DM9000的數據是地址還是數據,低電平是地址,高電平是數據。LADDR2是第2根地址線(從0算起),所以addr和data的區分就在地址第2位上,所以addr是0x2000_0000,而data是0x2000_0004
3. nLAN_CS2:接到nGCS4上面,同時也接到DM9000的片選信號上面,當s3c2440發出0x2000_0000--->0x2800_0000範圍地址時,該引腳會被拉低,DM9000被選擇
4. reg屬性中的0x2的意思是DM9000工作在16bit模式,具體請參考DM9000的驅動:drivers/net/ethernet/davicom/dm9000.c
此外,在Linux-4.9下的dm9000驅動在tq2440上面並不能很好的工作,丟包嚴重,針對這部分,還是參照以前的修改辦法。
五、根文件系統
目前由於還沒有添加NandFlash的硬件信息,所以目前採用的是ramdisk形式的內存文件系統。
直接使用tq2440_ramdisk.tar.gz就可以了,使用ramdisk後,kernel裏也必須有相應的配置,剛開始就是由於kernel配置不當,導致根文件系統無法正常掛載。
關於這部分可以參考:http://blog.csdn.net/ctthuangcheng/article/details/8555529,這裏把關鍵的地方列出來:
make menuconfig ARCH=arm
- 打开配置菜单,修改两个配置项,分别是:
a):General setup-->选择 Initial RAM filesystem and RAM disk...... 项
b):Device Drivers-->Block devices-->选择 RAM block device support 项
c):并检查Optimize for size是否被选中,如果没有则选中,此项优化内核大小,根据需要进行配置。
d):device
driver->block device里的一个选项,Default Ramdisk 设置ramdisk的大小.16384
Note:修改Default RAM disk size kbytes选项为(8192)Default RAM disk size kbytes,
之所以修改是因为我們制作的ramdisk是8192KB大小的。如果这个大小和你做的ramdisk不匹配,则启动时仍然会出现kernel panic内核恐慌,提示ramdisk格式不正确,挂载不上ramdisk。
- 进入File
systems菜单,选上<*> Second extended fs support
ramdisk是一种内存虚拟磁盘技术,实质上并不是一种文件系统,它使用的文件系统是ext2文件系统。
这样就为内核添加好了ramdisk启动功能和ramdisk的驱动支持了。
然後在chosen的bootargs中配置添加ramdisk相關的字段:
bootargs = "root=/dev/ram0 rw rootfstype=ext2 console=ttySAC0,115200n8 init=/linuxrc ignore_loglevel earlyprintk"
結尾
後續會慢慢把tq2440板子上的其他設備也bring up起來,對次感興趣的小夥伴也可以自己嘗試一下,盡享設備樹帶來的樂趣吧!!
最後附上啓動log:
U-Boot 2015.04-g5095150 (Dec - ::)
CPUID:
FCLK: MHz
HCLK: MHz
PCLK: MHz
I2C: ready
DRAM: MiB
WARNING: Caches not enabled
Flash: Bytes
NAND: MiB
In: serial
Out: serial
Err: serial
Net: dm9000
Hit any key to stop autoboot:
TQ2440 # print
baudrate=
bootcmd=run cmd
bootdelay=
cmd=tftp 0x30008000 uImage; tftp 0x31000000 ramdisk.img; tftp 0x33000000 dtb; bootm 0x30008000 0x31000000 0x33000000
cmd2=root=/dev/nfs rw nfsroot=192.168.2.8:/nfsroot/rootfs init=/linuxrc console=ttySAC0,115200n8 ip=192.168.2.6
cmd3=noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,115200n8 earlyprintk
cmd4=nand read 0x30008000 0x200000 0x400000;bootm 0x30008000;
cmd5=tftp 0x30008000 uImage; tftp 0x32000000 dtb; bootm 0x30008000 - 0x32000000
ethact=dm9000
ethaddr=:0c::2a:5c:a5
fileaddr=
filesize=fc6
ipaddr=192.168.2.8
netmask=255.255.255.0
serverip=192.168.2.6
Environment size: / bytes
TQ2440 # boot
dm9000 i/o: 0x20000000, id: 0x90000a46
DM9000: running in bit mode
MAC: :0c::2a:5c:a5
could not establish link
Using dm9000 device
TFTP from server 192.168.2.6; our IP address is 192.168.2.8
Filename 'uImage'.
Load address: 0x30008000
Loading: #################################################################
#################################################################
#################################################################
##########################
1.4 MiB/s
done
Bytes transferred = (316af8 hex)
dm9000 i/o: 0x20000000, id: 0x90000a46
DM9000: running in bit mode
MAC: :0c::2a:5c:a5
could not establish link
Using dm9000 device
TFTP from server 192.168.2.6; our IP address is 192.168.2.8
Filename 'ramdisk.img'.
Load address: 0x31000000
Loading: #################################################################
#################################################################
######################################
1.4 MiB/s
done
Bytes transferred = (259e3c hex)
dm9000 i/o: 0x20000000, id: 0x90000a46
DM9000: running in bit mode
MAC: :0c::2a:5c:a5
could not establish link
Using dm9000 device
TFTP from server 192.168.2.6; our IP address is 192.168.2.8
Filename 'dtb'.
Load address: 0x33000000
Loading: #
962.9 KiB/s
done
Bytes transferred = (f68 hex)
## Booting kernel from Legacy Image at ...
Image Name: Linux-4.9.+
Created: -- :: UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: Bytes = 3.1 MiB
Load Address:
Entry Point:
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at ...
Image Name: ramdisk
Created: -- :: UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: Bytes = 2.4 MiB
Load Address:
Entry Point:
Verifying Checksum ... OK
## Flattened Device Tree blob at
Booting using the fdt blob at 0x33000000
Loading Kernel Image ... OK
Loading Ramdisk to , end 33aa9dfc ... OK
Loading Device Tree to 3384c000, end 3384ff67 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.+ (pengdonglin@pengdonglin-dell) (gcc version 4.8. (prerelease) (Sourcery CodeBench Lite 2014.05-) ) # Sat Dec :: CST
[ 0.000000] CPU: ARM920T [] revision (ARMv4T), cr=c000717f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt:Machine model: TQ2440
[ 0.000000] debug: ignoring loglevel setting.
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU S3C2440A (id 0x32440001)
[ 0.000000] On node totalpages:
[ 0.000000] free_area_init_node: node , pgdat c0618928, node_mem_map c3f7a000
[ 0.000000] Normal zone: pages used for memmap
[ 0.000000] Normal zone: pages reserved
[ 0.000000] Normal zone: pages, LIFO batch:
[ 0.000000] DT missing boot CPU MPIDR[:], fall back to default cpu_logical_map
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=*
[ 0.000000] pcpu-alloc: []
[ 0.000000] Built zonelists in Zone order, mobility grouping on. Total pages:
[ 0.000000] Kernel command line: root=/dev/ram0 rw rootfstype=ext2 console=ttySAC0,115200n8 init=/linuxrc ignore_loglevel earlyprintk
[ 0.000000] PID hash table entries: (order: -, bytes)
[ 0.000000] Dentry cache hash table entries: (order: , bytes)
[ 0.000000] Inode-cache hash table entries: (order: , bytes)
[ 0.000000] Memory: 55968K/65536K available (4573K kernel code, 210K rwdata, 1108K rodata, 192K init, 259K bss, 9568K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 ( kB)
[ 0.000000] vmalloc : 0xc4800000 - 0xff800000 ( MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( MB)
[ 0.000000] .text : 0xc0008000 - 0xc047f990 ( kB)
[ 0.000000] .init : 0xc05bc000 - 0xc05ec000 ( kB)
[ 0.000000] .data : 0xc05ec000 - 0xc06209d8 ( kB)
[ 0.000000] .bss : 0xc06209d8 - 0xc06619a8 ( kB)
[ 0.000000] SLUB: HWalign=, Order=-, MinObjects=, CPUs=, Nodes=
[ 0.000000] NR_IRQS:
[ 0.000000] irq: clearing pending status
[ 0.000000] irq: clearing pending status
[ 0.000000] _get_rate: could not find clock xti
[ 0.000129] sched_clock: bits at 1000kHz, resolution 1000ns, wraps every 32767500ns
[ 0.008042] clocksource: samsung_clocksource_timer: mask: 0xffff max_cycles: 0xffff, max_idle_ns: ns
[ 0.019075] Console: colour dummy device 80x30
[ 0.023815] Calibrating delay loop... 199.47 BogoMIPS (lpj=)
[ 0.067559] pid_max: default: minimum:
[ 0.072895] Mount-cache hash table entries: (order: , bytes)
[ 0.079743] Mountpoint-cache hash table entries: (order: , bytes)
[ 0.090398] CPU: Testing write buffer coherency: ok
[ 0.097459] Setting up static identity map for 0x30008200 - 0x30008258
[ 0.127589] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: ns
[ 0.138119] pinctrl core: initialized pinctrl subsystem
[ 0.146746] NET: Registered protocol family
[ 0.154580] DMA: preallocated KiB pool for atomic coherent allocations
[ 0.185425] cpuidle: using governor ladder
[ 0.190320] S3C Power Management, Copyright Simtec Electronics
[ 0.196746] No ATAGs?[ 0.198745] S3C2440: Initialising architecture
[ 0.437862] usbcore: registered new interface driver usbfs
[ 0.444333] usbcore: registered new interface driver hub
[ 0.450408] usbcore: registered new device driver usb
[ 0.458996] Advanced Linux Sound Architecture Driver Initialized.
[ 0.493161] clocksource: Switched to clocksource samsung_clocksource_timer
[ 0.567114] NET: Registered protocol family
[ 0.576074] TCP established hash table entries: (order: , bytes)
[ 0.583350] TCP bind hash table entries: (order: , bytes)
[ 0.589831] TCP: Hash tables configured (established bind )
[ 0.596823] UDP hash table entries: (order: , bytes)
[ 0.602928] UDP-Lite hash table entries: (order: , bytes)
[ 0.610683] NET: Registered protocol family
[ 0.693880] RPC: Registered named UNIX socket transport module.
[ 0.700159] RPC: Registered udp transport module.
[ 0.704816] RPC: Registered tcp transport module.
[ 0.709791] RPC: Registered tcp NFSv4. backchannel transport module.
[ 0.718625] Trying to unpack rootfs image as initramfs...
[ 0.731241] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.840512] Freeing initrd memory: 2408K (c3850000 - c3aaa000)
[ 0.852741] futex hash table entries: (order: -, bytes)
[ 0.867903] workingset: timestamp_bits= max_order= bucket_order=
[ 1.008016] NFS: Registering the id_resolver key type
[ 1.013569] Key type id_resolver registered
[ 1.017959] Key type id_legacy registered
[ 1.022229] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.029376] jffs2: version 2.2. (NAND) © - Red Hat, Inc.
[ 1.044788] romfs: ROMFS MTD (C) Red Hat, Inc.
[ 1.071030] io scheduler noop registered
[ 1.075219] io scheduler deadline registered
[ 1.081221] io scheduler cfq registered (default)
[ 1.300355] .serial: ttySAC0 at MMIO 0x50000000 (irq = , base_baud = ) is a S3C2440
[ 1.309382] console [ttySAC0] enabled
[ 1.309382] console [ttySAC0] enabled
[ 1.316901] bootconsole [earlycon0] disabled
[ 1.316901] bootconsole [earlycon0] disabled
[ 1.340212] random: fast init done
[ 1.716981] brd: module loaded
[ 1.725986] eth0: dm9000e at c4930000,c4932004 IRQ MAC: ::de:ad:be:ef (platform data)
[ 1.729245] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.735383] ohci-s3c2410: OHCI S3C2410 driver
[ 1.742082] mousedev: PS/ mouse device common for all mice
[ 1.747121] s3c-rtc .rtc: rtc disabled, re-enabling
[ 1.751306] rtc rtc0: alarm rollover not handled
[ 1.754867] rtc rtc0: invalid alarm value: -- ::
[ 1.761576] s3c-rtc .rtc: rtc core: registered s3c as rtc0
[ 1.767510] i2c /dev entries driver
[ 1.773729] s3c2410-wdt .watchdog: watchdog inactive, reset disabled, irq disabled
[ 1.780689] sdhci: Secure Digital Host Controller Interface driver
[ 1.784136] sdhci: Copyright(c) Pierre Ossman
[ 1.790752] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.801870] usbcore: registered new interface driver usbhid
[ 1.802003] usbhid: USB HID core driver
[ 1.810764] NET: Registered protocol family
[ 1.811441] Key type dns_resolver registered
[ 1.881679] s3c-rtc .rtc: setting system clock to -- :: UTC ()
[ 1.885538] ALSA device list:
[ 1.887578] No soundcards found.
[ 1.894813] RAMDISK: gzip image found at block
[ 3.637668] VFS: Mounted root (ext2 filesystem) on device :.
[ 3.639332] Freeing unused kernel memory: 192K (c05bc000 - c05ec000)
[ 3.644519] This architecture does not have kernel memory protection.
[ 6.050107] dm9000 .ethernet eth0: link down
Please press Enter to activate this console.
[root@TQ2440 ]#
[root@TQ2440 ]#
[root@TQ2440 ]# [ 8.175096] dm9000 .ethernet eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[root@TQ2440 ]#
[root@TQ2440 ]# ping 192.168.2.6
PING 192.168.2.6 (192.168.2.6): data bytes
bytes from 192.168.2.6: seq= ttl= time=1.888 ms
bytes from 192.168.2.6: seq= ttl= time=1.086 ms
bytes from 192.168.2.6: seq= ttl= time=1.088 ms
^C
--- 192.168.2.6 ping statistics ---
packets transmitted, packets received, % packet loss
round-trip min/avg/max = 1.086/1.354/1.888 ms
[root@TQ2440 ]#
完。