added wakaama pkg

dev/timer
Darredevil 8 years ago
parent 04b927b1b3
commit 53ba8e317f

@ -0,0 +1,24 @@
From ff63a7a7d6b23bbc912e950403ccada15c2ce83d Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 12:06:47 +0100
Subject: [PATCH 1/6] changing header location
---
core/internals.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/internals.h b/core/internals.h
index 11b420c..36d7d12 100644
--- a/core/internals.h
+++ b/core/internals.h
@@ -60,7 +60,7 @@
#include <stddef.h>
#include <stdbool.h>
-#include "er-coap-13/er-coap-13.h"
+#include "er-coap-13.h"
#ifdef WITH_LOGS
#define LOG(...) fprintf(stderr, __VA_ARGS__)
--
1.9.1

@ -0,0 +1,28 @@
From 1d2282a5bf10f8e0bed285da028dd42354b5851d Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 15:18:50 +0100
Subject: [PATCH 2/6] defined endianness
---
core/tlv.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/core/tlv.c b/core/tlv.c
index 0586f3d..08c66f1 100644
--- a/core/tlv.c
+++ b/core/tlv.c
@@ -24,6 +24,12 @@
#include <inttypes.h>
#include <float.h>
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define LWM2M_LITTLE_ENDIAN
+#else
+#define LWM2M_BIG_ENDIAN
+#endif
+
#ifndef LWM2M_BIG_ENDIAN
#ifndef LWM2M_LITTLE_ENDIAN
#error Please define LWM2M_BIG_ENDIAN or LWM2M_LITTLE_ENDIAN
--
1.9.1

@ -0,0 +1,79 @@
From a20abf688bb2543f1bdf3e05d237092421408f2e Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 12:36:31 +0100
Subject: [PATCH 3/6] fixed warnings in er-coap-13.c
---
core/er-coap-13/er-coap-13.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/core/er-coap-13/er-coap-13.c b/core/er-coap-13/er-coap-13.c
index cef62cc..0df7e4f 100644
--- a/core/er-coap-13/er-coap-13.c
+++ b/core/er-coap-13/er-coap-13.c
@@ -382,7 +382,7 @@ coap_get_variable(const uint8_t *buffer, size_t length, const char *name, const
/*-----------------------------------------------------------------------------------*/
uint16_t
-coap_get_mid()
+coap_get_mid(void)
{
return ++current_mid;
}
@@ -750,6 +750,9 @@ coap_get_query_variable(void *packet, const char *name, const char **output)
return coap_get_variable(coap_pkt->uri_query, coap_pkt->uri_query_len, name, output);
}
*/
+ (void)packet;
+ (void)name;
+ (void)output;
return 0;
}
@@ -939,7 +942,7 @@ coap_get_header_proxy_uri(void *packet, const char **uri)
if (!IS_OPTION(coap_pkt, COAP_OPTION_PROXY_URI)) return 0;
- *uri = coap_pkt->proxy_uri;
+ *uri = (const char *)coap_pkt->proxy_uri;
return coap_pkt->proxy_uri_len;
}
@@ -948,7 +951,7 @@ coap_set_header_proxy_uri(void *packet, const char *uri)
{
coap_packet_t *const coap_pkt = (coap_packet_t *) packet;
- coap_pkt->proxy_uri = uri;
+ coap_pkt->proxy_uri = (const uint8_t *)uri;
coap_pkt->proxy_uri_len = strlen(uri);
SET_OPTION(coap_pkt, COAP_OPTION_PROXY_URI);
@@ -1120,7 +1123,7 @@ coap_get_header_location_query(void *packet, const char **query)
if (!IS_OPTION(coap_pkt, COAP_OPTION_LOCATION_QUERY)) return 0;
- *query = coap_pkt->location_query;
+ *query = (const char *)coap_pkt->location_query;
return coap_pkt->location_query_len;
}
@@ -1131,7 +1134,7 @@ coap_set_header_location_query(void *packet, char *query)
while (query[0]=='?') ++query;
- coap_pkt->location_query = query;
+ coap_pkt->location_query = (uint8_t *)query;
coap_pkt->location_query_len = strlen(query);
SET_OPTION(coap_pkt, COAP_OPTION_LOCATION_QUERY);
@@ -1231,7 +1234,7 @@ coap_get_header_size(void *packet, uint32_t *size)
coap_packet_t *const coap_pkt = (coap_packet_t *) packet;
if (!IS_OPTION(coap_pkt, COAP_OPTION_SIZE)) return 0;
-
+
*size = coap_pkt->size;
return 1;
}
--
1.9.1

@ -0,0 +1,34 @@
From dd5fd3021b0473c0bd6278fe574acbb8a9aa3504 Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 12:43:09 +0100
Subject: [PATCH 4/6] fixed warnings in packet.c
---
core/packet.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/core/packet.c b/core/packet.c
index 76715ff..886d17b 100644
--- a/core/packet.c
+++ b/core/packet.c
@@ -97,6 +97,9 @@ static void handle_reset(lwm2m_context_t * contextP,
void * fromSessionH,
coap_packet_t * message)
{
+ (void)contextP;
+ (void)fromSessionH;
+ (void)message;
#ifdef LWM2M_CLIENT_MODE
cancel_observe(contextP, message->mid, fromSessionH);
#endif
@@ -107,6 +110,8 @@ static coap_status_t handle_request(lwm2m_context_t * contextP,
coap_packet_t * message,
coap_packet_t * response)
{
+ (void)contextP;
+ (void)fromSessionH;
lwm2m_uri_t * uriP;
coap_status_t result = NOT_FOUND_4_04;
--
1.9.1

@ -0,0 +1,50 @@
From 26d765aee65ef8eeae0f8b61c885c017ad938c94 Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 12:58:42 +0100
Subject: [PATCH 5/6] fixed warnings in tlv.c
---
pkg/wakaama/wakaama/tlv.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/core/tlv.c b/core/tlv.c
index 91a0ee9..0586f3d 100644
--- a/core/tlv.c
+++ b/core/tlv.c
@@ -14,7 +14,7 @@
* David Navarro, Intel Corporation - initial API and implementation
* Fabien Fleutot - Please refer to git log
* Bosch Software Innovations GmbH - Please refer to git log
- *
+ *
*******************************************************************************/
#include "internals.h"
@@ -307,6 +307,7 @@ int lwm2m_opaqueToFloat(uint8_t * buffer,
size_t buffer_len,
double * dataP)
{
+ (void)buffer;
switch (buffer_len)
{
case 4:
@@ -614,7 +615,7 @@ int lwm2m_tlv_decode_int(lwm2m_tlv_t * tlvP,
else
{
result = lwm2m_opaqueToInt(tlvP->value, tlvP->length, dataP);
- if (result == tlvP->length)
+ if ((size_t)result == tlvP->length)
{
result = 1;
}
@@ -710,7 +711,7 @@ int lwm2m_tlv_decode_float(lwm2m_tlv_t * tlvP,
else
{
result = lwm2m_opaqueToFloat(tlvP->value, tlvP->length, dataP);
- if (result == tlvP->length)
+ if ((size_t)result == tlvP->length)
{
result = 1;
}
--
1.9.1

@ -0,0 +1,33 @@
From 2f8c7bd7eabd55f2f4dd0da5e2a252b95f0e51c9 Mon Sep 17 00:00:00 2001
From: Darredevil <alex.darredevil@gmail.com>
Date: Thu, 13 Aug 2015 13:03:42 +0100
Subject: [PATCH 6/6] fixed warnings in utils.c
---
core/utils.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/utils.c b/core/utils.c
index f62e932..c07ef4b 100644
--- a/core/utils.c
+++ b/core/utils.c
@@ -13,7 +13,7 @@
* Contributors:
* David Navarro, Intel Corporation - initial API and implementation
* Toby Jaffey - Please refer to git log
- *
+ *
*******************************************************************************/
/*
@@ -357,6 +357,8 @@ lwm2m_server_t * prv_findServer(lwm2m_context_t * contextP,
lwm2m_server_t * utils_findBootstrapServer(lwm2m_context_t * contextP,
void * fromSessionH)
{
+ (void)contextP;
+ (void)fromSessionH;
#ifdef LWM2M_CLIENT_MODE
lwm2m_server_t * targetP;
--
1.9.1

@ -0,0 +1,38 @@
PKG_NAME=wakaama
PKG_URL=git://github.com/eclipse/wakaama.git
PKG_VERSION=69a32cfae39f66fe4eec4cc8d1cd48ced7ad447c
PKG_DIR=$(CURDIR)/$(PKG_NAME)
PKG_TEMP_DIR=$(CURDIR)/temp
.PHONY: all clean patch
all: patch
"$(MAKE)" -C $(PKG_DIR)
patch: $(PKG_DIR)/Makefile
$(PKG_DIR)/Makefile: $(PKG_TEMP_DIR)/.git/config
echo 'include $$(RIOTBASE)/Makefile.base' > $(PKG_DIR)/Makefile
$(PKG_TEMP_DIR)/.git/config:
test -d "$(PKG_TEMP_DIR)" || git clone "$(PKG_URL)" "$(PKG_TEMP_DIR)"; \
cd "$(PKG_TEMP_DIR)" && git checkout -f "$(PKG_VERSION)"; \
cd "$(PKG_TEMP_DIR)" && git am --ignore-whitespace "$(CURDIR)"/*.patch; \
mkdir -p "$(PKG_DIR)" ; \
cp $(PKG_TEMP_DIR)/core/*.c $(PKG_TEMP_DIR)/core/*.h $(PKG_DIR); \
cp $(PKG_TEMP_DIR)/core/er-coap-13/*.c $(PKG_TEMP_DIR)/core/er-coap-13/*.h $(PKG_DIR); \
rm -Rf "$(PKG_TEMP_DIR)"
clean::
@echo "Cleaning up $(PKG_NAME) package..."
@cd "$(PKG_DIR)" 2> /dev/null > /dev/null && \
git clean -x -f && \
git am --abort && \
git reset --hard "$(PKG_VERSION)" && \
$(MAKE) patch || true
distclean::
rm -rf "$(PKG_DIR)"
Makefile.include:
@true

@ -0,0 +1 @@
INCLUDES += -I$(RIOTBASE)/pkg/wakaama/wakaama
Loading…
Cancel
Save