在qemu vexpress-a15平台运行xen,guest OS Dom0 Linux

1)编译linux内核

内核下载地址:The Linux Kernel Archives

配置内核:

make vexpress_defconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

在生成的.config文件中添加下面两个选项:

CONFIG_XEN_DOM0=y
CONFIG_XEN=y

编译内核:

make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

测试编译生成的linux内核镜像:

qemu-system-aarch64 -M vexpress-a15 -m 512M -kernel zImage -dtb vexpress-v2p-ca15_a7.dtb -append "init=/linuxrc root=/dev/mmcblk0 rw rootwait console=ttyAMA0" -nographic


2)制作busybox根文件系统

busybox下载地址:https://busybox.net/

配置busybox:

make menuconfig

#   勾选  Settings-> [*] Build static binary (no shared libs)

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4

make install

创建rootfs image镜像:

$ cd _install/

$ mkdir proc sys dev etc etc/init.

$ vim ./etc/init.d/rcS

##########################################

#! /bin/sh

mount -t proc none /proc

mount -t sysfs none /sys

/sbin/mdev -s

##########################################

$ chmod +x ./etc/init.d/rcS

$ find . | cpio -o --format=newc > ../rootfs.img

$ cd ..

$ gzip -c rootfs.img > rootfs.img.gz

3)配置设备树信息

计算Image.gz的大小:

printf "0x%x\n" $(stat -c %s Image.gz)

计算rootfs.img.gz的大小:

printf "0x%x\n" $(stat -c %s rootfs.img.gz)修改设备树:
# 告诉 u-boot 设备树的加载位置
fdt addr $dtb_addr_r

# 调整FDT的大小以防万一
fdt resize

# 根据$xen_bootargs设置Xen参数
fdt set /chosen xen,xen-bootargs \"$xen_bootargs\"

#setenv bootargs $xen_bootargs # 在Xen不稳定时,xen cmdline在bootargs中

# 根据$dom0_bootargs设置Dom0参数
fdt set /chosen xen,dom0-bootargs \"$dom0_bootargs\"

# 创建模块节点
fdt mknode /chosen modules
fdt set /chosen/modules '#address-cells' <1>
fdt set /chosen/modules '#size-cells' <1>

# 为位于$kernel_addr_r的linux创建节点

fdt mknode /chosen/modules module@0
fdt set /chosen/modules/module@0 compatible xen,linux-zimage xen,multiboot-module
fdt set /chosen/modules/module@0 reg <$kernel_addr_r Image.gz的大小>

fdt set /chosen/module@1 compatible "xen,linux-initrd" "xen,multiboot-module"
fdt set /chosen/module@1 reg <initrd_addr_r rootfs.img.gz的大小>


uboot引导启动Xen
booti $xen_addr_r - $dtb_addr_r

4)运行 Qemu Xen Dom0 Linux

qemu-system-aarch64 -machine vexpress-a15 -machine virtualization=true -cpu cortex-a15 -m 1024 -kernel u-boot -device loader,file=xen-uImage,force-raw=on,addr=0x80400000 -device loader,file=zImage,addr=0xa0008000 -device loader,file=vexpress-v2p-ca15_a7.dtb,addr=0x81f00000 -device loader,file=rootfs.img.gz,addr=0x82000000 -nographic

U-Boot 2019.01 (Sep 14 2021 - 02:57:40 -0700)

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 
=> 

设置设备树:

fdt addr 0x81f00000
fdt resize
 
fdt set /chosen \#address-cells <1>
fdt set /chosen \#size-cells <1>
 
fdt mknod /chosen module@0
fdt set /chosen/module@0 compatible "xen,linux-zimage" "xen,multiboot-module"
fdt set /chosen/module@0 reg <0xa0008000 0x422998>
fdt set /chosen/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot"
fdt mknod /chosen module@1
fdt set /chosen/module@1 compatible "xen,linux-initrd" "xen,multiboot-module"
fdt set /chosen/module@1 reg <0x82000000 0x29d8f4>
bootm 0x80400000 - 0x81f00000

