文章目录
- 一、U-Boot适配Ethernet
- 1.配置menuconfig
- 2.修改dts
- 3. 编译
- 4. 烧写
- 5.测试
- 二、Kernel适配Ethernet
- 1. 配置menuconfig
- 2. 修改dts
- 3.编译
- 4. 测试eth0
- 三、通过tftp下载zImage和dts,通过nfs挂载文件系统
- 1. 设置bootcmd
- 2. 设置bootargs
- 四、挂载效果
- 参考文档
一、U-Boot适配Ethernet
我使用的uboot是2017的
U-Boot 2017已经支持了sun8i-emac的驱动,只需要在编译时选上并且修改dts就行。
1.配置menuconfig
进入u-boot源码目录:
make menuconfig
Device Drivers ---->
[* ]Network device suppoty ------>
[*] Allwinner Sun8i Ethernet MAC support
2.修改dts
sun8i-v3s-licheepi-zero.dts
这里说明一下:下面的是git的对比功能,+就是表示比原来增加的部分,也就是我们需要编写的部分。(可以根据+前面和后面的部分准确的定位)
diff --git a/arch/arm/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/dts/sun8i-v3s-licheepi-zero.dts
index 3d9168c..b8b9fc3 100644
--- a/arch/arm/dts/sun8i-v3s-licheepi-zero.dts
+++ b/arch/arm/dts/sun8i-v3s-licheepi-zero.dts
@@ -49,6 +49,7 @@
compatible = "licheepi,licheepi-zero", "allwinner,sun8i-v3s";
aliases {
+ ethernet0 = &emac;
serial0 = &uart0;
};
@@ -81,3 +82,14 @@
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
+
+&emac {
+ phy = <&phy0>;
+ phy-mode = "mii";
+ allwinner,use-internal-phy;
+ allwinner,leds-active-low;
+ status = "okay";
+ phy0: ethernet-phy@0 {
+ reg = <1>;
+ };
+};
sun8i-v3s.dtsi:
diff --git a/arch/arm/dts/sun8i-v3s.dtsi b/arch/arm/dts/sun8i-v3s.dtsi
index ebefc0f..cb81dd5 100644
--- a/arch/arm/dts/sun8i-v3s.dtsi
+++ b/arch/arm/dts/sun8i-v3s.dtsi
@@ -96,6 +96,11 @@
#size-cells = <1>;
ranges;
+ syscon: syscon@01c00000 {
+ compatible = "allwinner,sun8i-h3-syscon","syscon";
+ reg = <0x01c00000 0x34>;
+ };
+
mmc0: mmc@01c0f000 {
compatible = "allwinner,sun7i-a20-mmc";
reg = <0x01c0f000 0x1000>;
@@ -208,6 +213,17 @@
interrupt-controller;
#interrupt-cells = <3>;
+ emac_rgmii_pins: emac0@0 {
+ allwinner,pins = "PD0", "PD1", "PD2", "PD3",
+ "PD4", "PD5", "PD7",
+ "PD8", "PD9", "PD10",
+ "PD12", "PD13", "PD15",
+ "PD16", "PD17";
+ allwinner,function = "emac";
+ allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
uart0_pins_a: uart0@0 {
pins = "PB8", "PB9";
function = "uart0";
@@ -270,6 +286,20 @@
status = "disabled";
};
+ emac: ethernet@1c30000 {
+ compatible = "allwinner,sun8i-h3-emac";
+ reg = <0x01c30000 0x104>, <0x01c00030 0x4>;
+ reg-names = "emac", "syscon";
+ interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&ccu RST_BUS_EMAC>, <&ccu RST_BUS_EPHY>;
+ reset-names = "ahb", "ephy";
+ clocks = <&ccu CLK_BUS_EMAC>, <&ccu CLK_BUS_EPHY>;
+ clock-names = "ahb", "ephy";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
gic: interrupt-controller@01c81000 {
compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
reg = <0x01c81000 0x1000>,
3. 编译
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
4. 烧写
sudo dd if=/dev/zero of=/dev/sdb bs=512K count=1
5.测试
启动打印信息
有上面红框的部分说明配置成功。
ping网络
在ping网络之前我们需要先设置ipaddr(这个功能只需要这一个)
我这里索性一下子全部配置
setenv ipaddr 192.168.1.50
setenv gatewayip 192.168.1.1
setenv netmask 255.255.255.0
setenv serverip 192.168.1.4
saveenv
然后
ping 192.168.1.4 这个ip地址是ubuntu的ip地址
出现上面的说明网络正常
出现上面这样就是出错了。
说明:我搞这个网络快两天了,一直卡在这个地方。 我的情况是有时候能ping通,大部分时间ping不通,但是我加载了内核,内核的网络是正常的,(就因为这个原因,我耽误了两天,网络都翻遍了,也问了别人,也烧写了别人的uboot,都没有解决。就在刚刚,我换了一条比较短的网线,竟然ok了,我真是无语了。这肯定不是我的网线不行吧,我的网线在原子的开发板是可以用的,并且一直在用,我暂时还不知道原因,就是换一个短的就可以了(切记,否则坑死人) )
二、Kernel适配Ethernet
我使用的kernel是5.2
1. 配置menuconfig
make ARCH=arm menuconfig
####配置以太网网络###
Device Drivers —>
[ * ] Network device support —>
[ * ] Ethernet driver support —>
[ * ] STMicroelectronics devices
< * > STMicroelectronics Multi-Gigabit Ethernet driver
[ ] Support for STMMAC Selftests
< * > STMMAC Platform bus support
< > Support for snps,dwc-qos-ethernet.txt DT binding.
< * > Generic driver for DWMAC
< * > Allwinner GMAC support
< * > Allwinner sun8i GMAC support
因为我们后面还需要通过nfs挂载文件系统,所以我们还需要继续配置
####配置NFS文件系统相关网络###
Networking support
Networking options
TCP/IP networking
IP: kernel level autoconfiguration
[ * ] IP: DHCP support
[ * ] IP: BOOTP support
####配置NFS文件系统###
File systems —>
Network File Systems —>
< * > NFS client support
[ * ] NFS client support for NFS version 3
[ * ] NFS client support for the NFSv3 ACL protocol extension
[ * ] NFS client support for NFS version 4 (EXPERIMENTAL)
[ * ] NFS client support for NFSv4.1 (DEVELOPER ONLY)
[ * ] Root file system on NFS
2. 修改dts
5.2版本的dock版本的设备树中已经添加了。
3.编译
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
得到zImage和sun8i-v3s-licheepi-zero-dock.dtb
4. 测试eth0
使用ifconfig查看
如果有eth0就不用配置了。
没有就执行下面的操作
启动网卡
ifconfig eth0 up
或者
ifup eth0
此时
设置IP地址:
这里可以自己手动设置:
ifconfig eth0 192.168.1.50
也可以自动配置
udhcpc
Ping测试
ping 192.168.1.4
如果能ping通,说明网络设置成功。
ping www.baidu.com
如果是手动配置ip地址会出现(自动获取的不需要,会自动配置)
之所以出现这个错误提示是因为 www.baidu.com 的地址解析失败了,并没有解析出其对应的 IP 地址。我们需要配置域名解析服务器的 IP 地址,一般域名解析地址可以设置为所处网络的网关地址,比如 192.168.1.1。也可以设置为 114.114.114.114,这个是运营商的域名解析服务器地址。
在 rootfs 中新建文件/etc/resolv.conf,然后在里面输入如下内容:
nameserver 114.114.114.114
nameserver 192.168.1.1
然后就可以了。
三、通过tftp下载zImage和dts,通过nfs挂载文件系统
在uboot下设置
1. 设置bootcmd
setenv bootcmd 'setenv bootm_boot_mode sec;setenv ipaddr 192.168.1.50;setenv serverip 192.168.1.4;tftp 41000000 zImage;tftp 41800000 sun8i-v3s-licheepi-zero-dock.dtb;bootz 0x41000000 - 0x41800000'
2. 设置bootargs
setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.4:/home/luatao/linux/nfs/rootfs ip=192.168.1.50:192.168.1.4:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttyS0,115200
然后保存
saveenv
四、挂载效果
一个启动的完整打印信息
U-Boot SPL 2017.01-rc2-00057-g32ab1804cd-dirty (Aug 29 2021 - 16:05:10)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2-00057-g32ab1804cd-dirty (Aug 29 2021 - 16:05:10 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
U-Boot 2017.01-rc2-00057-g32ab1804cd-dirty (Aug 29 2021 - 16:05:10 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
Using ethernet@1c30000 device
TFTP from server 192.168.1.4; our IP address is 192.168.1.50
Filename 'zImage'.
Load address: 0x41000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#############################################T ########
290 KiB/s
done
Bytes transferred = 4580824 (45e5d8 hex)
Using ethernet@1c30000 device
TFTP from server 192.168.1.4; our IP address is 192.168.1.50
Filename 'sun8i-v3s-licheepi-zero-dock.dtb'.
Load address: 0x41800000
Loading: #
210.9 KiB/s
done
Bytes transferred = 12100 (2f44 hex)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dfff43 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.2.0-licheepi-zero (luatao@luatao-virtual-machine) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02)) #2 SMP Mon Aug 30 16:37:57 CST 2021
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu s34508 r8192 d22836 u65536
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.4:/home/luatao/linux/nfs/rootfs ip=192.168.1.50:192.168.1.4:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttyS0,115200
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 54004K/65536K available (7168K kernel code, 308K rwdata, 1824K rodata, 1024K init, 265K bss, 11532K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x300/0x48c with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000021] Switching to timer-based delay loop, resolution 41ns
[ 0.000213] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000457] Console: colour dummy device 80x30
[ 0.000514] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000531] pid_max: default: 32768 minimum: 301
[ 0.000694] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000712] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001548] CPU: Testing write buffer coherency: ok
[ 0.002081] /cpus/cpu@0 missing clock-frequency property
[ 0.002107] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002880] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.003091] rcu: Hierarchical SRCU implementation.
[ 0.003629] smp: Bringing up secondary CPUs ...
[ 0.003650] smp: Brought up 1 node, 1 CPU
[ 0.003660] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.003667] CPU: All CPU(s) started in SVC mode.
[ 0.004720] devtmpfs: initialized
[ 0.008187] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.008520] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.008553] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.008801] pinctrl core: initialized pinctrl subsystem
[ 0.009857] NET: Registered protocol family 16
[ 0.010459] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.011748] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.011767] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.036874] SCSI subsystem initialized
[ 0.037168] usbcore: registered new interface driver usbfs
[ 0.037225] usbcore: registered new interface driver hub
[ 0.037330] usbcore: registered new device driver usb
[ 0.037543] mc: Linux media interface: v0.10
[ 0.037607] videodev: Linux video capture interface: v2.00
[ 0.037820] Advanced Linux Sound Architecture Driver Initialized.
[ 0.039142] clocksource: Switched to clocksource arch_sys_counter
[ 0.051715] NET: Registered protocol family 2
[ 0.052529] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.052573] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.052597] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.052622] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.052765] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.052820] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.053116] NET: Registered protocol family 1
[ 0.054047] RPC: Registered named UNIX socket transport module.
[ 0.054070] RPC: Registered udp transport module.
[ 0.054076] RPC: Registered tcp transport module.
[ 0.054082] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.055870] Initialise system trusted keyrings
[ 0.056324] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.064757] NFS: Registering the id_resolver key type
[ 0.064814] Key type id_resolver registered
[ 0.064823] Key type id_legacy registered
[ 0.064843] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.092992] Key type asymmetric registered
[ 0.093015] Asymmetric key parser 'x509' registered
[ 0.093118] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 0.093130] io scheduler mq-deadline registered
[ 0.093137] io scheduler kyber registered
[ 0.094093] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[ 0.097809] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.170415] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.172945] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[ 0.174116] printk: console [ttyS0] disabled
[ 0.194424] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[ 0.752801] printk: console [ttyS0] enabled
[ 0.782072] libphy: Fixed MDIO Bus: probed
[ 0.786760] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.792666] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.798863] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 58000)
[ 0.808350] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.815594] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.822823] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.827782] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.834573] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.840237] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.846135] libphy: stmmac: probed
[ 0.850326] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[ 0.856609] libphy: mdio_mux: probed
[ 0.860295] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[ 0.866650] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[ 0.873804] libphy: mdio_mux: probed
[ 0.877723] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.884366] ehci-platform: EHCI generic platform driver
[ 0.889917] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.895530] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.903526] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 0.939144] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.946363] hub 1-0:1.0: USB hub found
[ 0.950320] hub 1-0:1.0: 1 port detected
[ 0.954898] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.961242] ohci-platform: OHCI generic platform driver
[ 0.966784] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.973535] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.981507] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 1.054208] hub 2-0:1.0: USB hub found
[ 1.058073] hub 2-0:1.0: 1 port detected
[ 1.065412] usbcore: registered new interface driver usb-storage
[ 1.072717] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[ 1.082015] sun6i-rtc 1c20400.rtc: registered as rtc0
[ 1.087079] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.091797] i2c /dev entries driver
[ 1.096766] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[ 1.106606] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.115312] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 1.151822] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.159066] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[ 1.194117] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[ 1.202264] usbcore: registered new interface driver usbhid
[ 1.207842] usbhid: USB HID core driver
[ 1.213921] sun4i-codec 1c22c00.codec: ASoC: codec-analog@01c23000 not registered
[ 1.221561] sun4i-codec 1c22c00.codec: Failed to register our card
[ 1.228989] Initializing XFRM netlink socket
[ 1.233419] NET: Registered protocol family 17
[ 1.238462] Key type dns_resolver registered
[ 1.243043] Registering SWP/SWPB emulation handler
[ 1.249017] Loading compiled-in X.509 certificates
[ 1.260863] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.272348] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.278115] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.287703] hub 3-0:1.0: USB hub found
[ 1.291744] hub 3-0:1.0: 1 port detected
[ 1.298257] debugfs: Directory '1c22c00.codec' with parent 'V3s Audio Codec' already present!
[ 1.306935] sun4i-codec 1c22c00.codec: ASoC: Failed to create component debugfs directory: -17
[ 1.317007] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 1.324392] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.333858] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T01:22:52 UTC (4972)
[ 1.343124] mmc0: new high speed SDHC card at address b368
[ 1.350697] mmcblk0: mmc0:b368 SDU1 3.70 GiB
[ 1.356503] dwmac-sun8i 1c30000.ethernet eth0: PHY [0.1:01] driver [Generic PHY]
[ 1.365515] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[ 1.372897] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 1.380612] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[ 1.387143] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
[ 1.395901] mmcblk0: p1 p2
[ 4.489425] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 4.539137] IP-Config: Complete:
[ 4.542379] device=eth0, hwaddr=02:03:e7:8d:27:c3, ipaddr=192.168.1.50, mask=255.255.255.0, gw=192.168.1.1
[ 4.552497] host=192.168.1.50, domain=, nis-domain=(none)
[ 4.558325] bootserver=192.168.1.4, rootserver=192.168.1.4, rootpath=
[ 4.565555] vcc5v0: disabling
[ 4.568534] ALSA device list:
[ 4.571574] #0: V3s Audio Codec
[ 4.724718] VFS: Mounted root (nfs filesystem) on device 0:12.
[ 4.766609] devtmpfs: mounted
[ 4.770900] Freeing unused kernel memory: 1024K
[ 4.789287] Run /linuxrc as init process
[ 4.838525] random: fast init done
[ 18.409135] nfs: server 192.168.1.4 not responding, still trying
[ 18.420582] nfs: server 192.168.1.4 OK
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator... [ 19.369659] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: ip: RTNETLINK answers: File exists
FAIL
Welcome to Buildroot
buildroot login: root
# ls
# cd ..
# ls
bin lib media proc sbin usr
dev lib32 mnt root sys var
etc linuxrc opt run tmp
# ifconfig
eth0 Link encap:Ethernet HWaddr 02:03:E7:8D:27:C3
inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1858 errors:0 dropped:55 overruns:0 frame:0
TX packets:928 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1948492 (1.8 MiB) TX bytes:144084 (140.7 KiB)
Interrupt:38
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
# ping 192.168.1.4
PING 192.168.1.4 (192.168.1.4): 56 data bytes
64 bytes from 192.168.1.4: seq=0 ttl=64 time=2.101 ms
64 bytes from 192.168.1.4: seq=1 ttl=64 time=2.244 ms
^C
--- 192.168.1.4 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 2.101/2.172/2.244 ms
参考文档