Skip to contentSkip to conversation

how to run u-boot on qemu arm64 virt machine?

DISCUSSION [email protected] 3 participants 7 messages Oct 12, 2021 – Oct 14, 2021

lore
Share & tools
lore
#0 lore raw

Hello, u-boot mail list members,

I'm trying to run u-boot on qemu arm64 virt machine to analyze how the S/W runs.

I followed "doc/board/emulation/qemu-arm.rst", and here is what I did.

For qemu build (using qemu-2.9.0), I did under ~/QEMU/qemu directory,

mkdir build; cd build; ../configure --target-list=aarch64-softmmu --enable-debug --enable-gtk --disable-werror; make -j24

to build u-boot, I did under ~/U-BOOT/u-boot,

make ARCH=arm CROSS_COMPILE=aarch64-none-elf- qemu_arm64_defconfig

To run u-boot on qemu, I did under ~/U-BOOT/u-boot

~/QEMU/qemu/build/aarch64-softmmu/qemu-system-aarch64 -M virt -cpu cortex-a57 -bios u-boot.bin

But I see only qemu manager window and I don't know how to proceed.

Am I not supposed to see u-boot program running?

What am I doing wrong? Any help will be really appreciated.

Thank you.

Chan Kim

#1 lore raw
Quoted 25 lines · On Tue, Oct 12, 2021 at 01:46:33PM +0900, [email protected] wrote:

Hello, u-boot mail list members,

I'm trying to run u-boot on qemu arm64 virt machine to analyze how the S/W runs.

I followed "doc/board/emulation/qemu-arm.rst", and here is what I did.

For qemu build (using qemu-2.9.0), I did under ~/QEMU/qemu directory,

mkdir build; cd build; ../configure --target-list=aarch64-softmmu --enable-debug --enable-gtk --disable-werror; make -j24

to build u-boot, I did under ~/U-BOOT/u-boot,

make ARCH=arm CROSS_COMPILE=aarch64-none-elf- qemu_arm64_defconfig

To run u-boot on qemu, I did under ~/U-BOOT/u-boot

~/QEMU/qemu/build/aarch64-softmmu/qemu-system-aarch64 -M virt -cpu cortex-a57 -bios u-boot.bin

Quoted 7 lines

But I see only qemu manager window and I don't know how to proceed.

Am I not supposed to see u-boot program running?

What am I doing wrong? Any help will be really appreciated.

Thank you.

That's a very old QEMU version. We use v6.1.0 currently and v4.2.0 before that.

Signature · 1 line
Tom
author
#2 lore raw
Quoted 6 lines

That's a very old QEMU version. We use v6.1.0 currently and v4.2.0 before that.

--
Tom

Thank you, Tom

Yes, so I tried it now with v4.2.0 with "-nographic" option. (Without it I still see qemu manager window.)

Chan Kim

#3 lore raw

Hi

You can find work in progress here too:
http://releases.linaro.org/components/ledge/rp-0.2/ledge-multi-armv8/

For aarch64 there are virt and sbsa-ref machines. Virt is essentially to boot a VM while sbsa-ref is a reference platform that mimics all required hardware, firmware for the secure world (TF-A, OP-TEE) and firmware for normal world (U-Boot, EDK2). This technology (sbsa-ref) is really to simulate a system for pre-silicon development while virt shall be used in cloud native environments.

We are working on something that we may end up calling bsa-ref (note the absence of initial S standing for “server”). Sbsa-ref is about edk2 and acpi, bsa-ref is about U-Boot and device tree. The directory points to this work in progress. You can have a look at SystemReady in Arm to understand and get details on bsa.

In a future release of Qemu, one will be able to simulate a full platform with its main processor (as of today) but also SCP (system control processor) and MCP (management control processor).

Cheers

FF

Quoted 13 lines · Chan Kim
Quoted 2 lines

That's a very old QEMU version. We use v6.1.0 currently and v4.2.0

before

Quoted 4 lines

that.

