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

"Successful Testing, Issues for Other Custom ARM Hardware" #28

Closed fangkaix closed 1 year ago

fangkaix commented 1 year ago

Thank you very much for your efforts. I have successfully tested qemu and rpi4b with your source code recently. I think this project is very valuable. However, there are still some issues as follows:

  1. The program boot process should be TF-A -> Uboot -> bao, and then use bao to boot each guest, right? Is U-boot a must in your design?
  2. Where can I get an introduction to this virtual machine framework to explain how it works?
  3. How do I deploy it on my own (arm) hardware?
josecm commented 1 year ago

@fangkaix thanks for your comments!

  1. The program boot process should be TF-A -> Uboot -> bao, and then use bao to boot each guest, right? Is U-boot a must in your design?

No ou u-boot per se is not a must, but you do need to somehow load the bao image (which in the demos has the guests images embedded. For some platforms (e.g. zcu104) we are actually able to boot bao directly from TF-A, because the platform's first-stage bootloader is able to load the images from storage, so u-boot is not really needed. It really depends on the platform.

2. Where can I get an introduction to this virtual machine framework to explain how it works?

Right now there is no documentation available, but we have started to work on it recently. In the next few weeks we will start to provide detailed documentation on how to configure Bao and VMs as well as on the boot details.

3. How do I deploy it on my own (arm) hardware?

There will also be some documentation for porting. However, since bao does not have any drivers (except uart) in bao this is quite simple:

  1. If the uart you plan to use in your target platform is not supported by Bao, you need to write a simple driver for it. Please take look at the other uart driver implementations.
  2. You need to create a directory for your target board under the src/platform directory and write the platform.mk, platform.h, and platform_desc.c files that describe the platform and define some of the build parameters. Please take a look at one of the other boards to understand what information these files should contain. It should be straightforward.

Please forward me any questions regarding this. I'll be happy to assist you in that process.

fangkaix commented 1 year ago

@josecm thank you so much!