Commit graph

85 commits

Author SHA1 Message Date
Anas Nashif 94b29b562b kconfig: put bootloader and reboot options in a menu
Some options appear in the top level menuconfig, group them
and put put them in a menu.

Change-Id: Ib0285176e7f0ed7ec9ff54dd80c0f02ec4817f2b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:55 -05:00
Anas Nashif 77ba3c3b8b kconfig: define architecture as a kconfig variable
Do not depend on environment variables and use a kconfig variable
for defining the architecture.

In addition, remove the X86_32 variable, it just duplicates X86 for
not good reason, at least until start supporting MCUs with 64bit.

Change-Id: Ia001db81ed007e6a43f34506fed9be1345b88a4b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:52 -05:00
Benjamin Walsh 826edfc16b reboot: add reboot infrastructure
Add the REBOOT kconfig option, along with the sys_reboot() API.

This infrastructure is not enough to actually perform a reboot.
Architecture/platform code must be provided as well, in the form of a
sys_arch_reboot() function.

Change-Id: I5b2b15855ff06453f2764f3e3b3b7d6a4a078723
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:43 -05:00
Benjamin Walsh 760f191b1e debug: add safe memory access routines
Introduces the following routines to provide safe access to memory:
   _mem_probe()
   _mem_safe_read()
   _mem_safe_write()
   _mem_safe_write_to_text_section()
Those routines will return an error if the memory is not accessible rather
than potentially crash.

This implementation is based on the image's boundaries; thus it allows
read/write access to the data/bss/init sections and read access only to
the text/rodata sections.  All other memory is considered invalid, even
if addressable. This includes the leftover from the RAM at the end of
the image, since there is no support for using it (e.g. there is no
dynamic allocator).

Change-Id: I6093688ecfd9b00d61be0fd453ada7bb8915c897
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:42 -05:00
Yonattan Louise 815513a11d OS Awareness: Add debug object trace configuration.
Add the Kconfig option for enabling the debug object tracing.

Change-Id: I56bf48568905604f6f50a06db2c5eaf4d91ded1d
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
2016-02-05 20:24:32 -05:00
Javier B Perez Hernandez f7fffae8aa Change BSD-3 licenses to Apache 2
Change all the Intel and Wind River code license from BSD-3 to Apache 2.

Change-Id: Id8be2c1c161a06ea8a0b9f38e17660e11dbb384b
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:29 -05:00
Anas Nashif 1dc809b23b kconfig: use zephyr as the binary name globally
do not use microkernel or nanokernel as the output binaries,
instead, use zephyr globally.

Also change the documentation to reflect this.

Change-Id: I8405761d1a0392c90cdfeec5c67d72eb4e5a76ff
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:22 -05:00
Anas Nashif ee743c7d42 build: allow usage of a custom linker script
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>
2016-02-05 20:24:22 -05:00
Dirk Brandewie 9af81cc280 kernel: kconfig: remove boot options menu
Change BOOTLOADER_UNKNOWN to be a top level option the depends on
X86_32.

Change-Id: I1a92324038b53234730cc7324f43413f8ac18827
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie f37a4fcd71 kernel: kconfig: remove dependencies on EXPERIMENTAL
Remove the hard dependencies on EXPERIMENTAL symbol. Mark all the
symbols the relied on EXPERIMENTAL as EXPERIMENTAL in their prompt

Change-Id: I2779b0ed0776b3d510a8e2e44b35b83d7ad2377c
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie c55c858ffc x86: remove obsolete option PROT_MODE_SWITCH
Zephyr requires that the processor be in 32 bit protected mode on
entry.

Change-Id: I71792eeb154281881e8516a7a8a2291a52f83fc6
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie c033a6d609 misc/kconfig: remove references to non-existant features
Cleanup help text to remove references to non-existant features

Change-Id: I360cdf3de4d6132f1ffdde627004b730b3392299
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Dirk Brandewie 3012166000 x86: remove legacy BOOT_A20_ENABLE option
BOOT_A20_ENABLE relies on the kernel being on a system that has a full
PC BIOS and requires that the A20 line be enabled to boot
correctly. None of the supported platforms satisfy either requirment.

Change-Id: I05805a050f5531de0348b60a4f0cb974e464b279
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:24:20 -05:00
Andrew Boie 858decd162 misc: don't depend on serial drivers for printk()/printf()
We are introducing other kinds of drivers which support a console
that isn't over a UART.

Change-Id: I0dddbdce958437b5709c5ab26252ed47d030413d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-02-05 20:24:17 -05:00
Alexandre dAlton 3bef343493 linker: add whole-archive flag to app lib
Change-Id: I167b67bb227718d18bc383c4562cccaa915ed22b
Signed-off-by: Alexandre d'Alton <alexandre.d'alton@intel.com>
Signed-off-by: Alexandre d'Alton <alexandre.dalton@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:24:04 -05:00
Anas Nashif f3f7eac765 Add MINIMAL_LIBC_EXTENDED to limit libc builds
This option adds optional libc functions that are not directly
used by the kernel but can be used for testing purposes.

This option is experimental.

