BigW Consortium Gitlab

Commit fd1399c4 by David Frey

Use Legato kernel module dependencies in mangOH

* Rename .mdef files to remove numeric prefix that was used to force kernel modules to load in the required order * Use new "requires module" feature of .mdef files to specify dependencies. * Update mtwifi script based on module renaming
parent 12b47798
......@@ -9,8 +9,17 @@ cflags:
sources:
{
./BME680_driver/bme680.c
BME680_driver/bme680.c
bme680-i2c.c
bme680-regmap.c
}
requires:
{
kernelModules:
{
#if ${MANGOH_KERNEL_LACKS_IIO} = 1
$CURDIR/../iio/iio
#endif // MANGOH_KERNEL_LACKS_IIO
}
}
......@@ -15,3 +15,10 @@ sources:
bmi160_i2c.c
}
requires:
{
kernelModules:
{
$CURDIR/bmi160
}
}
......@@ -13,4 +13,12 @@ sources:
bmi160_core.c
}
requires:
{
kernelModules:
{
#if ${MANGOH_KERNEL_LACKS_IIO} = 1
$CURDIR/../iio/iio-triggered-buffer
#endif // MANGOH_KERNEL_LACKS_IIO
}
}
......@@ -3,3 +3,10 @@ sources:
bmp280-i2c.c
}
requires:
{
kernelModules:
{
$CURDIR/bmp280
}
}
......@@ -3,3 +3,10 @@ sources:
bmp280-spi.c
}
requires:
{
kernelModules:
{
$CURDIR/bmp280
}
}
......@@ -10,3 +10,12 @@ sources:
bmp280-regmap.c
}
requires:
{
kernelModules:
{
#if ${MANGOH_KERNEL_LACKS_IIO} = 1
$CURDIR/../iio/iio-kfifo-buf
#endif // MANGOH_KERNEL_LACKS_IIO
}
}
......@@ -2,3 +2,11 @@ sources:
{
bcm.c
}
requires:
{
kernelModules:
{
$CURDIR/can
}
}
......@@ -8,3 +8,10 @@ cflags:
-DCONFIG_CAN_CALC_BITTIMING
}
requires:
{
kernelModules:
{
$CURDIR/can
}
}
......@@ -2,3 +2,11 @@ sources:
{
raw.c
}
requires:
{
kernelModules:
{
$CURDIR/can
}
}
......@@ -3,3 +3,10 @@ sources:
mcp251x.c
}
requires:
{
kernelModules:
{
$CURDIR/can-dev
}
}
......@@ -2,3 +2,11 @@ sources:
{
vcan.c
}
requires:
{
kernelModules:
{
$CURDIR/can
}
}
Subproject commit 103c5a071d7ad191b3bd7faa84de4a72aeeec700
Subproject commit d3a35c68d4c1f20037c8c24dba185edacc2b8ebc
......@@ -12,3 +12,11 @@ sources:
kfifo_buf.c
}
requires:
{
kernelModules:
{
$CURDIR/iio
}
}
\ No newline at end of file
......@@ -13,3 +13,10 @@ sources:
industrialio-triggered-buffer.c
}
requires:
{
kernelModules:
{
$CURDIR/iio-kfifo-buf
}
}
......@@ -2,3 +2,11 @@ sources:
{
lsm6ds3_i2c.c
}
requires:
{
kernelModules:
{
$CURDIR/lsm6ds3
}
}
......@@ -2,3 +2,11 @@ sources:
{
lsm6ds3_spi.c
}
requires:
{
kernelModules:
{
$CURDIR/lsm6ds3
}
}
......@@ -2,7 +2,6 @@ cflags:
{
// Needed for lsm6ds3 platform data type definition
-I${MANGOH_ROOT}/linux_kernel_modules/lsm6ds3
-I${MANGOH_ROOT}/linux_kernel_modules/ltc294x
}
sources:
......@@ -14,3 +13,12 @@ params:
{
revision = "dv4"
}
requires:
{
kernelModules:
{
$CURDIR/../lsm6ds3/lsm6ds3-i2c
$LEGATO_ROOT/drivers/spisvc/spisvc
}
}
\ No newline at end of file
cflags:
{
-DDEBUG
// Needed for lsm6ds3 platform data type definition
-I${MANGOH_ROOT}/linux_kernel_modules/lsm6ds3
-I${MANGOH_ROOT}/linux_kernel_modules/ltc294x
......@@ -18,3 +19,15 @@ params:
{
revision = "dv5"
}
requires:
{
kernelModules:
{
$CURDIR/../led/led
$CURDIR/../bq24296/bq24296
$CURDIR/../ltc294x/ltc294x
$CURDIR/../bmp280/bmp280-i2c
$CURDIR/../bmi160/bmi160-i2c
}
}
......@@ -13,3 +13,17 @@ cflags:
-I$MANGOH_ROOT/linux_kernel_modules/mt7697common
}
requires:
{
kernelModules:
{
$CURDIR/../cp2130/cp2130
}
}
/*
* The mt7697q module must be manual load because the init() will try to access
* the USB device provided by the cp2130 driver and the device may not have had
* time to enumerate at the time that the this module loads.
*/
// load: manual
......@@ -26,3 +26,14 @@ cflags:
-I$MANGOH_ROOT/linux_kernel_modules/mt7697q
-I$MANGOH_ROOT/linux_kernel_modules/mt7697serial
}
requires:
{
kernelModules:
{
$CURDIR/../mt7697q/mt7697q
$CURDIR/../mt7697serial/mt7697serial
}
}
load: manual
......@@ -28,10 +28,10 @@ mt_wifi_start() {
sleep 2
fi
lsmod | grep 2_mt7697wifi_core >/dev/null
lsmod | grep mt7697wifi_core >/dev/null
if [ $? -eq 1 ]; then
hw_itf=`echo $1 | tr '[A-Z]' '[a-z]'`
insmod /legato/systems/current/modules/2-mt7697wifi_core.ko hw_itf=$hw_itf itf_idx_start=$2 || exit 127
insmod /legato/systems/current/modules/mt7697wifi_core.ko hw_itf=$hw_itf itf_idx_start=$2 || exit 127
echo "Initialized MT7697 WiFi core";
sleep 5
fi
......@@ -63,9 +63,9 @@ mt_wifi_stop() {
ifconfig wlan$1 down
fi
lsmod | grep 2_mt7697wifi_core >/dev/null
lsmod | grep mt7697wifi_core >/dev/null
if [ $? -eq 0 ]; then
rmmod 2_mt7697wifi_core || exit 127
rmmod mt7697wifi_core || exit 127
echo "Removed MT7697 WiFi core"; exit 127
fi
}
......
......@@ -93,57 +93,42 @@ componentSearch:
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
$CURDIR/linux_kernel_modules/mangoh/mangoh_red_dv5
// USB to SPI adapter connected to the mt7697 and RPi header
$MANGOH_ROOT/linux_kernel_modules/cp2130/0-cp2130
// temperature and pressure sensor
$MANGOH_ROOT/linux_kernel_modules/bmp280/2-bmp280
$MANGOH_ROOT/linux_kernel_modules/bmp280/3-bmp280-i2c
// 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
// battery gauge
$MANGOH_ROOT/linux_kernel_modules/ltc294x/0-ltc294x.mdef
// 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_SUPPORT_MT7697_WIFI} = 1
$CURDIR/linux_kernel_modules/mt7697wifi/mt7697wifi_core
#endif // MANGOH_SUPPORT_MT7697_WIFI
/*
* Dependencies of the above kernel modules - must be listed explicitly in the SDEF due to the
* way that Legato kernel module dependencies work
*/
$CURDIR/linux_kernel_modules/led/led
$CURDIR/linux_kernel_modules/bq24296/bq24296
$CURDIR/linux_kernel_modules/ltc294x/ltc294x
$CURDIR/linux_kernel_modules/cp2130/cp2130
$CURDIR/linux_kernel_modules/bmp280/bmp280-i2c
$CURDIR/linux_kernel_modules/bmp280/bmp280
$CURDIR/linux_kernel_modules/bmi160/bmi160-i2c
$CURDIR/linux_kernel_modules/bmi160/bmi160
#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
$CURDIR/linux_kernel_modules/iio/iio-triggered-buffer
$CURDIR/linux_kernel_modules/iio/iio-kfifo-buf
$CURDIR/linux_kernel_modules/iio/iio
#endif // MANGOH_KERNEL_LACKS_IIO
#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
$CURDIR/linux_kernel_modules/mt7697q/mt7697q
$CURDIR/linux_kernel_modules/mt7697serial/mt7697serial
#endif // MANGOH_SUPPORT_MT7697_WIFI
// 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
$CURDIR/linux_kernel_modules/mangoh/mangoh_green_dv4
// accelerometer driver
$MANGOH_ROOT/linux_kernel_modules/lsm6ds3/0-lsm6ds3
$MANGOH_ROOT/linux_kernel_modules/lsm6ds3/1-lsm6ds3-i2c
/*
* Dependencies of the above kernel modules - must be listed explicitly in the SDEF due to the
* way that Legato kernel module dependencies work
*/
$CURDIR/linux_kernel_modules/lsm6ds3/lsm6ds3-i2c
$CURDIR/linux_kernel_modules/lsm6ds3/lsm6ds3
#endif // MANGOH_BOARD
$LEGATO_ROOT/drivers/spisvc/spisvc
......
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