1、source ./oe-init-build-env
2、MACHINE=qemu-zynq7 bitbake core-image-minimal
3、runqemu qemu-zynq7
runqemu - INFO - Assuming MACHINE = qemu-zynq7
runqemu - INFO - Running MACHINE=qemu-zynq7 bitbake -e...
runqemu - INFO - MACHINE: qemu-zynq7
runqemu - INFO - DEPLOY_DIR_IMAGE: /home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7
runqemu - INFO - Running ls -t /home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/*.qemuboot.conf...
runqemu - INFO - CONFFILE: /home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/core-image-minimal-qemu-zynq7-20180813072804.qemuboot.conf
runqemu - INFO - Continuing with the following parameters:
KERNEL: [/home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/uImage]
DTB: [/home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/qemu-zynq7.dtb]
MACHINE: [qemu-zynq7]
FSTYPE: [cpio]
ROOTFS: [/home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/core-image-minimal-qemu-zynq7-20180813072804.rootfs.cpio]
CONFFILE: [/home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/core-image-minimal-qemu-zynq7-20180813072804.qemuboot.conf]
runqemu - INFO - Running /sbin/ip link...
runqemu - INFO - Setting up tap interface under sudo
[sudo] jf-yt 的密码:
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap0.lock...
runqemu - INFO - Created tap: tap0
runqemu - INFO - Running ldd /home/jf-yt/poky/build/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-aarch64...
runqemu - INFO - Running /home/jf-yt/poky/build/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-aarch64 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -net nic,netdev=net0,macaddr=52:54:00:12:34:02 -machine xilinx-zynq-a9 -m 1024 -initrd /home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/core-image-minimal-qemu-zynq7-20180813072804.rootfs.cpio -nographic -serial null -serial mon:stdio -kernel /home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/uImage -append 'root=/dev/ram0 rw debugshell mem=1024M ip=192.168.7.2::192.168.7.1:255.255.255.0 console=ttyPS0,115200 earlyprintk ' -dtb /home/jf-yt/poky/build/tmp/deploy/images/qemu-zynq7/qemu-zynq7.dtb
Warning: nic cadence_gem.1 has no peer
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.6.0-xilinx-v2016.3 (jf-yt@jf-yt) (gcc version 6.4.0 (GCC) ) #1 SMP PREEMPT Mon Aug 13 15:34:22 CST 2018
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine model: Zynq A9 QEMU
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] percpu: Embedded 12 pages/cpu @ef7d4000 s19660 r8192 d21300 u49152
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260608
[ 0.000000] Kernel command line: root=/dev/ram0 rw debugshell mem=1024M ip=192.168.7.2::192.168.7.1:255.255.255.0 console=ttyPS0,115200 earlyprintk
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 1025792K/1048576K available (5266K kernel code, 232K rwdata, 1616K rodata, 1024K init, 216K bss, 22784K reserved, 0K cma-reserved, 262144K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc07b88ac (7875 kB)
[ 0.000000] .init : 0xc0800000 - 0xc0900000 (1024 kB)
[ 0.000000] .data : 0xc0900000 - 0xc093a140 ( 233 kB)
[ 0.000000] .bss : 0xc093a140 - 0xc0970464 ( 217 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] efuse mapped to f0800000
[ 0.000000] slcr mapped to f0802000
[ 0.000000] GIC CPU mask not found - kernel will fail to boot.
[ 0.000000] GIC CPU mask not found - kernel will fail to boot.
[ 0.000000] L2C: platform modifies aux control register: 0x00000000 -> 0x30400000
[ 0.000000] L2C: DT/platform modifies aux control register: 0x00000000 -> 0x30400000
[ 0.000000] L2C-310 errata 588369 769419 enabled
[ 0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[ 0.000000] L2C-310 cache controller enabled, 8 ways, 64 kB
[ 0.000000] L2C-310: CACHE_ID 0x00000000, AUX_CTRL 0x00000000
[ 0.000000] zynq_clock_init: clkc starts at f0802100
[ 0.000000] Zynq clock init
[ 0.000000] ps_clk frequency not specified, using 33 MHz.
[ 0.000243] sched_clock: 64 bits at 83MHz, resolution 12ns, wraps every 4398046511100ns
[ 0.000484] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x13381ebc09, max_idle_ns: 440795204118 ns
[ 0.001760] Switching to timer-based delay loop, resolution 12ns
[ 0.002611] clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 2150193541 ns
[ 0.003373] timer #0 at f080a000, irq=17
[ 0.008000] Console: colour dummy device 80x30
[ 0.008605] Calibrating delay loop (skipped), value calculated using timer frequency.. 166.66 BogoMIPS (lpj=833333)
[ 0.008788] pid_max: default: 32768 minimum: 301
[ 0.009992] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.010049] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.021664] CPU: Testing write buffer coherency: ok
[ 0.034317] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.036308] Setting up static identity map for 0x100000 - 0x100058
[ 0.128712] Brought up 1 CPUs
[ 0.129037] SMP: Total of 1 processors activated (166.66 BogoMIPS).
[ 0.129344] CPU: All CPU(s) started in SVC mode.
[ 0.179081] devtmpfs: initialized
[ 0.191220] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
[ 0.219665] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.227804] pinctrl core: initialized pinctrl subsystem
[ 0.251966] NET: Registered protocol family 16
[ 0.257041] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.325975] cpuidle: using governor menu
[ 0.372105] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.374420] zynq-ocm f800c000.ocmc: can't request region for resource [mem 0x0000000c-0x0003ffff]
[ 0.376316] zynq-ocm: probe of f800c000.ocmc failed with error -16
[ 0.378123] zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
[ 0.502448] SCSI subsystem initialized
[ 0.505979] usbcore: registered new interface driver usbfs
[ 0.506525] usbcore: registered new interface driver hub
[ 0.507367] usbcore: registered new device driver usb
[ 0.510776] pps_core: LinuxPPS API ver. 1 registered
[ 0.510816] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti
[ 0.511087] PTP clock support registered
[ 0.511645] EDAC MC: Ver: 3.0.0
[ 0.517575] FPGA manager framework
[ 0.539384] clocksource: Switched to clocksource arm_global_timer
[ 0.605159] NET: Registered protocol family 2
[ 0.611722] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.612002] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.612229] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.612816] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.612967] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.614295] NET: Registered protocol family 1
[ 0.633527] RPC: Registered named UNIX socket transport module.
[ 0.633674] RPC: Registered udp transport module.
[ 0.633733] RPC: Registered tcp transport module.
[ 0.633797] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.639285] Trying to unpack rootfs image as initramfs...
[ 1.035390] Freeing initrd memory: 4896K (c8000000 - c84c8000)
[ 1.037138] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 1 counters available
[ 1.044537] futex hash table entries: 512 (order: 3, 32768 bytes)
[ 1.045218] audit: initializing netlink subsys (disabled)
[ 1.045871] audit: type=2000 audit(1.029:1): initialized
[ 1.063051] workingset: timestamp_bits=28 max_order=18 bucket_order=0
[ 1.080798] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 1.091313] bounce: pool size: 64 pages
[ 1.091799] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 1.092043] io scheduler noop registered
[ 1.092153] io scheduler deadline registered
[ 1.092309] io scheduler cfq registered (default)
[ 1.102809] dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
[ 1.102894] dma-pl330 f8003000.dmac: DBUFF-256x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
[ 1.106462] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 1.115756] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 143, base_baud = 859788) is a xuartps
[ 1.135245] console [ttyPS0] enabled
[ 1.137731] xdevcfg f8007000.devcfg: ioremap 0xf8007000 to f08b8000
[ 1.211366] brd: module loaded
[ 1.322883] loop: module loaded
[ 1.429569] m25p80 spi32766.0: SPI transfer timed out
[ 1.430369] m25p80 spi32766.0: error -110 reading 9f
[ 1.430745] m25p80: probe of spi32766.0 failed with error -110
[ 1.465254] libphy: Fixed MDIO Bus: probed
[ 1.478068] CAN device driver interface
[ 1.481681] gpiod_set_value: invalid GPIO
[ 1.486308] libphy: MACB_mii_bus: probed
[ 1.661183] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (52:54:00:12:34:02)
[ 1.661981] Marvell 88E1111 e000b000.etherne:17: attached PHY driver [Marvell 88E1111] (mii_bus:phy_addr=e000b000.etherne:17, irq=-1)
[ 1.665269] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.665854] usbcore: registered new interface driver usb-storage
[ 1.676169] mousedev: PS/2 mouse device common for all mice
[ 1.691348] i2c /dev entries driver
[ 1.704869] EDAC MC: ECC not enabled
[ 1.706075] Xilinx Zynq CpuIdle Driver started
[ 1.708890] sdhci: Secure Digital Host Controller Interface driver
[ 1.709068] sdhci: Copyright(c) Pierre Ossman
[ 1.709607] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.761061] mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
[ 1.762538] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.763985] usbcore: registered new interface driver usbhid
[ 1.764140] usbhid: USB HID core driver
[ 1.778266] NET: Registered protocol family 10
[ 1.798495] sit: IPv6 over IPv4 tunneling driver
[ 1.802901] NET: Registered protocol family 17
[ 1.803178] can: controller area network core (rev 20120528 abi 9)
[ 1.803656] NET: Registered protocol family 29
[ 1.803847] can: raw protocol (rev 20120528)
[ 1.804064] can: broadcast manager protocol (rev 20120528 t)
[ 1.804270] can: netlink gateway (rev 20130117) max_hops=1
[ 1.805127] zynq_pm_remap_ocm: OCM pool is not available
[ 1.805289] zynq_pm_suspend_init: Unable to map OCM.
[ 1.805642] Registering SWP/SWPB emulation handler
[ 1.859984] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 3.660643] macb e000b000.ethernet eth0: link up (100/Full)
[ 3.661509] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 3.687084] IP-Config: Complete:
[ 3.687445] device=eth0, hwaddr=52:54:00:12:34:02, ipaddr=192.168.7.2, mask=255.255.255.0, gw=192.168.7.1
[ 3.687810] host=192.168.7.2, domain=, nis-domain=(none)
[ 3.687959] bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
[ 3.706066] Freeing unused kernel memory: 1024K (c0800000 - c0900000)
INIT: version 2.88 booting
Starting udev
[ 5.236288] udevd[652]: starting version 3.2
[ 5.246578] random: udevd urandom read with 0 bits of entropy available
[ 5.337870] udevd[653]: starting eudev-3.2
Populating dev cache
Mon Aug 13 07:35:12 UTC 2018
INIT: Entering runlevel: 5
Configuring network interfaces... done.
Starting syslogd/klogd: done
Poky (Yocto Project Reference Distro) 2.2.4 qemu-zynq7 /dev/ttyPS0
qemu-zynq7 login: root
root@qemu-zynq7:~# ls
root@qemu-zynq7:~# cd /
root@qemu-zynq7:/# ls
bin boot dev etc home init lib media mnt proc root run sbin sys tmp usr var
root@qemu-zynq7:/# aa
这就算启动起来了。