Avoid having to remove quotes wherever the platform name is used
by exporting the variable only once.
Change-Id: I4cb51901e4ac19d70d0310fe6bbacd157f586661
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This lists all supported board by looking at configs/ and other
locations with defconfig files.
Change-Id: I48ed260543adfeacbc089f403f948010ea6f978e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not depend on host architecture and use architecture definition
from the defconfig file of the board.
Change-Id: Idb3dd42524f26bd167a34d6eb024d4d9816e9730
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Clang support already existed in the Makefiles but was not complete
and some gcc options did not work with clang. Move those to be conditional
on the compiler used to make clang work.
To build with clang for x86:
make CC=clang -C samples/microkernel/apps/hello_world/
You still need the gcc cross environment for various tools.
For now, only x86 was tested.
Change-Id: Ic5aeab4f80d312e1d1312a4a9fc885a43f760270
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This reverts commit 58fd0778c6dcc6bd3148b5d07615cd7bd777f456.
Change-Id: Ibffe036d2e182652b3c966c10ed405c9386f823c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Clang support already existed in the Makefiles but was not complete
and some gcc options did not work with clang. Move those to be conditional
on the compiler used to make clang work.
To build with clang for x86:
make CC=clang -C samples/microkernel/apps/hello_world/
You still need the gcc cross environment for various tools.
For now, only x86 was tested.
Change-Id: I1a50c3a82d79ff3001beb4366961ca810eeb6006
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove goals that call scripts we do not have or support.
Change-Id: Ic6f1d2b620e20f7355e1dec0a2454239fad8f123
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Lots of code that is not being used by Zephyr but makes debugging and find
issues related to zephyr very difficult.
Change-Id: If8f6515d68f64b03cc881a9c3cde48c0451fe3b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Application source code is not a core component of the kernel.
Remove from core-y and put the application tree in its own category.
Change-Id: I1d6f479829eb58b9a49baf90aaf9f74187660b86
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
use zephyr.h as the main include in applications, no need to have nano/micro
includes in applications and samples.
Inclusion of the proper kernel headers is be handled in the zephyr.h based
on the configured and used kernel.
Change-Id: If5275cef5d2ad1f475dfb39102cb71cfe5630f6c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
will generate an extra file that specifies the maximum amount
of stack used, on a per-function basis.
Using a static stack checker the data can be analysed, for example:
http://dlbeer.co.nz/oss/avstack.html
Change-Id: I23bd8ce7c4516bd0c7ffb74504e6d379677f25f8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The makefile has some options we do not have in Zephyr, so better
remove them to avoid any confusion and misconfiguration.
Change-Id: I35663261bceb741a28d35bdbe87df451aa298c86
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move Zephyr specific CFLAGS that depend on config options to
the Makefile where they can better be managed among other cflag
options.
Change-Id: Ia79a2f2def4f51857f6d661aa78e9fb7eb7a5e22
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit updates the help message adding pristine target
and removing reference to a non-existent README file.
Change-Id: I38f32e6d1e2fc0723894b5e5a71570bc4333e615
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This change will allow the use of a custom linker script by
setting the config variable CUSTOM_LINKER_SCRIPT to a path outside
of Zephyr tree.
This is useful when an application needs to add sections into the
linker script and avoid having to change the script provided by
Zephyr.
Change-Id: Ibe31abcc8c0227e734f59bc26d3c8d5619951b29
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
From old build system -DPERF_OPT was set with no optimisation, that
was buggy and did not function as expected with new Makefiles.
Change-Id: I21ebbe0e9314d0a25cb53c6455ff244252e44af0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
TinyCrypto includes files are in 'include' subfolder.
Without this patch one is required to include eg
#include <include/aes.h>
instead of
#include <aes.h>
Change-Id: I4a761a107d819400ad39cc0e3fb918bed2df4ab4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Follow the model of the Linux kernel for adding arch
specific CFLAGS by using the Makefile and Kbuild combination
in the arch/<arch> directory.
This will also allow adding architecture specific targets and is
easy to maintain when alongside the architecture.
Change-Id: If51a78e8845baa71d9090c4a4f49fcd013354840
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Makefile.inc duplicates many of the existing targets in Makefile.
Instead of duplication, pass all none local targets to Makefile
and implement only those needed locally.
Change-Id: I1e923dd398a138543fa676ab67570b630c75d7ea
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Using nm and sed works fine on Linux, however when moving to other
platforms, nm and sed do not work the same way and might have
different behaviour. This reduces dependency on host tools and brings
back the code for generating the offsets.h directly using a built
utility that is portable.
Change-Id: I13db1c16cbed12e366fd41d151886bbcbf419548
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
CONFIG_COMPILER_OPT was set before it was initialised.
Change-Id: I398da7a9fde1ad64ff5a8df41ec50884f8844ce6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove references and make targets still referring to Linux
Documentation directory.
Change-Id: I6544e0ea9ae6c6c48158c89ed9bd61d73b1684fd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This will allow adding more libc implementations in the future.
Also use the location of the include directory from the toolchain
settings.
Change-Id: Idae5e4ffd9b1bcb5e924da156df56e81f10c8842
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This will allow building of external components and linking
them at the end of the build process to the main kernel.
add a Makefile.app to the project directory with the required
targets, for example
Makefile.app:
KBUILD_ZEPHYR_APP := /tmp/libapp.a
/tmp/libapp.a:
@touch /tmp/libapp.a
Change-Id: If2ba6b3ee59023acc5f85c5701b65c4d096d5059
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This warning isn't particularly useful and we intentionally do this
in our __assert.h macros.
Change-Id: I783398fd92dffe57e2e18d520db4e752c8c37a98
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This is really not a platform target, rename it to match
what it really does, which is building drivers.
Change-Id: Ie36781fa0916371013de81b9fa542a9e790af7e6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The way we build the libc files is not a real library that can be
used as a libc and makes managing the source files a bit
difficult, so lets revert back to building the c function files
like everything else in the system to avoid any confusion.
Change-Id: I4e998e37bc376522fe253c4aefefe7804597f0f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The top make file has a documentation target that does not work.
Change it to work with our documentation and scripts.
Change-Id: Id32643900d122f54778e3179930f2e8e34387aa1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This only disables optimizations for now, we should
be able to select more debug options from here.
it changes KBUILD_CFLAGS from -Os to -O0.
Change-Id: I84515356f8af006b724d706c0647a671db54a6b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Performance is about the same, it does not appear to cause issues,
and older versions of QEMU don't support this flag.
Change-Id: Ie45a2396c7b0d3098923244d92b15422491413a1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
See
https://groups.google.com/forum/#!topic/ia32-abi/cn7TM6J_TIg
for more details.
• Support IA32 without FPU.
• Minimum ISA: Pentium ISA without x87 FPU instructions.
• Don't allow mixing i386 object files with Intel MCU object files.
• Support floating point with software emulation:
a. Long double is the same as double.
b. Use __float80 for 80-bit double.
• Minimize memory footprint:
a. Code size
b. Data size
c. Stack size
Here is the draft of Intel MCU psABI. The differences from IA32
psABI are
1. The minimum instruction set is Intel Pentium ISA minus instructions
for x87 floating point unit.
2. There are no x87 floating point registers.
3. There are no vector registers.
4. Segment registers are optional.
5. Support for TLS relocations are optional.
6. Scalar types larger than 4 bytes are aligned to 4 bytes.
7. There are no vector types.
8. _Decimal32, _Decimal64, and _Decimal128 types are optional.
9. long double type is the same as double.
10. float, double and long double types are passed and returned in
general purpose registers.
11. _Decimal32 and _Decimal64 types are passed in general purpose
registers.
12. Aggregate types no larger than 8 bytes are passed and returned
in general purpose registers.
13. Stack is 4-byte aligned.
14. The auxiliary vector support is optional.
15. Register %edx has undefined value at process entry.
16. New ELF machine code: EM_IAMCU.
17. New predefined C/C++ pre-processor symbols: __iamcu and __iamcu__
Change-Id: I6a0c45ad22d8f710b6f37a041aaa2fc1bf0b1c39
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If set, 'make qemu' will direct its console output to a named pipe and
disable the interactive monitor. Intended for use with the new sanity
check system which will parallelize test execution.
Change-Id: I902f77c02ed3f210891ff13147afea890e64d9c1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This introduces a new option
CONFIG_KERNEL_BIN_NAME
that can be used in the kernel configuration (kconfig) to set
the final binary name, for example you can set:
CONFIG_KERNEL_BIN_NAME="test_app"
in the project.conf and this will result in
test_app.{elf,bin} in outdir.
The default is still using the type of the kernel being used, i.e.
microkernel.elf or nanokernel.elf
Change-Id: Id6c437af2ce4c02cb52d4e1e41b29e64d83f9aab
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Updates references to CONFIG_BSP_DIR to CONFIG_PLATFORM as part of the
BSP -> platform clean up.
Note that despite the renaming, the usage of the config option remains
unchanged.
Change-Id: I2846c3f761cf09871019c0855bf1824ae03e6b3c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Use macro for checking in the code for a specific version,
for example:
if ZEPHYR_VERSION_CODE >= ZEPHYR_VERSION(0,6,2)
...
endf
Change-Id: I21f152ca3444630a0273e4a8115b56a2a4179924
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use printf to convert from decimal to hex and set the version.
Change-Id: Icdcfcd92f9b6ac1c2d0669d490b0122747ac7f4e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The kernel version has been converted from a string to a four-byte
quantity that is divided into two parts.
Part 1: The three most significant bytes represent the kernel's
numeric version, x.y.z. These fields denote:
x -- major release
y -- minor release
z -- patchlevel release
Each of these elements must therefore be in the range 0 to 256, inclusive.
Part 2: The least significant byte is reserved for future use.
EXTRAVERSION is used for intermediate releases and customised
builds on top of an existing/released version.
Change-Id: Ibb7dd5654c36daeaa3a53499857d254aaef25bdf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The generated version number in hex was incorrect and macros
were failing.
We also did not convert decimals to hex before we created the hex
version number.
Change-Id: Ic5b8d4a40d907f09cf4184e84f0ce89a4532a9b5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This has been causing issues with developers using older
compilers. Until we are on the same version and have a
better way to deal with this, lets disable it.
Change-Id: I25c895c72a7a1a888332320d78bd47246dbafaff
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In order to support IRQ_CONNECT_STATIC implementation for ARM,
the platform code needs to be linked after drivers.
Change-Id: Ifcba89283e4b9dc18a9cb774d591a689b38c9254
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
This commit removes original linux CFLAGS that needed review.
Change-Id: Ieeb13dcd3fc4d8c76bf48b6efbb3d6fa7767dfe2
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit set back .S as the assembly code extension for Kbuild.
Change-Id: Ib0119876bd0bed6617bbfbad2ca6a44e172ab042
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Remove excessive use of zephyr and use a more generic
terminology where possible.
Change-Id: Ida8916765dbe824f63d7a4cedba60b35d14aee55
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Not all GCC toolchains generate a fully linked image (non-relocatable) when
using ${CC} for linking.
Change-Id: Id99501b6510cd6eeb87f245a6273fcebd6d36cde
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Updates this environment variable to reflect the new OS name.
Change-Id: Iba9230466fbfda786be7d1265927b4ecc4c7dd93
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
The file extension indicates a "Microkernel DEFinitions" file,
and no longer reflects the obsolete VxMicro/Viper branding.
Change-Id: Ib95b271404a4a4737e851d603c371244fa609e4d
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit organizes the prepare sequence targets removing
some unused targets left behind as a relique from the linux build.
Change-Id: I7b215865e2c06f9c0138806bce9fce9191d07d8b
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit removes the generation of the kernel.release file.
THe kernel.release file is redundant with the kernel version file.
Change-Id: I55f75597a760b3a9c672b7409ad93533a4f2c6ab
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Use patches qemu binary provided by the Yocto SDK.
Change-Id: I5edc2338f45fdd0d953d8d34bea648d0d18d8bf8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This reduces the clutter and let us focus on what really
counts.
Change-Id: I30a245697684a036c6a908e52d77005b35b53d81
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit allows the tools build to be executed at TIMO_BASE
directory insted of being executed at the PROJECT_BASE.
This allows the sanity checks to run faster because there is no
need to recompile the tools with every test.
Change-Id: I9e9ac78695db884b44e2693029e9ea6ed96b21c8
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit removes targets dragged from linux system that are not
used in the current kernel build system.
Change-Id: Ie423a5478b2c86c2fa02a66096934f01b898f1f5
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit updates the help text content to cover
the targets that are currently supported.
The deleted help text will be added as functions are enabled.
Change-Id: Ia7c539a44427d740f23cdf12e5d3a18d3dd7cf24
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Right now we are building minimal libc as an archive (lib.a)
and do not need to link against -lc -lm in that case.
Link against libc/libm only when using an external libc.
Change-Id: I1af0eaf5c059bd5f0c8c16cda28114c6dc10b156
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This options allows us to link against newlib instead of the
integrated minimal c library.
Change-Id: I20990354d74c08f2f6348f0aeea452b8f0f4c8e9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This allows a toolchain to define the auxiliary libraries in
scripts/Makefile.toolchain.{variant} with more flexibility.
Change-Id: Iaae9c7613ddcbcc8376b7e756aa4b675db680737
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit adds the variable LDLIBS_TOOLCHAIN that, by default,
add the gcc static library to the link command.
This variable can be overriden as an environmental variable or as a make
parameter to allow the use of different toolchains different from gcc.
Change-Id: Id9d6c8621a7dc8feebdf377c115564701fb7652b
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
To use this, export the following:
export VXMICRO_GCC_VARIANT=yocto # for yocto
export VXMICRO_GCC_VARIANT=xtools # for crosstool-ng
export YOCTO_SDK_INSTALL_DIR=/opt/poky-tm/1.8
or
export XTOOLS_TOOLCHAIN_PATH=/opt/crosstool-ng
Change-Id: I9cd6062ecc32047d1582aad46209f4232e0e31f6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit changes the way libc is built.
Instead of building a hierarchy of objects linked into the
microkernel, libc minimal is built as a static library and
linked against the microkernel binary.
The location of the libc is configurable with the variable
KLIBC_DIR. This gives the flexibility to build against a
different libc other than minimal.
Change-Id: I9c0b6a684a9f3b407861aa387727c45eceb269c4
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit adds the Makefile and Kconfig files
to support the bluetooth driver in the Kbuild system.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I1f72b13aca8fb098eece04c4f0e1b680639b520f
This commit includes the genIdt tool as part of the kconfig
basic tools. Now the genIdt tool is built automatically as
part of the whole kernel project.
Change-Id: I45110a7c564c59d7a6684d868ccc377cbd6ef1c4
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
In some cases you might want to compile sources in a
customer location, for example share code for samples
that runs in nano and micro kernels.
Set SOURCE_DIR in the project Makefile to achieve this.
Change-Id: Iaa4d0fe701b30499b903b64ddf816a678074a176
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
KBUILD_CFLAGS line was broken because a breakline was missing.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I47a36f89d7cd589c71ce0bfb9a6d346a12202f43
This commit fixes the issue that ISA_FLAG was not being
added during the build process.
Change-Id: I780c8dbae8912ee8e159827cb24a5700432898d2
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
This commit removes several CFLAGS inherited from Linux Kconfig
that are not used in the current build system.
- The option fno-delete-null-pointer-checks is not used.
- O2 is not a default option and the symbol
CONFIG_CC_OPTIMIZE_FOR_SIZE is not supported.
- The option allow-store-data-races=0 is not used.
- The fno-stack-protector was being added twice and is not
a default parameter.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I3791d995638dea50796f041e558a39d5aa7e88f6
This commit add the following changes to the internal CFLAGS:
- DEFAULTFLAGS is adjusted to only hold the Os option by default.
- CONFIG_COMPILER_OPT is a Kbuild symbols that is included
in the CFLAGS.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ie78fe00c8d9b05f5d0361357267f08d978006427
We use the microkernel/nanokernel naming convention,
so run qemu with the right file.
Change-Id: I6cedf34f85693d6026c450904e1ce72c435baa06
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit adds support for the qemu target.
This target will generate the kernel binary and will
launch a qemu instance running the binary.
Currently, only the x86 generic pc and the arm tilm3s6965
BSPs are supported with emulation.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I9e71d3ce2fba98572830475a2e15e3fceb0216b4
This commit changes the name of the output files.
The output names tinymountain.* have been changed to
microkernel.* and nanokernel.*.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia73daa35bb8e44972065af3a217bf87335169dac
This commit substitutes references to the linux string in variable
names.
It changes the LINUX prefix and uses the TIMO prefix (short for
tiny mountain)
It changes the vmlinux prefix for tinymountain prefix.
It preserves linux references found in licenses, comments giving
credits and from scripts that are not supported by the current build
system yet, like rpm generation.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Id17d8d12161f00e2a2ff38f218cdb6c5afd169c0
This commit is adding the linking process.
-Creates linker command files.
-Creates IDT tables.
-Creates final ELF file.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I3ce92868b00957fdc24a361cc419e3548f475cc3
This commit adds all Kbuild CFLAGS to build the kernel binary.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia4ca1b71b4e68c4515c428147a8814ca983bb541
This commit fixes the target clean functionality.
Originally, the clean and mrproper targets search for the
Documentation and samples directories and their respective
Makefiles.
Our current directory structure is not including Documentation
directory yet. Also, there is not support for a global Makefiles
at samples directory.
This commit deletes references to Documentation directories for
clean and mrproper targets as well.
Also, This commit deletes the reference to sample directory for
clean target.
Finally, this commit temporary fixes the references to assembly
files .s extensions. This has been marked as a BUG until all .s
files can be renamed to .S files.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I4c95c2eed4b5756843ecb9021d03401289522586
This commit organizes the different directories listed in the
root Makefile. Each directory hold a root Makefile describing
libraries and object bundles that will be linked together as
the kernel binary.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I4af16114598ad985dfb4faac68e82dc73b1b6cc5
This commit adapts the root Makefile to generate the version.h
header with the format expected by embedded os.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ib394ad6b3fab4f02f6953d83d04f13404df87832
Adding the root Makefile from linux 3.19-rc7 Kbuild as is.
This Makefile will be modified and adapted to the current build
system in following commits.
This is done with the intention to help the revision of changes
that were done to the original Kbuild Makefile.
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ib897553d4d073dc3e3dab702b87b92a6f82cd804