Commit graph

42559 commits

Author SHA1 Message Date
Benjamin Walsh
ca51a72133 dlist: enhance library and make all functions inline
The old doubly-linked list implementation had only support for very
basic operations, i.e. add at head and remove.

The new implementation is highly enhanced, allowing these operations:

- initialize list
- check if a node is the list's head
- check if a node is the list's tail
- check if the list is empty
- get a reference to the head item in the list
- get a reference to the next item in the list
- add node to tail of list
- add node to head of list
- insert node after a node
- insert node before a node
- insert node at position based on condition
- remove a specific node from a list
- get the first node in a list

The implementation is completely inline, since the operations are rather
simple and do not warrant a function call.

Change-Id: Id85c04e67f6a88b005390172f1276daa12bcf8ce
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
62333429af util: add CONTAINER_OF()
Obtain the pointer to the encompassing object from the location of a
field in the object.

Change-Id: If8f9ffa4998c4c19b4cd17293610fff677fa0158
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
f9d34ff899 nanokernel: rename struct s_CCS to struct ccs
Follow coding conventions.

Change-Id: Ie398d66e6255b76b4546aa9c827997b5dfb0743c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:22 -05:00
Benjamin Walsh
6b8589612f sys_clock: rename nanokernel's _do_sys_clock_tick_announce
Rename nanokernel's _do_sys_clock_tick_announce() to
_nano_sys_clock_tick_announce() so that it can be called from the
microkernel tick handling code without name ambiguity.

Change-Id: I2ec9dd92ceda51f00be1dd95bc3239d6b2e82943
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:21 -05:00
Benjamin Walsh
3284865323 arm: fix __assert.h inclusion in asm files
The #include <__assert.h> in nvic.h must be guarded by __ASMLANGUAGE
since nvic.h is usable by asm code, and __assert.h is C-only.

Change-Id: I16d72e4579705dbd0bfb55a787525c5938fd1f22
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
5e29f52883 sanity: Enable out-of-tree sanity check
Enables sanity to run out-of-sanity checks on a set of sample projects.

Change-Id: I58ae894b326a6eb15d6d56bc8e95738d21e17245
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
d902e9e514 sanity: Key off platform instead of BSP
Deprecates (and hides) the -B option in favor of using the -P option.
The -B option is used to specify the BSP, whereas the -P option specifies
the platform.

Change-Id: Ie1d3cd6383f08a84e5d994221b253153152a0658
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
53d81ebeef sanity: Remove the -s option from sanity_chk
The -s option to sanity_chk became obsolete with the switchover to Kbuild.

Change-Id: I6ab68692aea39e4289520613b53a46320044fcfb
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
02432ca5e7 sanity: Use KBUILD_DEFCONFIG to specify target info
The sanity scripts no longer use the deprecated method specifying the BSP (and
the optional BSP_VARIANT).  Instead, they now use KBUILD_DEFCONFIG to identify
the target platform.

Change-Id: I583f876afd006e66fc314b8913cd766ba9d2b764
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
5d8c23a254 sanity: Update sanity scripts to use data files
Completes the separation of data from the sanity scripts.

Change-Id: Icc7a4922d5f108ca54d2c2f08b192259b07b3a0e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
a62a41c86a sanity: Add data files for use by sanity checks
These data files will eventually replace the project list tables that are
currently defined in the various sanity checks.

Change-Id: I1b9aef528ff2acc1ba96fa540986c50e01032f68
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
6a1287ba07 sanity: change strings stored in $PRJ_TYPE
Changes the set of strings stored in $PRJ_TYPE from
    {"microkernel", "nanokernel"} -> {"micro", "nano"}.

The $PRJ_TYPE variable will be used in later commits to create the
$KBUILD_DEFCONFIG string.

Change-Id: I9e2d866d4277ffaccff4f84a42ec2bc75c2ce57a
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
820a62dc7d sanity: Move Bluetooth regression script
Moves the Bluetooth regression script 'bt_regression.sh' so that it resides
in the same directory as the other sanity scripts.  It also renames it to
'bt_regression_chk' so that its name is consistent with the other sanity
scripts.

