Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] pblog: Add new package
@ 2016-12-09  1:13 William A. Kennington III
  2016-12-09  1:13 ` [Buildroot] [PATCH 1/3] python-protobuf: Allow host building William A. Kennington III
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: William A. Kennington III @ 2016-12-09  1:13 UTC (permalink / raw)
  To: buildroot

This patchset add the necessary dependencies for pblog and
adds the pblog package.

Google-Bug-Id: 33072942
Change-Id: Ia94c21096365e5b661804bcd84ed644621ed4123
Signed-off-by: William A. Kennington III <wak@google.com>

William A. Kennington III (3):
   python-protobuf: Allow host building
   nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
   pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072

  package/Config.in                          |  2 ++
  package/nanopb/Config.in                   |  8 ++++++++
  package/nanopb/nanopb.hash                 |  2 ++
  package/nanopb/nanopb.mk                   | 27 +++++++++++++++++++++++++++
  package/pblog/Config.in                    |  8 ++++++++
  package/pblog/pblog.hash                   |  2 ++
  package/pblog/pblog.mk                     | 27 +++++++++++++++++++++++++++
  package/python-protobuf/python-protobuf.mk |  1 +
  8 files changed, 77 insertions(+)
  create mode 100644 package/nanopb/Config.in
  create mode 100644 package/nanopb/nanopb.hash
  create mode 100644 package/nanopb/nanopb.mk
  create mode 100644 package/pblog/Config.in
  create mode 100644 package/pblog/pblog.hash
  create mode 100644 package/pblog/pblog.mk

-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1/3] python-protobuf: Allow host building
  2016-12-09  1:13 [Buildroot] [PATCH 0/3] pblog: Add new package William A. Kennington III
@ 2016-12-09  1:13 ` William A. Kennington III
  2016-12-10 14:38   ` Thomas Petazzoni
  2016-12-09  1:13 ` [Buildroot] [PATCH 2/3] nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef William A. Kennington III
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: William A. Kennington III @ 2016-12-09  1:13 UTC (permalink / raw)
  To: buildroot

Currently python-protobuf does not allow the building as a host package
during a cross compile. We would like to be able to build nanopb as a
host package but can't without host-python-protobuf.

Google-Bug-Id: 33072942
Change-Id: Id09f461bda3f9c7a0bd6b5c36a6a8fa92e4adb27
Signed-off-by: William A. Kennington III <wak@google.com>
---
  package/python-protobuf/python-protobuf.mk | 1 +
  1 file changed, 1 insertion(+)

diff --git a/package/python-protobuf/python-protobuf.mk  
b/package/python-protobuf/python-protobuf.mk
index d8be76d..d46bda2 100644
--- a/package/python-protobuf/python-protobuf.mk
+++ b/package/python-protobuf/python-protobuf.mk
@@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf
  PYTHON_PROTOBUF_SETUP_TYPE = setuptools
  PYTHON_PROTOBUF_SUBDIR = python

+$(eval $(host-python-package))
  $(eval $(python-package))
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/3] nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
  2016-12-09  1:13 [Buildroot] [PATCH 0/3] pblog: Add new package William A. Kennington III
  2016-12-09  1:13 ` [Buildroot] [PATCH 1/3] python-protobuf: Allow host building William A. Kennington III
@ 2016-12-09  1:13 ` William A. Kennington III
  2016-12-10 14:37   ` Thomas Petazzoni
  2016-12-09  1:13 ` [Buildroot] [PATCH 3/3] pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072 William A. Kennington III
  2017-01-12 19:15 ` [Buildroot] [PATCH v2 0/3] pblog: new package William A. Kennington III
  3 siblings, 1 reply; 16+ messages in thread
From: William A. Kennington III @ 2016-12-09  1:13 UTC (permalink / raw)
  To: buildroot

We chose not to use a stable version so that our version of nanopb
is compatible with pblog. In the future a stable version should be used.

Change-Id: I3f80c809efbe7c237de9b9de901d048247b4c6c1
Google-Bug-Id: 33072942
Signed-off-by: William A. Kennington III <wak@google.com>
---
  package/Config.in          |  1 +
  package/nanopb/Config.in   |  8 ++++++++
  package/nanopb/nanopb.hash |  2 ++
  package/nanopb/nanopb.mk   | 27 +++++++++++++++++++++++++++
  4 files changed, 38 insertions(+)
  create mode 100644 package/nanopb/Config.in
  create mode 100644 package/nanopb/nanopb.hash
  create mode 100644 package/nanopb/nanopb.mk

diff --git a/package/Config.in b/package/Config.in
index c14575c..2ffbcc1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1348,6 +1348,7 @@ endif
  	source "package/msgpack/Config.in"
  	source "package/mtdev2tuio/Config.in"
  	source "package/musl-compat-headers/Config.in"
+	source "package/nanopb/Config.in"
  	source "package/openblas/Config.in"
  	source "package/orc/Config.in"
  	source "package/p11-kit/Config.in"
diff --git a/package/nanopb/Config.in b/package/nanopb/Config.in
new file mode 100644
index 0000000..4c5779f
--- /dev/null
+++ b/package/nanopb/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_NANOPB
+	bool "nanopb"
+	help
+	  Nanopb is a small code-size Protocol Buffers implementation in ansi C.
+	  It is especially suitable for use in microcontrollers,
+	  but fits any memory restricted system.
+
+	  https://github.com/nanopb/nanopb
diff --git a/package/nanopb/nanopb.hash b/package/nanopb/nanopb.hash
new file mode 100644
index 0000000..c74a0c5
--- /dev/null
+++ b/package/nanopb/nanopb.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 e6dbaf58574c54e67b6bdfdee71f62d52d261e77a5f8e3961b7a6a0abbf06a86  
nanopb-69e9c1fc8162956feffa32e07a97c53bdb92f5ef.tar.gz
diff --git a/package/nanopb/nanopb.mk b/package/nanopb/nanopb.mk
new file mode 100644
index 0000000..a162b82
--- /dev/null
+++ b/package/nanopb/nanopb.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# nanopb
+#
+################################################################################
+
+NANOPB_VERSION = 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
+NANOPB_SITE = $(call github,nanopb,nanopb,$(NANOPB_VERSION))
+NANOPB_LICENSE = BSD-3c
+NANOPB_LICENSE_FILES = LICENSE.txt
+# no configure script
+
+# Need to use host protoc during cross compilation.
+NANOPB_DEPENDENCIES = protobuf python-protobuf
+
+define HOST_NANOPB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C  
$(@D)/generator/proto
+endef
+
+define NANOPB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C  
$(@D)/generator/proto
+endef
+
+# We don't actually need to install anything as you include the library  
files
+# directly.
+$(eval $(host-generic-package))
+$(eval $(generic-package))
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3/3] pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072
  2016-12-09  1:13 [Buildroot] [PATCH 0/3] pblog: Add new package William A. Kennington III
  2016-12-09  1:13 ` [Buildroot] [PATCH 1/3] python-protobuf: Allow host building William A. Kennington III
  2016-12-09  1:13 ` [Buildroot] [PATCH 2/3] nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef William A. Kennington III
@ 2016-12-09  1:13 ` William A. Kennington III
  2016-12-10 14:41   ` Thomas Petazzoni
  2017-01-12 19:15 ` [Buildroot] [PATCH v2 0/3] pblog: new package William A. Kennington III
  3 siblings, 1 reply; 16+ messages in thread