U-Boot 2019.01 (Sep 14 2021 - 02:57:40 -0700)

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 
=> fdt addr 0x81f00000
=> fdt resize
=>  
=> fdt set /chosen \#address-cells <1>
=> fdt set /chosen \#size-cells <1>
=>  
=> fdt mknod /chosen module@0
=> fdt set /chosen/module@0 compatible "xen,linux-zimage" "xen,multiboot-module"
=> fdt set /chosen/module@0 reg <0xa0008000 0x422998>
=> fdt set /chosen/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot"
=> fdt mknod /chosen module@1
=> fdt set /chosen/module@1 compatible "xen,linux-initrd" "xen,multiboot-module"
=> fdt set /chosen/module@1 reg <0x82000000 0x29d8f4>
=> bootm 0x80400000 - 0x81f00000
## Booting kernel from Legacy Image at 80400000 ...
   Image Name:   
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1048584 Bytes = 1 MiB
   Load Address: 80200000
   Entry Point:  80200000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 81f00000
   Booting using the fdt blob at 0x81f00000
   Loading Kernel Image ... OK
   reserving fdt memory region: addr=81f00000 size=5000
   Loading Device Tree to 9fe60000, end 9fe67fff ... OK

Starting kernel ...

- UART enabled -
- Boot CPU booting -
- Setting up control registers -
- Turning on paging -
- Zero BSS -
- Ready -
(XEN) Checking for initrd in /chosen
(XEN) RAM: 0000000080000000 - 000000009fffffff
(XEN) RAM: 00000000a0000000 - 00000000bfffffff
(XEN) 
(XEN) MODULE[0]: 0000000080200000 - 000000008033e290 Xen         
(XEN) MODULE[1]: 000000009fe60000 - 000000009fe65000 Device Tree 
(XEN) MODULE[2]: 0000000082000000 - 000000008229d8f4 Ramdisk     
(XEN) MODULE[3]: 00000000a0008000 - 00000000a042a998 Kernel      
(XEN)  RESVD[0]: 0000000081f00000 - 0000000081f05000
(XEN)  RESVD[1]: 000000009ffbf000 - 000000009ffbf138
(XEN)  RESVD[2]: 000000009fe60000 - 000000009fe65000
(XEN) 
(XEN) CMDLINE[00000000a0008000]:chosen rw root=/dev/ram rdinit=/sbin/init earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot
(XEN) 
(XEN) Command line: dom0_mem=768M console=dtuart dtuart=serial0 dom0_vcpus_pin hmp-unsafe=true dom0_max_vcpus=2 bootscrub=0 loglvl=all
(XEN) PFN compression on bits 18...18
(XEN) Xen heap: 00000000be000000-00000000c0000000 (8192 pages)
(XEN) Dom heap: 253952 pages
(XEN) Domain heap initialised
(XEN) Booting using Device Tree
(XEN) Platform: VERSATILE EXPRESS
(XEN) Looking for dtuart at "serial0", options ""
 Xen 4.17-unstable