Change-Id: Ia5a683e2c370c91a90edc648634ce56e484dcc20
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Peter Mitsis
99c55ba2fe sanity: Remove common-klibs_chk
KLIB_DIR builds are a relic from the previous build system.

Change-Id: I382db45f0a21786e1b7c50c9a881c82feb2c7481
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
54b4d3a24c fixed block formatting
Change-Id: I34fcab68ac0b7346e8a79c62a2b041e31a88e308
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
85fb2e1445 remove merge conflict
Change-Id: Iff634d72838a3975d62b6977b9e7fe5d32a2d6de

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
df575997c4 Tiny Mountain -> Zephyr renames
Change-Id: I323c3c2bc06c8fc2b6200186dde6853c61b094a8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
99f150682e remove extra 'Table of Contents'
sphinx was complaining about this.

Change-Id: Id97170cf28145dfcce9b650aff946dc0117c34cf
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
79dd79dc4d Gerrit: patch -> change
In gerrit documentation, use 'Change' instead of 'Patch'.
Use terminology similar to the gerrit help.

Change-Id: Ib521d5d8742e274510079e88e270f81f3f3e7a62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
61d5c0ff2b remove extra space from quick start
Change-Id: Ib6a0edc02aa4cfa34fe4413e99c72e06c5b700dc

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
5a7de14ffd Fix the index page and headers
- Put license at the bottom
- Add a title
- Change disclaimer from a heading to a rubric

Change-Id: I19b73e3a0408fd95efb514e75ea4ee028bb8f50c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
75472567b4 Set version of documentation to 0.1
Change-Id: I667fd8a1afcede1b87e09c5f540ed7f40432db1f

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
dc36a229f3 Use Zephyr instead of Tiny Mountain
Change-Id: I9a7ef2ab121103b5738f98cf5d7c0c373cc97060
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
aaa4e59db9 make quick start guide complete
Change-Id: Ie23702f5351e3c8ebd972f5e5fc6a2bf54fd34ea
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
464e04da17 Rename to Quick Start
Change-Id: Ife49b594458506c876750d5df2485f5e4f684f08

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
60bc48a06e move doxygen documentation to collab guide
Change-Id: I7522fcb2dddd30d63faf0878c55380267ba6792f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
210e22b4fb do not include substitutions
Change-Id: I4aaaec0addb987af709ca865c681beb79444ca55

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
fd3acb73aa restructure installation guide
Change-Id: I4d1b50b7826514802db926c0911a63fc08e9f761
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
031e68f1a5 Use Kernel Objects in the title
Change-Id: I5fc164bd50879961fbfab5aeadfa43abab21e0ae

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Anas Nashif
9485729b3a Rename *.s files to *.S
Change-Id: I706a06e287f9e8e52c1cee4863c36673b21762f7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
b33e1eccf1 x86: Remove arch/x86/bsp directory
After moving the driver code out of the bsp directory all the code
that remains is common to all x86 platforms move the code and
assocoated config variables to arch/x86.

Change-Id: I76617070bb165fd157f0c3a127f1b9829b86c283
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
02ef939831 x86/bsp: move timestamp "random" driver to drivers/random
Change-Id: I7a7e7627f1ef60c652c15ad482a4f84f00d79c44
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
11edf422b4 x86/bsp: move local apic timer driver to drivers/timer
Change-Id: I74f7297d21f3acf4a457ca335162602b35f4f6c1
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
73d74a5abb x86/bsp: move hpet driver to drivers/timer
Change-Id: I63c361a586d2fd8c03674febd58bc1dfd2658fdc
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
09d2770377 x86/bsp: move io apic driver to drivers/interrupt_controller
Change-Id: I00f400e0405f526dd17cf22c703fab4a4968fce0
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
124a27f210 x86/bsp: move local apic driver to drivers/interrupt_controller
Change-Id: I69350493c3b94d754f89fb37eaebe50a8076384b
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:21 -05:00
Dirk Brandewie
526e132eb1 x86/bsp: move PIC (i8259) driver to drivers/interrupt_controller
Change-Id: I383424667f291ad4985781a7e6566c01c76ba5e0
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
2016-02-05 20:14:20 -05:00
Juan Manuel Cruz
308f1586d6 Kbuild: Assembly code extension.
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>
2016-02-05 20:14:20 -05:00
Peter Mitsis
bc81896b2f Remove obsolete .gitignore entry
The samples/libc/ directory is no longer part of the source tree.