--
Tom

Thank you, Tom

Yes, so I tried it now with v4.2.0 with "-nographic" option. (Without it I still see qemu manager window.)

Quoted 6 lines

Chan Kim

--

François-Frédéric Ozog | *Director Business Development*
T: +33.67221.6485
[email protected] | Skype: ffozog

author
#4 lore raw

Hi Francois,

Thanks for the good information. I’ll look into that later.

Can I ask you a basic question?

When there are SCP, MCP and the main processor, in what processor does u-boot program run? I understand it runs on the main processor.

Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and calling kernel.

Thank you!

Chan Kim

From: François Ozog <[email protected]>
Sent: Wednesday, October 13, 2021 6:29 PM
To: Chan Kim <[email protected]>
Cc: Tom Rini <[email protected]>; [email protected]
Subject: Re: how to run u-boot on qemu arm64 virt machine?

Hi

You can find work in progress here too:

http://releases.linaro.org/components/ledge/rp-0.2/ledge-multi-armv8/

For aarch64 there are virt and sbsa-ref machines. Virt is essentially to boot a VM while sbsa-ref is a reference platform that mimics all required hardware, firmware for the secure world (TF-A, OP-TEE) and firmware for normal world (U-Boot, EDK2). This technology (sbsa-ref) is really to simulate a system for pre-silicon development while virt shall be used in cloud native environments.

We are working on something that we may end up calling bsa-ref (note the absence of initial S standing for “server”). Sbsa-ref is about edk2 and acpi, bsa-ref is about U-Boot and device tree. The directory points to this work in progress. You can have a look at SystemReady in Arm to understand and get details on bsa.

In a future release of Qemu, one will be able to simulate a full platform with its main processor (as of today) but also SCP (system control processor) and MCP (management control processor).

Cheers

FF

Quoted 6 lines · Le mer. 13 oct. 2021 à 07:03, Chan Kim <[email protected]…

That's a very old QEMU version. We use v6.1.0 currently and v4.2.0 before that.

--
Tom

Thank you, Tom

Yes, so I tried it now with v4.2.0 with "-nographic" option. (Without it I still see qemu manager window.)

Chan Kim

Signature · 8 lines
  <https://static.linaro.org/common/images/linaro-logo-web.png> 


François-Frédéric Ozog | Director Business Development


T: +33.67221.6485
 <mailto:[email protected]> [email protected] | Skype: ffozog
author
#5 lore raw
In reply to François Ozog

I think my question has error.

Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and calling kernel.

==>

Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and waking the main processor to start from kernel.

Thank you.

Chan Kim

From: Chan Kim <[email protected]>
Sent: Thursday, October 14, 2021 12:03 PM
To: 'François Ozog' <[email protected]>
Cc: 'Tom Rini' <[email protected]>; '[email protected]' <[email protected]>
Subject: RE: how to run u-boot on qemu arm64 virt machine?

Hi Francois,

Thanks for the good information. I’ll look into that later.

Can I ask you a basic question?

When there are SCP, MCP and the main processor, in what processor does u-boot program run? I understand it runs on the main processor.

Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and calling kernel.

Thank you!

Chan Kim

From: François Ozog <[email protected] <mailto:[email protected]> >
Sent: Wednesday, October 13, 2021 6:29 PM
To: Chan Kim <[email protected] <mailto:[email protected]> >
Cc: Tom Rini <[email protected] <mailto:[email protected]> >; [email protected] <mailto:[email protected]>
Subject: Re: how to run u-boot on qemu arm64 virt machine?

Hi

You can find work in progress here too:

http://releases.linaro.org/components/ledge/rp-0.2/ledge-multi-armv8/

For aarch64 there are virt and sbsa-ref machines. Virt is essentially to boot a VM while sbsa-ref is a reference platform that mimics all required hardware, firmware for the secure world (TF-A, OP-TEE) and firmware for normal world (U-Boot, EDK2). This technology (sbsa-ref) is really to simulate a system for pre-silicon development while virt shall be used in cloud native environments.

