How to run Linux on QEMU ? How do I learn embedded systems programming without the actual hardware ?
How to run Linux on QEMU ?
How do I learn embedded systems programming without the actual hardware ?
Linux 5.15 on QEMU
Now run the "OE Build Environment Setup Script" to setup the environment.
In your case initially there will not be "build" folder as seen in above image. Once below command is given, it will create a build folder for you.
Observe the terminal, now you are in "build" folder automatically.
If you don't want to use default "build" folder and you want give a name then you can use below command:
$ source oe-init-build-env <name to folder>
$ source oe-init-build-env qemuarm_build
Observe the image. Now you are in "qemuarm_build" folder instead of default "build" folder. (Click on the image to enlarge the image.)
It will automatically create a folder "conf" and files under this.
The files are as below:
└── conf
├── bblayers.conf
├── local.conf
└── templateconf.cfg
In the bblayers.conf file, the list of meta-* folders path will be automatically added by the script.
local.conf:
This
file is your local configuration file and is where all local user
settings are placed. The comments in this file give some guide to the
options a new user to the system might want to change but pretty much
any configuration option can be set in this file. More adventurous users
can look at local.conf.sample.extended which contains other examples of
configuration which can be placed in this file but new users likely
won't need any of them initially.
Lines starting with the '#'
character are commented out and in some cases the default values are
provided as comments to show people example syntax. Enabling the option
is a question of removing the # character and making any change to the
variable as required.
By default MACHINE variable is x86-64
MACHINE ??= "qemux86-64"
As we need to emulate ARM device select the machine as "qemuarm"
MACHINE ?= "qemuarm"
Remove the character '#' to uncomment the line.
Now run the below command to build the Linux image and Root file system :
To run the QEMU different python scripts are provided in the path:
poky/scripts
Once image build is success, run "runqemu" command boot the Linux image on ARM emulated device:
$ runqemu qemuarm core-image-minimal

Comments
Post a Comment