After installing the toolchain, for some use cases you might need to separately extract a root filesystem:
You want to boot the image using NFS.
You want to use the root filesystem as the target sysroot. For example, the Eclipse IDE environment with the Eclipse Yocto Plug-in installed allows you to use QEMU to boot under NFS.
You want to develop your target application using the root filesystem as the target sysroot.
To extract the root filesystem, first source
the cross-development environment setup script to establish
necessary environment variables.
If you built the toolchain in the Build Directory, you will find
the toolchain environment script in the
tmp
directory.
If you installed the toolchain by hand, the environment setup
script is located in /opt/poky/2.3
.
After sourcing the environment script, use the
runqemu-extract-sdk
command and provide the
filesystem image.
Following is an example.
The second command sets up the environment.
In this case, the setup script is located in the
/opt/poky/2.3
directory.
The third command extracts the root filesystem from a previously
built filesystem that is located in the
~/Downloads
directory.
Furthermore, this command extracts the root filesystem into the
qemux86-sato
directory:
$ cd ~ $ source /opt/poky/2.3/environment-setup-i586-poky-linux $ runqemu-extract-sdk \ ~/Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \ $HOME/qemux86-sato
You could now point to the target sysroot at
qemux86-sato
.