From: William A. Kennington III @ 2016-12-09  1:13 UTC (permalink / raw)
  To: buildroot

Using an unstable release as upstream has no release tags yet.

Google-Bug-Id: 33072942
Change-Id: Ieca458abea29de68fd9124a9782f3f27e71582d6
Signed-off-by: William A. Kennington III <wak@google.com>
---
  package/Config.in        |  1 +
  package/pblog/Config.in  |  8 ++++++++
  package/pblog/pblog.hash |  2 ++
  package/pblog/pblog.mk   | 27 +++++++++++++++++++++++++++
  4 files changed, 38 insertions(+)
  create mode 100644 package/pblog/Config.in
  create mode 100644 package/pblog/pblog.hash
  create mode 100644 package/pblog/pblog.mk

diff --git a/package/Config.in b/package/Config.in
index 2ffbcc1..122364d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1132,6 +1132,7 @@ menu "Logging"
  	source "package/log4cplus/Config.in"
  	source "package/log4cpp/Config.in"
  	source "package/log4cxx/Config.in"
+	source "package/pblog/Config.in"
  	source "package/zlog/Config.in"
  endmenu

diff --git a/package/pblog/Config.in b/package/pblog/Config.in
new file mode 100644
index 0000000..2ef77a8
--- /dev/null
+++ b/package/pblog/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PBLOG
+	bool "pblog"
+	depends BR2_PACKAGE_HOST_NANOPB
+	select BR2_PACKAGE_HOST_NANOPB
+	help
+	  Pblog is a protobuf based logging library.
+
+	  https://github.com/google/pblog
diff --git a/package/pblog/pblog.hash b/package/pblog/pblog.hash
new file mode 100644
index 0000000..e7f8dc5
--- /dev/null
+++ b/package/pblog/pblog.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 f5908706afe15041983f163da735db751dda82f20c84e60c0c59584d609f10eb  
pblog-e2e17544950eedac4f3bc59926aed8604d755072.tar.gz
diff --git a/package/pblog/pblog.mk b/package/pblog/pblog.mk
new file mode 100644
index 0000000..e5a2cd1
--- /dev/null
+++ b/package/pblog/pblog.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# pblog
+#
+################################################################################
+
+PBLOG_VERSION = e2e17544950eedac4f3bc59926aed8604d755072
+PBLOG_SITE = $(call github,google,pblog,$(PBLOG_VERSION))
+PBLOG_LICENSE = Apache-2.0
+PBLOG_LICENSE_FILES = LICENSE.txt
+# no configure script
+
+PBLOG_DEPENDENCIES = host-nanopb
+
+define PBLOG_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS)  
NANOPB_DIR=$(HOST_NANOPB_DIR) -C $(@D) all
+endef
+
+define PBLOG_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS)  
NANOPB_DIR=$(HOST_NANOPB_DIR) DESTDIR=$(STAGING_DIR) -C $(@D) install
+endef
+
+define PBLOG_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS)  
NANOPB_DIR=$(HOST_NANOPB_DIR) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
+
+$(eval $(generic-package))
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/3] nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
  2016-12-09  1:13 ` [Buildroot] [PATCH 2/3] nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef William A. Kennington III
@ 2016-12-10 14:37   ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2016-12-10 14:37 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks for this new iteration. However, there's a big problem with your
patch: it seems to be corrupt, and therefore cannot be applied. That's
weird because you've used git send-email, which normally always get
things right, but not here:

thomas at skate:~/projets/buildroot (master)$ git pwam 704279
Applying patch #704279 using 'git am -s -3'
Description: [2/3] nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
Applying: nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
fatal: corrupt patch at line 73
error: could not build fake ancestor
Patch failed at 0001 nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.

And indeed, looking at your patch below, some lines have been wrapped.

On Thu,  8 Dec 2016 17:13:12 -0800, William A. Kennington III wrote:
> We chose not to use a stable version so that our version of nanopb
> is compatible with pblog. In the future a stable version should be used.

The commit title should be just:

	nanopb: new package

> 
> Change-Id: I3f80c809efbe7c237de9b9de901d048247b4c6c1
> Google-Bug-Id: 33072942

Those two lines should be removed.

> Signed-off-by: William A. Kennington III <wak@google.com>

> +# Locally calculated
> +sha256 e6dbaf58574c54e67b6bdfdee71f62d52d261e77a5f8e3961b7a6a0abbf06a86  
> nanopb-69e9c1fc8162956feffa32e07a97c53bdb92f5ef.tar.gz

Here the line is wrapped while it should not.

> diff --git a/package/nanopb/nanopb.mk b/package/nanopb/nanopb.mk
> new file mode 100644
> index 0000000..a162b82
> --- /dev/null
> +++ b/package/nanopb/nanopb.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# nanopb
> +#
> +################################################################################
> +
> +NANOPB_VERSION = 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
> +NANOPB_SITE = $(call github,nanopb,nanopb,$(NANOPB_VERSION))
> +NANOPB_LICENSE = BSD-3c
> +NANOPB_LICENSE_FILES = LICENSE.txt
> +# no configure script

This comment is not needed.

> +# Need to use host protoc during cross compilation.

How is this comment related to the below dependencies? Your comment
mentions a host tools, but you don't depend on any host package. I know
'protobuf' depends on 'host-protobuf', which will bring you the host
protoc, but that's not very clear from your comment.

> +NANOPB_DEPENDENCIES = protobuf python-protobuf
> +
> +define HOST_NANOPB_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C  
> $(@D)/generator/proto

Line has been wrapped.

> +endef
> +
> +define NANOPB_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C  
> $(@D)/generator/proto

Line has been wrapped.

> +endef
> +
> +# We don't actually need to install anything as you include the library  
> files
> +# directly.

This looks really really weird, I'll review PATCH 3/3 to try to
understand, but this approach doesn't seem very good. Also, this
paragraph has also been badly rewrapped when your patch was sent.

> +$(eval $(host-generic-package))
> +$(eval $(generic-package))

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 1/3] python-protobuf: Allow host building
  2016-12-09  1:13 ` [Buildroot] [PATCH 1/3] python-protobuf: Allow host building William A. Kennington III
