Skip to contentSkip to conversation

tinycbor: new package

PATCH New Fabrice Fontaine 2 participants 7 messages Jul 25, 2016 – Jul 31, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tinycbor: new package

Concise Binary Object Representation (CBOR) Library

---
 package/Config.in              |  1 +
 package/tinycbor/Config.in     | 20 ++++++++++++++++++++
 package/tinycbor/tinycbor.hash |  2 ++
 package/tinycbor/tinycbor.mk   | 38 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 100644 package/tinycbor/Config.in
 create mode 100644 package/tinycbor/tinycbor.hash
 create mode 100644 package/tinycbor/tinycbor.mk
package/Config.in +1 -0
index 814141f..8ceeb9e 100644
@@ -1328,6 +1328,7 @@ endif
 	source "package/qlibc/Config.in"
 	source "package/sphinxbase/Config.in"
 	source "package/startup-notification/Config.in"
+	source "package/tinycbor/Config.in"
 	source "package/tz/Config.in"
 	source "package/tzdata/Config.in"
 endmenu
package/tinycbor/Config.in new file +20 -0
new file mode 100644
index 0000000..edbe64a
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_TINYCBOR
+	bool "tinyCBOR"
+	help
+	  Concise Binary Object Representation (CBOR) Library
+
+	  https://github.com/01org/tinycbor
+
+if BR2_PACKAGE_TINYCBOR
+
+config BR2_PACKAGE_TINYCBOR_JSON2CBOR
+	bool "json2cbor"
+	depends on !BR2_STATIC_LIBS # cJSON
+	select BR2_PACKAGE_CJSON
+	help
+	  The TinyCBOR library does not provide a way to convert from
+	  JSON representation back to encoded form. However, json2cbor
+	  can be used for that purpose. That tool supports the metadata
+	  format that these functions may produce.
+
+endif # BR2_PACKAGE_TINYCBOR
package/tinycbor/tinycbor.hash new file +2 -0
new file mode 100644
index 0000000..e60a86c
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256	e73a617b3a51fac103df1faab9ea037e509c1491cca29c1fd4b5083d74267597	tinycbor-v0.3.1.tar.gz
package/tinycbor/tinycbor.mk new file +38 -0
new file mode 100644
index 0000000..5d05a22
@@ -0,0 +1,38 @@
+################################################################################
+#
+# tinycbor
+#
+################################################################################
+
+TINYCBOR_VERSION = v0.3.1
+TINYCBOR_SITE = $(call github,01org,tinycbor,$(TINYCBOR_VERSION))
+TINYCBOR_LICENSE = MIT
+TINYCBOR_LICENSE_FILES = LICENSE
+
+TINYCBOR_DEPENDENCIES = host-pkgconf
+TINYCBOR_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_CJSON),y)
+TINYCBOR_DEPENDENCIES += cjson
+endif
+
+TINYCBOR_MAKE_OPTS = \
+	$(TARGET_CONFIGURE_OPTS) \
+	V=1 \
+	prefix=/usr
+
+define TINYCBOR_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D)
+endef
+
+define TINYCBOR_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \
+		DESTDIR=$(STAGING_DIR) install
+endef
+
+define TINYCBOR_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \
+		DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 tinycbor: new package

Hello,

Quoted 3 lines · Fabrice Fontaine

Concise Binary Object Representation (CBOR) Library

Applied, after doing a few minor changes:

[Thomas:
- use lower-case letters in the Config.in option prompt
- remove BR2_PACKAGE_TINYCBOR_JSON2CBOR sub-option, simply rely on the cjson package being enabled
- pass prefix=/usr only at install time.]

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 tinycbor: new package

In reply to Fabrice Fontaine

Hello,

Quoted 12 lines · Fabrice Fontaine

Concise Binary Object Representation (CBOR) Library

---
 package/Config.in              |  1 +
 package/tinycbor/Config.in     | 20 ++++++++++++++++++++
 package/tinycbor/tinycbor.hash |  2 ++
 package/tinycbor/tinycbor.mk   | 38 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 100644 package/tinycbor/Config.in
 create mode 100644 package/tinycbor/tinycbor.hash
 create mode 100644 package/tinycbor/tinycbor.mk

This package is causing two types of build failures:

* On Blackfin only:

http://autobuild.buildroot.net/?reason=tinycbor-v0.3.1&arch=bfin

The Blackfin external toolchain uses gcc 4.3, which is pretty old. The error occurs on unnamed unions, maybe there's a problem with that. But
https://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Unnamed-Fields.html
seems to indicate it was already supported in gcc 4.3. More investigation is needed.

* On other architectures, a problem occurs when output/target/usr/lib/libtinycbor.a is created as a directory, for some reason:

http://autobuild.buildroot.net/results/760/7605c301f460398c2435f6b73d6d07c7d1022e8c/build-end.log

Could you look into those issues?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 tinycbor: new package

Hello,

Quoted 5 lines · Thomas Petazzoni

* On other architectures, a problem occurs when output/target/usr/lib/libtinycbor.a is created as a directory, for some reason:

   http://autobuild.buildroot.net/results/760/7605c301f460398c2435f6b73d6d07c7d1022e8c/build-end.log

I have committed a patch to fix this problem:
https://git.buildroot.org/buildroot/commit/?id=04c9be519de922cda3e20a00be2fad39b265d398.

The Blackfin problem remains to be solved, however.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 tinycbor: new package

Dear Thomas,

Issue with unnamed union will be fixed by giving a name to it, patch has been accepted upstream: https://github.com/01org/tinycbor/pull/35.
Thanks a lot for fixing the other issue.

Best Regards,

Fabrice

2016-07-30 21:52 GMT+02:00 Thomas Petazzoni <
[email protected]>:

Quoted 18 lines

Hello,

Quoted 5 lines · Thomas Petazzoni

* On other architectures, a problem occurs when output/target/usr/lib/libtinycbor.a is created as a directory, for some reason:

http://autobuild.buildroot.net/results/760/7605c301f460398c2435f6b73d6d07c7d1022e8c/build-end.log

I have committed a patch to fix this problem:

https://git.buildroot.org/buildroot/commit/?id=04c9be519de922cda3e20a00be2fad39b265d398
.

The Blackfin problem remains to be solved, however.

Quoted 8 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160730/ee5b5980/attachment.html>

#5 lore raw

PATCH 1/1 tinycbor: new package

Hello,

Quoted 3 lines · Fabrice Fontaine

Issue with unnamed union will be fixed by giving a name to it, patch has been accepted upstream: https://github.com/01org/tinycbor/pull/35.
Thanks a lot for fixing the other issue.

Will you send a Buildroot patch to integrate the tinycbor fix until upstream makes a new release?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/1 tinycbor: new package

Dear Thomas,

Thiago will rework the patch:
https://github.com/01org/tinycbor/commit/4628a110b736c3c31bd8c577ea1d29400e0c0a53
so we'll have to wait for the 0.4 release.

Best Regards,

Fabrice

2016-07-30 23:24 GMT+02:00 Thomas Petazzoni <
[email protected]>:

Quoted 11 lines

Hello,

Quoted 3 lines · Fabrice Fontaine

Issue with unnamed union will be fixed by giving a name to it, patch has been accepted upstream: https://github.com/01org/tinycbor/pull/35.
Thanks a lot for fixing the other issue.

Will you send a Buildroot patch to integrate the tinycbor fix until upstream makes a new release?

Quoted 8 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160731/2865d6c9/attachment.html>