bao-project / bao-demos

A guide on how to build and use a set of Bao guest configurations for various platforms
Other
33 stars 37 forks source link

Failed when running QEMU command with baremetal demo #52

Closed xioliu closed 5 months ago

xioliu commented 5 months ago

Hello,

I tried to run the baremetal demo on QEMU for aarch64, I followed the step-by-step guide (I installed QEMU version 7.2.0 before so I skipped step B.5.1). But I got below failure when running the demo. Could you please give me some clues? Thank you.

ubx1szh@SZH-V-00077:~/bao/bao-demos/wrkdir/srcs$ qemu-system-aarch64 -nographic -M virt,secure=on,virtualization=on,gic-version=3 -cpu cortex-a53 -smp 4 -m 4G -bios $BAO_DEMOS_WRKDIR/imgs/$PLATFORM/flash.bin -device loader,file="$BAO_DEMOS_WRKDIR_IMGS/bao.bin",addr=0x50000000,force-raw=on -device virtio-serial-device -chardev pty,id=serial3 -device virtconsole,chardev=serial3 char device redirected to /dev/pts/2 (label serial3) NOTICE: Booting Trusted Firmware NOTICE: BL1: v2.9(release):8a3945e NOTICE: BL1: Built : 15:38:15, Mar 11 2024 NOTICE: BL1: Booting BL2 NOTICE: BL2: v2.9(release):8a3945e NOTICE: BL2: Built : 15:38:17, Mar 11 2024 NOTICE: BL1: Booting BL31 NOTICE: BL31: v2.9(release):8a3945e NOTICE: BL31: Built : 15:38:21, Mar 11 2024

U-Boot 2022.10 (Mar 11 2024 - 15:35:34 +0800)

DRAM: 4 GiB Core: 47 devices, 13 uclasses, devicetree: board Flash: 32 MiB Loading Environment from Flash... *** Warning - bad CRC, using default environment

In: pl011@9000000 Out: pl011@9000000 Err: pl011@9000000 Net: eth0: virtio-net#32 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

Device 0: unknown device starting USB... No working controllers found BOOTP broadcast 1 DHCP client bound to address 10.0.2.15 (2 ms) Using virtio-net#32 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'boot.scr.uimg'. Load address: 0x40200000 Loading: TFTP error: 'Access violation' (2) Not retrying... BOOTP broadcast 1 DHCP client bound to address 10.0.2.15 (0 ms) Using virtio-net#32 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'boot.scr.uimg'. Load address: 0x40400000 Loading: TFTP error: 'Access violation' (2) Not retrying... => QEMU: Terminated

xioliu commented 5 months ago

Settings: export CROSS_COMPILE=/home/ubx1szh/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin/aarch64-none-elf- export PLATFORM=qemu-aarch64-virt export DEMO=baremetal export ARCH=aarch64

xioliu commented 5 months ago

Please ignore this issue, I rebuilt the demo and now it works.

xioliu commented 5 months ago

close