@ 2016-12-10 14:38   ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2016-12-10 14:38 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu,  8 Dec 2016 17:13:11 -0800, William A. Kennington III wrote:
> Currently python-protobuf does not allow the building as a host package
> during a cross compile. We would like to be able to build nanopb as a
> host package but can't without host-python-protobuf.

This patch looks good, but also doesn't apply:

thomas at skate:~/projets/buildroot (master)$ git pwam 704278
Applying patch #704278 using 'git am -s -3'
Description: [1/3] python-protobuf: Allow host building
Applying: python-protobuf: Allow host building
fatal: sha1 information is lacking or useless (package/python-protobuf/python-protobuf.mk).
error: could not build fake ancestor
Patch failed at 0001 python-protobuf: Allow host building
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.

> Google-Bug-Id: 33072942
> Change-Id: Id09f461bda3f9c7a0bd6b5c36a6a8fa92e4adb27

Please remove those two lines.

> Signed-off-by: William A. Kennington III <wak@google.com>
> ---
>   package/python-protobuf/python-protobuf.mk | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/package/python-protobuf/python-protobuf.mk  
> b/package/python-protobuf/python-protobuf.mk
> index d8be76d..d46bda2 100644
> --- a/package/python-protobuf/python-protobuf.mk
> +++ b/package/python-protobuf/python-protobuf.mk
> @@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf
>   PYTHON_PROTOBUF_SETUP_TYPE = setuptools
>   PYTHON_PROTOBUF_SUBDIR = python
> 
> +$(eval $(host-python-package))
>   $(eval $(python-package))

The way the added line is indented compared to the context lines make
it look weird. It's probably why it doesn't apply.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3/3] pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072
  2016-12-09  1:13 ` [Buildroot] [PATCH 3/3] pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072 William A. Kennington III
@ 2016-12-10 14:41   ` Thomas Petazzoni
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Petazzoni @ 2016-12-10 14:41 UTC (permalink / raw)
  To: buildroot

Hello,

Like the other patches, this patch is badly wrapped and therefore does
not apply. Its title should be just:

	pblog: new package

On Thu,  8 Dec 2016 17:13:13 -0800, William A. Kennington III wrote:

> diff --git a/package/pblog/Config.in b/package/pblog/Config.in
> new file mode 100644
> index 0000000..2ef77a8
> --- /dev/null
> +++ b/package/pblog/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_PBLOG
> +	bool "pblog"
> +	depends BR2_PACKAGE_HOST_NANOPB
> +	select BR2_PACKAGE_HOST_NANOPB

There is no BR2_PACKAGE_HOST_NANOPB symbol. Also, "depends" doesn't
exist, only "depends on" does. And doing a "depends on" and a "select"
on the same symbol doesn't make any sense.

