'Hello world' in Micropython in a 64-bit RISC-V BusyBox Linux guest on the Diosix hypervisor

by diosix
GNU/Linux ◆ xterm-256color ◆ zsh 1816 views

This is a demonstration of printing ‘hello world!’ using Micropython in a 64-bit RISC-V Linux guest OS on the bare-metal Diosix hypervisor. The command just seen in the term does the following:

  • The hypervisor and its system services are built, a Linux guest binary is located, and all these components are packaged up in a simple file-system image ready to boot.
  • The hypervisor is started inside Qemu, it initializes the emulated hardware – a quad-core 1GB system – and loads a system service that handles the console interface.
  • The hypervisor then loads the Linux guest OS into its virtualized environment, called a capsule, and starts it.
  • Linux boots as if it were on real hardware, and eventually gets to a login prompt.
  • Via the console system service, the user can log in and interact with a BusyBox-based environment. The zsh shell is provided.
  • The guest kernel build and version info can be displayed using the uname -a command, and a list of the root directory using ls -l /.
  • The user can run micropython and print ‘hello world!’ from the interpreter.
  • After exiting Micropython, the user can shutdown the guest using the command poweroff.