在家学习嵌入式2--在qemu环境下使用uboot启动linux

前言

新冠疫情期间在家里无事可做,奈何手上没有现成的开发板,又想调试学习linux内核,于是就有了这一系列的文章。本系列文章包含以下内容:


在前面的文章中,我们简单的编译一个kernel,然后使用qemu-system-arm -kernel指定启动一个特定的linux kernel,在虚拟开发板上可以这么做。但是在实际的开发板中,启动是一个很复杂的东西。在启动kernel之前,通常有个小的引导程序(本文使用u-boot),引导程序需要事先存储在某些存储介质上,比如SD、eMMC、Flash、USB。当启动的时候,会有RomCode去初始化某些关键外设并且拷贝引导程序到DDR上。现在某些SOC支持ATF和TEE的功能,启动会变得更加的复杂。本文不讨论启动流程,本文只介绍在qemu环境下使用uboot通过sd卡去启动linux


下载编译启动uboot

1
2
3
git clone https://github.com/u-boot/u-boot.git -b v2017.01
make CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm vexpress_ca9x4_defconfig
make CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm -j8

编译完毕之后,在当前目录下会生成u-boot文件,这个文件可以使用以下命令启动:

1
qemu-system-arm -M vexpress-a9 -m 512M -kernel /home/victor/work/uboot/u-boot/u-boot -nographic -no-reboot

启动后,可以看到u-boot已经正常运行,但是由于找不到kernel,所以无法启动kernel,因此停留在u-boot命令行模式下。后续我们将基于这个版本修改uboot从sd卡启动linux kernel。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
victor@victor-linux:~$ qemu-system-arm -M vexpress-a9 -m 512M -kernel ~/work/uboot/u-boot/u-boot -nographic -no-reboot
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument


U-Boot 2017.01 (Feb 10 2020 - 11:46:10 +0800)

DRAM: 512 MiB
WARNING: Caches not enabled
Flash: 128 MiB
MMC: MMC: 0
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: smc911x-0
Hit any key to stop autoboot: 0
MMC Device 1 not found
no mmc device at slot 1
Card did not respond to voltage select!
smc911x: MAC 52:54:00:12:34:56
smc911x: detected LAN9118 controller
smc911x: phy initialized
smc911x: MAC 52:54:00:12:34:56
BOOTP broadcast 1
DHCP client bound to address 10.0.2.15 (3 ms)
*** Warning: no boot file name; using '0A00020F.img'
Using smc911x-0 device
TFTP from server 10.0.2.2; our IP address is 10.0.2.15
Filename '0A00020F.img'.
Load address: 0x80008000
Loading: *
TFTP error: 'Access violation' (2)
Not retrying...
smc911x: MAC 52:54:00:12:34:56
smc911x: MAC 52:54:00:12:34:56
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-52-54-00-12-34-56
smc911x: MAC 52:54:00:12:34:56
smc911x: detected LAN9118 controller
smc911x: phy initialized
smc911x: MAC 52:54:00:12:34:56
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=>


制作sd卡

从uboot启动的log来看,好像是通过TFTP去load kernel但是找不到,因此就停留在uboot命令行模式。qemu支持模拟sd卡,因此,我们可以制作一个sd卡,然后将kernel、rootfs、dtb文件放到sd卡,在uboot中将sd卡中的文件load到DDR,并从DDR去启动,以下命令可以用于制作vfat文件系统的sd卡,大小为512M。

制作sd卡
1
2
dd if=/dev/zero of=/home/victor/work/sd_card bs=1M count=512
sudo fdisk /home/victor/work/sd_card

为该sd卡创建分区,按onw,创建完分区之后,然后使用sudo mkfs.vfat sd_card命令创建vfat文件系统。至此创建sd卡成功,查看该文件格式为:

sd_card格式
1
2
victor@victor-linux:~/work$ file sd_card
sd_card: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "mkfs.fat", sectors/cluster 16, root entries 512, Media descriptor 0xf8, sectors/FAT 256, sectors/track 32, heads 64, sectors 1048576 (volumes > 32 MB) , serial number 0xd9022643, unlabeled, FAT (16 bit)

这部分的内容可以参考:ubuntu下格式化U盘


制作uramdisk.img

在之前的文章中,我们通过busybox制作了带ext4文件系统的a9rootfs.ext4文件,这个文件uboot是无法引导的,因此需要重新制作一个gzipcpio压缩的uramdisk.img文件供uboot引导使用。
之前在制作a9rootfs.ext4的时候,我们创建过一个rootfs/目录用来存放根文件系统,现在可以使用这个系统制作ramdisk.img文件。

生成ramdisk.img
1
2
cd /home/victor/work/linux/rootfs/
find . |cpio -ov -H newc |gzip > ../ramdisk.img

但是这还不够,经过测试,如果使用ramdisk.img,那么使用bootz命令去启动的时候,会提示Wrong Ramdisk Image Format的错误,很明显是ramdisk.img格式不对。必须给ramdisk.img加上64字节的头部信息使之成为uramdisk.img文件,才能通过bootz命令去启动。这一步完成之后,我们可以得到uramdisk.img

生成uramdisk.img命令
1
2
3
4
5
6
7
victor@victor-linux:~/work/linux$ mkimage -A arm -O linux -C none -T ramdisk -a 0x00000000 -e 0x00000000 -n "wowothink Root Filesystem" -d /home/victor/work/linux/ramdisk.img /home/victor/work/linux/uramdisk.img
Image Name: wowothink Root Filesystem
Created: Tue Feb 11 20:01:01 2020
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 5052411 Bytes = 4934.00 kB = 4.82 MB
Load Address: 00000000
Entry Point: 00000000

关于这部分的内容可以参考:解压打包img文件


拷贝文件到sd卡

连同之前编译linux kernel得到的zImagevexpress-v2p-ca9.dtb,我们有3个文件需要拷贝到sd卡里面。将linux kernel的镜像zImage,rootfs的镜像uramdisk.img,dtb vexpress-v2p-ca9.dtb拷贝到sd卡里面。

1
2
3
4
5
6
mkdir /home/victor/work/card/
sudo mount -t vfat /home/victor/work/sd_card card/
sudo cp -rf /home/victor/work/linux/linux/arch/arm/boot/zImage /home/victor/work/card/
sudo cp -rf /home/victor/work/linux/linux/arch/arm/boot/dts/vexpress-v2p-ca9.dtb /home/victor/work/card/
sudo cp -rf /home/victor/work/linux/uramdisk.img /home/victor/work/card/
sudo umount card/


修改uboot从sd卡启动

在uboot v2017.01的版本上打入以下patch,以下patch主要修改的内容为:

  • 设置启动delay为0s;
  • 删除从TFTP启动的命令distro_bootcmd
  • 设置zImage、dtb、ramdisk的文件名字以及启动地址;
  • 设置bootargsrdinit=/sbin/init console=${console},这里的bootargs就是传递给kernel的cmdline。注意:由于我们制作的uramdisk.img是根据busybox制作的,它的init程序默认在sbin/目录下,因此必须用rdinit=来指定,不能使用init=来指定。cmdline的rdinit=init=的定义如下:

    The kernel's command-line parameters
    1
    2
    3
    4
    5
    6
    7
    8
    9
    init=   [KNL]
    Format: <full_path>
    Run specified binary instead of /sbin/init as init
    process.

    rdinit= [KNL]
    Format: <full_path>
    Run specified binary instead of /init from the ramdisk,
    used for early userspace startup. See initrd.
  • 使用fatload命令将镜像文件从sd卡拷贝到DDR上指定地址;

  • 使用bootz启动。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig
index d783e66..1205294 100644
--- a/configs/vexpress_ca9x4_defconfig
+++ b/configs/vexpress_ca9x4_defconfig
@@ -18,3 +18,4 @@ CONFIG_CMD_MMC=y
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
CONFIG_OF_LIBFDT=y
+CONFIG_BOOTDELAY=0
diff --git a/include/configs/vexpress_common.h b/include/configs/vexpress_common.h
index 0bc4ea5..2892dfb 100644
--- a/include/configs/vexpress_common.h
+++ b/include/configs/vexpress_common.h
@@ -186,8 +186,7 @@
/* Basic environment settings */
#define CONFIG_BOOTCOMMAND \
- "run distro_bootcmd; " \
- "run bootflash; "
+ "run bootsd; "
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
@@ -205,7 +204,16 @@
"maxramdisk=0x1800000\0" \
"pxefile_addr_r=0x88000000\0" \
"scriptaddr=0x88000000\0" \
- "kernel_addr_r=0x80008000\0"
+ "kernel_addr_r=0x80008000\0" \
+ "kernel_name=zImage\0" \
+ "ramdisk_name=uramdisk.img\0" \
+ "dtb_name=vexpress-v2p-ca9.dtb\0" \
+ "kernel_wowo_addr=0x60000000\0" \
+ "ramdisk_wowo_addr=0x70000000\0" \
+ "dtb_wowo_addr=0x61000000\0" \
+ "load_kernel=fatload mmc 0:0 ${kernel_wowo_addr} ${kernel_name}\0 " \
+ "load_ramdisk=fatload mmc 0:0 ${ramdisk_wowo_addr} ${ramdisk_name}\0 " \
+ "load_dtb=fatload mmc 0:0 ${dtb_wowo_addr} ${dtb_name}\0 "
#elif defined(CONFIG_VEXPRESS_EXTENDED_MEMORY_MAP)
#define CONFIG_PLATFORM_ENV_SETTINGS \
"loadaddr=0xa0008000\0" \
@@ -216,21 +224,36 @@
"pxefile_addr_r=0xa8000000\0" \
"scriptaddr=0xa8000000\0" \
"kernel_addr_r=0xa0008000\0"
+ "kernel_name=zImage\0" \
+ "ramdisk_name=uramdisk.img\0" \
+ "dtb_name=vexpress-v2p-ca9.dtb\0" \
+ "kernel_wowo_addr=0x60000000\0" \
+ "ramdisk_wowo_addr=0x70000000\0" \
+ "dtb_wowo_addr=0x61000000\0" \
+ "load_kernel=fatload mmc 0:0 ${kernel_wowo_addr} ${kernel_name}\0 " \
+ "load_ramdisk=fatload mmc 0:0 ${ramdisk_wowo_addr} ${ramdisk_name}\0 " \
+ "load_dtb=fatload mmc 0:0 ${dtb_wowo_addr} ${dtb_name}\0 "
#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_PLATFORM_ENV_SETTINGS \
BOOTENV \
"console=ttyAMA0,38400n8\0" \
"dram=1024M\0" \
- "root=/dev/sda1 rw\0" \
+ "root=/dev/mmcblk0 rw\0" \
"mtd=armflash:1M@0x800000(uboot),7M@0x1000000(kernel)," \
"24M@0x2000000(initrd)\0" \
"flashargs=setenv bootargs root=${root} console=${console} " \
"mem=${dram} mtdparts=${mtd} mmci.fmax=190000 " \
"devtmpfs.mount=0 vmalloc=256M\0" \
+ "sdargs=setenv bootargs rdinit=/sbin/init console=${console}\0" \
"bootflash=run flashargs; " \
"cp ${ramdisk_addr} ${ramdisk_addr_r} ${maxramdisk}; " \
- "bootm ${kernel_addr} ${ramdisk_addr_r}\0"
+ "bootm ${kernel_addr} ${ramdisk_addr_r}\0" \
+ "bootsd=run sdargs; " \
+ "run load_kernel; " \
+ "run load_ramdisk; " \
+ "run load_dtb; " \
+ "bootz ${kernel_wowo_addr} ${ramdisk_wowo_addr} ${dtb_wowo_addr}\0"
/* FLASH and environment organization */
#define PHYS_FLASH_SIZE 0x04000000 /* 64MB */

启动带sd卡的qemu

qemu命令加上-sd的参数后,让该开发板支持sd卡,并且我们之前在uboot中指定从sd卡拷贝镜像到DDR中,并且启动kernel,可以进入串口。至此,在qemu环境下使用uboot通过sd卡去启动linux已经完成,我们可以通过这个过程学习uboot引导启动linux kernel的相关流程。