> diff --git a/package/pblog/pblog.hash b/package/pblog/pblog.hash
> new file mode 100644
> index 0000000..e7f8dc5
> --- /dev/null
> +++ b/package/pblog/pblog.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256 f5908706afe15041983f163da735db751dda82f20c84e60c0c59584d609f10eb  
> pblog-e2e17544950eedac4f3bc59926aed8604d755072.tar.gz

Badly wrapped.

> diff --git a/package/pblog/pblog.mk b/package/pblog/pblog.mk
> new file mode 100644
> index 0000000..e5a2cd1
> --- /dev/null
> +++ b/package/pblog/pblog.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# pblog
> +#
> +################################################################################
> +
> +PBLOG_VERSION = e2e17544950eedac4f3bc59926aed8604d755072
> +PBLOG_SITE = $(call github,google,pblog,$(PBLOG_VERSION))
> +PBLOG_LICENSE = Apache-2.0
> +PBLOG_LICENSE_FILES = LICENSE.txt
> +# no configure script

Comment unneeded.

> +PBLOG_DEPENDENCIES = host-nanopb

So, the target nanopb package is useless?

> +
> +define PBLOG_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS)  
> NANOPB_DIR=$(HOST_NANOPB_DIR) -C $(@D) all

Please install nanopb to $(HOST_DIR) and use it from there.

> +endef
> +
> +define PBLOG_INSTALL_STAGING_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS)  
> NANOPB_DIR=$(HOST_NANOPB_DIR) DESTDIR=$(STAGING_DIR) -C $(@D) install
> +endef

If you specific some staging installation commands, you must have a
PBLOG_INSTALL_STAGING = YES otherwise those commands are completely
ignored.

> +
> +define PBLOG_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS)  
> NANOPB_DIR=$(HOST_NANOPB_DIR) DESTDIR=$(TARGET_DIR) -C $(@D) install
> +endef

More global commands: please split long lines, like this:

	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
		NANOPB_DIR=... \
		DESTDIR=... \
		-C $(@D) install

Thanks!

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 0/3] pblog: new package
  2016-12-09  1:13 [Buildroot] [PATCH 0/3] pblog: Add new package William A. Kennington III
                   ` (2 preceding siblings ...)
  2016-12-09  1:13 ` [Buildroot] [PATCH 3/3] pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072 William A. Kennington III
@ 2017-01-12 19:15 ` William A. Kennington III
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building William A. Kennington III
                     ` (2 more replies)
  3 siblings, 3 replies; 16+ messages in thread
From: William A. Kennington III @ 2017-01-12 19:15 UTC (permalink / raw)
  To: buildroot

Add the pblog package and all dependencies needed for building.

William A. Kennington III (3):
  python-protobuf: Allow host building
  nanopb: new package
  pblog: new package

 package/Config.in                          |  2 ++
 package/nanopb/Config.in                   |  8 +++++++
 package/nanopb/nanopb.hash                 |  2 ++
 package/nanopb/nanopb.mk                   | 25 ++++++++++++++++++++++
 package/pblog/Config.in                    |  8 +++++++
 package/pblog/pblog.hash                   |  2 ++
 package/pblog/pblog.mk                     | 34 ++++++++++++++++++++++++++++++
 package/python-protobuf/python-protobuf.mk |  1 +
 8 files changed, 82 insertions(+)
 create mode 100644 package/nanopb/Config.in
 create mode 100644 package/nanopb/nanopb.hash
 create mode 100644 package/nanopb/nanopb.mk
 create mode 100644 package/pblog/Config.in
 create mode 100644 package/pblog/pblog.hash
 create mode 100644 package/pblog/pblog.mk

-- 
2.11.0

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building
  2017-01-12 19:15 ` [Buildroot] [PATCH v2 0/3] pblog: new package William A. Kennington III
@ 2017-01-12 19:15   ` William A. Kennington III
  2017-01-15 21:30     ` Yann E. MORIN
  2017-01-15 21:32     ` Yann E. MORIN
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 2/3] nanopb: new package William A. Kennington III
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 3/3] pblog: " William A. Kennington III
  2 siblings, 2 replies; 16+ messages in thread
From: William A. Kennington III @ 2017-01-12 19:15 UTC (permalink / raw)
  To: buildroot

Currently python-protobuf does not allow be built as a host package
during a cross compile. We would like to be able to build nanopb as a
host package but can't without host-python-protobuf.

Signed-off-by: William A. Kennington III <wak@google.com>
---
 package/python-protobuf/python-protobuf.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk
index d8be76dd7..d46bda243 100644
--- a/package/python-protobuf/python-protobuf.mk
+++ b/package/python-protobuf/python-protobuf.mk
@@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf
 PYTHON_PROTOBUF_SETUP_TYPE = setuptools
 PYTHON_PROTOBUF_SUBDIR = python
 
