Initial setup in simulation using QEMU(for risc v)
runqemu qemu-riscv64.I will fetch detailed instructions on setting up meta-riscv, configuring Yocto for RISC-V machine, building an image, and running it on QEMU. This will provide a step-by-step guide for the user.{"urls":"[https://github.com/riscv/meta-riscv","https://bootlin.com/blog/updated-yocto-support-for-sifive-risc-v-platforms/","https://docs.yoctoproject.org/dev-manual/qemu.html"]}To generate a custom Linux image using Yocto for RISC-V with QEMU, the general steps are as follows:
Initially I had cloned into the branch of mickledore (without realizing the corresponding version does not exist for meta-riscv)

Set up the Yocto build environment by cloning Poky and required layers, including the meta-riscv layer which supports RISC-V architecture. (Like a preexisting recipie)


Add the meta-riscv layer to your bblayers.conf. (Or the layer can be added from build directory)

Set the MACHINE variable in your local.conf to a RISC-V target supported by the layer, such as qemu-riscv64.
~/yocto/build/conf$ nano local.conf
Customize your image by selecting or creating your own image recipe, commonly starting with core-image-minimal.
Build the image using BitBake: bitbake core-image-minimal.
Once the build finishes, run the image using QEMU emulator targeting RISC-V with the command: runqemu qemu-riscv64.