]> code.ossystems Code Review - openembedded-core.git/commit
baremetal-helloworld: Create recipe for baremetal examples on QEMU
authorAlejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Fri, 31 Jan 2020 09:54:42 +0000 (01:54 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Feb 2020 11:59:32 +0000 (11:59 +0000)
commitb314e9a0923c8aa95a2f2c3f48d956206e9885a7
treec204b56cfab79ddabfd257686ece7db566b0e36d
parentd3083e941578fb343454e106eba349adcc525ad3
baremetal-helloworld: Create recipe for baremetal examples on QEMU

Create HelloWorld examples that run on several of the QEMU architectures
supported by the build system.

This recipe can be used by anyone to understand how baremetal applications
can be built using OpenEmbedded and how the wiring to set them up could be.

This should also facilitate creating/extending the OE testing infrastructure
to allow baremetal applications or RTOSs to be tested in the same way that
Linux currently is.

This can easily be extended to work on other MACHINES in the future.

To run this example:

$ source oe-init-buildenv

$ bitbake-layers add-layer ../meta-skeleton

# TCLIBC="baremetal" would work as well
$ echo "TCLIBC = \"newlib\"" >> ./conf/local.conf

$ echo "MACHINE = \"qemuarm64\"" >> ./conf/local.conf

$ bitbake baremetal-helloworld

$ runqemu

runqemu - INFO - Running bitbake -e ...
runqemu - INFO - Continuing with the following parameters:
KERNEL: [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.bin]
MACHINE: [qemuarm64]
FSTYPE: [bin]
ROOTFS: [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.bin]
CONFFILE: [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.qemuboot.conf]

Hello OpenEmbedded!

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb [new file with mode: 0644]