|
Here are some quick instructions for using the qemuarm target that ispreinstalled in fuego.
|
{{TableOfContents}}Here are some quick instructions for using the qemuarm target that ispreinstalled in fuego.
|
|
Fuego does not ship with a qemuarm image in the repository, but assumesthat you have built one with the Yocto Project.
|
Fuego does not ship with a qemuarm image in the repository, but assumesthat you have built one with the Yocto Project.
|
|
If you don't have one lying around, you will need to build one. Thenyou should follow the other steps on this page to configure it to runwith Fuego.
|
If you don't have one lying around, you will need to build one. Thenyou should follow the other steps on this page to configure it to runwith Fuego.
|
|
Yocto Project Quick Start, for more information)
|
= Build a qemuarm image =Here are some quick steps for building a qemuarm image using the Yocto Project:(See the [[http://www.yoctoproject.org/docs/2.1/yocto-project-qs/yocto-project-qs.html|Yocto Project Quick Start]], for more information)
|
|
Note that these steps are for Ubuntu.
|
Note that these steps are for Ubuntu.
|
- make sure you have required packages for building the software * sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm * install the qemu software * sudo apt-get install qemu-user * download the latest stable release of the Yocto Project * git clone git://git.yoctoproject.org/poky * configure for building the qemuarm target * cd poky * source oe-init-build-env build-qemuarm build-qemuarm * edit conf/local.conf * Under the comment about "Machine Selection", uncomment the line 'MACHINE ?= "qemuarm"' * build a minimal image (this will take a while) * bitbake core-image-minimal
|
* make sure you have required packages for building the software * sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm * install the qemu software * sudo apt-get install qemu-user * download the latest stable release of the Yocto Project * git clone git://git.yoctoproject.org/poky * configure for building the qemuarm target * cd poky * source oe-init-build-env build-qemuarm build-qemuarm * edit conf/local.conf * Under the comment about "Machine Selection", uncomment the line 'MACHINE ?= "qemuarm"' * build a minimal image (this will take a while) * bitbake core-image-minimal
|
|
|
= Running the qemuarm image =You can run the emulator, using the image you just built: * run the emulator * runqemu qemuarm
|
- find the address and ssh port for the image * inside the image, do 'ifconfig eth0'
|
* find the address and ssh port for the image * inside the image, do 'ifconfig eth0'
|
|
|
= Test connectivity =From the host, verify that the networking is running: * ping 192.168.7.2 * ssh root@192.168.7.2
|
|
Of course, substitute the correct IP address in the commands above.
|
Of course, substitute the correct IP address in the commands above.
|
|
Once you know that things are working, directly connecting from thehost to the qemuarm image, make sure the correct values are in theqemu-arm.board file. You can edit this file inside the fuego containerat /userdata/conf/boards/qemu-arm.board, or on your host in .../fuego/userdata/conf/board/qemu-arm.board
|
Once you know that things are working, directly connecting from thehost to the qemuarm image, make sure the correct values are in theqemu-arm.board file. You can edit this file inside the fuego containerat /userdata/conf/boards/qemu-arm.board, or on your host in .../fuego/userdata/conf/board/qemu-arm.board
|
|
Here are the values you should set: * IPADDR="192.168.7.2" * SSH_PORT=22 * LOGIN="root" * PASSWORD=""
|
Here are the values you should set: * IPADDR="192.168.7.2" * SSH_PORT=22 * LOGIN="root" * PASSWORD=""
|
|
|
= Test building software =It is important to be able to build the test software for the image youare using with qemu.
|
|
The toolchain used to compile programs for a board is controlled viathe PLATFORM variable in the board file. Currently the qemu-arm.boardfile specifies PLATFORM="qemu-armv7hf". Unfortunately, in my own testingthat toolchain won't produce a binary that runs with a core-image-minimalimage from YP Poky.
|
The toolchain used to compile programs for a board is controlled viathe PLATFORM variable in the board file. Currently the qemu-arm.boardfile specifies PLATFORM="qemu-armv7hf". Unfortunately, in my own testingthat toolchain won't produce a binary that runs with a core-image-minimalimage from YP Poky.
|
|
You may need to install your Yocto Project SDK into fuego, in order tosuccessfully build programs for the platforms.
|
You may need to install your Yocto Project SDK into fuego, in order tosuccessfully build programs for the platforms.
|
|
See Adding a toolchain for information about how to do that.
|
See [[Adding a toolchain]] for information about how to do that.
|
|
Try building a simple program, like hello_world, as a test for the new system, and see what happens.
|
Try building a simple program, like hello_world, as a test for the new system, and see what happens.
|