Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import of Rel-2-BETA-WW05-15 #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 182 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# Top level makefile, repo tool should create a link on this file at the root
# of the build environement.

.DEFAULT_GOAL := image

# Parallelism is managed by bitbake for this project
.NOTPARALLEL:

# In this makefile, all targets are phony because dependencies are managed at the bitbake level.
# We don't need to specify all targets here because no files named like them exist at the top level directory.
.PHONY : bbcache

# Use a default build tag when none is set by the caller
NOWDATE := $(shell date +"%Y%m%d%H%M%S")
BUILD_TAG ?= custom_build_$(USER)@$(HOSTNAME)$(NOWDATE)
BB_DL_DIR ?= $(CURDIR)/bbcache/downloads
BB_SSTATE_DIR ?= $(CURDIR)/bbcache/sstate-cache

###############################################################################
# Main targets
###############################################################################
setup: _setup-sdkhost_linux64

cleansstate: _check_setup_was_done
/bin/bash -c "source out/current/poky/oe-init-build-env $(CURDIR)/out/current/build ; $(CURDIR)/device-software/utils/invalidate_sstate.sh $(CURDIR)/out/current/build"

devtools_package: _check_setup_was_done
/bin/bash -c "source out/current/poky/oe-init-build-env $(CURDIR)/out/current/build ; $(CURDIR)/device-software/utils/create_devtools_package.sh $(CURDIR)/out/current/build"

sdk: _check_setup_was_done
/bin/bash -c "source out/current/poky/oe-init-build-env $(CURDIR)/out/current/build ; bitbake edison-image -c populate_sdk"

src-package: pub
./device-software/utils/create_src_package.sh
mv edison-src.tgz $(CURDIR)/pub/edison-src-$(BUILD_TAG).tgz

clean:
rm -rf out

u-boot linux-externalsrc edison-image meta-toolchain bootimg: _check_setup_was_done
/bin/bash -c "source out/current/poky/oe-init-build-env $(CURDIR)/out/current/build ; bitbake -c cleansstate $@ ; bitbake $@"
./device-software/utils/flash/postBuild.sh $(CURDIR)/out/current/build

bootloader: u-boot

image: edison-image

kernel: linux-externalsrc bootimg

toolchain: meta-toolchain

flash: _check_postbuild_was_done
./out/current/build/toFlash/flashall.sh

flash-kernel: _check_postbuild_was_done
dd if=./out/current/build/toFlash/edison-image-edison.hddimg | ssh [email protected] "dd of=/dev/disk/by-partlabel/boot bs=1M"
ssh [email protected] "/sbin/reboot -f"

flash-bootloader: _check_postbuild_was_done
dfu-util -d 8087:0a99 --alt u-boot0 -D ./out/current/build/toFlash/u-boot-edison.bin -R

cscope:
find linux-kernel/ u-boot -regex '.*\.\(c\|cpp\|h\)$\' > cscope.files
cscope -R -b -k

list:
@sh -c "$(MAKE) -p _no_targets | awk -F':' '/^[a-zA-Z0-9][^\$$#\/\\t=]*:([^=]|$$)/ {split(\$$1,A,/ /);for(i in A)print A[i]}' | sort"

debian_image:
$(MAKE) setup SETUP_ARGS="$(SETUP_ARGS) --deb_packages"
$(MAKE) image
@echo '*******************************'
@echo '*******************************'
@echo 'Now run the following command to create the debian rootfs:'
@echo 'sudo $(CURDIR)/device-software/utils/create-debian-image.sh --build_dir=$(CURDIR)/out/current/build'
@echo 'and run a regular make flash'
@echo '*******************************'

help:
@echo 'Main targets:'
@echo ' help - show this help'
@echo ' clean - remove the out and pub directory'
@echo ' setup - prepare the build env for later build operations'
@echo ' cleansstate - clean the sstate for some recipes to work-around some bitbake limitations'
@echo ' image - build the flashable edison image, results are in out/current/build/toFlash'
@echo ' flash - flash the current build image'
@echo ' sdk - build the SDK for the current build'
@echo ' toolchain - build the cross compilation toolchain for the current build'
@echo ' src-package - create the external source package'
@echo ' devtools_package - build some extra dev tools packages, results are in out/current/build/devtools_packages/'
@echo
@echo 'Continuous Integration targets:'
@sh -c "$(MAKE) -p _no_targets | awk -F':' '/^ci_[a-zA-Z0-9][^\$$#\/\\t=]*:([^=]|$$)/ {split(\$$1,A,/ /);for(i in A)print \" \"A[i]}' | sort"
@echo
@echo 'Environment variables:'
@echo ' BUILD_TAG - set the build name used for e.g. artifact file naming'
@echo ' BB_DL_DIR - defines the directory (absolute path) where bitbake places downloaded files (defaults to bbcache/downloads)'
@echo ' BB_SSTATE_DIR - defines the directory (absolute path) where bitbake places shared-state files (defaults to bbcache/sstate-cache)'
@echo ' SETUP_ARGS - control advanced behaviour of the setup script (run ./device-software/setup.sh --help for more details)'

