366 Commits

Author SHA1 Message Date
Juro Bystricky
6d3c048750 zephyr-getchar_git: sample program
Sample program for out-of-tree Zephyr images
development.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:45 -08:00
Juro Bystricky
636f7c4823 zephyr-kernel-src: pack Zephyr source
This recipe obtains the Zephyr source code tree.
The idea is to use this tree for out-of-tree Zepyhyr images via
DEPENDS += "zephyr-kernel-src"

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:45 -08:00
Juro Bystricky
c2a6b64162 zephyr-philosophers: use ZEPHYR_GCC_VARIANT="yocto"
Setting ZEPHYR_GCC_VARIANT="yocto" will result in images being
built by our own Makefile: Makefile.toolchain.yocto
The Makefile already contains LIB_INCLUDE_DIR definition, so it
can be removed from this recipe.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:41 -08:00
Juro Bystricky
60a43d692e zephyr-image.inc: use ZEPHYR_GCC_VARIANT="yocto"
Setting ZEPHYR_GCC_VARIANT="yocto" will result in images being
built by our own Makefile: Makefile.toolchain.yocto
The Makefile already contains LIB_INCLUDE_DIR definition, so it
can be removed from this file.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:41 -08:00
Juro Bystricky
d1627ac39b zephyr-kernel.inc: use own Makefile
Zephyr RTOS uses the environmental variable ZEPHYR_GCC_VARIANT to
determine which Makefile to use to build images. This allows different
Makefiles for different toolchains, so the toolchains can co-exist.
Rather than patching the included Makefile.toolchain.zephyr, we use
our own file Makefile.toolchain.yocto. This Makefile will be used as
long as Zephyr recipes set:

export ZEPHYR_GCC_VARIANT="yocto"

(Also removed some BOARD definitions)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:41 -08:00
Juro Bystricky
f7e9b19e1d zephyr-conf: various changes
Removed the need for "poky.conf", as a consequence
some variables previously defined via poky.conf needed to
be re-defined: TARGET_VENDOR, TCLIBCAPPEND
Moved here default BOARD definitions.
Defined DISTRO_VERSION.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:40 -08:00
Juro Bystricky
274d4bce79 README.txt: initial version
[YOCTO#10655]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:37 -08:00
Juro Bystricky
385380fc2c zephyr-philosophers: cleanup
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:36 -08:00
Juro Bystricky
404a9d50a4 zephyr-image.inc: cleanup
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:31 -08:00
Juro Bystricky
4cefaa1b01 zephyr-kernel-inc: add default BOARD definitions
Specify default BOARDs for x86 and ARM.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:31 -08:00
Juro Bystricky
3daa59f4da zephyrtest.bbclass: do not prepend 'test_'
Do not prepend 'test' to test programs.
(Don't assume all test programs names begin with 'test_')

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:30 -08:00
Juro Bystricky
d6298aac6b zephyr-kernel-test.inc: remove some ARM tests
Remove tests that fail because QEMU for ARM does not emulate
CortexM3 BASEPRI register functionality.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:30 -08:00
Juro Bystricky
2c8ff3342f zephyr-kernel-test-all.bb: modify LICENSE
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:27 -08:00
Juro Bystricky
1e2da74cf0 meta-zephyr: add support for cortexm3 toolchain
Cortex-M3 is not supported natively by oe-embedded, so we need to
do it here. With these changes it should be possible to run:

To build all Zephyr tests:
    $ MACHINE=qemuarm bitbake zephyr-kernel-test-all
    $ MACHINE=qemuarm bitbake zephyr-kernel-test-all -ctestimage

To build "philosophers" sample:
    $ MACHINE=qemuarm bitbake zephyr-philosophers

Once built, you can run the created "philosophers" image in qemu
(at this point the various paths have to be entered manually):

    $ ./tmp/sysroots/x86_64-linux/usr/bin/qemu-system-arm \
          -kernel ./tmp/deploy/images/qemuarm/philosophers.elf \
          -cpu cortex-m3 -machine lm3s6965evb -nographic -vga none

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:26 -08:00
Juro Bystricky
97643716c2 meta-zephyr: basic upgrade
Numerous changes to allow building and running various
Zephyr tests using Zephyr release 1.6 and Yocto master distro
(commit 3676601335b4673e3572d5a9987a351f0bb44bcb and later)
Work in progress.

Notable changes:
1. Zephyr 1.6 does not support the concept of nano and micro kernel
   anymore.
2. Location of various tests have changed
3. Changes due to subtle python3/python2 differences
4. Zephyr Makefile changes (including renaming)
5. Improved failed test detection
6. Remove patch files no longer needed

With these changes, it is now possible to run Zephyr test suite and
Zephyr sample programs. Currently only x86 CPUs are supported, with
additional CPU support coming in the near future, in particular
support for ARM Cortex-M3 CPUs

Prerequisites:
Modify local conf by adding:
DISTRO="zephyr"
MACHINE?="qemux86"

Modify bblayers.conf by adding "meta-zephyr" to BBLAYERS

To build all Zephyr tests:
    $ bitbake zephyr-kernel-test-all

To test all built test images:
    $ bitbake zephyr-kernel-test-all -ctestimage

You can also build and test an individual test. This is done by appending
the actual test name to the "zephyr-kernel-test", for example:

    $ bitbake zephyr-kernel-test-test_sleep
    $ bitbake zephyr-kernel-test-test_sleep -ctestimage

It is also possible to build Zephyr sample programs. Included is a sample recipe
that builds the Zephyr "philosophers" sample:

    $ bitbake zephyr-philosophers

Once built, you can run the created "philosophers" image in qemu (at this point
the various paths have to be entered manually):

    $  ./tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386 \
         -kernel ./tmp/deploy/images/qemux86/philosophers.elf \
         -nographic -machine type=pc-0.14 -display none -clock dynticks \
         -no-acpi -balloon none

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:10:25 -08:00
Randy Witt
7a8d7eb97e Create the meta-zephyr layer with empty SRC_URI
Initial commit: original work by Randy Witt and Richard Purdie.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2017-01-04 11:09:57 -08:00