+$(eval $(host-python-package))
 $(eval $(python-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 2/3] nanopb: new package
  2017-01-12 19:15 ` [Buildroot] [PATCH v2 0/3] pblog: new package William A. Kennington III
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building William A. Kennington III
@ 2017-01-12 19:15   ` William A. Kennington III
  2017-01-15 21:51     ` Yann E. MORIN
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 3/3] pblog: " William A. Kennington III
  2 siblings, 1 reply; 16+ messages in thread
From: William A. Kennington III @ 2017-01-12 19:15 UTC (permalink / raw)
  To: buildroot

We chose not to use a stable version so that our version of nanopb
is compatible with pblog. In the future a stable version should be used.

Signed-off-by: William A. Kennington III <wak@google.com>
---
 package/Config.in          |  1 +
 package/nanopb/Config.in   |  8 ++++++++
 package/nanopb/nanopb.hash |  2 ++
 package/nanopb/nanopb.mk   | 25 +++++++++++++++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100644 package/nanopb/Config.in
 create mode 100644 package/nanopb/nanopb.hash
 create mode 100644 package/nanopb/nanopb.mk

diff --git a/package/Config.in b/package/Config.in
index 8c8c33ec3..625315c1c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1362,6 +1362,7 @@ endif
 	source "package/msgpack/Config.in"
 	source "package/mtdev2tuio/Config.in"
 	source "package/musl-compat-headers/Config.in"
+	source "package/nanopb/Config.in"
 	source "package/openblas/Config.in"
 	source "package/orc/Config.in"
 	source "package/p11-kit/Config.in"
diff --git a/package/nanopb/Config.in b/package/nanopb/Config.in
new file mode 100644
index 000000000..4c5779f58
--- /dev/null
+++ b/package/nanopb/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_NANOPB
+	bool "nanopb"
+	help
+	  Nanopb is a small code-size Protocol Buffers implementation in ansi C.
+	  It is especially suitable for use in microcontrollers,
+	  but fits any memory restricted system.
+
+	  https://github.com/nanopb/nanopb
diff --git a/package/nanopb/nanopb.hash b/package/nanopb/nanopb.hash
new file mode 100644
index 000000000..0a9224777
--- /dev/null
+++ b/package/nanopb/nanopb.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 d29305a235f9a58c95ffd999d258d7dd2c2cbb8b81312a4138dfe5802ff2c8e8 nanopb-afdbca39edfaef58073f661d23300e1133c4e8af.tar.gz
diff --git a/package/nanopb/nanopb.mk b/package/nanopb/nanopb.mk
new file mode 100644
index 000000000..0e3d8cf55
--- /dev/null
+++ b/package/nanopb/nanopb.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# nanopb
+#
+################################################################################
+
+NANOPB_VERSION = afdbca39edfaef58073f661d23300e1133c4e8af
+NANOPB_SITE = $(call github,nanopb,nanopb,$(NANOPB_VERSION))
+NANOPB_LICENSE = BSD-3c
+NANOPB_LICENSE_FILES = LICENSE.txt
+
+NANOPB_DEPENDENCIES = protobuf python-protobuf
+
+define HOST_NANOPB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/generator/proto
+endef
+
+define NANOPB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/generator/proto
+endef
+
+# We don't actually need to install anything as you include the library files
+# directly.
+$(eval $(host-generic-package))
+$(eval $(generic-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 3/3] pblog: new package
  2017-01-12 19:15 ` [Buildroot] [PATCH v2 0/3] pblog: new package William A. Kennington III
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building William A. Kennington III
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 2/3] nanopb: new package William A. Kennington III
@ 2017-01-12 19:15   ` William A. Kennington III
  2 siblings, 0 replies; 16+ messages in thread
From: William A. Kennington III @ 2017-01-12 19:15 UTC (permalink / raw)
  To: buildroot

Using an unstable release as upstream has no release tags yet.

Signed-off-by: William A. Kennington III <wak@google.com>
---
 package/Config.in        |  1 +
 package/pblog/Config.in  |  8 ++++++++
 package/pblog/pblog.hash |  2 ++
 package/pblog/pblog.mk   | 34 ++++++++++++++++++++++++++++++++++
 4 files changed, 45 insertions(+)
 create mode 100644 package/pblog/Config.in
 create mode 100644 package/pblog/pblog.hash
 create mode 100644 package/pblog/pblog.mk

diff --git a/package/Config.in b/package/Config.in
index 625315c1c..5f22bb100 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1146,6 +1146,7 @@ menu "Logging"
 	source "package/log4cplus/Config.in"
 	source "package/log4cpp/Config.in"
 	source "package/log4cxx/Config.in"
+	source "package/pblog/Config.in"
 	source "package/zlog/Config.in"
 endmenu
 
diff --git a/package/pblog/Config.in b/package/pblog/Config.in
new file mode 100644
index 000000000..2ef77a850
--- /dev/null
+++ b/package/pblog/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PBLOG
+	bool "pblog"
+	depends BR2_PACKAGE_HOST_NANOPB
+	select BR2_PACKAGE_HOST_NANOPB
+	help
+	  Pblog is a protobuf based logging library.
+
+	  https://github.com/google/pblog
diff --git a/package/pblog/pblog.hash b/package/pblog/pblog.hash
new file mode 100644
index 000000000..abae6d33f
--- /dev/null
+++ b/package/pblog/pblog.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 6d3ca5bfdaa16dc788876ac90fb025514b2b285b39251425e480d546ef044f13 pblog-93b05307000ee3d6b7e4276f1cbb51d71fee4b09.tar.gz
diff --git a/package/pblog/pblog.mk b/package/pblog/pblog.mk
new file mode 100644
index 000000000..4cbc41819
--- /dev/null
+++ b/package/pblog/pblog.mk
@@ -0,0 +1,34 @@
+################################################################################
+#
+# pblog
+#
+################################################################################
+
+PBLOG_VERSION = 93b05307000ee3d6b7e4276f1cbb51d71fee4b09
+PBLOG_SITE = $(call github,google,pblog,$(PBLOG_VERSION))
+PBLOG_LICENSE = Apache-2.0
+PBLOG_LICENSE_FILES = LICENSE.txt
+
+PBLOG_DEPENDENCIES = host-nanopb
+
+define PBLOG_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		NANOPB_DIR=$(HOST_NANOPB_DIR) \
+		-C $(@D) all
+endef
+
+define PBLOG_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		NANOPB_DIR=$(HOST_NANOPB_DIR) \
+		DESTDIR=$(STAGING_DIR) \
+		-C $(@D) install
+endef
+
+define PBLOG_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		NANOPB_DIR=$(HOST_NANOPB_DIR) \
+		DESTDIR=$(TARGET_DIR) \
+		-C $(@D) install
+endef
+
+$(eval $(generic-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building William A. Kennington III
@ 2017-01-15 21:30     ` Yann E. MORIN
  2017-01-17 22:09       ` Arnout Vandecappelle
  2017-01-15 21:32     ` Yann E. MORIN
  1 sibling, 1 reply; 16+ messages in thread
From: Yann E. MORIN @ 2017-01-15 21:30 UTC (permalink / raw)
  To: buildroot

William, All,

On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
> Currently python-protobuf does not allow be built as a host package
> during a cross compile. We would like to be able to build nanopb as a
> host package but can't without host-python-protobuf.
> 
> Signed-off-by: William A. Kennington III <wak@google.com>
> ---
>  package/python-protobuf/python-protobuf.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk
> index d8be76dd7..d46bda243 100644
> --- a/package/python-protobuf/python-protobuf.mk
> +++ b/package/python-protobuf/python-protobuf.mk
> @@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf
>  PYTHON_PROTOBUF_SETUP_TYPE = setuptools
>  PYTHON_PROTOBUF_SUBDIR = python
>  
> +$(eval $(host-python-package))
>  $(eval $(python-package))

This is not documented (AFAIK), but the host variant must go after the
target variant. Otherwise, strange things can happen (because of the way
variables have default values that depend on the order of evaluation,
like the source archive for example).

Note: this is valid for the following patch as awell, of course.

Regards,
Yann E. MORIN.


-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building William A. Kennington III
  2017-01-15 21:30     ` Yann E. MORIN
@ 2017-01-15 21:32     ` Yann E. MORIN
  1 sibling, 0 replies; 16+ messages in thread
From: Yann E. MORIN @ 2017-01-15 21:32 UTC (permalink / raw)
  To: buildroot

Wlliam, All,

On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
> Currently python-protobuf does not allow be built as a host package
> during a cross compile. We would like to be able to build nanopb as a
> host package but can't without host-python-protobuf.
> 
> Signed-off-by: William A. Kennington III <wak@google.com>
> ---
>  package/python-protobuf/python-protobuf.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk
> index d8be76dd7..d46bda243 100644
> --- a/package/python-protobuf/python-protobuf.mk
> +++ b/package/python-protobuf/python-protobuf.mk
> @@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf
>  PYTHON_PROTOBUF_SETUP_TYPE = setuptools
>  PYTHON_PROTOBUF_SUBDIR = python
>  
> +$(eval $(host-python-package))

Oh, I forgot: the dependencies for the host variant must be explicitly
specified:

    HOST_PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf

Regards,
Yann E. MORIN.

>  $(eval $(python-package))
> -- 
> 2.11.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 2/3] nanopb: new package
  2017-01-12 19:15   ` [Buildroot] [PATCH v2 2/3] nanopb: new package William A. Kennington III
@ 2017-01-15 21:51     ` Yann E. MORIN
  2017-01-18 18:59       ` William Kennington
  0 siblings, 1 reply; 16+ messages in thread
From: Yann E. MORIN @ 2017-01-15 21:51 UTC (permalink / raw)
  To: buildroot

William, All,

On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
> We chose not to use a stable version so that our version of nanopb
> is compatible with pblog. In the future a stable version should be used.

From this description, it looks like nanopb is only really usefull as a
host tool. Yet, you also made it a target package. Is it intentional?

If it is only a host tool that does not have a reason to be selected on
its own, then do [**] below...

> Signed-off-by: William A. Kennington III <wak@google.com>
> ---
>  package/Config.in          |  1 +
>  package/nanopb/Config.in   |  8 ++++++++
>  package/nanopb/nanopb.hash |  2 ++
>  package/nanopb/nanopb.mk   | 25 +++++++++++++++++++++++++
>  4 files changed, 36 insertions(+)
>  create mode 100644 package/nanopb/Config.in
>  create mode 100644 package/nanopb/nanopb.hash
>  create mode 100644 package/nanopb/nanopb.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 8c8c33ec3..625315c1c 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1362,6 +1362,7 @@ endif
>  	source "package/msgpack/Config.in"
>  	source "package/mtdev2tuio/Config.in"
>  	source "package/musl-compat-headers/Config.in"
> +	source "package/nanopb/Config.in"

[**] Move that to package/Config.in/host

>  	source "package/openblas/Config.in"
>  	source "package/orc/Config.in"
>  	source "package/p11-kit/Config.in"
> diff --git a/package/nanopb/Config.in b/package/nanopb/Config.in
> new file mode 100644
> index 000000000..4c5779f58
> --- /dev/null
> +++ b/package/nanopb/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_NANOPB
> +	bool "nanopb"
> +	help
> +	  Nanopb is a small code-size Protocol Buffers implementation in ansi C.
> +	  It is especially suitable for use in microcontrollers,
> +	  but fits any memory restricted system.
> +
> +	  https://github.com/nanopb/nanopb

[**] Don't give it a prompt; don't add help.

> diff --git a/package/nanopb/nanopb.hash b/package/nanopb/nanopb.hash
> new file mode 100644
> index 000000000..0a9224777
> --- /dev/null
> +++ b/package/nanopb/nanopb.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256 d29305a235f9a58c95ffd999d258d7dd2c2cbb8b81312a4138dfe5802ff2c8e8 nanopb-afdbca39edfaef58073f661d23300e1133c4e8af.tar.gz
> diff --git a/package/nanopb/nanopb.mk b/package/nanopb/nanopb.mk
> new file mode 100644
> index 000000000..0e3d8cf55
> --- /dev/null
> +++ b/package/nanopb/nanopb.mk
> @@ -0,0 +1,25 @@
> +################################################################################
> +#
> +# nanopb
> +#
> +################################################################################
> +
> +NANOPB_VERSION = afdbca39edfaef58073f661d23300e1133c4e8af
> +NANOPB_SITE = $(call github,nanopb,nanopb,$(NANOPB_VERSION))
> +NANOPB_LICENSE = BSD-3c
> +NANOPB_LICENSE_FILES = LICENSE.txt
> +
> +NANOPB_DEPENDENCIES = protobuf python-protobuf
> +
> +define HOST_NANOPB_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/generator/proto
> +endef
> +
> +define NANOPB_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/generator/proto
> +endef
> +
> +# We don't actually need to install anything as you include the library files
> +# directly.

Well, this is not clear at all.

We do want packages to install their devel files in staging/ (for target
packages) or in host/ (for host package).

However, looking at the pblog package (next patch), it looks like pblog
does not have a way to use instaleld files from nanopb... Sigh...

What about this comment instead:

    # The only user of host-nanopb is pblog, which can only use nanopb
    # files from its build directory. So there is nothing to install.

.. and then in pblog itself:

    # pblog can not use installed files from nanopb; it really wants to
    # use those from the build directory of nanopb. So we point it there.

Yet, that is still a bit ugly... :-(

Since you're the author of pblog, you may iwant to fix it to be able to
use files the standard way (i.e. see of the toolchain can find them,
like any other header/lib) and only revert to use a non-installed
version as a last resort? ;-)

> +$(eval $(host-generic-package))
> +$(eval $(generic-package))

If the target variant is really required, then this should be reversed.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building
  2017-01-15 21:30     ` Yann E. MORIN