(XEN) Xen version 4.17-unstable (hdwei@) (arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0) debug=y Fri Feb 11 08:15:37 PST 2022
(XEN) Latest ChangeSet: Tue Feb 1 18:03:21 2022 +0100 git:3457460
(XEN) build-id: 6d2190a52f826f15ad6a60cebfbf25cb9da162f0
(XEN) Processor: 412fc0f1: "ARM Limited", variant: 0x2, part 0xc0f,rev 0x1
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00001131:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 02010555
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10201105 20000000
(XEN)                          01240000 02102211
(XEN)   ISA Features: 02101110 13112111 21232041
(XEN)                 11112131 10011142 00000000
(XEN) Set SYS_FLAGS to 00000000802000d4 (002000d4)
(XEN) SMP: Allowing 1 CPUs
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 62500 KHz
(XEN) GICv2 initialization:
(XEN)         gic_dist_addr=000000002c001000
(XEN)         gic_cpu_addr=000000002c002000
(XEN)         gic_hyp_addr=000000002c004000
(XEN)         gic_vcpu_addr=000000002c006000
(XEN)         gic_maintenance_irq=25
(XEN) GICv2: 160 lines, 1 cpu, secure (IID 00000000).
(XEN) XSM Framework v1.0.1 initialized
(XEN) Initialising XSM SILO mode
(XEN) Using scheduler: SMP Credit Scheduler rev2 (credit2)
(XEN) Initializing Credit2 scheduler
(XEN)  load_precision_shift: 18
(XEN)  load_window_shift: 30
(XEN)  underload_balance_tolerance: 0
(XEN)  overload_balance_tolerance: -3
(XEN)  runqueues arrangement: socket
(XEN)  cap enforcement granularity: 10ms
(XEN) load tracking window length 1073741824 ns
(XEN) Allocated console ring of 16 KiB.
(XEN) VFP implementer 0x41 architecture 4 part 0x30 variant 0xf rev 0x0
(XEN) CPU0: Guest atomics will try 1 times before pausing the domain
(XEN) Brought up 1 CPUs
(XEN) I/O virtualisation disabled
(XEN) P2M: 40-bit IPA
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80003558
(XEN) Scheduling granularity: cpu, 1 CPU per sched-resource
(XEN) Adding cpu 0 to runqueue 0
(XEN)  First cpu on runqueue, activating
(XEN) alternatives: Patching with alt table 002d2c58 -> 002d2d48
(XEN) CPU0 will execute ICIALLU on guest exit
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading d0 kernel from boot module @ 00000000a0008000
(XEN) Loading ramdisk from boot module @ 0000000082000000
(XEN) Allocating 1:1 mappings totalling 768MB for dom0:
(XEN) BANK[0] 0x00000084000000-0x0000009c000000 (384MB)
(XEN) BANK[1] 0x000000a4000000-0x000000bc000000 (384MB)
(XEN) Grant table range: 0x00000080200000-0x00000080240000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) The extended regions are only supported for 64-bit guest currently
(XEN) Loading zImage from 00000000a0008000 to 000000008ba00000-000000008be22998
(XEN) Loading d0 initrd from 0000000082000000 to 0x000000008c200000-0x000000008c49d8f4
(XEN) Loading d0 DTB to 0x000000008c000000-0x000000008c003e7b
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) ***************************************************
(XEN) WARNING: HMP COMPUTING HAS BEEN ENABLED.
(XEN) It has implications on the security and stability of the system,
(XEN) unless the cpu affinity of all domains is specified.
(XEN) ***************************************************
(XEN) 3... 2... 1... 
(XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
(XEN) Freed 348kB init memory.
Booting Linux on physical CPU 0x0
Linux version 4.20.0 (hdwei@ubuntu) (gcc version 6.5.0 (Linaro GCC 6.5-2018.12)) #1 SMP Fri Feb 11 06:19:15 PST 2022
CPU: ARMv7 Processor [412fc0f1] revision 1 (ARMv7), cr=10c5387d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
OF: fdt: Machine model: V2P-CA15_CA7
OF: fdt: Ignoring memory range 0x84000000 - 0x88000000
earlycon: xenboot0 at I/O port 0x0 (options '')
printk: bootconsole [xenboot0] enabled
Memory policy: Data cache writealloc
Xen 4.17 support found
psci: probing for conduit method from DT.
psci: PSCIv1.1 detected in firmware.
psci: Using standard PSCI v0.2 function IDs
psci: Trusted OS migration not required
psci: SMC Calling Convention v1.1
random: get_random_bytes called from start_kernel+0x9c/0x464 with crng_init=0
percpu: Embedded 17 pages/cpu @(ptrval) s37772 r8192 d23668 u69632
Built 1 zonelists, mobility grouping on.  Total pages: 178560
Kernel command line: rw root=/dev/ram rdinit=/sbin/init earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 700772K/720896K available (7168K kernel code, 406K rwdata, 1456K rodata, 1024K init, 165K bss, 20124K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xb4800000 - 0xff800000   (1200 MB)
    lowmem  : 0x80000000 - 0xb4000000   ( 832 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x(ptrval) - 0x(ptrval)   (8160 kB)
      .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
      .data : 0x(ptrval) - 0x(ptrval)   ( 407 kB)
       .bss : 0x(ptrval) - 0x(ptrval)   ( 166 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: 	RCU event tracing is enabled.
rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER4
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER8
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER12
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER16
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER0
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
Failed to initialize '/smb@8000000/motherboard/iofpga@3,00000000/timer@120000': -22
arch_timer: cp15 timer(s) running at 62.50MHz (virt).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
Switching to timer-based delay loop, resolution 16ns
Console: colour dummy device 80x30
printk: console [hvc0] enabled
printk: console [hvc0] enabled
printk: bootconsole [xenboot0] disabled
printk: bootconsole [xenboot0] disabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=625000)
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: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
/cpus/cpu@0 missing clock-frequency property
/cpus/cpu@1 missing clock-frequency property
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
xen:grant_table: Grant tables using version 1 layout
Grant table initialized
xen:events: Using FIFO-based ABI
Xen: initializing cpu0
Setting up static identity map for 0x88100000 - 0x88100060
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
(XEN) d0v1: vGICD: unhandled word write 0xffffffff to ICACTIVER0
Xen: initializing cpu1
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU1: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (250.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/mfd/vexpress-sysreg.c:189 vexpress_sysreg_probe+0x19c/0x1d4
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.20.0 #1
Hardware name: ARM-Versatile Express
[<801113ec>] (unwind_backtrace) from [<8010d2b0>] (show_stack+0x10/0x14)
[<8010d2b0>] (show_stack) from [<806e8ad4>] (dump_stack+0x84/0x98)
[<806e8ad4>] (dump_stack) from [<80121360>] (__warn+0xf8/0x110)
[<80121360>] (__warn) from [<8012148c>] (warn_slowpath_null+0x40/0x48)
[<8012148c>] (warn_slowpath_null) from [<804c2790>] (vexpress_sysreg_probe+0x19c/0x1d4)
[<804c2790>] (vexpress_sysreg_probe) from [<8049ae1c>] (platform_drv_probe+0x48/0x9c)
[<8049ae1c>] (platform_drv_probe) from [<80498f8c>] (really_probe+0x1cc/0x2b0)
[<80498f8c>] (really_probe) from [<804991d4>] (driver_probe_device+0x60/0x164)
[<804991d4>] (driver_probe_device) from [<804993b4>] (__driver_attach+0xdc/0xe0)
[<804993b4>] (__driver_attach) from [<804972d0>] (bus_for_each_dev+0x68/0xb4)
[<804972d0>] (bus_for_each_dev) from [<80498398>] (bus_add_driver+0x104/0x210)
[<80498398>] (bus_add_driver) from [<80499f3c>] (driver_register+0x78/0x10c)
[<80499f3c>] (driver_register) from [<80102e08>] (do_one_initcall+0x54/0x1fc)
[<80102e08>] (do_one_initcall) from [<80a010e0>] (kernel_init_freeable+0x28c/0x380)
[<80a010e0>] (kernel_init_freeable) from [<80700a70>] (kernel_init+0x8/0x10c)
[<80700a70>] (kernel_init) from [<801010e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xb3493fb0 to 0xb3493ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace ba986b74276595f6 ]---
vexpress-sysreg 1c010000.sysreg: DT HBI (249) is not matching hardware (237)!
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
xen:swiotlb_xen: Warning: only able to allocate 4 MB for software IO TLB
software IO TLB: mapped [mem 0xbac00000-0xbb000000] (4MB)
hw-breakpoint: Failed to enable monitor mode on CPU 0.
Serial: AMBA PL011 UART driver
1c0a0000.uart: ttyAMA1 at MMIO 0x1c0a0000 (irq = 30, base_baud = 0) is a PL011 rev1
1c0b0000.uart: ttyAMA2 at MMIO 0x1c0b0000 (irq = 31, base_baud = 0) is a PL011 rev1
1c0c0000.uart: ttyAMA3 at MMIO 0x1c0c0000 (irq = 32, base_baud = 0) is a PL011 rev1
OF: amba_device_add() failed (-19) for /smb@8000000/motherboard/iofpga@3,00000000/wdt@f0000
OF: amba_device_add() failed (-19) for /wdt@2a490000
OF: amba_device_add() failed (-19) for /memory-controller@2b0a0000
OF: amba_device_add() failed (-19) for /memory-controller@7ffd0000
OF: amba_device_add() failed (-19) for /dma@7ff00000
OF: amba_device_add() failed (-19) for /etb@20010000
OF: amba_device_add() failed (-19) for /tpiu@20030000
OF: amba_device_add() failed (-19) for /funnel@20040000
OF: amba_device_add() failed (-19) for /ptm@2201c000
xen:balloon: Initialising balloon driver
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 arch_sys_counter
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
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.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 2680K
failed to build OPP table
workingset: timestamp_bits=30 max_order=18 bucket_order=0
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)
io scheduler mq-deadline registered
io scheduler kyber registered
clcd-pl11x 1c1f0000.clcd: PL111 designer 41 rev2 at 0x1c1f0000
clcd-pl11x 1c1f0000.clcd: clcd@1f0000 hardware, 640x480@59 display
Console: switching to colour frame buffer device 80x30
xen:xen_evtchn: Event-channel device installed
brd: module loaded
Invalid max_queues (4), will use default max: 2.
8000000.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
8000000.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): "8000000.flash"
(1): "8000000.flash"
into device "8000000.flash"
libphy: Fixed MDIO Bus: probed
smsc911x 1a000000.ethernet: Linked as a consumer to regulator.1
libphy: smsc911x-mdio: probed
smsc911x 1a000000.ethernet eth0: MAC Address: 52:54:00:12:34:56
xen_netfront: Initialising Xen virtual ethernet driver
isp1760 1b000000.usb: bus width: 32, oc: digital
isp1760 1b000000.usb: NXP ISP1760 USB Host Controller
isp1760 1b000000.usb: new USB bus registered, assigned bus number 1
isp1760 1b000000.usb: Scratch test failed.
isp1760 1b000000.usb: can't setup: -19
isp1760 1b000000.usb: USB bus 1 deregistered
usbcore: registered new interface driver usb-storage
rtc-pl031 1c170000.rtc: registered as rtc0
mmci-pl18x 1c050000.mmci: Got CD GPIO
mmci-pl18x 1c050000.mmci: Got WP GPIO
mmci-pl18x 1c050000.mmci: Linked as a consumer to regulator.1
mmci-pl18x 1c050000.mmci: mmc0: PL181 manf 41 rev0 at 0x1c050000 irq 26,27 (pio)
input: AT Raw Set 2 keyboard as /devices/platform/smb@8000000/smb@8000000:motherboard/smb@8000000:motherboard:iofpga@3,00000000/1c060000.kmi/serio0/input/input0
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
aaci-pl041 1c040000.aaci: ARM AC'97 Interface PL041 rev0 at 0x1c040000, irq 25
aaci-pl041 1c040000.aaci: FIFO 512 entries
oprofile: no performance counters
oprofile: using timer interrupt.
NET: Registered protocol family 17
9pnet: Installing 9P2000 support
Registering SWP/SWPB emulation handler
rtc-pl031 1c170000.rtc: setting system clock to 2022-02-12 13:56:41 UTC (1644674201)
ALSA device list:
  #0: ARM AC'97 Interface PL041 rev0 at 0x1c040000, irq 25
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/smb@8000000/smb@8000000:motherboard/smb@8000000:motherboard:iofpga@3,00000000/1c070000.kmi/serio1/input/input2
Freeing unused kernel memory: 1024K
Run /sbin/init as init process
mount: mounting tmpfs on /tmp failed: No such file or directory
Generic PHY 1a000000.ethernet-ffffffff:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1a000000.ethernet-ffffffff:01, irq=POLL)
smsc911x 1a000000.ethernet eth0: SMSC911x/921x identified at 0xb51d0000, IRQ: 23

Please press Enter to activate this console. 
[root@vexpress ]#

可以把设置设备树的步骤写入设备树:

chosen {
	bootargs = "dom0_mem=768M console=dtuart dtuart=serial0 dom0_vcpus_pin hmp-unsafe=true dom0_max_vcpus=2 bootscrub=0 loglvl=all";

	/delete-property/stdout-path;

	xen,dom0-bootargs = "console=hvc0 root=/dev/ram rdinit=/sbin/init rw rootwait clk_ignore_unused";

	modules {
		#address-cells = <1>;
		#size-cells = <1>;

		module@1 {
			compatible = "xen,linux-zimage", "xen,multiboot-module";
			reg = <0xa0008000 0x422998>;
		};

		module@2 {
			compatible = "xen,linux-initrd", "xen,multiboot-module";
			reg = <0x82000000 0x29d8f4>;
		};
	};
};

进入uboot之后,可直接引导启动xen,bootm 0x80400000 - 0x81f00000。

已编译好的可执行文件

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值