Change-Id: Ia4dba718359c4f381047a5b52ebddb26d87ea75a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:16:15 -05:00
Constanza Heath 7d0e1d9218 Add initial import of TinyCrypt crypto library and tests
Change-Id: I89b8db6925385dd02e95e0401bc42f32543e0daf
Signed-off-by: Constanza Heath <constanza.m.heath@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:36 -05:00
Anas Nashif a2c88abf63 Add dropped GDB_INFO option
This option is being referenced all over the code but is not
being defined in Kconfig.

Change-Id: I181668ce7a35819804b8e6261f6cf27088843377
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:36 -05:00
Tomasz Bursztyka f55392770e misc: Add an option to enable early console
Unset by default. When set, this options will enable early printk
through the console. Such option is only meant to be used for debugging
purposes.

Change-Id: I6690f94b0922826bd2666ef0488dcabe2f131531
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-02-05 20:15:36 -05:00
Anas Nashif 5c0bf859c3 Kconfig: reorganise misc/Kconfig
Put relevant items under the same menu and move compile options
out of general setup and make it a top level menu.

Change-Id: I8125418e19cb6ffd08825d30c07058ec0d943ba3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:35 -05:00
Juan Manuel Cruz 1be6519bda build: fix build fail when NS16550 disabled.
This commit fixes a linking error when disabling all serial drivers
and enabling PRINTK or STDOUT_CONSOLE.

Change-Id: I26414aea42776364ce01e090d533470d9569206b
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:15:27 -05:00
Anas Nashif 42fbd4afd2 cleanup libc kconfig and use choice
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>
2016-02-05 20:15:25 -05:00
Anas Nashif 05875f062d toolchain: support toolchain variants
This commit enables the use of special toolchains other than
the default. Some architectures have specialized cross-compilers
within the same SDK that need to be enabled for specific platforms
of an architecture.

For example, for Intel MCUs, we have an optimized toolchain that
needs to be used for specific platforms under x86.

Change-Id: I7e25603dd66ed3ec4e019c72483c76a32b3bbdde
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:15:25 -05:00
Peter Mitsis e8839abb4a Remove Kconfig option PROT_MODE_SWITCH_PROMPT
The Kconfig option PROT_MODE_SWITCH_PROMPT was being used to conditionally
display the "Boot Sequence Options" Kconfig menu. It is simpler to include
both PROT_MODE_SWITCH and its dependent BOOT_A20_ENABLE in the parent menu.
However, doing so necessitates that the name of the parent menu be changed
from "Bootloader Options" to "Boot Options".

Change-Id: I9b9a074a0d4ec5209f5349b42178409c73875b00
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:45 -05:00
Anas Nashif eb1fdf5741 Add debug option to Kconfig to enable debugging
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>
2016-02-05 20:14:45 -05:00
Peter Mitsis 8ff6904084 Remove references to BSP from misc/ directory
Replaces references to obsolete BSP terminology with platforms.

Change-Id: Id5f7760e2d14353a19c020afd8f87d9033ddbf69
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:43 -05:00
Anas Nashif c2762f5b5b Remove unused BOOTLOADER_GRUB
This option was remove as part of linker script cleanup
a few months ago.

Change-Id: If04d69096eb3ef682d72258be90bf710ed931e69
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:38 -05:00
Anas Nashif 72cb707f20 kconfig: Let the application decide the name of the kernel bin
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>
2016-02-05 20:14:37 -05:00
Anas Nashif edb02f0274 kconfig: move bootloader options to misc/
More bootloader options moved to 1 single menu.

Change-Id: I6908de8e26b4a15617ad5aa738c9dc2a928ad6a4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:26 -05:00
Anas Nashif def4fc89c1 kconfig: move bootloader options to misc/
Repeating options per BSP should all be maintained in one
single place.

Change-Id: I45394a5230978effa8fff93ecef736ba44e382d2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:26 -05:00
Anas Nashif b3234bd349 kconfig: move printk under debugging options
The options was shown in top level menu, it is however a
debugging option and should part of debug menu.

Change-Id: Id245a45fa9fc367382ffe2f07bf21daa468ad2fe
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:26 -05:00
Anas Nashif 36b05de231 kconfig: metrics depends on experimental
The menu would appear empty in menuconfig otherwise.

Change-Id: I00bb93bb3e9b7d4dbddd9a6e142a458d163781cb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:26 -05:00
Anas Nashif ab1ab563d5 Kconfig: add general options and debugging in misc/
Change-Id: Id9de9b1073ecf4d49a561e42f7b1013069c0552c

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:11 -05:00
Juan Manuel Cruz d15251fec5 Kbuild: Kconfig license headers.
This commit add license headers to Kconfig files.

Change-Id: I79e60263b8c7b696463ecc84b8ad411af5415117
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:10 -05:00
Juan Manuel Cruz 0e301cc07f Kconfig symbols for kernel and misc directory.
This commit adds the Kconfig files that describe the CONFIG
symbols that belongs to the kernel directory and subdirectories.
It includes the misc directory Kconfig as well.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I3e653562ea5c259203a63274197e3a0e1522ecc4
2016-02-05 20:14:04 -05:00