BigW Consortium Gitlab

Commit 37bddbc6 by Zahid Chowdhury

Fix bug in build.sh on wp76xx, remove all build artifacts, refactor Makefile…

Fix bug in build.sh on wp76xx, remove all build artifacts, refactor Makefile some for wifi, and make board names lower-case
parent 708d640f
......@@ -37,96 +37,108 @@ else
$(MAKE) -C $(LEGATO_ROOT) framework_$(LEGATO_TARGET)
endif
export LEGATO_TARGET := $(subst legato_,,$@)
.PHONY: green_wp85
green_wp85: legato_wp85
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp85 dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp85 prefix) \
MANGOH_BOARD=GREEN \
MANGOH_BOARD=green \
mksys -t wp85 $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH.sdef
.PHONY: green_wp750x
green_wp750x: legato_wp750x
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp750x dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp750x prefix) \
MANGOH_BOARD=GREEN \
MANGOH_BOARD=green \
mksys -t wp750x $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH.sdef
.PHONY: green_wp76xx
green_wp76xx: legato_wp76xx
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp76xx dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp76xx prefix) \
MANGOH_BOARD=GREEN \
MANGOH_BOARD=green \
mksys -t wp76xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH.sdef
.PHONY: green_wp77xx
green_wp77xx: legato_wp77xx
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp77xx dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp77xx prefix) \
MANGOH_BOARD=GREEN \
MANGOH_BOARD=green \
mksys -t wp77xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_GREEN) mangOH.sdef
.PHONY: red_wp85
red_wp85: legato_wp85
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp85 dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp85 prefix) \
MANGOH_BOARD=RED \
MANGOH_BOARD=red \
mksys -t wp85 $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: red_wp750x
red_wp750x: legato_wp750x
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp750x dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp750x prefix) \
MANGOH_BOARD=RED \
MANGOH_BOARD=red \
mksys -t wp750x $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: red_wp76xx
red_wp76xx: legato_wp76xx
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp76xx dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp76xx prefix) \
MANGOH_BOARD=RED \
MANGOH_BOARD=red \
mksys -t wp76xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: red_wp77xx
red_wp77xx: legato_wp77xx
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp77xx dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp77xx prefix) \
MANGOH_BOARD=RED \
MANGOH_BOARD=red \
mksys -t wp77xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
# Until Legato allows external builds in mdefs we will need to build a
# subsystem driver like Cypress Wifi in the top makefile and with scripts
# Define a function to build the Cypress driver for different architectures
# $(call cyp_bld,build_dir)
define cyp_bld
if [ ! -d $(MANGOH_ROOT)/build/$1/modules/cypwifi ] ; then \
mkdir -p $(MANGOH_ROOT)/build/$1/modules/cypwifi ;\
cp -pr $(MANGOH_ROOT)/linux_kernel_modules/cypwifi $(MANGOH_ROOT)/build/$1/modules/ ; \
$(MANGOH_ROOT)/build/$1/modules/cypwifi/build.sh $1 clean; \
else \
$(MANGOH_ROOT)/build/$1/modules/cypwifi/build.sh $1 modules; \
fi
endef
.PHONY: yellow_wp85
yellow_wp85: legato_wp85
# Until Legato allows external builds in mdefs we will need to build a
# subsystem driver like Cypress in the top makefile and with scripts
LEGATO_TARGET=wp85 $(MANGOH_ROOT)/linux_kernel_modules/cypwifi/build.sh
$(call cyp_bld,$@)
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp85 dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp85 prefix) \
MANGOH_BOARD=YELLOW \
MANGOH_BOARD=yellow \
mksys -t wp85 $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: yellow_wp750x
yellow_wp750x: legato_wp750x
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp750x dir) \
$(call cyp_bld,$@)
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp750x prefix) \
MANGOH_BOARD=YELLOW \
MANGOH_BOARD=yellow \
mksys -t wp750x $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_RED) mangOH.sdef
.PHONY: yellow_wp76xx
yellow_wp76xx: legato_wp76xx
# Until Legato allows external builds in mdefs we will need to build a
# subsystem driver like Cypress in the top makefile and with scripts
# This does not seem to work except on 1 board flakily - will try with
# DV2 Yellow
LEGATO_TARGET=wp76xx $(MANGOH_ROOT)/linux_kernel_modules/cypwifi/build.sh
$(call cyp_bld,$@)
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp76xx dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp76xx prefix) \
MANGOH_BOARD=YELLOW \
MANGOH_BOARD=yellow \
mksys -t wp76xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_YELLOW) mangOH.sdef
.PHONY: yellow_wp77xx
yellow_wp77xx: legato_wp77xx
$(call cyp_bld,$@)
TOOLCHAIN_DIR=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp77xx dir) \
TOOLCHAIN_PREFIX=$(shell $(LEGATO_ROOT)/bin/findtoolchain wp77xx prefix) \
MANGOH_BOARD=YELLOW \
MANGOH_BOARD=yellow \
mksys -t wp77xx $(MKSYS_ARGS_COMMON) $(MKSYS_ARGS_YELLOW) mangOH.sdef
.PHONY: clean
......
This source diff could not be displayed because it is too large. You can view the blob instead.
config KERNEL_4_16
def_bool y
config KERNEL_4_17
def_bool y
config KERNEL_4_18
def_bool y
config KERNEL_4_19
def_bool y
config KERNEL_4_20
def_bool y
config KERNEL_4_21
def_bool y
config KERNEL_4_22
def_bool y
config KERNEL_4_23
def_bool y
config KERNEL_4_24
def_bool y
config KERNEL_4_25
def_bool y
config KERNEL_4_26
def_bool y
config KERNEL_4_27
def_bool y
config KERNEL_4_28
def_bool y
config KERNEL_4_29
def_bool y
config KERNEL_4_30
def_bool y
config KERNEL_4_31
def_bool y
config KERNEL_4_32
def_bool y
config KERNEL_4_33
def_bool y
config KERNEL_4_34
def_bool y
config KERNEL_4_35
def_bool y
config KERNEL_4_36
def_bool y
config KERNEL_4_37
def_bool y
config KERNEL_4_38
def_bool y
config KERNEL_4_39
def_bool y
config KERNEL_4_40
def_bool y
config KERNEL_4_41
def_bool y
config KERNEL_4_42
def_bool y
config KERNEL_4_43
def_bool y
config KERNEL_4_44
def_bool y
config KERNEL_4_45
def_bool y
config KERNEL_4_46
def_bool y
config KERNEL_4_47
def_bool y
config KERNEL_4_48
def_bool y
config KERNEL_4_49
def_bool y
config KERNEL_4_50
def_bool y
config KERNEL_4_51
def_bool y
config KERNEL_4_52
def_bool y
config KERNEL_4_53
def_bool y
config KERNEL_4_54
def_bool y
config KERNEL_4_55
def_bool y
config KERNEL_4_56
def_bool y
config KERNEL_4_57
def_bool y
config KERNEL_4_58
def_bool y
config KERNEL_4_59
def_bool y
config KERNEL_4_60
def_bool y
config KERNEL_4_61
def_bool y
config KERNEL_4_62
def_bool y
config KERNEL_4_63
def_bool y
config KERNEL_4_64
def_bool y
config KERNEL_4_65
def_bool y
config KERNEL_4_66
def_bool y
config KERNEL_4_67
def_bool y
config KERNEL_4_68
def_bool y
config KERNEL_4_69
def_bool y
config KERNEL_4_70
def_bool y
config KERNEL_4_71
def_bool y
config KERNEL_4_72
def_bool y
config KERNEL_4_73
def_bool y
config KERNEL_4_74
def_bool y
config KERNEL_4_75
def_bool y
config KERNEL_4_76
def_bool y
config KERNEL_4_77
def_bool y
config KERNEL_4_78
def_bool y
config KERNEL_4_79
def_bool y
config KERNEL_4_80
def_bool y
config KERNEL_4_81
def_bool y
config KERNEL_4_82
def_bool y
config KERNEL_4_83
def_bool y
config KERNEL_4_84
def_bool y
config KERNEL_4_85
def_bool y
config KERNEL_4_86
def_bool y
config KERNEL_4_87
def_bool y
config KERNEL_4_88
def_bool y
config KERNEL_4_89
def_bool y
config KERNEL_4_90
def_bool y
config KERNEL_4_91
def_bool y
config KERNEL_4_92
def_bool y
config KERNEL_4_93
def_bool y
config KERNEL_4_94
def_bool y
config KERNEL_4_95
def_bool y
config KERNEL_4_96
def_bool y
config KERNEL_4_97
def_bool y
config KERNEL_4_98
def_bool y
config KERNEL_4_99
def_bool y
#ifndef COMPAT_AUTOCONF_INCLUDED
#define COMPAT_AUTOCONF_INCLUDED
/*
* Automatically generated file, don't edit!
* Changes will be overwritten
*/
#define CPTCFG_WIRELESS 1
#define CPTCFG_NET_CORE 1
#define CPTCFG_EXPERT 1
#define CPTCFG_BP_MODULES 1
#define CPTCFG_BPAUTO_REFCOUNT 1
#define CPTCFG_CFG80211_MODULE 1
#define CPTCFG_CFG80211_DEFAULT_PS 1
#define CPTCFG_CFG80211_CRDA_SUPPORT 1
#define CPTCFG_CFG80211_WEXT 1
#define CPTCFG_WLAN 1
#define CPTCFG_WLAN_VENDOR_BROADCOM 1
#define CPTCFG_BRCMUTIL_MODULE 1
#define CPTCFG_BRCMFMAC_MODULE 1
#define CPTCFG_BRCMFMAC_PROTO_BCDC 1
#define CPTCFG_BRCMFMAC_SDIO 1
#define CPTCFG_BRCMFMAC_USB 1
#define CPTCFG_BACKPORTED_WIRELESS 1
#define CPTCFG_BACKPORTED_NET_CORE 1
#define CPTCFG_BACKPORTED_EXPERT 1
#define CPTCFG_BACKPORTED_BP_MODULES 1
#define CPTCFG_BACKPORTED_BPAUTO_REFCOUNT 1
#define CPTCFG_BACKPORTED_CFG80211_MODULE 1
#define CPTCFG_BACKPORTED_CFG80211_DEFAULT_PS 1
#define CPTCFG_BACKPORTED_CFG80211_CRDA_SUPPORT 1
#define CPTCFG_BACKPORTED_CFG80211_WEXT 1
#define CPTCFG_BACKPORTED_WLAN 1
#define CPTCFG_BACKPORTED_WLAN_VENDOR_BROADCOM 1
#define CPTCFG_BACKPORTED_BRCMUTIL_MODULE 1
#define CPTCFG_BACKPORTED_BRCMFMAC_MODULE 1
#define CPTCFG_BACKPORTED_BRCMFMAC_PROTO_BCDC 1
#define CPTCFG_BACKPORTED_BRCMFMAC_SDIO 1
#define CPTCFG_BACKPORTED_BRCMFMAC_USB 1
#endif /* COMPAT_AUTOCONF_INCLUDED */
......@@ -7,8 +7,21 @@
# If your kernel headers are in a different place than mine - please
# modify the values appropriately
set -x
USAGE="Usage: $0 build_target_dir clean|modules"
if [ -z "$1" ] ; then
echo $USAGE
exit 2
fi
if [ -z "$2" ] ; then
echo $USAGE
exit 3
fi
export PATH=`findtoolchain ${LEGATO_TARGET} dir`:$PATH
export MY_KERNEL=`findtoolchain wp85 kernelroot`
export MY_KERNEL=`findtoolchain ${LEGATO_TARGET} kernelroot`
export KLIB=$MY_KERNEL
export KLIB_BUILD=$MY_KERNEL
......@@ -19,9 +32,14 @@ export CROSS_COMPILE=`findtoolchain ${LEGATO_TARGET} prefix`
# Lets do it
OLDPWD=`pwd`
cd ${MANGOH_ROOT}/linux_kernel_modules/cypwifi
make clean ; make defconfig-brcmfmac ; make modules
cd ${MANGOH_ROOT}/build/${1}/modules/cypwifi
if [ "$2" == "clean" ] ; then
make clean ; make defconfig-brcmfmac
fi
make modules
if [ $? -ne 0 ] ; then
cd $OLDPWD
exit 1
else
cd $OLDPWD
......
preBuilt:
{
$CURDIR/compat/compat.ko
$CURDIR/net/wireless/cfg80211.ko
$CURDIR/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
$CURDIR/drivers/net/wireless/broadcom/brcm80211/brcmutil/brcmutil.ko
$MANGOH_ROOT/build/${MANGOH_BOARD}_${LEGATO_TARGET}/modules/cypwifi/compat/compat.ko
$MANGOH_ROOT/build/${MANGOH_BOARD}_${LEGATO_TARGET}/modules/cypwifi/net/wireless/cfg80211.ko
$MANGOH_ROOT/build/${MANGOH_BOARD}_${LEGATO_TARGET}/modules/cypwifi/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
$MANGOH_ROOT/build/${MANGOH_BOARD}_${LEGATO_TARGET}/modules/cypwifi/drivers/net/wireless/broadcom/brcm80211/brcmutil/brcmutil.ko
}
bundles:
......@@ -14,9 +14,17 @@ bundles:
$CURDIR/firmware/brcmfmac43430-sdio.bin /etc/firmware/brcm/brcmfmac43430-sdio.bin
$CURDIR/firmware/brcmfmac43430-sdio.clm_blob /etc/firmware/brcm/brcmfmac43430-sdio.clm_blob
[x] $CURDIR/scripts/cywifi.sh /etc/init.d/cywifi.sh
//[x] $CURDIR/scripts/cywifi_start.sh /etc/init.d/cywifi_start.sh
//[x] $CURDIR/scripts/cywifi_stop.sh /etc/init.d/cywifi_stop.sh
}
}
//scripts:
//{
//install: $CURDIR/scripts/cywifi_start.sh
//remove: $CURDIR/scripts/cywifi_stop.sh
//}
load: manual
......@@ -10,7 +10,7 @@
apps:
{
#if ${MANGOH_BOARD} = RED
#if ${MANGOH_BOARD} = red
/*
* There is a conflict between the following software components:
* - sx1509 Linux kernel driver
......@@ -46,14 +46,14 @@ apps:
$MANGOH_ROOT/apps/BatteryService/battery
$LEGATO_ROOT/apps/sample/dataHub/dataHub
#elif ${MANGOH_BOARD} = GREEN
#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
#elif ${MANGOH_BOARD} = YELLOW
#elif ${MANGOH_BOARD} = yellow
// $MANGOH_ROOT/apps/YellowSensorToCloud/yellowSensor
$LEGATO_ROOT/apps/sample/dataHub/dataHub
......@@ -70,7 +70,7 @@ apps:
commands:
{
#if ${MANGOH_BOARD} = GREEN
#if ${MANGOH_BOARD} = green
mux = muxCtrlTools:/bin/mux
#else // MANGOH_BOARD
dhub = dataHub:/bin/dhub
......@@ -82,15 +82,15 @@ commands:
interfaceSearch:
{
#if ${MANGOH_BOARD} = RED
#if ${MANGOH_BOARD} = red
$MANGOH_ROOT/apps/BatteryService
$MANGOH_ROOT/apps/mangOHRedSensorToCloud
$LEGATO_ROOT/apps/sample/dataHub
#elif ${MANGOH_BOARD} = GREEN
#elif ${MANGOH_BOARD} = green
$MANGOH_ROOT/apps/MuxControl
#elif ${MANGOH_BOARD} = YELLOW
#elif ${MANGOH_BOARD} = yellow
$LEGATO_ROOT/apps/sample/dataHub
#endif // MANGOH_BOARD
......@@ -104,15 +104,15 @@ componentSearch:
{
${CURDIR}/components
#if ${MANGOH_BOARD} = RED
#if ${MANGOH_BOARD} = red
${CURDIR}/apps/GpioExpander/gpioExpanderService
${CURDIR}/apps/RedSensorToCloud
${CURDIR}/apps/LocationTriangulation
${CURDIR}/apps/MqttClient
${CURDIR}/apps/mangOHRedSensorToCloud/interfaces
#elif ${MANGOH_BOARD} = GREEN
#elif ${MANGOH_BOARD} = green
${CURDIR}/apps/GpioExpander/gpioExpanderService
#elif ${MANGOH_BOARD} = YELLOW
#elif ${MANGOH_BOARD} = yellow
${CURDIR}/apps/YellowSensorToCloud/interfaces
#endif
......@@ -122,7 +122,7 @@ componentSearch:
kernelModules:
{
#if ${MANGOH_BOARD} = RED
#if ${MANGOH_BOARD} = red
$CURDIR/linux_kernel_modules/mangoh/mangoh_red
$CURDIR/linux_kernel_modules/mt7697wifi/mt7697wifi_core
......@@ -150,7 +150,7 @@ kernelModules:
// Uncomment to build for the CAN Bus IoT card on mangOH Red
// #include "sinc/mangoh_red_can_iot_card.sinc"
#elif ${MANGOH_BOARD} = GREEN
#elif ${MANGOH_BOARD} = green
$CURDIR/linux_kernel_modules/mangoh/mangoh_green_dv4
/*
......@@ -159,7 +159,7 @@ kernelModules:
*/
$CURDIR/linux_kernel_modules/lsm6ds3/lsm6ds3-i2c
$CURDIR/linux_kernel_modules/lsm6ds3/lsm6ds3
#elif ${MANGOH_BOARD} = YELLOW
#elif ${MANGOH_BOARD} = yellow
$CURDIR/linux_kernel_modules/mangoh/mangoh_yellow_dev
#if ${MANGOH_KERNEL_LACKS_IIO} = 1
$CURDIR/linux_kernel_modules/iio/iio-triggered-buffer
......
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