meta-digi: add wmiconfig package for MXS
wmiconfig is Atheros proprietary code so the recipe builds from source if DIGI_INTERNAL_GIT is defined or uses a prebuilt binary otherwise. https://jira.digi.com/browse/DEL-640 Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
70120ff69d
commit
b0247e7e05
|
|
@ -7,3 +7,6 @@ include conf/machine/include/ccardimx28.inc
|
|||
DTSNAME = "imx28-${MACHINE}"
|
||||
SERIAL_CONSOLE_DEVICE = "${@base_conditional('IS_KERNEL_2X', '1' , 'ttyAM0', 'ttyAMA0', d)}"
|
||||
SERIAL_CONSOLE = "115200 ${SERIAL_CONSOLE_DEVICE}"
|
||||
|
||||
# Use our wmiconfig instead of the one in meta-oe
|
||||
PREFERRED_VERSION_wmiconfig ?= "3.4p4"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
diff --git a/ath6kl-wmiconfig/Makefile b/ath6kl-wmiconfig/Makefile
|
||||
index b9787a4..b074b6f 100644
|
||||
--- a/ath6kl-wmiconfig/Makefile
|
||||
+++ b/ath6kl-wmiconfig/Makefile
|
||||
@@ -5,12 +5,12 @@
|
||||
#------------------------------------------------
|
||||
-include .config
|
||||
|
||||
-LDFLAGS += $(shell pkg-config --cflags --libs glib-2.0)
|
||||
+# LDFLAGS += $(shell pkg-config --cflags --libs glib-2.0)
|
||||
|
||||
-CC :=$(ATH_CROSS_COMPILE_TYPE)gcc
|
||||
+# CC :=$(ATH_CROSS_COMPILE_TYPE)gcc
|
||||
APP=wmiconfig
|
||||
|
||||
-NLLIBNAME = libnl-1
|
||||
+NLLIBNAME = libnl-3.0
|
||||
LIBTCMD_DIR := ../libtcmd
|
||||
|
||||
LDFLAGS += -ltcmd $(shell pkg-config --libs $(NLLIBNAME)) -lrt
|
||||
diff --git a/libtcmd/Makefile b/libtcmd/Makefile
|
||||
index 22f17db..1048758 100644
|
||||
--- a/libtcmd/Makefile
|
||||
+++ b/libtcmd/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
-CC = gcc
|
||||
+# CC = gcc
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
-NLLIBNAME = libnl-1
|
||||
+NLLIBNAME = libnl-3.0
|
||||
WLAN_API = WLAN_API_NL80211
|
||||
WLAN_API_SRCS = nl80211.c
|
||||
|
||||
@@ -9,7 +9,7 @@ SRCS = os.c $(WLAN_API_SRCS) libtcmd.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
LDLIBS += $(shell pkg-config --libs $(NLLIBNAME)) -lrt
|
||||
-CFLAGS += $(shell pkg-config --cflags $(NLLIBNAME)) -D$(WLAN_API)
|
||||
+CFLAGS += $(shell pkg-config --cflags $(NLLIBNAME)) -D$(WLAN_API) -DLIBNL_3
|
||||
|
||||
libtcmd.a: $(SRCS) $(OBJS)
|
||||
$(AR) rcs $@ $(OBJS)
|
||||
diff --git a/libtcmd/nl80211.c b/libtcmd/nl80211.c
|
||||
index ec44a68..783d172 100644
|
||||
--- a/libtcmd/nl80211.c
|
||||
+++ b/libtcmd/nl80211.c
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
int cb_ret;
|
||||
|
||||
-#ifdef LIBNL_2
|
||||
+#if defined(LIBNL_2) || defined(LIBNL_3)
|
||||
static inline struct nl_sock *nl_handle_alloc(void)
|
||||
{
|
||||
return nl_socket_alloc();
|
||||
Binary file not shown.
|
|
@ -0,0 +1,60 @@
|
|||
# Copyright (C) 2013 Digi International.
|
||||
|
||||
SUMMARY = "Atheros' wmiconfig proprietary tool"
|
||||
LICENSE = "Proprietary"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
|
||||
|
||||
DEPENDS = "libnl"
|
||||
|
||||
inherit pkgconfig
|
||||
|
||||
ATH_PROP_PN = "atheros-proprietary-v3.4p4-b3.4.0.158"
|
||||
|
||||
SRC_MD5 = "5693e26e904ee7b829bc09a202b5fdcb"
|
||||
SRC_SHA256 = "9d29113a9832ee4960d75c42e0ba229c71ebfe1f1f6f7738b213329c6214e708"
|
||||
BIN_MD5 = "4f5536dddd6b69235b957a1261ddbb93"
|
||||
BIN_SHA256 = "4e86a8fd345e00e785e16e71ed8517b53d0e5ac75f52b318e89136b8ad0652e8"
|
||||
|
||||
SRC_URI_src = " \
|
||||
http://build-linux.digi.com/yocto/downloads/${ATH_PROP_PN}.tar.gz;md5sum=${SRC_MD5};sha256sum=${SRC_SHA256} \
|
||||
file://0001-cross_compile.patch \
|
||||
"
|
||||
SRC_URI_bin = "file://wmiconfig;md5sum=${BIN_MD5};sha256sum=${BIN_SHA256}"
|
||||
SRC_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRC_URI_src}', '${SRC_URI_bin}', d)}"
|
||||
|
||||
S = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${WORKDIR}/${ATH_PROP_PN}', '${WORKDIR}', d)}"
|
||||
|
||||
EXTRA_OEMAKE = ""
|
||||
|
||||
do_compile() {
|
||||
if [ "${DIGI_INTERNAL_GIT}" = "1" ]; then
|
||||
oe_runmake -C libtcmd
|
||||
oe_runmake -C ath6kl-wmiconfig
|
||||
fi
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sbindir}
|
||||
if [ "${DIGI_INTERNAL_GIT}" = "1" ]; then
|
||||
install -m 0755 ath6kl-wmiconfig/wmiconfig ${D}${sbindir}
|
||||
else
|
||||
install -m 0755 wmiconfig ${D}${sbindir}
|
||||
fi
|
||||
}
|
||||
|
||||
# Deploy binary if building from sources
|
||||
do_deploy() {
|
||||
if [ "${DIGI_INTERNAL_GIT}" = "1" ]; then
|
||||
install -d ${DEPLOY_DIR_IMAGE}
|
||||
if [ -f "${D}${sbindir}/wmiconfig" ]; then
|
||||
cp "${D}${sbindir}/wmiconfig" ${DEPLOY_DIR_IMAGE}/
|
||||
else
|
||||
bberror "Wmiconfig binary not found: "${D}${sbindir}/wmiconfig""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
addtask deploy before do_build after do_install
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE = "mxs"
|
||||
|
|
@ -21,4 +21,4 @@ RDEPENDS_${PN} = "\
|
|||
${WIRELESS_MODULE} \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}_append_mxs = " iw"
|
||||
RDEPENDS_${PN}_append_mxs = " iw wmiconfig"
|
||||
|
|
|
|||
Loading…
Reference in New Issue