Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d6de88b
Showing
453 changed files
with
218,491 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#------------------------------------------------------------------------------ | ||
# <copyright file="makefile" company="Atheros"> | ||
# Copyright (c) 2005-2010 Atheros Corporation. All rights reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License version 2 as | ||
# published by the Free Software Foundation; | ||
# | ||
# Software distributed under the License is distributed on an "AS | ||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | ||
# implied. See the License for the specific language governing | ||
# rights and limitations under the License. | ||
# | ||
# | ||
#------------------------------------------------------------------------------ | ||
#============================================================================== | ||
# Author(s): ="Atheros" | ||
#============================================================================== | ||
|
||
ifneq ($(TARGET_SIMULATOR),true) | ||
|
||
LOCAL_PATH:= $(call my-dir) | ||
include $(CLEAR_VARS) | ||
|
||
ATH_ANDROID_SRC_BASE:= $(BOARD_WLAN_ATHEROS_SDK) | ||
export ATH_BUILD_TYPE=ANDROID_ARM_NATIVEMMC | ||
export ATH_BUS_TYPE=sdio | ||
export ATH_OS_SUB_TYPE=linux_2_6 | ||
|
||
ATH_ANDROID_ROOT:= $(CURDIR) | ||
export ATH_SRC_BASE:=$(ATH_ANDROID_ROOT)/$(BOARD_WLAN_ATHEROS_SDK)/host | ||
#ATH_CROSS_COMPILE_TYPE:=$(ATH_ANDROID_ROOT)/$(TARGET_TOOLS_PREFIX) | ||
#ATH_CROSS_COMPILE_TYPE:=$(ATH_ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi- | ||
ATH_TARGET_OUTPUT:=$(ATH_ANDROID_ROOT) | ||
|
||
ifeq ($(TARGET_PRODUCT),$(filter $(TARGET_PRODUCT),qsd8250_surf qsd8250_ffa msm7627_surf msm7627_ffa msm7625_ffa msm7625_surf msm7630_surf GT-I5500 msm8660_topaz msm8660_opal)) | ||
export ATH_LINUXPATH=$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ | ||
ATH_CROSS_COMPILE_TYPE:=$(ATH_ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi- | ||
endif | ||
|
||
ifndef ATH_LINUXPATH | ||
#check for Nvidia-base platform | ||
ifeq ($(TARGET_PRODUCT),$(filter $(TARGET_PRODUCT),harmony)) | ||
export ATH_LINUXPATH=$(ATH_ANDROID_ROOT)/$(TARGET_OUT_INTERMEDIATES)/KERNEL | ||
ATH_CROSS_COMPILE_TYPE:=$(ATH_ANDROID_ROOT)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- | ||
endif | ||
endif | ||
|
||
ifndef ATH_LINUXPATH | ||
# Comment in the following variable for your platform and comment out $(error) | ||
# Link your kernel into android SDK directory as 'kernel' directory | ||
# export ATH_LINUXPATH= [Your android/kernel path ] | ||
$(error define your kernel path here for ATH_LINUXPATH) | ||
endif | ||
|
||
export ATH_ARCH_CPU_TYPE=arm | ||
export ATH_BUS_SUBTYPE=linux_sdio | ||
export ATH_ANDROID_ENV=yes | ||
export ATH_SOFTMAC_FILE_USED=yes | ||
export ATH_CFG80211_ENV=no | ||
export ATH_DEBUG_DRIVER=yes | ||
export ATH_HTC_RAW_INT_ENV=yes | ||
export ATH_AR6K_OTA_TEST_MODE=yes | ||
export ATH_HIF_MESSAGE_BASED=no | ||
|
||
ATH_HIF_TYPE:=sdio | ||
|
||
ifneq ($(PLATFORM_VERSION),$(filter $(PLATFORM_VERSION),1.5 1.6)) | ||
|
||
ifeq ($(TARGET_PRODUCT),$(filter $(TARGET_PRODUCT),msm7627_surf msm7627_ffa GT-I5500)) | ||
ATH_ANDROID_BUILD_FLAGS=-D__LINUX_ARM_ARCH__=6 -march=armv6 | ||
#-fstack-check="generic" | ||
endif | ||
|
||
ifeq ($(TARGET_PRODUCT),$(filter $(TARGET_PRODUCT),qsd8250_surf qsd8250_ffa msm7630_surf smdkc100)) | ||
ATH_ANDROID_BUILD_FLAGS=-D__LINUX_ARM_ARCH__=7 -march=armv7-a | ||
#-fstack-check="generic" | ||
endif | ||
|
||
endif # ECLAIR | ||
|
||
ifeq ($(TARGET_PRODUCT),$(filter $(TARGET_PRODUCT),smdk6410)) | ||
ATH_ANDROID_BUILD_FLAGS += -DATH6KL_CONFIG_HIF_VIRTUAL_SCATTER | ||
endif | ||
|
||
#Uncomment the following define in order to enable OTA mode | ||
ATH_ANDROID_BUILD_FLAGS += -DATH6K_CONFIG_OTA_MODE | ||
|
||
export ATH_ANDROID_BUILD_FLAGS | ||
|
||
mod_cleanup := $(ATH_TARGET_OUTPUT)/$(ATH_ANDROID_SRC_BASE)/dummy | ||
|
||
$(mod_cleanup) : | ||
rm -f `find $(ATH_TARGET_OUTPUT)/$(ATH_ANDROID_SRC_BASE) -name "*.o"` | ||
mkdir -p $(TARGET_OUT)/wifi/ath6k/AR6003/hw2.0/ | ||
|
||
mod_file := $(TARGET_OUT)/wifi/ar6000.ko | ||
$(mod_file) : $(mod_cleanup) $(TARGET_PREBUILT_KERNEL) $(ACP) | ||
$(MAKE) ARCH=arm CROSS_COMPILE=$(ATH_CROSS_COMPILE_TYPE) -C $(ATH_LINUXPATH) ATH_HIF_TYPE=$(ATH_HIF_TYPE) SUBDIRS=$(ATH_SRC_BASE)/os/linux modules | ||
$(ACP) $(ATH_TARGET_OUTPUT)/$(ATH_ANDROID_SRC_BASE)/host/os/linux/ar6000.ko $(TARGET_OUT)/wifi/ | ||
$(ATH_CROSS_COMPILE_TYPE)strip -g -S -d $(TARGET_OUT)/wifi/ar6000.ko | ||
|
||
ALL_PREBUILT += $(mod_file) | ||
|
||
include $(LOCAL_PATH)/tools/Android.mk | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
#------------------------------------------------------------------------------ | ||
# <copyright file="makefile" company="Atheros"> | ||
# Copyright (c) 2005-2010 Atheros Corporation. All rights reserved. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License version 2 as | ||
# published by the Free Software Foundation; | ||
# | ||
# Software distributed under the License is distributed on an "AS | ||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | ||
# implied. See the License for the specific language governing | ||
# rights and limitations under the License. | ||
# | ||
# | ||
#------------------------------------------------------------------------------ | ||
#============================================================================== | ||
# Author(s): ="Atheros" | ||
#============================================================================== | ||
# AR6K Host driver makefile | ||
# | ||
# Minimal build invocation: | ||
# | ||
# make (all | clean | clobber) | ||
# | ||
# Extended Make invocation: | ||
# | ||
# make ATH_BUILD_TYPE=<build type> ATH_SDIO_STACK_BASE=<sdio stack install path> (all | clean | clobber) | ||
# | ||
# Notes: | ||
# 1. This makefile must be invoked from the host/ directory | ||
# 2. The <build type> must match an entry in localmake.linux.inc. | ||
# 3. The localmake.linux.inc can be overridden using an include file outside the build tree. | ||
# This file (name and path) can be set via the ATH_MAKE_INCLUDE_OVERRIDE variable. | ||
# ** If ATH_MAKE_INCLUDE_OVERRIDE is used, you can define all build variables in that file | ||
# instead of using command line arguments **. This feature is provided for developers | ||
# that may want to customize the build using a single include file. | ||
# | ||
# For example : | ||
# | ||
# " make ATH_MAKE_INCLUDE_OVERRIDE=$HOME/mymake.inc " | ||
# | ||
# could be used, as long as "mymake.inc" defines all the required variables (see below) | ||
# | ||
# Required Variables: | ||
# | ||
# ATH_OS_SUB_TYPE - on linux, this must be "linux_2_4" for 2.4 kernels or left blank for 2.6 kernels. | ||
# ATH_LINUXPATH - linux kernel source path | ||
# ATH_CROSS_COMPILE_TYPE - optional cross compiler path , leave blank for local gcc compilation | ||
# ATH_ARCH_CPU_TYPE - CPU architecture type, leave blank for local gcc compilation | ||
# ATH_SDIO_STACK_BASE - SDIO Stack installation path to compile the SDIO HIF layer against an externally supplied | ||
# SDIO stack source. | ||
# | ||
# Override variables: | ||
# | ||
# ATH_MAKE_INCLUDE_OVERRIDE - full path to include file which overrides the default (localmake.linux.inc) | ||
# this file can contain other overrides specific to a developers | ||
# workspace environment. | ||
# ATH_BUILD_OUTPUT_OVERRIDE - output path override for compiled executable and | ||
# database image | ||
# | ||
|
||
# Include local variables | ||
ifdef ATH_MAKE_INCLUDE_OVERRIDE | ||
_LOCALMAKE_INCLUDE = $(ATH_MAKE_INCLUDE_OVERRIDE) | ||
else | ||
_LOCALMAKE_INCLUDE = localmake.linux.inc | ||
endif | ||
|
||
-include $(_LOCALMAKE_INCLUDE) | ||
|
||
export ATH_SRC_BASE | ||
export ATH_BUILD_TYPE | ||
export ATH_OS_SUB_TYPE | ||
export ATH_LINUXPATH | ||
export ATH_CROSS_COMPILE_TYPE | ||
export ATH_ARCH_CPU_TYPE | ||
export ATH_SDIO_STACK_BASE | ||
export ATH_BUS_TYPE | ||
export ATH_BUS_SUBTYPE | ||
export ATH_HC_DRIVERS | ||
export ATH_HTC_RAW_INT_ENV | ||
export ATH_ANDROID_ENV | ||
export ATH_SOFTMAC_FILE_USED | ||
export ATH_CFG80211_ENV | ||
export ATH_DEBUG_DRIVER | ||
|
||
ATH_SRC_BASE :=$(shell pwd) | ||
MAKE :=make | ||
CC :=$(ATH_CROSS_COMPILE_TYPE)gcc | ||
LD :=$(ATH_CROSS_COMPILE_TYPE)ld | ||
STRIP :=$(ATH_CROSS_COMPILE_TYPE)strip | ||
ATH_HIF_TYPE :=`echo $(ATH_BUS_TYPE) | tr [:upper:] [:lower:]` | ||
|
||
export STRIP | ||
|
||
#export compiler variables for 3rd party applications (like the WPA supplicant) | ||
export CC | ||
export LD | ||
export STRIP | ||
|
||
# Set cross compile type (if any) | ||
ifdef ATH_CROSS_COMPILE_TYPE | ||
_CROSS_COMPILE_LINE := ARCH=$(ATH_ARCH_CPU_TYPE) CROSS_COMPILE=$(ATH_CROSS_COMPILE_TYPE) | ||
endif | ||
|
||
# Figure out module extension | ||
ifneq ($(ATH_OS_SUB_TYPE),linux_2_4) | ||
KMOD_EXTENSION :=ko | ||
endif | ||
ifeq ($(ATH_OS_SUB_TYPE),linux_2_4) | ||
KMOD_EXTENSION :=o | ||
endif | ||
|
||
# Set up object output areas | ||
ifdef ATH_BUILD_OUTPUT_OVERRIDE | ||
_COMPILED_OBJECTS_PATH :=$(ATH_BUILD_OUTPUT_OVERRIDE) | ||
COMPILED_BIN_OBJECTS_PATH :=$(ATH_BUILD_OUTPUT_OVERRIDE) | ||
COMPILED_IMAGE_OBJECTS_PATH :=$(ATH_BUILD_OUTPUT_OVERRIDE) | ||
_MAKE_IMAGE_OUTPUT_DIR := | ||
_MAKE_BIN_OUTPUT_DIR := | ||
_CLEAN_IMAGE_OUTPUT_DIR := | ||
_CLEAN_BIN_OUTPUT_DIR := | ||
else | ||
_COMPILED_OBJECTS_PATH := $(ATH_SRC_BASE)/.output/$(ATH_BUILD_TYPE)-$(ATH_BUS_TYPE) | ||
COMPILED_BIN_OBJECTS_PATH := $(ATH_SRC_BASE)/.output/bin | ||
COMPILED_IMAGE_OBJECTS_PATH :=$(_COMPILED_OBJECTS_PATH)/$(COMPILED_OBJECTS_PREFIX)image | ||
_MAKE_IMAGE_OUTPUT_DIR := mkdir --parents $(COMPILED_IMAGE_OBJECTS_PATH) | ||
_MAKE_BIN_OUTPUT_DIR := mkdir --parents $(COMPILED_BIN_OBJECTS_PATH) | ||
_CLEAN_IMAGE_OUTPUT_DIR := rm -R -f $(COMPILED_IMAGE_OBJECTS_PATH) | ||
_CLEAN_BIN_OUTPUT_DIR := rm -R -f $(COMPILED_BIN_OBJECTS_PATH) | ||
endif | ||
|
||
# Export the required variables to other Makefiles in the system | ||
export COMPILED_IMAGE_OBJECTS_PATH | ||
export COMPILED_BIN_OBJECTS_PATH | ||
|
||
all: modules | ||
|
||
modules: | ||
ifndef ATH_BUILD_TYPE | ||
@echo "Please edit the $(_LOCALMAKE_INCLUDE) file" | ||
exit 1 | ||
endif | ||
$(_MAKE_IMAGE_OUTPUT_DIR) | ||
$(_MAKE_BIN_OUTPUT_DIR) | ||
$(MAKE) $(_CROSS_COMPILE_LINE) -C $(ATH_LINUXPATH) ATH_HIF_TYPE=$(ATH_HIF_TYPE) SUBDIRS=$(ATH_SRC_BASE)/os/linux modules | ||
$(MAKE) -C hif/$(ATH_HIF_TYPE) | ||
$(MAKE) -C tools/wmiconfig/ | ||
$(MAKE) -C tools/recEvent/ | ||
cp -f $(ATH_SRC_BASE)/os/linux/ar6000.$(KMOD_EXTENSION) $(COMPILED_IMAGE_OBJECTS_PATH) | ||
cp -f tools/wmiconfig/wmiconfig $(COMPILED_IMAGE_OBJECTS_PATH) | ||
cp -f tools/recEvent/recEvent $(COMPILED_IMAGE_OBJECTS_PATH) | ||
cp -f tools/recEvent/restore.sh $(COMPILED_IMAGE_OBJECTS_PATH) | ||
|
||
clean: | ||
rm -f os/linux/ar6000.mod.c os/linux/*.o os/linux/*.ko wmi/*.o htc/AR6000/src/*.o htc/*.o \ | ||
bmi/src/*.o wlan/src/*.o driver/* tools/wmiconfig/wmiconfig \ | ||
tools/recEvent/recEvent | ||
|
||
# The kernel module build process leaves some intermediate files, this will clean up all these files | ||
find $(ATH_SRC_BASE) \( -not -path "*.output*" -a -name '*.[oas]' -o -name core -o -name '.*.flags' -o -name '.ko' -o -name '.*.cmd' \) -type f -print \ | ||
| grep -v lxdialog/ | xargs rm -f | ||
$(MAKE) -C hif/$(ATH_HIF_TYPE) clean | ||
|
||
clobber:clean | ||
rm -rf .output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/*------------------------------------------------------------------------------ */ | ||
/* <copyright file="bmi_internal.h" company="Atheros"> */ | ||
/* Copyright (c) 2004-2008 Atheros Corporation. All rights reserved. */ | ||
/* */ | ||
/* This program is free software; you can redistribute it and/or modify */ | ||
/* it under the terms of the GNU General Public License version 2 as */ | ||
/* published by the Free Software Foundation; */ | ||
/* */ | ||
/* Software distributed under the License is distributed on an "AS */ | ||
/* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or */ | ||
/* implied. See the License for the specific language governing */ | ||
/* rights and limitations under the License. */ | ||
/* */ | ||
/* */ | ||
/*------------------------------------------------------------------------------ */ | ||
/*============================================================================== */ | ||
/* */ | ||
/* Author(s): ="Atheros" */ | ||
/*============================================================================== */ | ||
#ifndef BMI_INTERNAL_H | ||
#define BMI_INTERNAL_H | ||
|
||
#include "a_config.h" | ||
#include "athdefs.h" | ||
#include "a_types.h" | ||
#include "a_osapi.h" | ||
#define ATH_MODULE_NAME bmi | ||
#include "a_debug.h" | ||
#include "bmi_msg.h" | ||
|
||
#define ATH_DEBUG_BMI ATH_DEBUG_MAKE_MODULE_MASK(0) | ||
|
||
/* ------ Global Variable Declarations ------- */ | ||
A_BOOL bmiDone; | ||
|
||
#endif |
Oops, something went wrong.