Commit graph

18591 commits

Author SHA1 Message Date
Juan Manuel Cruz
808e5c4ba0 Fixes to Kbuild to build on ARM architecture.
This commit fixes issues to allow build on ARM architecture.
- It fixes the include paths in Makefiles.
- It fixes the include path for the offsets.c compilation.
- It fixes the linker command. This changes is needed because gcc
  ARM cross-compiler does not accept an AT() command without
  specifing an address explicitly. This corner case appears
  on ARM architectures when XIP is disabled.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ief8b53c4cc154abba7b7827121ec5a56f62b7b26
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
2e3e28c3ed Kconfig KERNEL_DIR symbol removal.
This commit removes the Kconfig symbol KERNEL_DIR.
The symbols was no longer needed because sysgen is only
used on microkernel architectures and the value of
KERNEL_DIR is always "ukernel", therefore it is redundant.

Change-Id: I5e38dd431c5b6f7586e8b25aea330632e96f581f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
a05bce491f Kbuild fix for quark console driver.
This commit fixes the include path for quark BSP.

Change-Id: Idb9b5124476c0bec2d16a143407cd9d0c42e0801
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
2016-02-05 20:14:05 -05:00
Anas Nashif
67df20402c Add cross compiler prefix config
Change-Id: I9dcd04742705a914aff4c03f9c63058b96276155

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:05 -05:00
Anas Nashif
1e8dc5ad88 no need for old_version!
Change-Id: I2fdc4281a5663e1f48fd3b45f5226a2cedf66878
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:05 -05:00
Anas Nashif
6afc4851bf empty CHECKFLAGS
Change-Id: I97787e176fda9f3e118eec4a110408789570f8b1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:05 -05:00
Anas Nashif
67fc206887 Remove ia64 references
Change-Id: I9ae4e32f8f85aa261943acb0c00c7bd0c4d3217a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
73c4417ac9 Kbuild defconfig files.
This commit adds the defconfig files that define the standard
configurations for x86 and arm architecture and the standard
configurations for the following BSPs for microkernel and
nanokernel:

- x86 generic pc
- x86 quark
- arm fsl_frdm_k64f
- arm ti_lm3s6965

They can be applied using the make target defconfig.
This target will generate the corresponding .config
file that will be consumed by the build system.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I128ad52f792eeb61cc80578be5fc3bd427447aaa
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
7ac851afef Kbuild. Remove linux name references.
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
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
0d01f5bedc Adding Kbuild linking process.
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
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
a0b5466540 Adding Kbuild CFLAGS.
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
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
ce3533a476 Kbuild fix for clean and mrproper targets.
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
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
ba741fedd7 Root Makefile adaptation.
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
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
4ee8a8e042 Kbuild Makefile mechanism for samples and projects.
This commit adds the capability to the Kbuild system of adding
samples and projects to the build process.
This commits adds the hello_world and philosophers sample code
as an example of how to configure a project into the build
system.
The project can be hosted inside the kernel source tree or
outside the kernel source tree.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Id980e959ac6e0061f8227d5d81191a169bfc8fc3
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
6de34008ab Creation of version.h header file.
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
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
94b78c1276 Creation of offsets.h header file.
This commit adds the target to generate the offsets.h header.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I6222f7478ade33f5ca130eea8637cb454b67eaab
2016-02-05 20:14:05 -05:00
Juan Manuel Cruz
e1bb210bf3 Creation of configs.c file.
This commit adds the target to generate the configs.c source file.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Ia068a20c3b76c78f5bdd041f6e19daabd2107a5a
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
9b0854bd84 Creation of target for sysgen execution.
This commit adds the target to execute sysgen.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I31f2e896274fa5ddfe6c10b4ccfb07ff6704c130
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
e33ede376e Creation of prj.vpf file.
This commit adds the target to generate the configuration file prj.vpf.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I407b304d33fe27daf92e6049377930cca484fde5
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
a9b1c74ee3 Adding Kbuild root Makefile.
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
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
d31a6a6f31 Creation of Makefiles for libc minimal.
This commit adds the Makefiles to create object-bundle for
libc minimal.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I9d15e0203664010ba4ef5cf3625b4075d7827ad7
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
f2ae6d5202 Creation of Makefiles for drivers directory.
This commit adds the Makefiles that describe the object-bundles
for the drivers directory and every subdirectory below.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Id77cff9cf0ab51827acc2aef32cbed3ec3ad586b
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
1c233a0377 Creation of Makefiles for arch directory.
This commit creates all the Makefiles that describe the object-
bundles for the arch directory and  every sub-directory below.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Icb4ebcfc430a132e514507149ad5ab6878eeed64
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
e55a79d6f9 Creation of Makefiles for kernel and misc directory.
This commit creates the Makefiles that describe the object-bundles for
the kernel directory and every sub-directory below.
It also includes the misc Makefile.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I847e79a40ced0b1d8370b893cd95c15efc7e5147
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
f98466d54b Kconfig symbols for drivers directory.
This commit adds the Kconfig files that describe the CONFIG
symbols that belongs to the drivers directory and subdirectories.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I924835ece11a3d597e77a55ace21d724dd5ddbe5
2016-02-05 20:14:04 -05:00
Juan Manuel Cruz
132649f2cc Kconfig symbols for arch directory.
This commit adds the Kconfig files that describe the CONFIG
    symbols that belongs to the arch directory and subdirectories.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I744225ddaa5e2b45113ca049457a8f9925ebe4c2
2016-02-05 20:14:04 -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
Juan Manuel Cruz
2763d51e1d Adding Kconfig root file.
This commit adds the Kconfig root file.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: Id9478012376bfd19475bf08fd75aacad9048ce27
2016-02-05 20:14:04 -05:00
Johan Hedberg
a1dd6d6aec Bluetooth: Remove unused BDADDR_ANY variable
This is a left-over from previous code.

Change-Id: I4d12e236a4065d2cd33d492605704f516df906f3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:04 -05:00
Johan Hedberg
3b71b2dd41 Bluetooth: Fix using correct cmd_rx_fiber stack size
The code was incorrectly using RX_STACK_SIZE instead of
CMD_RX_STACK_SIZE.

Change-Id: I4a8ddb700e2a701bf8572ed877865a7d0cb3b2d0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:04 -05:00
Johan Hedberg
4172b712c9 Bluetooth: Fix build when HCI_CORE debug is enabled
Some hci_core.c debug logs were still incorrectly using the old
bt_bdaddr_str API.

Change-Id: I92ce4544c44266216225b4d9a20e639a2fefa9d0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
3ea2c48899 Bluetooth: Fix advertising data of peripheral sample
An extended inquiry response or advertising data packet shall not contain
more than one instance for each Service UUID data size.

Change-Id: I41d1a25fdcb2987e8d0cadfb2110fd62b3685f17
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Johan Hedberg
8620ff3e0c Bluetooth: Add GATT debug config option
Add a GATT debug config option to be able to limit the debug logs only
to the GATT submodule.

Change-Id: Ie486c9125070f32506547f981c704eaf3e9f2377
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:04 -05:00
Andrei Emeltchenko
bd0805acdd Bluetooth: Fix too few arguments to error log
Change-Id: Ic618f3535b60d861e2044aefb82671c48fa35f61
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
fc1392d7aa Bluetooth: Add implementation of ATT Find Information Response
Read attributes matching handle range generating a proper response:

< ACL Data TX: Handle 3585 flags 0x00 dlen 10
      ATT: Find Information Response (0x05) len 5
        Format: UUID-16 (0x01)
        Handle: 0x0011
        UUID: Client Characteristic Configuration (0x2902)

Change-Id: I16a5abbcca67d522bd2282d3bf727770d1fa4006
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
32c50333b3 Bluetooth: Add implementation of ATT Read and Read Blob Response
Read attribute and generate a proper responses:

< ACL Data TX: Handle 3585 flags 0x00 dlen 6
      ATT: Read Response (0x0b) len 1
        Value: 01

< ACL Data TX: Handle 3585 flags 0x00 dlen 20
      ATT: Read Blob Response (0x0d) len 15
        54 65 73 74 20 50 65 72 69 70 68 65 72 61 6c     Test Peripheral

Change-Id: I5a644fd29ae46fdecdc32c6558591ce7a8d2d42c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
e6ef8df212 Bluetooth: Add implementation of ATT Find by Type Value Response
Read attributes matching value and handle range generating a proper
response:

< ACL Data TX: Handle 3585 flags 0x00 dlen 9
      ATT: Find By Type Value Response (0x07) len 4
        Handle range: 0x0001-0x0005

