用qemu搭建aarch64学习环境
作者信息
作者: 彭东林
邮箱: pengdonglin137@163.com
QQ: 405728433
软件平台
主机: Ubuntu14.04 64位版本
模拟器:Qemu-2.8.0
Linux内核版本: Linux-4.10
Busybox版本:busybox-1.24.2
工具链: gcc-linaro-aarch64-linux-gnu-4.9-2014.07_linux
参考博文
用Qemu模拟vexpress-a9 --- 配置 qemu 的网络功能
用Qemu模拟vexpress-a9 (一) --- 搭建Linux kernel调试环境
用Qemu模拟vexpress-a9 (三)--- 实现用u-boot引导Linux内核
缘起
随着aarch64在手机和服务器上面的普及,我们越来越有必要学习一下aarch64的知识,但是目前市面上面还没有做的很好的aarch64的开发板,之前我买了一块NanoPC-T3,用的SoC是Samsung的6818,是cortex-a53 八核架构,但是商家给的资料全都是32位的(armv8兼容aarch32和aarch64),他们说Samsung没有给64位的BSP资料,所以只能等待Samsung来解决,这样的结果令我很失望,偶然看到网上有人用Qemu模拟器来搭建aarch64的运行环境,让我看到了曙光,所以从网上搜刮了一下资料,为后人铺路。
下面涉及到的软件包可以到这里下载。
具备的功能
模拟一个cortex-a53 双核或者单核的环境,同时可以跟Host通信,以便于共享一些文件,为了简单起见,根文件系统使用的是ramdisk格式。
正文
1、编译Qemu模拟器
首先到Qemu官网下载最新的模拟器,我下到的是Qemu-2.8.0,也可以下载其他版本
tar -xf qemu-2.8..tar.xz
cd qemu-2.8./
mkdir build
cd build/
# 需要安装这个软件包,因为我们使能了--enable-virtfs, 否则configure的时候会失败
sudo apt-get install libcap-dev
../configure --target-list=arm-softmmu,i386-softmmu,x86_64-softmmu,aarch64-linux-user,arm-linux-user,i386-linux-user,x86_64-linux-user,aarch64-softmmu --audio-drv-list=alsa --enable-virtfs
make -j8
sudo make install
然后就可以使用我们下面会用到的qemu-system-aarch64工具了。
2、下载工具链
登录这个网址:http://www.veryarm.com/aarch64-linux-gnu-gcc
其中有一些注意事项:
aarch64-linux-gnu-gcc是由 Linaro 公司基于GCC推出的的ARM交叉编译工具。可用于交叉编译ARMv8 64位目标中的裸机程序、u-boot、Linux kernel、filesystem和App应用程序。aarch64-linux-gnu-gcc交叉编译器必须安装在64为主机上,才能编译目标代码。
我们这里使用的是最新的Linux解压版:
3、下载编译最新的Linux内核
登录https://www.kernel.org/, 下载最新的Linux版本,目前最新的是Linux-4.10。
下面是编译下面要用的kernel的命令:
#!/bin/bash
cross_compile=/home/pengdonglin/src/qemu/aarch64/gcc-linaro-aarch64-linux-gnu-4.9-.07_linux/bin/aarch64-linux-gnu-
make CROSS_COMPILE=$cross_compile ARCH=arm64 O=./out_aarch64 defconfig
make CROSS_COMPILE=$cross_compile ARCH=arm64 O=./out_aarch64 menuconfig
make CROSS_COMPILE=$cross_compile ARCH=arm64 O=./out_aarch64 Image -j4
由于下面要用到ramdisk的启动方式,需要在kernel配置中支持:
General setup --->
----> [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support Device Drivers --->
[*] Block devices --->
<*> RAM block device support
() Default RAM disk size (kbytes)
这里我们给ramdisk设置的默认大小是64MB,不能比后面我们实际生成的ramdisk.img的size小。
此外,由于我们还需要支持NFS挂在以及通过9p的方式跟Host共享文件,这些也需要在kernel中进行相应的配置。(默认配置已经支持了)
关于Qemu的9p方式实现跟Host的目录共享可以参考 : qemu中使用9p,支持host和guest中共享目录
这样就有了我们下面要用到的内核镜像Image。
4、制作根文件系统
登录https://busybox.net/downloads/下载要用的busybox版本,这里我下的是busybox-1.24.2
要设置的不多:
执行make menuconfig,配置下面几项:
Build Options ---> [*] Build BusyBox as a static binary (no shared libs) (/home/pengdonglin/src/qemu/aarch64/gcc-linaro-aarch64-linux-gnu-4.9-.07_linux/bin/aarch64-linux-gnu-) Cross Compiler prefix
然后执行make && make install命令
下面制作启动用的ramdisk,我把这个过程写成了脚本,如下:
#!/bin/bash
sudo rm -rf rootfs
sudo rm -rf tmpfs
sudo rm -rf ramdisk*
sudo mkdir rootfs
sudo cp ../busybox-1.24./_install/* rootfs/ -raf
7 sudo mkdir -p rootfs/proc/
8 sudo mkdir -p rootfs/sys/
9 sudo mkdir -p rootfs/tmp/
10 sudo mkdir -p rootfs/root/
11 sudo mkdir -p rootfs/var/
12 sudo mkdir -p rootfs/mnt/
13 sudo cp etc rootfs/ -arf
14 sudo mkdir -p rootfs/lib
15 sudo cp -arf ../gcc-linaro-aarch64-linux-gnu-4.9-2014.07_linux/aarch64-linux-gnu/libc/lib/aarch64-linux-gnu/* rootfs/lib/
16 sudo rm rootfs/lib/*.a
17 sudo ../gcc-linaro-aarch64-linux-gnu-4.9-2014.07_linux/bin/aarch64-linux-gnu-strip rootfs/lib/*
18 sudo mkdir -p rootfs/dev/
19 sudo mknod rootfs/dev/tty1 c 4 1
20 sudo mknod rootfs/dev/tty2 c 4 2
21 sudo mknod rootfs/dev/tty3 c 4 3
22 sudo mknod rootfs/dev/tty4 c 4 4
23 sudo mknod rootfs/dev/console c 5 1
24 sudo mknod rootfs/dev/null c 1 3
25 sudo dd if=/dev/zero of=ramdisk bs=1M count=16
26 sudo mkfs.ext4 -F ramdisk
27 sudo mkdir -p tmpfs
28 sudo mount -t ext4 ramdisk ./tmpfs/ -o loop
29 sudo cp -raf rootfs/* tmpfs/
30 sudo umount tmpfs
31 sudo gzip --best -c ramdisk > ramdisk.gz
sudo mkimage -n "ramdisk" -A arm -O linux -T ramdisk -C gzip -d ramdisk.gz ramdisk.img
制作ramdisk用到的文件到这里下载。
5、Qemu支持网络
请参考博客:
用Qemu模拟vexpress-a9 --- 配置 qemu 的网络功能
用Qemu模拟vexpress-a9 (三)--- 实现用u-boot引导Linux内核
6、测试
共享目录的方法:
sudo qemu-system-aarch64 \
-M virt \
-cpu cortex-a53 \
-smp \
-m 4096M \
-kernel ./linux-4.10/out_aarch64/arch/arm64/boot/Image \
-nographic \
-append "root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc ignore_loglevel" \
-initrd ./rootfs/ramdisk.img \
-fsdev local,security_model=passthrough,id=fsdev0,path=/nfsroot \
-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare
支持网络的启动:
sudo qemu-system-aarch64 \
-M virt \
-cpu cortex-a53 \
-smp \
-m 4096M \
-kernel ./linux-4.10/out_aarch64/arch/arm64/boot/Image \
-nographic \
-append "root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc ignore_loglevel" \
-initrd ./rootfs/ramdisk.img \
-net nic,vlan= -net tap,vlan=,ifname=tap0
当然,也可以将上面的两种方是合在一起:
sudo qemu-system-aarch64 \
-M virt \
-cpu cortex-a53 \
-smp \
-m 4096M \
-kernel ./linux-4.10/out_aarch64/arch/arm64/boot/Image \
-nographic \
-append "root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc ignore_loglevel" \
-initrd ./rootfs/ramdisk.img \
-net nic,vlan= -net tap,vlan=,ifname=tap0 \
-fsdev local,security_model=passthrough,id=fsdev0,path=/nfsroot \
-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare
我们需要在Host上面先指定一个共享目录, 比如就用/nfsroot,如果用nfs挂载的话还需要在/etc/export中进行相应的配置。
nfs挂载:
mount -t nfs -o nolock 172.16.14.203:/nfsroot /mnt
9p挂载:
mount -t 9p -o trans=virtio,version=9p2000.L hostshare /mnt2
这样就实现了跟Host的文件共享, 推荐用9p的方式,这个更稳定一些。
下面是启动信息:
$./run_all.sh
sudo tunctl -u root -t tap0
TUNSETIFF: Device or resource busy
sudo ifconfig tap0 0.0.0.0 promisc up
sudo brctl addif br0 tap0
brctl show
bridge name bridge id STP enabled interfaces
br0 .2a30f59a82a1 no eth0
tap0
docker0 .02429cade970 no
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.10. (pengdonglin@pengdonglin-HP) (gcc version 4.9. (prerelease) (crosstool-NG linaro-1.13.-4.9-2014.07 - Linaro GCC 4.9-2014.06) ) # SMP PREEMPT Wed Feb :: CST
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] debug: ignoring loglevel setting.
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved MiB at 0x00000000ff000000
[ 0.000000] On node totalpages:
[ 0.000000] DMA zone: pages used for memmap
[ 0.000000] DMA zone: pages reserved
[ 0.000000] DMA zone: pages, LIFO batch:
[ 0.000000] Normal zone: pages used for memmap
[ 0.000000] Normal zone: pages, LIFO batch:
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0. detected in firmware.
[ 0.000000] psci: Using standard PSCI v0. function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded pages/cpu @ffff8000fffc0000 s48128 r8192 d29696 u86016
[ 0.000000] pcpu-alloc: s48128 r8192 d29696 u86016 alloc=*
[ 0.000000] pcpu-alloc: [] []
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum
[ 0.000000] Built zonelists in Zone order, mobility grouping on. Total pages:
[ 0.000000] Kernel command line: root=/dev/ram0 rw rootfstype=ext4 console=ttyAMA0 init=/linuxrc ignore_loglevel
[ 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] software IO TLB [mem 0xfafff000-0xfefff000] (64MB) mapped at [ffff8000bafff000-ffff8000beffefff]
[ 0.000000] Memory: 4022724K/4194304K available (8508K kernel code, 946K rwdata, 3852K rodata, 1024K init, 393K bss, 155196K reserved, 16384K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffff000000000000 - 0xffff000008000000 ( MB)
[ 0.000000] vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000 ( GB)
[ 0.000000] .text : 0xffff000008080000 - 0xffff0000088d0000 ( KB)
[ 0.000000] .rodata : 0xffff0000088d0000 - 0xffff000008ca0000 ( KB)
[ 0.000000] .init : 0xffff000008ca0000 - 0xffff000008da0000 ( KB)
[ 0.000000] .data : 0xffff000008da0000 - 0xffff000008e8ca00 ( KB)
[ 0.000000] .bss : 0xffff000008e8ca00 - 0xffff000008eeee50 ( KB)
[ 0.000000] fixed : 0xffff7dfffe7fd000 - 0xffff7dfffec00000 ( KB)
[ 0.000000] PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000 ( MB)
[ 0.000000] vmemmap : 0xffff7e0000000000 - 0xffff800000000000 ( GB maximum)
[ 0.000000] 0xffff7e0000000000 - 0xffff7e0004000000 ( MB actual)
[ 0.000000] memory : 0xffff800000000000 - 0xffff800100000000 ( MB)
[ 0.000000] SLUB: HWalign=, Order=-, MinObjects=, CPUs=, Nodes=
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to .
[ 0.000000] RCU restricting CPUs from NR_CPUS= to nr_cpu_ids=.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=, nr_cpu_ids=
[ 0.000000] NR_IRQS: nr_irqs:
[ 0.000000] GICv2m: range[mem 0x08020000-0x08020fff], SPI[:]
[ 0.000000] arm_arch_timer: WARNING: Invalid trigger for IRQ3, assuming level low
[ 0.000000] arm_arch_timer: WARNING: Please fix your firmware
[ 0.000000] arm_arch_timer: Architected cp15 timer(s) running at .50MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: ns
[ 0.000107] sched_clock: bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[ 0.002457] Console: colour dummy device 80x25
[ 0.002953] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=)
[ 0.005003] pid_max: default: minimum:
[ 0.005495] Security Framework initialized
[ 0.005796] Mount-cache hash table entries: (order: , bytes)
[ 0.005823] Mountpoint-cache hash table entries: (order: , bytes)
[ 0.033688] ASID allocator initialised with entries
[ 0.055888] EFI services will not be available.
[ 0.070508] smp: Bringing up secondary CPUs ...
[ 0.103718] Detected VIPT I-cache on CPU1
[ 0.104137] CPU1: Booted secondary processor [410fd034]
[ 0.105447] smp: Brought up node, CPUs
[ 0.105484] SMP: Total of processors activated.
[ 0.105544] CPU features: detected feature: -bit EL0 Support
[ 0.106390] CPU: All CPU(s) started at EL1
[ 0.106993] alternatives: patching kernel code
[ 0.117571] devtmpfs: initialized
[ 0.125123] DMI not present or invalid.
[ 0.125968] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: ns
[ 0.126043] futex hash table entries: (order: , bytes)
[ 0.129131] pinctrl core: initialized pinctrl subsystem
[ 0.140179] NET: Registered protocol family
[ 0.174101] cpuidle: using governor menu
[ 0.174984] vdso: pages ( code @ ffff0000088d7000, data @ ffff000008da5000)
[ 0.175144] hw-breakpoint: found breakpoint and watchpoint registers.
[ 0.179636] DMA: preallocated KiB pool for atomic allocations
[ 0.180866] Serial: AMBA PL011 UART driver
[ 0.217051] .pl011: ttyAMA0 at MMIO 0x9000000 (irq = , base_baud = ) is a PL011 rev1
[ 0.229660] console [ttyAMA0] enabled
[ 0.234380] irq: type mismatch, failed to map hwirq- for /intc!
[ 0.332166] HugeTLB registered MB page size, pre-allocated pages
[ 0.346761] ACPI: Interpreter disabled.
[ 0.351316] vgaarb: loaded
[ 0.352841] SCSI subsystem initialized
[ 0.354129] libata version 3.00 loaded.
[ 0.356211] usbcore: registered new interface driver usbfs
[ 0.356660] usbcore: registered new interface driver hub
[ 0.357155] usbcore: registered new device driver usb
[ 0.363521] pps_core: LinuxPPS API ver. registered
[ 0.363666] pps_core: Software ver. 5.3. - Copyright - Rodolfo Giometti <giometti@linux.it>
[ 0.364073] PTP clock support registered
[ 0.365464] dmi: Firmware registration failed.
[ 0.366899] Advanced Linux Sound Architecture Driver Initialized.
[ 0.376396] clocksource: Switched to clocksource arch_sys_counter
[ 0.377906] VFS: Disk quotas dquot_6.6.0
[ 0.379184] VFS: Dquot-cache hash table entries: (order , bytes)
[ 0.381159] pnp: PnP ACPI: disabled
[ 0.410723] NET: Registered protocol family
[ 0.425569] TCP established hash table entries: (order: , bytes)
[ 0.426069] TCP bind hash table entries: (order: , bytes)
[ 0.426727] TCP: Hash tables configured (established bind )
[ 0.427411] UDP hash table entries: (order: , bytes)
[ 0.427736] UDP-Lite hash table entries: (order: , bytes)
[ 0.429815] NET: Registered protocol family
[ 0.432139] RPC: Registered named UNIX socket transport module.
[ 0.432824] RPC: Registered udp transport module.
[ 0.432964] RPC: Registered tcp transport module.
[ 0.433091] RPC: Registered tcp NFSv4. backchannel transport module.
[ 0.433311] PCI: CLS bytes, default
[ 0.436037] Trying to unpack rootfs image as initramfs...
[ 0.440854] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.453369] Freeing initrd memory: 2400K
[ 0.455311] kvm []: HYP mode not available
[ 0.466090] audit: initializing netlink subsys (disabled)
[ 0.469328] audit: type= audit(0.452:): initialized
[ 0.475039] workingset: timestamp_bits= max_order= bucket_order=
[ 0.518138] squashfs: version 4.0 (//) Phillip Lougher
[ 0.523010] NFS: Registering the id_resolver key type
[ 0.523578] Key type id_resolver registered
[ 0.523654] Key type id_legacy registered
[ 0.523791] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.524960] 9p: Installing v9fs 9p2000 file system support
[ 0.534620] Block layer SCSI generic (bsg) driver version 0.4 loaded (major )
[ 0.534832] io scheduler noop registered
[ 0.535541] io scheduler cfq registered (default)
[ 0.557194] pl061_gpio .pl061: PL061 GPIO chip @0x0000000009030000 registered
[ 0.564858] OF: PCI: host bridge /pcie@ ranges:
[ 0.565315] OF: PCI: IO 0x3eff0000..0x3effffff -> 0x00000000
[ 0.565681] OF: PCI: MEM 0x10000000..0x3efeffff -> 0x10000000
[ 0.565850] OF: PCI: MEM 0x8000000000..0xffffffffff -> 0x8000000000
[ 0.566651] pci-host-generic 3f000000.pcie: ECAM at [mem 0x3f000000-0x3fffffff] for [bus -0f]
[ 0.568716] pci-host-generic 3f000000.pcie: PCI host bridge to bus :
[ 0.569014] pci_bus :: root bus resource [bus -0f]
[ 0.569196] pci_bus :: root bus resource [io 0x0000-0xffff]
[ 0.569343] pci_bus :: root bus resource [mem 0x10000000-0x3efeffff]
[ 0.569501] pci_bus :: root bus resource [mem 0x8000000000-0xffffffffff]
[ 0.570327] pci ::00.0: [1b36:] type class 0x060000
[ 0.573729] pci ::01.0: [1af4:] type class 0x020000
[ 0.574091] pci ::01.0: reg 0x10: [io 0x0000-0x001f]
[ 0.574263] pci ::01.0: reg 0x14: [mem 0x00000000-0x00000fff]
[ 0.574487] pci ::01.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 0.574667] pci ::01.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[ 0.575624] pci ::02.0: [1af4:] type class 0x000200
[ 0.575801] pci ::02.0: reg 0x10: [io 0x0000-0x003f]
[ 0.575945] pci ::02.0: reg 0x14: [mem 0x00000000-0x00000fff]
[ 0.576117] pci ::02.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 0.579248] pci ::01.0: BAR : assigned [mem 0x10000000-0x1003ffff pref]
[ 0.579773] pci ::01.0: BAR : assigned [mem 0x8000000000-0x8000003fff 64bit pref]
[ 0.580132] pci ::02.0: BAR : assigned [mem 0x8000004000-0x8000007fff 64bit pref]
[ 0.580965] pci ::01.0: BAR : assigned [mem 0x10040000-0x10040fff]
[ 0.581226] pci ::02.0: BAR : assigned [mem 0x10041000-0x10041fff]
[ 0.581423] pci ::02.0: BAR : assigned [io 0x1000-0x103f]
[ 0.581602] pci ::01.0: BAR : assigned [io 0x1040-0x105f]
[ 0.612049] virtio-pci ::01.0: enabling device ( -> )
[ 0.615182] virtio-pci ::02.0: enabling device ( -> )
[ 0.617449] xenfs: not registering filesystem on non-xen platform
[ 0.629378] Serial: / driver, ports, IRQ sharing enabled
[ 0.636035] SuperH (H)SCI(F) driver initialized
[ 0.645049] msm_serial: driver initialized
[ 0.647353] cacheinfo: Unable to detect cache hierarchy for CPU
[ 0.703861] brd: module loaded
[ 0.744597] loop: module loaded
[ 0.746301] hisi_sas: driver version v1.
[ 0.763497] libphy: Fixed MDIO Bus: probed
[ 0.764792] tun: Universal TUN/TAP device driver, 1.6
[ 0.764893] tun: (C) - Max Krasnyansky <maxk@qualcomm.com>
[ 0.778786] e1000e: Intel(R) PRO/ Network Driver - 3.2.-k
[ 0.778947] e1000e: Copyright(c) - Intel Corporation.
[ 0.779221] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.-k
[ 0.779350] igb: Copyright (c) - Intel Corporation.
[ 0.779597] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.-k
[ 0.779732] igbvf: Copyright (c) - Intel Corporation.
[ 0.779963] sky2: driver version 1.30
[ 0.785210] VFIO - User Level meta-driver version: 0.3
[ 0.790416] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.790566] ehci-pci: EHCI PCI platform driver
[ 0.790837] ehci-platform: EHCI generic platform driver
[ 0.791295] ehci-exynos: EHCI EXYNOS driver
[ 0.791675] ehci-msm: Qualcomm On-Chip EHCI Host Controller
[ 0.792007] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.792378] ohci-pci: OHCI PCI platform driver
[ 0.792662] ohci-platform: OHCI generic platform driver
[ 0.793038] ohci-exynos: OHCI EXYNOS driver
[ 0.794623] usbcore: registered new interface driver usb-storage
[ 0.798672] mousedev: PS/ mouse device common for all mice
[ 0.805642] rtc-pl031 .pl031: rtc core: registered pl031 as rtc0
[ 0.811835] i2c /dev entries driver
[ 0.828982] sdhci: Secure Digital Host Controller Interface driver
[ 0.829089] sdhci: Copyright(c) Pierre Ossman
[ 0.830537] Synopsys Designware Multimedia Card Interface Driver
[ 0.834397] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.838884] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.844425] usbcore: registered new interface driver usbhid
[ 0.844550] usbhid: USB HID core driver
[ 0.854742] NET: Registered protocol family
[ 0.856085] 9pnet: Installing 9P2000 support
[ 0.858100] Key type dns_resolver registered
[ 0.860637] registered taskstats version
[ 0.866590] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 0.868829] rtc-pl031 .pl031: setting system clock to -- :: UTC ()
[ 0.869655] ALSA device list:
[ 0.869743] No soundcards found.
[ 0.871669] uart-pl011 .pl011: no DMA platform data
[ 0.873769] RAMDISK: gzip image found at block
[ 1.242574] EXT4-fs (ram0): mounted filesystem with ordered data mode. Opts: (null)
[ 1.242933] VFS: Mounted root (ext4 filesystem) on device :.
[ 1.244541] devtmpfs: mounted
[ 1.292728] Freeing unused kernel memory: 1024K
Please press Enter to activate this console.
[root@aarch64 ]#
[root@aarch64 ]#
[root@aarch64 ]#
[root@aarch64 ]# ifconfig
eth0 Link encap:Ethernet HWaddr :::::
inet addr:172.16.14.250 Bcast:172.16.15.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (23.0 KiB) TX bytes: (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (0.0 B) TX bytes: (0.0 B)
[root@aarch64 ]# mount -t nfs -o nolock 172.16.14.203:/nfsroot /mnt
[ 26.558855] random: fast init done
[root@aarch64 ]# mount
/dev/root on / type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=2011360k,nr_inodes=,mode=)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=,ptmxmode=)
172.16.14.203:/nfsroot on /mnt type nfs (rw,relatime,vers=,rsize=,wsize=,namlen=,hard,nolock,proto=tcp,timeo=,retrans=,sec=sys,mountaddr=172.16.14.203,mountvers=,mountproto=tcp,local_lock=all,addr=172.16.14.203)
[root@aarch64 ]# mkdir mnt2
[root@aarch64 ]# mount -t 9p -o trans=virtio,version=9p2000.L hostshare /mnt2
[root@aarch64 ]# mount
/dev/root on / type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=2011360k,nr_inodes=,mode=)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=,ptmxmode=)
172.16.14.203:/nfsroot on /mnt type nfs (rw,relatime,vers=,rsize=,wsize=,namlen=,hard,nolock,proto=tcp,timeo=,retrans=,sec=sys,mountaddr=172.16.14.203,mountvers=,mountproto=tcp,local_lock=all,addr=172.16.14.203)
hostshare on /mnt2 type 9p (rw,sync,dirsync,relatime,trans=virtio,version=9p2000.L)
[root@aarch64 ]# [ 246.789966] random: crng init done
完。
用qemu搭建aarch64学习环境的更多相关文章
- 用Qemu搭建aarch32学习环境
作者信息 作者: 彭东林 邮箱: pengdonglin137@163.com QQ: 405728433 软件平台 主机: Ubuntu14.04 64位版本 模拟器:Qemu-2.8.0 Linu ...
- 用Qemu搭建x86_64学习环境
作者信息 作者:彭东林 邮箱:pengdonglin137@163.com QQ:405728433 软件平台 主机: Ubuntu14.04 64位版本 模拟器:Qemu-2.8.0 Linux内核 ...
- 用Qemu搭建x86学习环境
作者信息 作者:彭东林 邮箱:pengdonglin137@163.com QQ:405728433 软件平台 主机: Ubuntu14.04 64位版本 模拟器:Qemu-2.8.0 Linux内核 ...
- 使用Qemu运行Ubuntu文件系统 —— 搭建SVE学习环境(2)
开发环境 PC:ubuntu18.04 Qemu:4.1 Kernel:Linux-5.2 概述 由于要学习ARM的SVE技术,但是目前还没有支持SVE指令的板子,所以只能用Qemu来模拟,但是发现Q ...
- 云端搭建Linux学习环境 链接https://edu.aliyun.com/article/19 (阿里云ECS服务器 )课堂
云端搭建Linux学习环境 链接https://edu.aliyun.com/article/19 1. 开通云服务器 2 1.包年包月 按量付费(适合测试数据的时候) 2 2.地域 服务器数 ...
- 基于Ubuntu+Python+Tensorflow+Jupyter notebook搭建深度学习环境
基于Ubuntu+Python+Tensorflow+Jupyter notebook搭建深度学习环境 前言一.环境准备环境介绍软件下载VMware下安装UbuntuUbuntu下Anaconda的安 ...
- 【MIT6.828】centos7下使用Qemu搭建xv6运行环境
title:[MIT6.828]centos7下使用Qemu搭建xv6运行环境 date: "2020-05-05" [MIT6.828]centos7下搭建xv6运行环境 1. ...
- 使用 qemu 搭建内核开发环境
本文主要介绍在 MacOS 上使用 qemu 搭建 Linux Kernel 的开发环境.(在开始之前需要注意的是,本文中的 Linux 开发环境是一个远程服务器,而 qemu 被安装在本地的 Mac ...
- ubuntu18.04下搭建深度学习环境anaconda2+ cuda9.0+cudnn7.0.5+tensorflow1.7【原创】【学习笔记】
PC:ubuntu18.04.i5.七彩虹GTX1060显卡.固态硬盘.机械硬盘 作者:庄泽彬(欢迎转载,请注明作者) 说明:记录在ubuntu18.04环境下搭建深度学习的环境,之前安装了cuda9 ...
随机推荐
- BZOJ 1257 [CQOI2007]余数之和sum ——Dirichlet积
[题目分析] 卷积很好玩啊. [代码] #include <cstdio> #include <cstring> #include <cmath> #include ...
- DTCoreText
背景:使用DTCoreText实现epub阅读器的内容排版 基础准备:coretext,HTML+CSS渲染机制,epub文件格式 一:ios端epub实现:主要是两种,coretext,webvie ...
- 怎样编制excel序列目录
怎样编制序列目录 原帖内容:http://www.excelpx.com/forum.php?mod=viewthread&tid=164190&extra=%26page%3D1&a ...
- IOS开发-OC学习-Info.plist文件解析
Info.plist文件是新建ios项目完成后自动生成的一个配置文件,在Xcode中如下图: 通过解析可以获得配置的具体细节,解析过程如下: // 定义一个nsstring用来获取Info.plist ...
- python流程控制:for循环
for循环: 先来看一个猜年龄的小程序: AGE = 23 count = 0 for i in range(10): if count == 3: u_count = input("y|n ...
- UVa 10667 - Largest Block
题目大意:这个也是和UVa 836 - Largest Submatrix差不多,修改一下数据就可以套用代码的. #include <cstdio> #include <cstrin ...
- Maven deploy时报Fatal error compiling: tools.jar not found错误的问题处理
摘自:http://blog.csdn.net/achilles12345/article/details/19046061 在Eclipse环境下,使用Maven进行deploy时发现报了该错误:F ...
- linux下安装mysql(编译mysql源码)
编译所需软件地址 http://mysql.mirror.kangaroot.net/Downloads/ -- 下载需要的mysql版本例如mysql-5.5.39.tar.gz 目前还不太 ...
- OpenCV点滴2
明天回家了-- 昨天去见了老师,去之前告诉自己不要紧张,去了后还是紧张了,语无伦次,很没礼貌--(不敢看老师的眼睛) 刚才妈打电话说让我早点回去,不知道为什么,在空荡荡的宿舍里听到妈的声音,眼泪会夺眶 ...
- CART分类与回归树 学习笔记
CART:Classification and regression tree,分类与回归树.(是二叉树) CART是决策树的一种,主要由特征选择,树的生成和剪枝三部分组成.它主要用来处理分类和回归问 ...