@ 2017-01-17 22:09       ` Arnout Vandecappelle
  0 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2017-01-17 22:09 UTC (permalink / raw)
  To: buildroot



On 15-01-17 22:30, Yann E. MORIN wrote:
> William, All,
> 
> On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
>> Currently python-protobuf does not allow be built as a host package
>> during a cross compile. We would like to be able to build nanopb as a
>> host package but can't without host-python-protobuf.
>>
>> Signed-off-by: William A. Kennington III <wak@google.com>
>> ---
>>  package/python-protobuf/python-protobuf.mk | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk
>> index d8be76dd7..d46bda243 100644
>> --- a/package/python-protobuf/python-protobuf.mk
>> +++ b/package/python-protobuf/python-protobuf.mk
>> @@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf
>>  PYTHON_PROTOBUF_SETUP_TYPE = setuptools
>>  PYTHON_PROTOBUF_SUBDIR = python
>>  
>> +$(eval $(host-python-package))
>>  $(eval $(python-package))
> 
> This is not documented (AFAIK), but the host variant must go after the
> target variant. Otherwise, strange things can happen (because of the way
> variables have default values that depend on the order of evaluation,
> like the source archive for example).

 I think that this is not true. If it were true, then it would mean that
host-only packages would be problematic, no? In fact, it is the
host-after-target order where strange things could happen, but package-generic
obviously deals with those strange things :-).


 That said, the Buildroot convention is to have host after target, so William,
please do it like that.

 Regards,
 Arnout

> Note: this is valid for the following patch as awell, of course.
> 
> Regards,
> Yann E. MORIN.
> 
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 2/3] nanopb: new package
  2017-01-15 21:51     ` Yann E. MORIN