qemu加上-sd参数
1
2
3
4
qemu-system-arm -M vexpress-a9 -m 1024M -kernel /home/victor/work/uboot/u-boot/u-boot -nographic -no-reboot -sd /home/victor/work/sd_card

或者使用以下命令启动带图形界面
qemu-system-arm -M vexpress-a9 -m 1024M -kernel /home/victor/work/uboot/u-boot/u-boot -no-reboot -sd /home/victor/work/sd_card -serial stdio

启动log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
victor@victor-linux:~$ qemu-system-arm -M vexpress-a9 -m 1024M -kernel /home/victor/work/uboot/u-boot/u-boot -nographic -no-reboot -sd /home/victor/work/sd_card
WARNING: Image format was not specified for '/home/victor/work/sd_card111' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument


U-Boot 2017.01-00001-g1d9426d-dirty (Feb 13 2020 - 14:24:21 +0800)

DRAM: 1 GiB
WARNING: Caches not enabled
Flash: 128 MiB
MMC: MMC: 0
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: smc911x-0
Hit any key to stop autoboot: 0
reading zImage
3453144 bytes read in 585 ms (5.6 MiB/s)
reading uramdisk.img
5052472 bytes read in 957 ms (5 MiB/s)
reading vexpress-v2p-ca9.dtb
14360 bytes read in 17 ms (824.2 KiB/s)
Kernel image @ 0x60000000 [ 0x000000 - 0x34b0d8 ]
## Loading init Ramdisk from Legacy Image at 70000000 ...
Image Name: xxx Root Filesystem
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 5052408 Bytes = 4.8 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 61000000
Booting using the fdt blob at 0x61000000
Loading Ramdisk to 7fa09000, end 7feda7f8 ... OK
Loading Device Tree to 7fa02000, end 7fa08817 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Linux version 4.4.0+ (victor@victor-linux) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) ) #8 SMP Thu Feb 13 11:08:51 CST 2020
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine model: V2P-CA9
Looking for initrd properties...
initrd_start=0x7fa09000 initrd_end=0x7feda7f8
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
PERCPU: Embedded 12 pages/cpu @bf7bb000 s18188 r8192 d22772 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: rdinit=/sbin/init console=ttyAMA0,38400n8
log_buf_len individual max cpu contribution: 4096 bytes
log_buf_len total cpu_extra contributions: 12288 bytes
log_buf_len min size: 16384 bytes
log_buf_len: 32768 bytes
early log buf free: 14816(90%)
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1027484K/1048576K available (4848K kernel code, 155K rwdata, 1388K rodata, 280K init, 152K bss, 21092K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc0800000 - 0xff800000 (1008 MB)
lowmem : 0x80000000 - 0xc0000000 (1024 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x80008000 - 0x8061f620 (6238 kB)
.init : 0x80620000 - 0x80666000 ( 280 kB)
.data : 0x80666000 - 0x8068cfa0 ( 156 kB)
.bss : 0x8068f000 - 0x806b53b8 ( 153 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=4
NR_IRQS:16 nr_irqs:16 16
GIC CPU mask not found - kernel will fail to boot.
GIC CPU mask not found - kernel will fail to boot.
L2C: platform modifies aux control register: 0x02020000 -> 0x02420000
L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 dynamic clock gating disabled, standby mode disabled
L2C-310 cache controller enabled, 8 ways, 128 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46420001
smp_twd: clock not found -2
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
Console: colour dummy device 80x30
Calibrating local timer... 96.66MHz.
Calibrating delay loop... 778.24 BogoMIPS (lpj=3891200)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x60008280 - 0x600082d8
Brought up 1 CPUs
SMP: Total of 1 processors activated (778.24 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
of_amba_device_create(): amba_device_add() failed (-19) for /memory-controller@100e0000
of_amba_device_create(): amba_device_add() failed (-19) for /memory-controller@100e1000
of_amba_device_create(): amba_device_add() failed (-19) for /watchdog@100e5000
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@7,00000000/sysctl@01000
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@7,00000000/wdt@0f000
hw-breakpoint: debug architecture 0x4 unsupported.
Serial: AMBA PL011 UART driver
10009000.uart: ttyAMA0 at MMIO 0x10009000 (irq = 35, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
1000a000.uart: ttyAMA1 at MMIO 0x1000a000 (irq = 36, base_baud = 0) is a PL011 rev1
1000b000.uart: ttyAMA2 at MMIO 0x1000b000 (irq = 37, base_baud = 0) is a PL011 rev1
1000c000.uart: ttyAMA3 at MMIO 0x1000c000 (irq = 38, base_baud = 0) is a PL011 rev1
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm,sp804
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
[xxx] populate_rootfs start 11111
[xxx] populate_rootfs start 2222
[xxx] initrd_start = 0x-1616867328
Unpacking initramfs...
Freeing initrd memory: 4936K (9fa09000 - 9fedb000)
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 1 counters available
futex hash table entries: 1024 (order: 4, 65536 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
9p: Installing v9fs 9p2000 file system support
io scheduler noop registered (default)
clcd-pl11x 10020000.clcd: PL111 rev2 at 0x10020000
clcd-pl11x 10020000.clcd: /clcd@10020000 hardware, 1024x768@59 display
Console: switching to colour frame buffer device 128x48
clcd-pl11x 1001f000.clcd: PL111 rev2 at 0x1001f000
clcd-pl11x 1001f000.clcd: /smb/motherboard/iofpga@7,00000000/clcd@1f000 hardware, 640x480@59 display
40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
Concatenating MTD devices:
(0): "40000000.flash"
(1): "40000000.flash"
into device "40000000.flash"
libphy: smsc911x-mdio: probed
smsc911x 4e000000.ethernet eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4e000000.etherne:01, irq=-1)
smsc911x 4e000000.ethernet eth0: MAC Address: 52:54:00:12:34:56
isp1760 4f000000.usb: bus width: 32, oc: digital
isp1760 4f000000.usb: NXP ISP1760 USB Host Controller
isp1760 4f000000.usb: new USB bus registered, assigned bus number 1
isp1760 4f000000.usb: Scratch test failed.
isp1760 4f000000.usb: can't setup: -19
isp1760 4f000000.usb: USB bus 1 deregistered
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
rtc-pl031 10017000.rtc: rtc core: registered pl031 as rtc0
mmci-pl18x 10005000.mmci: Got CD GPIO
mmci-pl18x 10005000.mmci: Got WP GPIO
mmci-pl18x 10005000.mmci: No vqmmc regulator found
mmci-pl18x 10005000.mmci: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 31,32 (pio)
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
input: AT Raw Set 2 keyboard as /devices/platform/smb/smb:motherboard/smb:motherboard:iofpga@7,00000000/10006000.kmi/serio0/input/input0
mmc0: new SD card at address 4567
mmcblk0: mmc0:4567 QEMU! 512 MiB
mmcblk0:
aaci-pl041 10004000.aaci: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 30
aaci-pl041 10004000.aaci: FIFO 512 entries
oprofile: using arm/armv7-ca9
NET: Registered protocol family 17
9pnet: Installing 9P2000 support
Registering SWP/SWPB emulation handler
rtc-pl031 10017000.rtc: setting system clock to 2020-02-13 06:25:06 UTC (1581575106)
ALSA device list:
#0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 30
[xxx] ramdisk_exc_cmd = /sbin/init
Freeing unused kernel memory: 280K (80620000 - 80666000)
mount: mounting configfs on /config failed: No such device

Please press Enter to activate this console. input: ImExPS/2 Generic Explorer Mouse as /devices/platform/smb/smb:motherboard/smb:motherboard:iofpga@7,00000000/10007000.kmi/serio1/input/input2

/ #
/ #
/ #

参考资料

Title:在家学习嵌入式2--在qemu环境下使用uboot启动linux

Author:Victor Huang

Time:2020-03-27 / 18:03

Link:http://wowothink.com/1b0d21a9/

License: Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)