We are working on something that we may end up calling bsa-ref (note the absence of initial S standing for “server”). Sbsa-ref is about edk2 and acpi, bsa-ref is about U-Boot and device tree. The directory points to this work in progress. You can have a look at SystemReady in Arm to understand and get details on bsa.

In a future release of Qemu, one will be able to simulate a full platform with its main processor (as of today) but also SCP (system control processor) and MCP (management control processor).

Cheers

FF

Quoted 6 lines · Le mer. 13 oct. 2021 à 07:03, Chan Kim <[email protected]…

That's a very old QEMU version. We use v6.1.0 currently and v4.2.0 before that.

--
Tom

Thank you, Tom

Yes, so I tried it now with v4.2.0 with "-nographic" option. (Without it I still see qemu manager window.)

Chan Kim

Signature · 8 lines
  <https://static.linaro.org/common/images/linaro-logo-web.png> 


François-Frédéric Ozog | Director Business Development


T: +33.67221.6485
 <mailto:[email protected]> [email protected] | Skype: ffozog
#6 lore raw
Quoted 4 lines · Chan Kim

I think my question has error.

Quoted 9 lines

Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and calling kernel.

è

Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and waking the main processor to start from kernel.

The role of the SCP is mainly to setup clock and power devices. It does have much space to do anything else. You can look at open source implementation of SCP, select a platform that has one and check if it has enough memory (you may try to run U-Boot SPL). You need to know which chip has reponsibility to setup dram controller.

Quoted 112 lines

Thank you.

Chan Kim

*From:* Chan Kim <[email protected]>
*Sent:* Thursday, October 14, 2021 12:03 PM
*To:* 'François Ozog' <[email protected]> *Cc:* 'Tom Rini' <[email protected]>; '[email protected]' < [email protected]>
*Subject:* RE: how to run u-boot on qemu arm64 virt machine?

Hi Francois,

Thanks for the good information. I’ll look into that later.

Can I ask you a basic question?

When there are SCP, MCP and the main processor, in what processor does u-boot program run? I understand it runs on the main processor.

Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and calling kernel.

Thank you!

Chan Kim

*From:* François Ozog <[email protected]>

*Sent:* Wednesday, October 13, 2021 6:29 PM
*To:* Chan Kim <[email protected]>
*Cc:* Tom Rini <[email protected]>; [email protected] *Subject:* Re: how to run u-boot on qemu arm64 virt machine?

Hi

You can find work in progress here too:

http://releases.linaro.org/components/ledge/rp-0.2/ledge-multi-armv8/

For aarch64 there are virt and sbsa-ref machines. Virt is essentially to boot a VM while sbsa-ref is a reference platform that mimics all required hardware, firmware for the secure world (TF-A, OP-TEE) and firmware for normal world (U-Boot, EDK2). This technology (sbsa-ref) is really to simulate a system for pre-silicon development while virt shall be used in cloud native environments.

We are working on something that we may end up calling bsa-ref (note the absence of initial S standing for “server”). Sbsa-ref is about edk2 and acpi, bsa-ref is about U-Boot and device tree. The directory points to this work in progress. You can have a look at SystemReady in Arm to understand and get details on bsa.

In a future release of Qemu, one will be able to simulate a full platform with its main processor (as of today) but also SCP (system control processor) and MCP (management control processor).

Cheers

FF

Quoted 2 lines · Chan Kim

That's a very old QEMU version. We use v6.1.0 currently and v4.2.0

before

Quoted 4 lines

that.

--
Tom

Thank you, Tom

Yes, so I tried it now with v4.2.0 with "-nographic" option. (Without it I still see qemu manager window.)

Chan Kim

--

*François-Frédéric Ozog* | *Director Business Development*

T: +33.67221.6485
[email protected] | Skype: ffozog

Signature · 3 lines
François-Frédéric Ozog | *Director Business Development*
T: +33.67221.6485
[email protected] | Skype: ffozog