@ 2017-01-18 18:59       ` William Kennington
  0 siblings, 0 replies; 16+ messages in thread
From: William Kennington @ 2017-01-18 18:59 UTC (permalink / raw)
  To: buildroot

I'm working on cleaning up the nanopb build system as it previously didn't
install any of the protoc generator scripts so you always had to reference
the source directory if you were trying to invoke the protoc plugin. I've
incorporated all of your changes that make sense given the refactoring I'm
doing as nanopb will now be a cmake package. Once I get all of the changes
upstream I'll submit v3.

On Sun, Jan 15, 2017 at 1:51 PM Yann E. MORIN <yann.morin.1998@free.fr>
wrote:

> William, All,
>
> On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
> > We chose not to use a stable version so that our version of nanopb
> > is compatible with pblog. In the future a stable version should be used.
>
> From this description, it looks like nanopb is only really usefull as a
> host tool. Yet, you also made it a target package. Is it intentional?
>
> If it is only a host tool that does not have a reason to be selected on
> its own, then do [**] below...
>
> > Signed-off-by: William A. Kennington III <wak@google.com>
> > ---
> >  package/Config.in          |  1 +
> >  package/nanopb/Config.in   |  8 ++++++++
> >  package/nanopb/nanopb.hash |  2 ++
> >  package/nanopb/nanopb.mk   | 25 +++++++++++++++++++++++++
> >  4 files changed, 36 insertions(+)
> >  create mode 100644 package/nanopb/Config.in
> >  create mode 100644 package/nanopb/nanopb.hash
> >  create mode 100644 package/nanopb/nanopb.mk
> >
> > diff --git a/package/Config.in b/package/Config.in
> > index 8c8c33ec3..625315c1c 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -1362,6 +1362,7 @@ endif
> >       source "package/msgpack/Config.in"
> >       source "package/mtdev2tuio/Config.in"
> >       source "package/musl-compat-headers/Config.in"
> > +     source "package/nanopb/Config.in"
>
> [**] Move that to package/Config.in/host
>
> >       source "package/openblas/Config.in"
> >       source "package/orc/Config.in"
> >       source "package/p11-kit/Config.in"
> > diff --git a/package/nanopb/Config.in b/package/nanopb/Config.in
> > new file mode 100644
> > index 000000000..4c5779f58
> > --- /dev/null
> > +++ b/package/nanopb/Config.in
> > @@ -0,0 +1,8 @@
> > +config BR2_PACKAGE_NANOPB
> > +     bool "nanopb"
> > +     help
> > +       Nanopb is a small code-size Protocol Buffers implementation in
> ansi C.
> > +       It is especially suitable for use in microcontrollers,
> > +       but fits any memory restricted system.
> > +
> > +       https://github.com/nanopb/nanopb
>
> [**] Don't give it a prompt; don't add help.
>
> > diff --git a/package/nanopb/nanopb.hash b/package/nanopb/nanopb.hash
> > new file mode 100644
> > index 000000000..0a9224777
> > --- /dev/null
> > +++ b/package/nanopb/nanopb.hash
> > @@ -0,0 +1,2 @@
> > +# Locally calculated
> > +sha256 d29305a235f9a58c95ffd999d258d7dd2c2cbb8b81312a4138dfe5802ff2c8e8
> nanopb-afdbca39edfaef58073f661d23300e1133c4e8af.tar.gz
> > diff --git a/package/nanopb/nanopb.mk b/package/nanopb/nanopb.mk
> > new file mode 100644
> > index 000000000..0e3d8cf55
> > --- /dev/null
> > +++ b/package/nanopb/nanopb.mk
> > @@ -0,0 +1,25 @@
> >
> +################################################################################
> > +#
> > +# nanopb
> > +#
> >
> +################################################################################
> > +
> > +NANOPB_VERSION = afdbca39edfaef58073f661d23300e1133c4e8af
> > +NANOPB_SITE = $(call github,nanopb,nanopb,$(NANOPB_VERSION))
> > +NANOPB_LICENSE = BSD-3c
> > +NANOPB_LICENSE_FILES = LICENSE.txt
> > +
> > +NANOPB_DEPENDENCIES = protobuf python-protobuf
> > +
> > +define HOST_NANOPB_BUILD_CMDS
> > +     $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C
> $(@D)/generator/proto
> > +endef
> > +
> > +define NANOPB_BUILD_CMDS
> > +     $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C
> $(@D)/generator/proto
> > +endef
> > +
> > +# We don't actually need to install anything as you include the library
> files
> > +# directly.
>
> Well, this is not clear at all.
>
> We do want packages to install their devel files in staging/ (for target
> packages) or in host/ (for host package).
>
> However, looking at the pblog package (next patch), it looks like pblog
> does not have a way to use instaleld files from nanopb... Sigh...
>
> What about this comment instead:
>
>     # The only user of host-nanopb is pblog, which can only use nanopb
>     # files from its build directory. So there is nothing to install.
>
> .. and then in pblog itself:
>
>     # pblog can not use installed files from nanopb; it really wants to
>     # use those from the build directory of nanopb. So we point it there.
>
> Yet, that is still a bit ugly... :-(
>
> Since you're the author of pblog, you may iwant to fix it to be able to
> use files the standard way (i.e. see of the toolchain can find them,
> like any other header/lib) and only revert to use a non-installed
> version as a last resort? ;-)
>
> > +$(eval $(host-generic-package))
> > +$(eval $(generic-package))
>
> If the target variant is really required, then this should be reversed.
>
> Regards,
> Yann E. MORIN.
>
> --
>
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
> conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___
>      |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is
> no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v
>  conspiracy.  |
>
> '------------------------------^-------^------------------^--------------------'
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170118/ee3500b8/attachment.html>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-01-18 18:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-09  1:13 [Buildroot] [PATCH 0/3] pblog: Add new package William A. Kennington III
2016-12-09  1:13 ` [Buildroot] [PATCH 1/3] python-protobuf: Allow host building William A. Kennington III
2016-12-10 14:38   ` Thomas Petazzoni
2016-12-09  1:13 ` [Buildroot] [PATCH 2/3] nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef William A. Kennington III
2016-12-10 14:37   ` Thomas Petazzoni
2016-12-09  1:13 ` [Buildroot] [PATCH 3/3] pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072 William A. Kennington III
2016-12-10 14:41   ` Thomas Petazzoni
2017-01-12 19:15 ` [Buildroot] [PATCH v2 0/3] pblog: new package William A. Kennington III
2017-01-12 19:15   ` [Buildroot] [PATCH v2 1/3] python-protobuf: Allow host building William A. Kennington III
2017-01-15 21:30     ` Yann E. MORIN
2017-01-17 22:09       ` Arnout Vandecappelle
2017-01-15 21:32     ` Yann E. MORIN
2017-01-12 19:15   ` [Buildroot] [PATCH v2 2/3] nanopb: new package William A. Kennington III
2017-01-15 21:51     ` Yann E. MORIN
2017-01-18 18:59       ` William Kennington
2017-01-12 19:15   ` [Buildroot] [PATCH v2 3/3] pblog: " William A. Kennington III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox