QMEU on Ubuntu22.04 with support by Fleximg
AWS-Marketplace
https://aws.amazon.com/marketplace/pp/prodview-zf5awcserlfru#pdp-usage
Usage Instructions
2. If you download a different version of the kernel and root file system, you must start from the first step again. Otherwise, proceed directly to step thirteen.
Operating Steps:
Step 1. Download the required version of the Linux source code.
Step 2. Extract the kernel package: tar -zxvf linux-x.xx.xx.tar.gz
Step 3. Create a compilation script in the linux-x.xx.xx directory.
export PATH=/usr/bin/:$PATH
export CROSS_COMPILE=riscv64-linux-gnu-
export ARCH=riscv
make clean
make menuconfig
make -j8
Step 4. Run the script and configure.
Step 5. Download the required version of the Buildroot minimal root file system.
Step 6. Extract the Buildroot package: tar -zxvf buildroot-xxxx.xx.x.tar.gz
Step 7. Go to the /work/risc-v/buildroot-xxxx.xx.x/config directory,copy qemu_riscv64_virt_defconfig to the /work/risc-v/buildroot-xxxx.xx.x directory,and overwrite .config.
Step 8. Create a compilation script in the buildroot-xxxx.xx.x directory.
make qemu_riscv64_virt_defconfig
make menuconfig
make -j8
Step 9. Run the script and configure.
Step 10. Enter the work directory and create an image.
Step 11. Copy /work/risc-v/linux-x.xx.xx/arch/riscv/boot/Image to image/.
Step 12. Copy /work/risc-v/buildroot-xxxx.xx.x/output/images/rootfs.ext2 to image/.
Step 13. Start QEMU and load the kernel image file, and mount the root file system.
cd /work/risc-v
Step 14. After successfully loading the Linux kernel and mounting the root file system, the QEMU interface will look as follows, indicating the successful setup of the Linux system environment based on the QEMU RISC-V platform.The login account and password are both root.
buildroot login:
password: