diff --git a/Makefile b/Makefile index 26ebb89784d..08a2b3698f2 100644 --- a/Makefile +++ b/Makefile @@ -575,7 +575,7 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \ $(Q)$(MAKE) $(build)=$(@) # Objects we will link into tinymountain / subdirs we need to visit -core-y := arch/ kernel/ misc/ lib/ +core-y := arch/ kernel/ misc/ lib/ net/ bsp-y := drivers/ ifneq ($(strip $(PROJECT)),) @@ -1529,7 +1529,7 @@ QEMU_FLAGS = $(QEMU_FLAGS_$(SRCARCH)) -pidfile qemu.pid qemu: tinymountain @echo "To exit from QEMU enter: 'CTRL+a, x'" @echo '[QEMU] CPU: $(QEMU_CPU_TYPE_$(SRCARCH))' - $(Q)$(QEMU) $(QEMU_FLAGS) -kernel $(KERNEL_NAME).elf + $(Q)$(QEMU) $(QEMU_FLAGS) $(QEMU_EXTRA_FLAGS) -kernel $(KERNEL_NAME).elf # Single targets # --------------------------------------------------------------------------- diff --git a/Makefile.inc b/Makefile.inc index fef7a6423d3..0ea96ea4c1f 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -34,7 +34,7 @@ rm-files:= final-linker.cmd linker.cmd modules.order \ *kernel.map *kernel.elf qemu.pid rm-objects:= *.o rm-dirs := arch drivers include kernel lib misc \ - scripts source + scripts source net cmd_clean_inner_files = \ $(shell cd $(PROJECT_BASE);rm $(rm-files) -f; rm $(rm-dirs) -rf) diff --git a/arch/arm/fsl_frdm_k64f/Makefile b/arch/arm/fsl_frdm_k64f/Makefile index e9fb2ef94c8..404ccaa4310 100644 --- a/arch/arm/fsl_frdm_k64f/Makefile +++ b/arch/arm/fsl_frdm_k64f/Makefile @@ -1,5 +1,6 @@ EXTRA_CFLAGS +=-I$(srctree)/include/bsp EXTRA_CFLAGS +=-I$(srctree)/include/drivers +EXTRA_CFLAGS +=-I$(srctree)/drivers EXTRA_CFLAGS +=-I$(srctree)/arch/arm/fsl_frdm_k64f EXTRA_AFLAGS := ${EXTRA_CFLAGS} diff --git a/arch/arm/ti_lm3s6965/Makefile b/arch/arm/ti_lm3s6965/Makefile index 4e582b107f4..89f9a2792d1 100644 --- a/arch/arm/ti_lm3s6965/Makefile +++ b/arch/arm/ti_lm3s6965/Makefile @@ -1,5 +1,6 @@ EXTRA_CFLAGS +=-I$(srctree)/include/bsp EXTRA_CFLAGS +=-I$(srctree)/include/drivers +EXTRA_CFLAGS +=-I$(srctree)/drivers EXTRA_CFLAGS +=-I$(srctree)/arch/arm/ti_lm3s6965 EXTRA_AFLAGS := ${EXTRA_CFLAGS} diff --git a/arch/x86/generic_pc/Makefile b/arch/x86/generic_pc/Makefile index 7aa29a649c5..950af869bbe 100644 --- a/arch/x86/generic_pc/Makefile +++ b/arch/x86/generic_pc/Makefile @@ -1,5 +1,6 @@ EXTRA_CFLAGS +=-I$(srctree)/arch/x86 EXTRA_CFLAGS +=-I$(srctree)/include/drivers +EXTRA_CFLAGS +=-I$(srctree)/drivers EXTRA_AFLAGS := ${EXTRA_CFLAGS} obj-y = system.o diff --git a/drivers/Kconfig b/drivers/Kconfig index c99af45439d..af44d6b2c25 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -47,3 +47,5 @@ config DRV_RANDOM This option enables the random number generator driver. source "drivers/random/Kconfig" + +source "drivers/bluetooth/Kconfig" diff --git a/drivers/Makefile b/drivers/Makefile index ebcfc5c3fb5..38b1077ae66 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -3,3 +3,4 @@ obj-$(CONFIG_DRV_SERIAL) += serial/ obj-$(CONFIG_DRV_TIMER) += timer/ obj-$(CONFIG_DRV_INTCTL) += interrupt_controller/ obj-$(CONFIG_DRV_PCI) += pci/ +obj-$(CONFIG_BLUETOOTH) += bluetooth/ diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig new file mode 100644 index 00000000000..e547b503f77 --- /dev/null +++ b/drivers/bluetooth/Kconfig @@ -0,0 +1,81 @@ +# bluetooth.kconf - Bluetooth LE configuration options + +# +# Copyright (c) 2015 Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1) Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2) Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3) Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +# +# Bluetooth options +# +menu "Bluetooth Options" + +config BLUETOOTH + bool + prompt "Bluetooth LE support [EXPERIMENTAL]" + default n + help + This option enables Bluetooth Low Energy support. + +config BLUETOOTH_DEBUG + bool + prompt "Bluetooth LE debug support" + depends on BLUETOOTH + default n + help + This option enables Bluetooth debug going to standard + serial console. + +config BLUETOOTH_DEBUG_UART + bool + prompt "Bluetooth UART driver debug" + depends on BLUETOOTH_DEBUG + default n + help + This option enables debug support for Bluetooth UART + driver + +config BLUETOOTH_DEBUG_HCI_CORE + bool + prompt "Bluetooth HCI core debug" + depends on BLUETOOTH_DEBUG + default n + help + This option enables debug support for Bluetooth HCI + core + +config BLUETOOTH_UART + bool + prompt "Bluetooth UART driver" + depends on BLUETOOTH + select UART_INTERRUPT_DRIVEN + default n + help + Enable Bluetooth UART driver. + +endmenu diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile new file mode 100644 index 00000000000..a7c307fd9ca --- /dev/null +++ b/drivers/bluetooth/Makefile @@ -0,0 +1,19 @@ +EXTRA_CFLAGS +=-I$(srctree)/include/drivers + +ifeq (${CONFIG_BSP_GENERIC_PC},y) +EXTRA_CFLAGS +=-I$(srctree)/arch/x86/generic_pc +endif + +ifeq (${CONFIG_BSP_QUARK},y) +EXTRA_CFLAGS +=-I$(srctree)/arch/x86/quark +endif + +ifeq (${CONFIG_BSP_FSL_FRDM_K64F},y) +EXTRA_CFLAGS +=-I$(srctree)/arch/arm/fsl_frdm_k64f +endif + +ifeq (${CONFIG_BSP_TI_LM3S6965},y) +EXTRA_CFLAGS +=-I$(srctree)/arch/arm/ti_lm3s6965 +endif + +obj-y=uart.o diff --git a/net/Makefile b/net/Makefile new file mode 100644 index 00000000000..c6e90a0f55d --- /dev/null +++ b/net/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_BLUETOOTH) = bluetooth/ diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile new file mode 100644 index 00000000000..9678d9b2528 --- /dev/null +++ b/net/bluetooth/Makefile @@ -0,0 +1,5 @@ +obj-y = att.o \ + buf.o \ + conn.o \ + hci_core.o \ + l2cap.o