Change-Id: I8001afa2b22e804bef3778d0509d17b01a8d597c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
9a09a5d329 Bluetooth: Add implementation of ATT Read by Type Response
Read attributes matching UUID and handle range generating a proper
response:

< ACL Data TX: Handle 3585 flags 0x00 dlen 20
      ATT: Read By Type Response (0x09) len 15
        Attribute data length: 7
        Attribute data list: 2 entries
        Handle: 0x0002
        Value: 020300002a
        Handle: 0x0004
        Value: 020500012a

Change-Id: Iaf4b0c963765a7769a17144a4d394dce8555c2d3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
7c14248061 Bluetooth: Add implementation of ATT Read by Group Type Request
Read attributes matching UUID and handle range generating a proper
response:

< ACL Data TX: Handle 3585 flags 0x00 dlen 24
      ATT: Read By Group Type Response (0x11) len 19
        Attribute data length: 6
        Attribute group list: 3 entries
        Handle range: 0x0001-0x0005
        UUID: Generic Access Profile (0x1800)
        Handle range: 0x0006-0x000d
        UUID: Heart Rate (0x180d)
        Handle range: 0x000e-0x0011
        UUID: Battery Service (0x180f)

Change-Id: I1ef2d5b1b0237fc0f89221239686777169cc8883
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
2506aa93b3 Bluetooth: Make use of bt_uuid_cmp to compare UUIDs
This replace the old code that could only compare 16 bits UUID with
bt_uuid_cmp which can expand to 128 bits if types don't match.

Change-Id: I84219d451d8c95baf6f7e42b92629cb106428ccf
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
dd41c3375c Bluetooth: Add bt_gatt_foreach_attr
bt_gatt_foreach_attr iterates over attributes via callback, it will be
used to implement discovery functionality.

Change-Id: Ice66f4b3d0d12b3616986931d5da0fe0f202e533
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
862835d8a6 Bluetooth: Add bt_uuid_cmp
bt_uuid_cmp compares 2 UUIDs returning if they match, if the types are
different it converts both to 128 bit format before performing the
comparison.

Change-Id: Iacf330cc0271a7e5429cbb2f405a7d9ef249a1a3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
a8f34a1c1e Bluetooth: Add Battery Service to peripheral sample
Add Battery Service along with its characteristics and descriptors
to the database table.

Change-Id: Ifb83ebcb4d6cdafa5df84d643b2e2a69e5a6c1e3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
1b793139db Bluetooth: Add Heart Rate Service to peripheral sample
Add Heart Rate Service along with its characteristics and descriptors
to the database table.

Change-Id: Ibff52da7352883edccb7c5b903538a81aad2ba55
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
0d505e2045 Bluetooth: Add GAP primary service to peripheral sample
This adds attributes for Generic Access Profile.

Change-Id: I1fe08429f80341e7ba9fc06ef35a6df9b5abbf84
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
de52b09a3f Bluetooth: Add GATT skeleton
This adds initial API and definitions to create a database.

Change-Id: I69d5b3f5fd2f04cc309c2f76a84581673aa54e7b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Luiz Augusto von Dentz
6d564a9648 Bluetooth: Handle ATT Exchange MTU request
This properly init the MTU to default upon new connection and properly
store the new value in case of Exchange MTU request.

Change-Id: I561f5b1756fd8833244cdd2a986e561c16fc8471
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-02-05 20:14:04 -05:00
Johan Hedberg
1781490c87 Bluetooth: Improve buffer debug usefulness
The overflow/underflow checks are something that we want to have
whenever debug is enabled in general (and not just for buffers
specifically).

Change-Id: Ib4edd366ae8ce1a80d33155ab1dc8d5a20477909
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:04 -05:00
Johan Hedberg
8d0d247f23 Bluetooth: Add helpers for checking LE address type
For LE Privacy support we'll need to be able to distinguish which
addresses are RPAs and which are Identity Addresses.

Change-Id: Ie244a4d53ffddc435edbd6d69d7ecca205202f18
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:04 -05:00
Johan Hedberg
9b40ec3360 Bluetooth: Introduce dedicated Bluetooth address types
We use addresses in lots of places and with LE we always need to pass
around the type in addition to the address value. Defining dedicated
types for addresses makes the code much simpler.

Change-Id: Ie8b495dce50e3f084685909c19acc5d08e2cca10
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-02-05 20:14:03 -05:00