为什么uboot x86_64无法启动alpine vmlinuz-virt,启动后重置

为什么uboot x86_64无法启动alpine vmlinuz-virt,启动后重置

qemu-x86_64uboot.rom与阿尔派的virt

获取虚拟机Linux

wget https://mirrors.aliyun.com/alpine/v3.12/releases/x86_64/netboot/{vmlinuz,initramfs}-virt

现在启动 qemu

qemu-system-x86_64 -m 1024 -smp 2 -nographic -bios u-boot.rom \
  -kernel vmlinuz-virt \
  -initrd initramfs-virt \
  -append 'root=/dev/ram console=ttyS0'  
# load kernel
qfw load
# boot according to last command output
zboot 0000000001000000 5632a0 0000000004000000 453acb

我期待内核预订消息,但似乎 uboot 已重置

Valid Boot Flag
Setup Size = 0x00004000
Magic signature found
Using boot protocol version 2.0d
Linux kernel version 5.4.43-1-virt (buildozer@build-3-12-x86_64) #2-Alpine SMP Thu, 28 May 2020 20:13:48 UTC
Building boot_params at 0x00090000
Loading bzImage at address 100000 (5649056 bytes)

U-Boot SPL 2020.04 (Aug 10 2020 - 14:50:54 +0000)
CPU: x86_64, vendor AMD, device 663h
Trying to boot from SPI
Jumping to 64-bit U-Boot: Note many features are missing


U-Boot 2020.04 (Aug 10 2020 - 14:50:54 +0000)

CPU:   QEMU Virtual CPU version 2.5+
DRAM:  1 GiB
Incorrect expansion ROM header signature 4daa
Model: QEMU x86 (I440FX)
Net:   e1000: 52:54:00:12:34:56
       
Warning: e1000#0 using MAC address from ROM
eth0: e1000#0
Hit any key to stop autoboot:  0 
starting USB...
No working controllers found
USB is stopped. Please issue 'usb start' first.
scanning bus for devices...

Device 0: unknown device

Device 0: unknown device

设置有什么问题?如何使用 u-boot 启动 vmlinuz-virt?

编辑

从 ide 加载显示相同的消息

# a bootable image
qemu-system-x86_64 -nographic -m 1024 -accel hvf -hda images/virt/alpine.qcow2 

# using uboot can not boot
qemu-system-x86_64 -nographic -m 1024 -bios artifacts/uboot/qemu-x86_64/u-boot.rom -hda images/virt/alpine.qcow2

uboot命令

load ide 0 ${kernel_addr_r} /vmlinuz-virt
load ide 0 ${ramdisk_addr_r} /initramfs-virt
zboot ${kernel_addr_r} - ${ramdisk_addr_r} ${filesize}

显示后Loading bzImage at address,下一条消息是U-Boot 2020.04 (Aug 10 2020 - 14:50:54 +0000)

编辑2 i386 可以工作,这与 uboot x86_84 有关

相关内容