###############################################################################
# Private targets
###############################################################################

_no_targets:

_check_setup_was_done:
@if [ ! -f $(CURDIR)/out/current/build/conf/local.conf ]; then echo Please run \"make setup\" first ; exit 1 ; fi

_check_postbuild_was_done:
@if [ ! -f $(CURDIR)/out/current/build/toFlash/flashall.sh ]; then echo Please run \"make image/bootloader/kernel\" first ; exit 1 ; fi

_setup-sdkhost_%: pub bbcache
@echo Setup buildenv for SDK host $*
@mkdir -p out/$*
./device-software/setup.sh $(SETUP_ARGS) --dl_dir=$(BB_DL_DIR) --sstate_dir=$(BB_SSTATE_DIR) --build_dir=$(CURDIR)/out/$* --build_name=$(BUILD_TAG) --sdk_host=$*
@rm -f out/current
@ln -s $(CURDIR)/out/$* $(CURDIR)/out/current
@if [ $* = macosx ]; then /bin/bash -c "source out/current/poky/oe-init-build-env $(CURDIR)/out/current/build ; bitbake odcctools2-crosssdk -c cleansstate" ; echo "Please make sure that OSX-sdk.zip is available in your bitbake download directory" ; fi

pub:
@mkdir -p $@

bbcache:
@mkdir -p bbcache
@mkdir -p $(BB_DL_DIR)
@mkdir -p $(BB_SSTATE_DIR)

_image_archive:
cd $(CURDIR)/out/current/build/toFlash ; zip -r $(CURDIR)/pub/edison-image-$(BUILD_TAG).zip `ls`
cd $(CURDIR)/out/current/build/symbols ; zip -r $(CURDIR)/pub/symbols-$(BUILD_TAG).zip `ls`

_devtools_package_archive:
cd $(CURDIR)/out/current/build/devtools_packages ; zip -r $(CURDIR)/pub/edison-devtools-packages-$(BUILD_TAG).zip `ls`

_sdk_archive_%:
cd $(CURDIR)/out/$*/build/tmp/deploy/sdk ; zip -r $(CURDIR)/pub/edison-sdk-$*-$(BUILD_TAG).zip `ls *-edison-image-*`

_toolchain_archive_%:
cd $(CURDIR)/out/$*/build/tmp/deploy/sdk ; zip -r $(CURDIR)/pub/edison-meta-toolchain-$*-$(BUILD_TAG).zip `ls *-meta-toolchain-*`


###############################################################################
# Continuous Integration targets: one per checkbox available in jenkins
# Each target places the the end-user artifact in the pub/ directory
###############################################################################

ci_image: setup cleansstate devtools_package _devtools_package_archive image _image_archive

_ci_sdk_%:
$(MAKE) _setup-sdkhost_$* cleansstate sdk _sdk_archive_$*

_ci_toolchain_%:
$(MAKE) _setup-sdkhost_$* cleansstate toolchain _toolchain_archive_$*

ci_sdk_win32: _ci_sdk_win32
ci_sdk_win64: _ci_sdk_win64
ci_sdk_linux32: _ci_sdk_linux32
ci_sdk_linux64: _ci_sdk_linux64
ci_sdk_macosx: _ci_sdk_macosx
ci_toolchain_win32: _ci_toolchain_win32
ci_toolchain_win64: _ci_toolchain_win64
ci_toolchain_linux32: _ci_toolchain_linux32
ci_toolchain_linux64: _ci_toolchain_linux64
ci_toolchain_macosx: _ci_toolchain_macosx

ci_image-from-src-package-and-GPL-LGPL-sources_archive: setup src-package
cp $(CURDIR)/pub/edison-src-$(BUILD_TAG).tgz $(CURDIR)/out/current
cd $(CURDIR)/out/current ; tar -xvf edison-src-$(BUILD_TAG).tgz
cd $(CURDIR)/out/current/edison-src ; /bin/bash -c "SETUP_ARGS=\"$(SETUP_ARGS) --create_src_archive\" make setup cleansstate image _image_archive"
cd $(CURDIR)/out/current/edison-src/out/current/build/toFlash ; zip -r $(CURDIR)/pub/edison-image-from-src-package-$(BUILD_TAG).zip `ls`
cd $(CURDIR)/out/current/edison-src/out/current/build/tmp/deploy/sources ; zip -r $(CURDIR)/pub/edison-GPL_LGPL-sources-$(BUILD_TAG).zip `ls`

ci_full:
$(MAKE) ci_image BUILD_TAG=$(BUILD_TAG)
$(MAKE) ci_image-from-src-package-and-GPL-LGPL-sources_archive BUILD_TAG=$(BUILD_TAG)
$(MAKE) ci_sdk_win32 ci_toolchain_win32 BUILD_TAG=$(BUILD_TAG)
$(MAKE) ci_sdk_win64 ci_toolchain_win64 BUILD_TAG=$(BUILD_TAG)
$(MAKE) ci_sdk_linux32 ci_toolchain_linux32 BUILD_TAG=$(BUILD_TAG)
$(MAKE) ci_sdk_linux64 ci_toolchain_linux64 BUILD_TAG=$(BUILD_TAG)
$(MAKE) ci_sdk_macosx ci_toolchain_macosx BUILD_TAG=$(BUILD_TAG)

11 changes: 7 additions & 4 deletions arduino/clloader/clloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -2729,12 +2729,15 @@ int clantonLoaderFSM(int argc, char * argv[])
fprintf(stderr, "host: %s\n", rbuf_from_host);
errors = 0;
/* TODO: bring out state change of BAUD/LINE and replace magic string */
if (strncmp(CL_LOADER_CMD_HOST_START_DOWNLOAD_CMD,
rbuf_from_host,
(size_t)strlen(CL_LOADER_CMD_HOST_START_DOWNLOAD_CMD)) == 0) {
if (strncmp(downloadCMD, rbuf_from_host,
((size_t)strlen(rbuf_from_host)-1)) == 0) {
// We got a special command to start download
clantonLeavePassThroughState = TRUE;

} else if (strncmp(CL_LOADER_CMD_HOST_START_DOWNLOAD_CMD,
rbuf_from_host,
((size_t)strlen(rbuf_from_host)-1)) == 0) {
// Old command string. Allow to download anyway.
clantonLeavePassThroughState = TRUE;
} else {
write(mystate.tty_slave,rbuf_from_host,ret); //todo check write status
}
Expand Down
1 change: 1 addition & 0 deletions arduino/clloader/clloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define MAX_ARGS 0x20

#define CL_LOADER_CMD_HOST_START_DOWNLOAD_CMD "~sketch download"
#define downloadCMD "~sketch downloadEdison"

#define CL_LOADER_CMD_STARTCHAR '#'
#define CL_LOADER_CMD_START_SKETCH_APP "#Start Sketch:" /* filename args and exec i/o wrapper */
Expand Down
Binary file not shown.
55 changes: 41 additions & 14 deletions broadcom_cws/wlan/driver_bcm43x/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ common_iface_combinations[] = {
#endif

#ifndef IBSS_COALESCE_ALLOWED
#define IBSS_COALESCE_ALLOWED 0
#define IBSS_COALESCE_ALLOWED 1
#endif

#ifndef IBSS_INITIAL_SCAN_ALLOWED
Expand Down Expand Up @@ -2606,6 +2606,7 @@ channel_to_chanspec(struct wiphy *wiphy, struct net_device *dev, u32 channel, u3
}
for (i = 0; i < dtoh32(list->count); i++) {
c = dtoh32(list->element[i]);
c = wl_chspec_driver_to_host(c);
if (channel <= CH_MAX_2G_CHANNEL) {
if (!CHSPEC_IS20(c))
continue;
Expand Down Expand Up @@ -2657,6 +2658,8 @@ channel_to_chanspec(struct wiphy *wiphy, struct net_device *dev, u32 channel, u3
if (buf)
kfree(buf);
#undef LOCAL_BUF_SIZE
if (ret_c)
ret_c = wl_chspec_host_to_driver(ret_c);
WL_INFO(("return chanspec %x %d\n", ret_c, bw));
return ret_c;
}
Expand Down Expand Up @@ -2738,7 +2741,10 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
s32 err = 0;
size_t join_params_size;
chanspec_t chanspec = 0;
u32 param[2] = {0, 0};
struct {
u32 band;
u32 bw_cap;
} param = {0, 0};
u32 bw_cap = 0;

WL_TRACE(("In\n"));
Expand Down Expand Up @@ -2808,16 +2814,35 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
cfg->ibss_starter = true;
}
if (chan) {
if (chan->band == IEEE80211_BAND_5GHZ)
param[0] = WLC_BAND_5G;
else if (chan->band == IEEE80211_BAND_2GHZ)
param[0] = WLC_BAND_2G;
err = wldev_iovar_getint(dev, "bw_cap", param);
if (unlikely(err)) {
WL_ERR(("Get bw_cap Failed (%d)\n", err));
return err;
if (chan->band == IEEE80211_BAND_5GHZ) {
param.band = WLC_BAND_5G;
err = wldev_iovar_getbuf(dev, "bw_cap", &param, sizeof(param),
cfg->ioctl_buf, WLC_IOCTL_SMLEN, &cfg->ioctl_buf_sync);
if (err) {
if (err != BCME_UNSUPPORTED) {
WL_ERR(("bw_cap failed, %d\n", err));
return err;
} else {
err = wldev_iovar_getint(dev, "mimo_bw_cap", &bw_cap);
if (err) {
WL_ERR(("error get mimo_bw_cap (%d)\n", err));
}
if (bw_cap != WLC_N_BW_20ALL)
bw_cap = WL_CHANSPEC_BW_40;
}
}
else {
if (WL_BW_CAP_80MHZ(cfg->ioctl_buf[0]))
bw_cap = WL_CHANSPEC_BW_80;
else if (WL_BW_CAP_40MHZ(cfg->ioctl_buf[0]))
bw_cap = WL_CHANSPEC_BW_40;
else
bw_cap = WL_CHANSPEC_BW_20;
}
}
bw_cap = param[0];
else if (chan->band == IEEE80211_BAND_2GHZ)
bw_cap = WL_CHANSPEC_BW_20;

chanspec = channel_to_chanspec(wiphy, dev, cfg->channel, bw_cap);
}
/*
Expand Down Expand Up @@ -2851,9 +2876,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
}
}

join_params.params.chanspec_list[0] = chanspec;
join_params.params.chanspec_num = 1;
wldev_iovar_setint(dev, "chanspec", chanspec);
if (chan) {
join_params.params.chanspec_list[0] = chanspec;
join_params.params.chanspec_num = 1;
wldev_iovar_setint(dev, "chanspec", chanspec);
}
join_params_size = sizeof(join_params);

/* Disable Authentication, IBSS will add key if it required */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SUMMARY = "dhdutil utility"
DESCRIPTION = "dhdutil utility for BCM chipset"
SECTION = "test-tools"
LICENSE = "CLOSED"

PV = "r1.141"
PR = "r47"

S = "${EDISONREPO_TOP_DIR}/broadcom_tools/wlan/dhdutil"

do_install() {
install -v -d ${D}/usr/sbin/
install -m 0755 ${B}/dhdutil ${D}/usr/sbin
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SUMMARY = "wlx utility"
DESCRIPTION = "wlx utility for BCM chipset"
SECTION = "test-tools"
LICENSE = "CLOSED"

PV = "r6.10.190"
PR = "r40"

S = "${EDISONREPO_TOP_DIR}/broadcom_tools/wlan/wlx"

do_compile () {
oe_runmake -C wl/exe
}

do_install() {
install -v -d ${D}/usr/sbin/
install -m 0755 ${B}/wl/exe/wlx ${D}/usr/sbin
}

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ do_install() {
install -m 0755 ${S}/scripts/wfa_stop_ping ${D}/usr/sbin
install -m 0755 ${S}/scripts/wfa_start_dhcp_client ${D}/usr/sbin
install -m 0755 ${S}/scripts/wfa_stop_dhcp_client ${D}/usr/sbin
install -m 0755 ${S}/scripts/wfa_start_dhcp_server ${D}/usr/sbin
install -m 0755 ${S}/scripts/wfa_stop_dhcp_server ${D}/usr/sbin

install -v -d ${D}${sysconfdir}/sigma
install -m 644 ${S}/scripts/udhcpd.conf ${D}${sysconfdir}/sigma
install -m 644 ${S}/certificates/cas.pem ${D}${sysconfdir}/sigma
install -m 644 ${S}/certificates/root.pem ${D}${sysconfdir}/sigma
install -m 644 ${S}/certificates/wifiuser.pem ${D}${sysconfdir}/sigma
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ PREFERRED_VERSION_linux-yocto = "3.10%"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
PREFERRED_VERSION_u-boot ?= "2014.04-1"
PREFERRED_VERSION_u-boot-fw-utils ?= "2014.04-1"
PREFERRED_VERSION_connman ?= "1.24"
PREFERRED_VERSION_openssl ?= "1.0.1g"
PREFERRED_VERSION_connman ?= "1.27"
PREFERRED_VERSION_openssl ?= "1.0.1j"
PREFERRED_VERSION_systemd ?= "213+gitAUTOINC+c9679c652b"

DISTRO_FEATURES = "systemd alsa argp bluetooth ext2 largefile usbgadget usbhost wifi xattr nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ fw_patch = /etc/firmware/bcm43341.hcd
uart_dev = /dev/ttyMFD0

# SCO settings
# N/A now
# scopcm =
# configure sco routing to Transport (HCI);
scopcm = 1,0,0,0,0,0,0,0,0,0
Loading