Another option to exit QEMU is pressing keys CTRL-a followed by key x. In U-Boot’s console you can use the poweroff command to stop QEMU. U-Boot gives you a 2 second time window to press the Enter key to reach the U-Boot console. When rebooting we have to remove the installer image. drive file=jammy-live-server-riscv64.img,format=raw,if=virtio \ kernel /usr/lib/u-boot/qemu-riscv64_smode/u-boot.bin \ usr/bin/qemu-system-riscv64 -machine virt -m 4G -smp cpus=2 -nographic \ 16 GiB should be enough.ĭd if=/dev/zero bs=1M of=disk count=1 seek=16383 ĭownload the image either using your web browser or withĬreate the disk image on which you will install Ubuntu. Ī general overview of the installation process is available at. This topic describes how to use the image for an installation on a virtual machine. Starting with Ubuntu 22.04 a server install image for QEMU is available. Ubuntu installation of a RISC-V virtual machine using a server install image and QEMU You can use network-info to configure networking if something more sophisticated than just DHCP is desired.įor example ssh keys, disabling interactive login, and so on. Please mount CIDATA partition rename meta-data and user-data files and adjust them to taste. If you wish to customize user password, networking information, add ssh keys, etc. The image has CIDATA partition which can be used as a valid datasource to adjust cloud-config metadata. You will be asked to change the password on first login. The image has a fallback cloud-init datasource that configures sudo user ubuntu with password ubuntu and DHCP networking. See the cloud-init section below to further customise the first boot behaviour with cloud-init. It will show a line with the text 'Cloud-init finished' like: Watch the serial console output and wait for cloud-init to complete. One can use pass through networking, adjust memory ( -m) & cpu counts ( -smp) as needed. The second stage firmware U-Boot is loaded into memory via -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf This option is not needed with QEMU 7.0 or higher. The first stage firmware booted by QEMU is OpenSBI as specified by the -bios option. QEMU's generic virtual platform is selected by -machine virt drive file=ubuntu-22.04.2-preinstalled-server-riscv64+unmatched.img,format=raw,if=virtio device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \ kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \ bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.bin \ machine virt -nographic -m 2048 -smp 4 \ A working example with all the options is: Next use u-boot-qemu to boot the virtual machine. Qemu-img resize -f raw ubuntu-22.04.2-preinstalled-server-riscv64+unmatched.img +5G Optionally, if you want a larger disk, you can expand the disk (the filesystem will be automatically resized too). Xz -dk ubuntu-22.04.2-preinstalled-server-riscv64+ Sudo apt-get install opensbi qemu-system-misc u-boot-qemuįor booting Ubuntu 22.04 (Jammy) or later images use u-boot-qemu from release Ubuntu 22.04 or later.īooting a preinstalled server image with QEMUĪ preinstalled server image can be downloaded from. u-boot-qemu - U-Boot is the firmware implementing the UEFI API and loads GRUB.qemu-system-misc - QEMU 18 is used to emulate a virtual RISC-V machine. To boot a RISC-V virtual machine you will need the following packages:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |