下载内核源码
下载内核有两种方法,一种是用git直接下载内核代码树,方便后面的内核开发。另一种是直接到内核社区下载稳定版本(详见:https://www.kernel.org/pub/linux/kernel/v4.x/)。下面演示从Linux kernel主线下载代码进行编译。
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git复制代码
安装arm的交叉编译工具链
因为交叉编译容易出现兼容性问题,所以最好使用稳定的版本,这里使用4.8版本:
编译Linux内核
生成vexpress开发板子的config文件:
make CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm vexpress_defconfig复制代码
编译:
make CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm
生成的内核镱像位于arch/arm/boot/zImage, 后续qemu启动时需要使用该镜像。
下载和安装qemu模拟器
wget http://wiki.qemu-project.org/download/qemu-2.5.0.tar.bz2复制代码
配置qemu,支持模拟arm架构下的所有单板:
./configure --target-list=arm-softmmu --audio-drv-list=复制代码
编译和安装:
makemake install复制代码
测试qemu和内核启动
qemu已经安装好,内核也编译成功之后,到这里最好是测试一下 运行命令很简单:
qemu-system-arm -M vexpress-a9 -m 512M -kernel ./arch/arm/boot/zImage -dtb ./arch/arm/boot/dts/vexpress-v2p-ca9.dtb -nographic -append "console=ttyAMA0"复制代码
这里简单介绍下qemu命令的参数:
-
-M vexpress-a9 模拟vexpress-a9单板,你可以使用-M ?参数来获取该qemu版本支持的所有单板
-
-m 512M 单板运行物理内存512M
-
-kernel ./arch/arm/boot/zImage 告诉qemu单板运行内核镜像路径
-
-nographic 不使用图形化界面,只使用串口
-
-append "console=ttyAMA0" 内核启动参数,这里告诉内核vexpress单板运行,串口设备是那个tty。
执行测试命令qemu-system-arm -M vexpress-a9 -m 512M -kernel ./arch/arm/boot/zImage -dtb ./arch/arm/boot/dts/vexpress-v2p-ca9.dtb -nographic -append "console=ttyAMA0"
, 则启动内核,打印出内核启动信息,如下:
pulseaudio: set_sink_input_volume() failedpulseaudio: Reason: Invalid argumentpulseaudio: set_sink_input_mute() failedpulseaudio: Reason: Invalid argumentBooting Linux on physical CPU 0x0Linux version 4.16.2 (hades@hades) (gcc version 4.8.4 (GCC)) #3 SMP Wed May 16 10:49:42 CST 2018CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387dCPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cacheOF: fdt: Machine model: V2P-CA9Memory policy: Data cache writebackCPU: All CPU(s) started in SVC mode.random: get_random_bytes called from start_kernel+0x88/0x3ec with crng_init=0percpu: Embedded 16 pages/cpu @(ptrval) s36288 r8192 d21056 u65536Built 1 zonelists, mobility grouping on. Total pages: 130048Kernel command line: console=ttyAMA0log_buf_len individual max cpu contribution: 4096 byteslog_buf_len total cpu_extra contributions: 12288 byteslog_buf_len min size: 16384 byteslog_buf_len: 32768 bytesearly log buf free: 15056(91%)Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)Memory: 509624K/524288K available (6144K kernel code, 390K rwdata, 1372K rodata, 1024K init, 164K bss, 14664K reserved, 0K cma-reserved)Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xa0800000 - 0xff800000 (1520 MB) lowmem : 0x80000000 - 0xa0000000 ( 512 MB) modules : 0x7f000000 - 0x80000000 ( 16 MB) .text : 0x(ptrval) - 0x(ptrval) (7136 kB) .init : 0x(ptrval) - 0x(ptrval) (1024 kB) .data : 0x(ptrval) - 0x(ptrval) ( 391 kB) .bss : 0x(ptrval) - 0x(ptrval) ( 165 kB)SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1Hierarchical RCU implementation. RCU event tracing is enabled. RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16GIC 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 -> 0x02420000L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000L2C-310 enabling early BRESP for Cortex-A9L2C-310 full line of zeros enabled for Cortex-A9L2C-310 dynamic clock gating disabled, standby mode disabledL2C-310 cache controller enabled, 8 ways, 128 kBL2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46420001smp_twd: clock not found -2sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971nsclocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 nsFailed to initialize '/smb@4000000/motherboard/iofpga@7,00000000/timer@12000': -22Console: colour dummy device 80x30Calibrating local timer... 99.42MHz.Calibrating delay loop... 743.83 BogoMIPS (lpj=3719168)pid_max: default: 32768 minimum: 301Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)CPU: Testing write buffer coherency: okCPU0: thread -1, cpu 0, socket 0, mpidr 80000000Setting up static identity map for 0x60100000 - 0x60100060Hierarchical SRCU implementation.smp: Bringing up secondary CPUs ...smp: Brought up 1 node, 1 CPUSMP: Total of 1 processors activated (743.83 BogoMIPS).CPU: All CPU(s) started in SVC mode.devtmpfs: initializedVFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 nsfutex hash table entries: 1024 (order: 4, 65536 bytes)random: fast init doneNET: Registered protocol family 16DMA: preallocated 256 KiB pool for atomic coherent allocationscpuidle: using governor ladderhw-breakpoint: debug architecture 0x4 unsupported.Serial: AMBA PL011 UART driverOF: amba_device_add() failed (-19) for /memory-controller@100e0000OF: amba_device_add() failed (-19) for /memory-controller@100e1000OF: amba_device_add() failed (-19) for /watchdog@100e5000irq: type mismatch, failed to map hwirq-75 for interrupt-controller@1e001000!10009000.uart: ttyAMA0 at MMIO 0x10009000 (irq = 38, base_baud = 0) is a PL011 rev1console [ttyAMA0] enabled1000a000.uart: ttyAMA1 at MMIO 0x1000a000 (irq = 39, base_baud = 0) is a PL011 rev11000b000.uart: ttyAMA2 at MMIO 0x1000b000 (irq = 40, base_baud = 0) is a PL011 rev11000c000.uart: ttyAMA3 at MMIO 0x1000c000 (irq = 41, base_baud = 0) is a PL011 rev1OF: amba_device_add() failed (-19) for /smb@4000000/motherboard/iofpga@7,00000000/wdt@f000SCSI subsystem initializedusbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbAdvanced Linux Sound Architecture Driver Initialized.clocksource: Switched to clocksource arm,sp804NET: Registered protocol family 2tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)TCP established hash table entries: 4096 (order: 2, 16384 bytes)TCP bind hash table entries: 4096 (order: 3, 32768 bytes)TCP: Hash tables configured (established 4096 bind 4096)UDP hash table entries: 256 (order: 1, 8192 bytes)UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)NET: Registered protocol family 1RPC: Registered named UNIX socket transport module.RPC: Registered udp transport module.RPC: Registered tcp transport module.RPC: Registered tcp NFSv4.1 backchannel transport module.hw perfevents: enabled with armv7_cortex_a9 PMU driver, 1 counters availableworkingset: timestamp_bits=30 max_order=17 bucket_order=0squashfs: version 4.0 (2009/01/31) Phillip Lougherjffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.9p: Installing v9fs 9p2000 file system supportio scheduler noop registered (default)io scheduler mq-deadline registeredio scheduler kyber registeredclcd-pl11x 10020000.clcd: PL111 designer 41 rev2 at 0x10020000clcd-pl11x 10020000.clcd: clcd@10020000 hardware, 1024x768@59 displayConsole: switching to colour frame buffer device 128x48clcd-pl11x 1001f000.clcd: PL111 designer 41 rev2 at 0x1001f000clcd-pl11x 1001f000.clcd: clcd@1f000 hardware, 640x480@59 display40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000Intel/Sharp Extended Query Table at 0x0031Using buffer write method40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000Intel/Sharp Extended Query Table at 0x0031Using buffer write methodConcatenating MTD devices:(0): "40000000.flash"(1): "40000000.flash"into device "40000000.flash"libphy: Fixed MDIO Bus: probedlibphy: smsc911x-mdio: probedsmsc911x 4e000000.ethernet eth0: MAC Address: 52:54:00:12:34:56isp1760 4f000000.usb: bus width: 32, oc: digitalisp1760 4f000000.usb: NXP ISP1760 USB Host Controllerisp1760 4f000000.usb: new USB bus registered, assigned bus number 1isp1760 4f000000.usb: Scratch test failed.isp1760 4f000000.usb: can't setup: -19isp1760 4f000000.usb: USB bus 1 deregisteredusbcore: registered new interface driver usb-storagertc-pl031 10017000.rtc: rtc core: registered pl031 as rtc0mmci-pl18x 10005000.mmci: Got CD GPIOmmci-pl18x 10005000.mmci: Got WP GPIOmmci-pl18x 10005000.mmci: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 34,35 (pio)ledtrig-cpu: registered to indicate activity on CPUsusbcore: registered new interface driver usbhidusbhid: USB HID core driveraaci-pl041 10004000.aaci: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 33aaci-pl041 10004000.aaci: FIFO 512 entriesoprofile: using arm/armv7-ca9NET: Registered protocol family 179pnet: Installing 9P2000 supportRegistering SWP/SWPB emulation handlerinput: AT Raw Set 2 keyboard as /devices/platform/smb@4000000/smb@4000000:motherboard/smb@4000000:motherboard:iofpga@7,00000000/10006000.kmi/serio0/input/input0rtc-pl031 10017000.rtc: setting system clock to 2018-05-16 02:57:41 UTC (1526439461)ALSA device list: #0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 33input: ImExPS/2 Generic Explorer Mouse as /devices/platform/smb@4000000/smb@4000000:motherboard/smb@4000000:motherboard:iofpga@7,00000000/10007000.kmi/serio1/input/input2VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6Please append a correct "root=" boot option; here are the available partitions:1f00 131072 mtdblock0 (driver?)1f01 32768 mtdblock1 (driver?)Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.16.2 #3Hardware name: ARM-Versatile Express[<8010f820>] (unwind_backtrace) from [<8010c0f8>] (show_stack+0x10/0x14)[<8010c0f8>] (show_stack) from [<8065ee0c>] (dump_stack+0x90/0xa4)[<8065ee0c>] (dump_stack) from [<8011ebc4>] (panic+0xf0/0x264)[<8011ebc4>] (panic) from [<8090128c>] (mount_block_root+0x1e4/0x2c8)[<8090128c>] (mount_block_root) from [<80901490>] (mount_root+0x120/0x128)[<80901490>] (mount_root) from [<809015f0>] (prepare_namespace+0x158/0x1a0)[<809015f0>] (prepare_namespace) from [<80900f04>] (kernel_init_freeable+0x254/0x264)[<80900f04>] (kernel_init_freeable) from [<80672a14>] (kernel_init+0x8/0x118)[<80672a14>] (kernel_init) from [<801010e8>] (ret_from_fork+0x14/0x2c)Exception stack(0x9f48ffb0 to 0x9f48fff8)ffa0: 00000000 00000000 00000000 00000000ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000ffe0: 00000000 00000000 00000000 00000000 00000013 00000000---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)复制代码
最后kernel panic 没有根文件系统!
下载、编译和安装busybox
wget http://www.busybox.net/downloads/busybox-1.28.3.tar.bz2cd busybox-1.28.3make defconfig ARCH=armmake CROSS_COMPILE=arm-linux- ARCH=armmake install CROSS_COMPILE=arm-linux- ARCH=arm复制代码
安装完成后,会在busybox目录下生成_install目录,该目录下的程序就是单板运行所需要的命令。 编译时出现如下错误:
查找没有MTD_FILE_MODE_RAW
定义,可找到枚举定义:
/* * Read/write file modes for access to MTD */ enum mtd_file_modes { MTD_MODE_NORMAL = MTD_OTP_OFF, MTD_MODE_OTP_FACTORY = MTD_OTP_FACTORY, MTD_MODE_OTP_USER = MTD_OTP_USER, MTD_MODE_RAW, };复制代码
修改busybox nandwrite.c:147 ,将 MTD_FILE_MODE_RAW
替换成‘MTD_MODE_RAW
制作根文件系统目录结构
先在Ubuntu主机环境下,形成目录结构,里面存放的文件和目录与单板上运行所需要的目录结构完全一样,然后再打包成镜像,这个临时的目录结构称为根目录
创建rootfs目录(根目录),根文件系统内的文件全部放到这里
mkdir -p rootfs/{dev,etc/init.d,lib}复制代码
拷贝busybox命令到根目录下
sudo cp busybox-1.28.3/_install/* -r rootfs/ 复制代码
从交叉编译工具链中拷贝运行库到lib目录下
sudo cp -P /usr/local/arm_linux_4.8/lib/* rootfs/lib/ 复制代码
创建4个tty端终设备
sudo mknod rootfs/dev/tty1 c 4 1sudo mknod rootfs/dev/tty2 c 4 2sudo mknod rootfs/dev/tty3 c 4 3sudo mknod rootfs/dev/tty4 c 4 4复制代码
制作根文件系统镜像
生成32M大小的镜像
dd if=/dev/zero of=a9rootfs.ext4 bs=1M count=32复制代码
格式化成ext4文件系统
mkfs.ext4 a9rootfs.ext4
将文件拷贝到镜像中
sudo mkdir tmpfssudo mount -t ext4 a9rootfs.ext4 tmpfs/ -o loopsudo cp -r rootfs/* tmpfs/sudo umount tmpfs复制代码
系统启动运行
完成上述所有步骤之后,就可以启动qemu来模拟vexpress开发板了,命令参数如下:
qemu-system-arm -M vexpress-a9 -m 512M -kernel ./linux-4.16.2/arch/arm/boot/zImage -dtb ./linux-4.16.2/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -nographic -append "root=/dev/mmcblk0" console=ttyAMA0" -sd a9rootfs.ext4复制代码
内核启动打印出启动信息,到命令行提示符出现,则模拟成功
WARNING: Image format was not specified for 'a9rootfs.ext4' 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() failedpulseaudio: Reason: Invalid argumentpulseaudio: set_sink_input_mute() failedpulseaudio: Reason: Invalid argumentBooting Linux on physical CPU 0x0Linux version 4.16.2 (hades@hades) (gcc version 4.8.4 (GCC)) #3 SMP Wed May 16 10:49:42 CST 2018CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387dCPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cacheOF: fdt: Machine model: V2P-CA9Memory policy: Data cache writebackCPU: All CPU(s) started in SVC mode.random: get_random_bytes called from start_kernel+0x88/0x3ec with crng_init=0percpu: Embedded 16 pages/cpu @(ptrval) s36288 r8192 d21056 u65536Built 1 zonelists, mobility grouping on. Total pages: 130048Kernel command line: root=/dev/mmcblk0 console=ttyAMA0log_buf_len individual max cpu contribution: 4096 byteslog_buf_len total cpu_extra contributions: 12288 byteslog_buf_len min size: 16384 byteslog_buf_len: 32768 bytesearly log buf free: 15036(91%)Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)Memory: 509624K/524288K available (6144K kernel code, 390K rwdata, 1372K rodata, 1024K init, 164K bss, 14664K reserved, 0K cma-reserved)Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xa0800000 - 0xff800000 (1520 MB) lowmem : 0x80000000 - 0xa0000000 ( 512 MB) modules : 0x7f000000 - 0x80000000 ( 16 MB) .text : 0x(ptrval) - 0x(ptrval) (7136 kB) .init : 0x(ptrval) - 0x(ptrval) (1024 kB) .data : 0x(ptrval) - 0x(ptrval) ( 391 kB) .bss : 0x(ptrval) - 0x(ptrval) ( 165 kB)SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1Hierarchical RCU implementation. RCU event tracing is enabled. RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16GIC 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 -> 0x02420000L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000L2C-310 enabling early BRESP for Cortex-A9L2C-310 full line of zeros enabled for Cortex-A9L2C-310 dynamic clock gating disabled, standby mode disabledL2C-310 cache controller enabled, 8 ways, 128 kBL2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46420001smp_twd: clock not found -2sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971nsclocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 nsFailed to initialize '/smb@4000000/motherboard/iofpga@7,00000000/timer@12000': -22Console: colour dummy device 80x30Calibrating local timer... 97.82MHz.Calibrating delay loop... 755.30 BogoMIPS (lpj=3776512)pid_max: default: 32768 minimum: 301Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)CPU: Testing write buffer coherency: okCPU0: thread -1, cpu 0, socket 0, mpidr 80000000Setting up static identity map for 0x60100000 - 0x60100060Hierarchical SRCU implementation.smp: Bringing up secondary CPUs ...smp: Brought up 1 node, 1 CPUSMP: Total of 1 processors activated (755.30 BogoMIPS).CPU: All CPU(s) started in SVC mode.devtmpfs: initializedVFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 nsfutex hash table entries: 1024 (order: 4, 65536 bytes)random: fast init doneNET: Registered protocol family 16DMA: preallocated 256 KiB pool for atomic coherent allocationscpuidle: using governor ladderhw-breakpoint: debug architecture 0x4 unsupported.Serial: AMBA PL011 UART driverOF: amba_device_add() failed (-19) for /memory-controller@100e0000OF: amba_device_add() failed (-19) for /memory-controller@100e1000OF: amba_device_add() failed (-19) for /watchdog@100e5000irq: type mismatch, failed to map hwirq-75 for interrupt-controller@1e001000!10009000.uart: ttyAMA0 at MMIO 0x10009000 (irq = 38, base_baud = 0) is a PL011 rev1console [ttyAMA0] enabled1000a000.uart: ttyAMA1 at MMIO 0x1000a000 (irq = 39, base_baud = 0) is a PL011 rev11000b000.uart: ttyAMA2 at MMIO 0x1000b000 (irq = 40, base_baud = 0) is a PL011 rev11000c000.uart: ttyAMA3 at MMIO 0x1000c000 (irq = 41, base_baud = 0) is a PL011 rev1OF: amba_device_add() failed (-19) for /smb@4000000/motherboard/iofpga@7,00000000/wdt@f000SCSI subsystem initializedusbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbAdvanced Linux Sound Architecture Driver Initialized.clocksource: Switched to clocksource arm,sp804NET: Registered protocol family 2tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)TCP established hash table entries: 4096 (order: 2, 16384 bytes)TCP bind hash table entries: 4096 (order: 3, 32768 bytes)TCP: Hash tables configured (established 4096 bind 4096)UDP hash table entries: 256 (order: 1, 8192 bytes)UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)NET: Registered protocol family 1RPC: Registered named UNIX socket transport module.RPC: Registered udp transport module.RPC: Registered tcp transport module.RPC: Registered tcp NFSv4.1 backchannel transport module.hw perfevents: enabled with armv7_cortex_a9 PMU driver, 1 counters availableworkingset: timestamp_bits=30 max_order=17 bucket_order=0squashfs: version 4.0 (2009/01/31) Phillip Lougherjffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.9p: Installing v9fs 9p2000 file system supportio scheduler noop registered (default)io scheduler mq-deadline registeredio scheduler kyber registeredclcd-pl11x 10020000.clcd: PL111 designer 41 rev2 at 0x10020000clcd-pl11x 10020000.clcd: clcd@10020000 hardware, 1024x768@59 displayConsole: switching to colour frame buffer device 128x48clcd-pl11x 1001f000.clcd: PL111 designer 41 rev2 at 0x1001f000clcd-pl11x 1001f000.clcd: clcd@1f000 hardware, 640x480@59 display40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000Intel/Sharp Extended Query Table at 0x0031Using buffer write method40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000Intel/Sharp Extended Query Table at 0x0031Using buffer write methodConcatenating MTD devices:(0): "40000000.flash"(1): "40000000.flash"into device "40000000.flash"libphy: Fixed MDIO Bus: probedlibphy: smsc911x-mdio: probedsmsc911x 4e000000.ethernet eth0: MAC Address: 52:54:00:12:34:56isp1760 4f000000.usb: bus width: 32, oc: digitalisp1760 4f000000.usb: NXP ISP1760 USB Host Controllerisp1760 4f000000.usb: new USB bus registered, assigned bus number 1isp1760 4f000000.usb: Scratch test failed.isp1760 4f000000.usb: can't setup: -19isp1760 4f000000.usb: USB bus 1 deregisteredusbcore: registered new interface driver usb-storagertc-pl031 10017000.rtc: rtc core: registered pl031 as rtc0mmci-pl18x 10005000.mmci: Got CD GPIOmmci-pl18x 10005000.mmci: Got WP GPIOmmci-pl18x 10005000.mmci: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 34,35 (pio)ledtrig-cpu: registered to indicate activity on CPUsusbcore: registered new interface driver usbhidusbhid: USB HID core driveraaci-pl041 10004000.aaci: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 33aaci-pl041 10004000.aaci: FIFO 512 entriesoprofile: using arm/armv7-ca9NET: Registered protocol family 179pnet: Installing 9P2000 supportRegistering SWP/SWPB emulation handlerinput: AT Raw Set 2 keyboard as /devices/platform/smb@4000000/smb@4000000:motherboard/smb@4000000:motherboard:iofpga@7,00000000/10006000.kmi/serio0/input/input0mmc0: new SD card at address 4567mmcblk0: mmc0:4567 QEMU! 32.0 MiB rtc-pl031 10017000.rtc: setting system clock to 2018-05-16 04:16:58 UTC (1526444218)ALSA device list: #0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 33input: ImExPS/2 Generic Explorer Mouse as /devices/platform/smb@4000000/smb@4000000:motherboard/smb@4000000:motherboard:iofpga@7,00000000/10007000.kmi/serio1/input/input2EXT4-fs (mmcblk0): couldn't mount as ext3 due to feature incompatibilitiesEXT4-fs (mmcblk0): mounted filesystem with ordered data mode. Opts: (null)VFS: Mounted root (ext4 filesystem) readonly on device 179:0.Freeing unused kernel memory: 1024Krandom: crng init donecan't run '/etc/init.d/rcS': No such file or directoryPlease press Enter to activate this console. / # lsbin etc linuxrc sbindev lib lost+found usr/ # 复制代码