Change-Id: I8db55be5e4601611170833a55d31ac788fae51be
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:14:20 -05:00
Arkadiusz Lichwa
d7e239c6c2 Python: Tweak with python3 compatibility
Fixes sysgen's python code errors generated during build.
On python2 environment it's ok but *not* on python3.

Change-Id: I4a042c5d5203e546b65540f7020ae75677d102f8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-02-05 20:14:20 -05:00
Oleg Zhurakivskyy
cf59dda4a5 Fix compilation with CONFIG_DYNAMIC_INT_STUBS
Change-Id: I153747d441e8efe7a2941b01ef0cedda7e58237c
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2016-02-05 20:14:20 -05:00
Szymon Janc
b70ba38325 drivers/simple: Use ccflags-y instead of EXTRA_CFLAGS
According to section 3.7 of Documentation/kbuild/makefiles.txt, using
EXTRA_CFLAGS in Makefiles is "still supported but their usage is
deprecated."

Change-Id: Iec6121b6b79a6a8c58ac26b8b08a542eac575c22
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
702a596594 net: Add kconf for networking
Change-Id: Id956b7debe4564613007d934636501c98ba1851d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
4c53ef0b93 net: Initialize the IP stack
Call relevant Contiki uIP functions to setup the internal
structures in the uIP stack.

Change-Id: If64df1543d66d0ff378c12f371aa2c06fb2fde0a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
6ba3a02eed net: uip: Avoid casting warning when accessing link local addr
The uip_ds6_nbr_get_ll() returns const addr but we need to
overwrite the addr so cast is needed here.

The const pointer returned by nbr-table.c:nbr_table_get_lladdr(),
which is called by uip_ds6_nbr_get_ll(), actually points to
neighbor cache which is dynamic and will never be stored in read
only memory, and thus is safe to cast to non-const.

Change-Id: Ifb47e4cb75054b0a9717304dc1d0bc497fee1e87
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
251a45b602 net: Use our network buffers instead of global ones in Contiki
This mega patch changes how Contiki uses buffers. In standard
Contiki there is only couple of static and global buffers.
This makes the stack non-reentrant and only usable in one
thread. This patch replaces the global buffer with buffer
supplied by caller (net_buf.h). The Contiki stack is still not
fully re-entrant after this (packet reassembly needs more TLC)
but it is a good start.

Change-Id: I63abc230b36b14f33f687d3ef64cffb0f3a69f5d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
da36c6371c net: Simple socket API introduced
The network context defines a network connection.

Change-Id: I29a186be6c9de9d824f10b6442fa1dfd3711d24d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
1cf34680cb net: Using correct defines to configure the net stack
Change-Id: Ia2f5f8e496d11c73125aa3e74c0f9ad48141c712
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
4f5723a5d0 net: Network initialization and tx/rx functionality
Functions to receive data from apps and transmit it to network, and
receive from network and pass data to apps.

Change-Id: I1b1b8c041e6c5e20294081d2cd403636e9909cdc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00
Jukka Rissanen
3633410706 net: uip: Pack and alias network buffer related structs
We need to make sure that the structs that are cast to received
network buffer are packed. We also need to enable __may_alias__
attribute for these structs in order to avoid "dereferencing
type-punned pointer" warnings.

Change-Id: Iad65612fd176ed41d66c6fa05c50151001a406eb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-02-05 20:14:20 -05:00