BigW Consortium Gitlab

Commit 9b6026ac by David Frey

Introduce a unified mangOH.sdef

Introduce a single mangOH.sdef and remove the board/module specific SDEFs. The content of the single SDEF change depending on the build parameters. The "targets" directory was introduced based on the way Legato handles different modules. The location of build artifacts has now changed. Everything produced by the Makefile is under "build/".
parent 8b0bbcf5
export MANGOH_ROOT = $(shell pwd)
MKSYS_ARGS_COMMON = -s $(MANGOH_ROOT)/apps/GpioExpander/gpioExpanderService
MKSYS_ARGS_GREEN =
MKSYS_ARGS_RED = -s $(MANGOH_ROOT)/apps/RedSensorToCloud
MKSYS_ARGS_COMMON = --object-dir=build/${@} -s $(MANGOH_ROOT)/apps/GpioExpander/gpioExpanderService
MKSYS_ARGS_GREEN = --output-dir=build/update_files/green
MKSYS_ARGS_RED = --output-dir=build/update_files/red -s $(MANGOH_ROOT)/apps/RedSensorToCloud
# The comments below are for Developer Studio integration. Do not remove them.
# DS_CLONE_ROOT(MANGOH_ROOT)
......@@ -10,46 +10,31 @@ MKSYS_ARGS_RED = -s $(MANGOH_ROOT)/apps/RedSensorToCloud
# DS_CUSTOM_OPTIONS(MKSYS_ARGS_GREEN)
# DS_CUSTOM_OPTIONS(MKSYS_ARGS_RED)
# This is a temporary workaround for bug LE-7850. Once Legato 17.08.0 or 17.07.2 is released, this
# should no longer be necessary.
export TARGET := wp85
.PHONY: all
all: green_wp85 green_wp750x green_wp76xx red_wp85 red_wp750x red_wp76xx
.PHONY: green_wp85
green_wp85:
mksys -t wp85 $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH_Green.sdef
MANGOH_BOARD=GREEN mksys -t wp85 $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH.sdef
.PHONY: green_wp750x
green_wp750x:
mksys -t wp750x $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH_Green.sdef
MANGOH_BOARD=GREEN mksys -t wp750x $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH.sdef
.PHONY: green_wp76xx
green_wp76xx:
mksys -t wp76xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH_Green.sdef
MANGOH_BOARD=GREEN mksys -t wp76xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH.sdef
.PHONY: red_wp85
red_wp85:
mksys -t wp85 $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH_Red.sdef
MANGOH_BOARD=RED mksys -t wp85 $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: red_wp750x
red_wp750x:
mksys -t wp750x $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH_Red.sdef
MANGOH_BOARD=RED mksys -t wp750x $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: red_wp76xx
red_wp76xx:
mksys -t wp76xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH_Red_9x07.sdef
MANGOH_BOARD=RED mksys -t wp76xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: clean
clean:
rm -rf \
_build_mangOH_Green \
mangOH_Green.wp85.update \
mangOH_Green.wp750x.update \
mangOH_Green.wp76xx.update \
_build_mangOH_Red \
_build_mangOH_Red_9x07 \
mangOH_Red.wp85.update \
mangOH_Red.wp750x.update \
mangOH_Red_9x07.wp76xx.update
rm -rf build
//--------------------------------------------------------------------------------------------------
// mangOH Red system definition that extends the wifi sdef from Legato.
// Universal mangOH system definition that extends the wifi sdef from Legato. This SDEF aims to
// support all mangOH boards and all WP modules.
//
// Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
//--------------------------------------------------------------------------------------------------
......@@ -8,98 +9,128 @@
apps:
{
// gpioExpanderServiceRed conflicts with the iot_slot driver because the iot_slot driver makes
// use of the sx1509 gpio expander kernel driver whereas the gpio expander implements a driver
// in user space.
#if ${MANGOH_BOARD} = RED
/*
* There is a conflict between the following software components:
* - sx1509 Linux kernel driver
* - mangOH GPIO expander service
* - gpioexp command line program
* All of these components attempt to control the sx1509 GPIO expander on mangOH Red. The sx1509
* driver is required for other kernel modules such as the iot slot driver and the LED driver to
* manipulate the GPIOs. The mangOH GPIO expander service is a userspace driver for the SX1509
* which provides a service conforming to le_gpio.api to access the GPIOs of the sx1509 from
* Legato apps. gpioexp is also a userspace command line program which can control the sx1509.
* This program is called from the /etc/init.d/tiwifi provided by the Sierra Wireless Linux
* distro in order to setup GPIOs to use the TI WiFi IoT card (without the iot slot module). The
* fundamental problem is that the gpiolib implementation in the Sierra Wireless kernels doesn't
* support accessing GPIOs from userspace through sysfs if they are not listed in the kernel at
* build time.
*/
// $MANGOH_ROOT/apps/GpioExpander/gpioExpanderService/gpioExpanderServiceRed
$MANGOH_ROOT/apps/MqttClient/mqttClient
$MANGOH_ROOT/apps/DataRouter/dataRouter
$MANGOH_ROOT/apps/DataRouter/drTool/drTool
$MANGOH_ROOT/apps/SocialService/socialService
/*
* The heartbeat app is disabled on mangOH Red because the logging messages from the low power
* microcontroller make it very difficult to use the console port.
*/
// $MANGOH_ROOT/apps/Heartbeat/heartbeatRed
$MANGOH_ROOT/apps/LedService/ledService
$MANGOH_ROOT/apps/RedSensorToCloud/redSensorToCloud
$MANGOH_ROOT/apps/DataPushTest/dataPushTest
#if ${MANGOH_BATTERY_SERVICE_SUPPORTED} = 1
$MANGOH_ROOT/apps/BatteryService/batteryService
#endif // MANGOH_BATTERY_SERVICE_SUPPORTED
#elif ${MANGOH_BOARD} = GREEN
$MANGOH_ROOT/apps/GpioExpander/gpioExpanderService/gpioExpanderServiceGreen
$MANGOH_ROOT/apps/MuxControl/muxCtrlService/muxCtrlService
$MANGOH_ROOT/apps/MuxControl/tools/muxCtrlTools
$MANGOH_ROOT/apps/ArduinoBridge/arduinoBridge
$MANGOH_ROOT/apps/Heartbeat/heartbeatGreen
#endif // MANGOH_BOARD
// Disabled until Release 15 is released due to bug in power supply kernel support
// $MANGOH_ROOT/apps/BatteryService/batteryService
// The heartbeat app is disabled on mangOH Red because the logging messages
// from the low power microcontroller make it very difficult to use the
// console port.
// $MANGOH_ROOT/apps/Heartbeat/heartbeatRed
// $LEGATO_ROOT/apps/tools/devMode
$MANGOH_ROOT/apps/MqttClient/mqttClient
$MANGOH_ROOT/apps/DataRouter/dataRouter
$MANGOH_ROOT/apps/DataRouter/drTool/drTool
$MANGOH_ROOT/apps/SocialService/socialService
$LEGATO_ROOT/apps/tools/devMode
}
commands:
{
#if ${MANGOH_BOARD} = GREEN
mux = muxCtrlTools:/bin/mux
#endif // MANGOH_BOARD
dr = drTool:/bin/dr
twitter = socialService:/bin/twitter
}
interfaceSearch:
{
$MANGOH_ROOT/apps/MqttClient
$MANGOH_ROOT/apps/DataRouter
#if ${MANGOH_BOARD} = RED
$MANGOH_ROOT/apps/BatteryService
#elif ${MANGOH_BOARD} = GREEN
$MANGOH_ROOT/apps/MuxControl
#endif // MANGOH_BOARD
$MANGOH_ROOT/apps/DataRouter
$MANGOH_ROOT/apps/MqttClient
$MANGOH_ROOT/apps/SocialService/interfaces
$MANGOH_ROOT/apps/BatteryService
}
kernelModules:
{
#if ${MANGOH_BOARD} = RED
// $MANGOH_ROOT/linux_kernel_modules/mangoh/9-mangoh_red_dv2
// $MANGOH_ROOT/linux_kernel_modules/mangoh/9-mangoh_red_dv3
$MANGOH_ROOT/linux_kernel_modules/mangoh/9-mangoh_red_dv5
// cp2130 required for MT7697 WiFi/BT
// USB to SPI adapter connected to the mt7697 and RPi header
$MANGOH_ROOT/linux_kernel_modules/cp2130/0-cp2130
// Required for bmp280 & bmi160
$MANGOH_ROOT/linux_kernel_modules/iio/0-iio
$MANGOH_ROOT/linux_kernel_modules/iio/1-iio-kfifo-buf
// Required for bmi160
$MANGOH_ROOT/linux_kernel_modules/iio/2-iio-triggered-buffer
// temperature and pressure sensor
$MANGOH_ROOT/linux_kernel_modules/bmp280/2-bmp280
$MANGOH_ROOT/linux_kernel_modules/bmp280/3-bmp280-i2c
// Used on mangOH Red DV2
// accelerometer on DV3 and later board revs
$MANGOH_ROOT/linux_kernel_modules/bmi160/3-bmi160
$MANGOH_ROOT/linux_kernel_modules/bmi160/4-bmi160-i2c
// accelerometer on DV2 boards
// $MANGOH_ROOT/linux_kernel_modules/lsm6ds3/0-lsm6ds3
// $MANGOH_ROOT/linux_kernel_modules/lsm6ds3/1-lsm6ds3-i2c
// Used on mangOH Red DV3 and later
$MANGOH_ROOT/linux_kernel_modules/bmi160/3-bmi160
$MANGOH_ROOT/linux_kernel_modules/bmi160/4-bmi160-i2c
// battery gauge
$MANGOH_ROOT/linux_kernel_modules/ltc294x/0-ltc294x.mdef
// Disabled for now due to incompatibility with the way the TI wifi card is configured by the
// default yocto
// $MANGOH_ROOT/linux_kernel_modules/iot_slot/0-iot_slot
// battery charger
$MANGOH_ROOT/linux_kernel_modules/bq24296/0-bq24296.mdef
// LED on GPIO driver
$MANGOH_ROOT/linux_kernel_modules/led/0-led
#if ${MANGOH_KERNEL_LACKS_IIO} = 1
// Required for bmp280 & bmi160
$MANGOH_ROOT/linux_kernel_modules/iio/0-iio
$MANGOH_ROOT/linux_kernel_modules/iio/1-iio-kfifo-buf
// Required for bmi160
$MANGOH_ROOT/linux_kernel_modules/iio/2-iio-triggered-buffer
#endif // MANGOH_KERNEL_LACKS_IIO
// Don't enable mt7697 drivers until a kernel is publicly available which supports the correct
// cfg80211 and mac80211 modules
#if ${MANGOH_SUPPORT_MT7697_WIFI} = 1
$MANGOH_ROOT/linux_kernel_modules/mt7697q/1-mt7697q
$MANGOH_ROOT/linux_kernel_modules/mt7697serial/1-mt7697serial
$MANGOH_ROOT/linux_kernel_modules/mt7697wifi/2-mt7697wifi_core
#endif // MANGOH_SUPPORT_MT7697_WIFI
// spisvc creates a spidev device which will appear as /dev/spidev0.0 once the spidev module is
// loaded.
$LEGATO_ROOT/drivers/spisvc/spisvc
// Not on the mangOH Red DV3
$MANGOH_ROOT/linux_kernel_modules/ltc294x/0-ltc294x.mdef
// Required for BQ24296
$MANGOH_ROOT/linux_kernel_modules/bq24296/0-bq24296.mdef
// Disabled for now. See comment at top of file regarding GPIO expander service
// $MANGOH_ROOT/linux_kernel_modules/iot_slot/0-iot_slot
#elif ${MANGOH_BOARD} = GREEN
$MANGOH_ROOT/linux_kernel_modules/mangoh/9-mangoh_green_dv4
// Support for the CAN IoT card - CAN subsystem
// $MANGOH_ROOT/linux_kernel_modules/can/0-can.mdef
// $MANGOH_ROOT/linux_kernel_modules/can/1-can-raw.mdef
// $MANGOH_ROOT/linux_kernel_modules/can/1-can-bcm.mdef
// accelerometer driver
$MANGOH_ROOT/linux_kernel_modules/lsm6ds3/0-lsm6ds3
$MANGOH_ROOT/linux_kernel_modules/lsm6ds3/1-lsm6ds3-i2c
#endif // MANGOH_BOARD
// Support for the CAN IoT card - CAN drivers
// $MANGOH_ROOT/linux_kernel_modules/can/2-can-dev.mdef
// $MANGOH_ROOT/linux_kernel_modules/can/2-vcan.mdef
// $MANGOH_ROOT/linux_kernel_modules/can/3-mcp251x.mdef
}
$LEGATO_ROOT/drivers/spisvc/spisvc
}
\ No newline at end of file
//--------------------------------------------------------------------------------------------------
// mangOH Green system definition that extends the wifi sdef from Legato.
//
// Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
//--------------------------------------------------------------------------------------------------
#include "$LEGATO_ROOT/modules/WiFi/wifi.sdef"
apps:
{
$MANGOH_ROOT/apps/GpioExpander/gpioExpanderService/gpioExpanderServiceGreen
$MANGOH_ROOT/apps/MuxControl/muxCtrlService/muxCtrlService
$MANGOH_ROOT/apps/MuxControl/tools/muxCtrlTools
$MANGOH_ROOT/apps/MqttClient/mqttClient
$MANGOH_ROOT/apps/DataRouter/dataRouter
$MANGOH_ROOT/apps/DataRouter/drTool/drTool
$MANGOH_ROOT/apps/ArduinoBridge/arduinoBridge
$MANGOH_ROOT/apps/SocialService/socialService
$MANGOH_ROOT/apps/Heartbeat/heartbeatGreen
$LEGATO_ROOT/apps/tools/devMode
}
commands:
{
mux = muxCtrlTools:/bin/mux
dr = drTool:/bin/dr
twitter = socialService:/bin/twitter
}
interfaceSearch:
{
$MANGOH_ROOT/apps/MqttClient
$MANGOH_ROOT/apps/DataRouter
$MANGOH_ROOT/apps/MuxControl
$MANGOH_ROOT/apps/SocialService/interfaces
}
kernelModules:
{
$MANGOH_ROOT/linux_kernel_modules/mangoh/9-mangoh_green_dv4
$MANGOH_ROOT/linux_kernel_modules/lsm6ds3/0-lsm6ds3
$MANGOH_ROOT/linux_kernel_modules/lsm6ds3/1-lsm6ds3-i2c
// spisvc creates a spidev device which will appear as /dev/spidev0.0 once the spidev module is
// loaded.
$LEGATO_ROOT/drivers/spisvc/spisvc
}
//--------------------------------------------------------------------------------------------------
// mangOH Red system definition that extends the wifi sdef from Legato.
//
// Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
//--------------------------------------------------------------------------------------------------
#include "$LEGATO_ROOT/modules/WiFi/wifi.sdef"
apps:
{
// gpioExpanderServiceRed conflicts with the iot_slot driver because the iot_slot driver makes
// use of the sx1509 gpio expander kernel driver whereas the gpio expander implements a driver
// in user space.
// $MANGOH_ROOT/apps/GpioExpander/gpioExpanderService/gpioExpanderServiceRed
$MANGOH_ROOT/apps/MqttClient/mqttClient
$MANGOH_ROOT/apps/DataRouter/dataRouter
$MANGOH_ROOT/apps/DataRouter/drTool/drTool
$MANGOH_ROOT/apps/SocialService/socialService
$MANGOH_ROOT/apps/LedService/ledService
$MANGOH_ROOT/apps/RedSensorToCloud/redSensorToCloud
$MANGOH_ROOT/apps/DataPushTest/dataPushTest
// Disabled until Release 15 is released due to bug in power supply kernel support
// $MANGOH_ROOT/apps/BatteryService/batteryService
// The heartbeat app is disabled on mangOH Red because the logging messages
// from the low power microcontroller make it very difficult to use the
// console port.
// $MANGOH_ROOT/apps/Heartbeat/heartbeatRed
$LEGATO_ROOT/apps/tools/devMode
}
commands:
{
dr = drTool:/bin/dr
twitter = socialService:/bin/twitter
}
interfaceSearch:
{
$MANGOH_ROOT/apps/MqttClient
$MANGOH_ROOT/apps/DataRouter
$MANGOH_ROOT/apps/MuxControl
$MANGOH_ROOT/apps/SocialService/interfaces
$MANGOH_ROOT/apps/BatteryService
$MANGOH_ROOT/apps/LedService
}
kernelModules:
{
// $MANGOH_ROOT/linux_kernel_modules/mangoh/9-mangoh_red_dv2
// $MANGOH_ROOT/linux_kernel_modules/mangoh/9-mangoh_red_dv3
$MANGOH_ROOT/linux_kernel_modules/mangoh/9-mangoh_red_dv5
// cp2130 required for MT7697 WiFi/BT
$MANGOH_ROOT/linux_kernel_modules/cp2130/0-cp2130
$MANGOH_ROOT/linux_kernel_modules/bmp280/2-bmp280
$MANGOH_ROOT/linux_kernel_modules/bmp280/3-bmp280-i2c
// Used on mangOH Red DV2
// $MANGOH_ROOT/linux_kernel_modules/lsm6ds3/0-lsm6ds3
// $MANGOH_ROOT/linux_kernel_modules/lsm6ds3/1-lsm6ds3-i2c
// Used on mangOH Red DV3 and later
$MANGOH_ROOT/linux_kernel_modules/bmi160/3-bmi160
$MANGOH_ROOT/linux_kernel_modules/bmi160/4-bmi160-i2c
// Disabled for now due to incompatibility with the way the TI wifi card is configured by the
// default yocto
// $MANGOH_ROOT/linux_kernel_modules/iot_slot/0-iot_slot
$MANGOH_ROOT/linux_kernel_modules/led/0-led
// Disabled until compliation errors are fixed in wp76 kernel
$MANGOH_ROOT/linux_kernel_modules/mt7697q/1-mt7697q
$MANGOH_ROOT/linux_kernel_modules/mt7697serial/1-mt7697serial
$MANGOH_ROOT/linux_kernel_modules/mt7697wifi/2-mt7697wifi_core
// Don't load spisvc right now on wp76 because it tries to create spidev0.0, but should create
// spidev1.0
// $LEGATO_ROOT/drivers/spisvc/spisvc
// Not on the mangOH Red DV3
//$MANGOH_ROOT/linux_kernel_modules/ltc294x/0-ltc294x.mdef
// Required for BQ24296
$MANGOH_ROOT/linux_kernel_modules/bq24296/0-bq24296.mdef
// Support for the CAN IoT card - CAN subsytem
// $MANGOH_ROOT/linux_kernel_modules/can/0-can.mdef
// $MANGOH_ROOT/linux_kernel_modules/can/1-can-raw.mdef
// $MANGOH_ROOT/linux_kernel_modules/can/1-can-bcm.mdef
// Support for the CAN IoT card - CAN drivers
// $MANGOH_ROOT/linux_kernel_modules/can/2-can-dev.mdef
// $MANGOH_ROOT/linux_kernel_modules/can/2-vcan.mdef
// $MANGOH_ROOT/linux_kernel_modules/can/3-mcp251x.mdef
}
//--------------------------------------------------------------------------------------------------
// Definitions specific to Sierra Wireless modules that are based on the Qualcomm MDM9x07 chipset
// family.
//
// Copyright (C), Sierra Wireless Inc.
//--------------------------------------------------------------------------------------------------
#include mdm9xxx.sinc
buildVars:
{
/*
* The battery service can't be enabled on 9x07 until the power supply unload lockup fix lands
* in an official release.
*/
MANGOH_BATTERY_SERVICE_SUPPORTED = 0
MANGOH_SUPPORT_MT7697_WIFI = 1
}
//--------------------------------------------------------------------------------------------------
// Definitions specific to Sierra Wireless modules that are based on the Qualcomm MDM9x15 chipset
// family.
//
// Copyright (C), Sierra Wireless Inc.
//--------------------------------------------------------------------------------------------------
#include mdm9xxx.sinc
buildVars:
{
/*
* The battery service can't be enabled on 9x15 until the power supply kernel fix lands in an
* official release.
*/
MANGOH_BATTERY_SERVICE_SUPPORTED = 0
/*
* mt7697 wifi can't be supported on the 9x15 based modules until the mac80211 and cfg80211
* change lands in an official release.
*/
MANGOH_SUPPORT_MT7697_WIFI = 0
/*
* The 9x15 kernel doesn't include IIO (Industrial IO) support
*/
MANGOH_KERNEL_LACKS_IIO = 1
}
//--------------------------------------------------------------------------------------------------
// Definitions specific to Sierra Wireless modules that are based on the Qualcomm MDM9xxx chipset
// family.
//
// Copyright (C), Sierra Wireless Inc.
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Target definitions specific to Sierra Wireless WP750x modules.
//
// Copyright (C), Sierra Wireless Inc.
//--------------------------------------------------------------------------------------------------
#include mdm9x15.sinc
//--------------------------------------------------------------------------------------------------
// Target definitions specific to Sierra Wireless WP76xx modules.
//
// Copyright (C), Sierra Wireless Inc.
//--------------------------------------------------------------------------------------------------
#include mdm9x07.sinc
//--------------------------------------------------------------------------------------------------
// Target definitions specific to Sierra Wireless WP77xx modules.
//
// Copyright (C), Sierra Wireless Inc.
//--------------------------------------------------------------------------------------------------
#include mdm9x07.sinc
//--------------------------------------------------------------------------------------------------
// Target definitions specific to Sierra Wireless WP85xx modules.
//
// Copyright (C), Sierra Wireless Inc.
//--------------------------------------------------------------------------------------------------
#include mdm9x15.sinc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment