pblog: Add new package
cover pblog: Add new package
This patchset add the necessary dependencies for pblog and adds the pblog package.
Google-Bug-Id: 33072942
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
Signature · 1 line
2.8.0.rc3.226.g39d4020
PATCH 1/3 python-protobuf: Allow host building
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
--- package/python-protobuf/python-protobuf.mk | 1 + 1 file changed, 1 insertion(+)
(quoted diff) +0 -0
b/package/python-protobuf/python-protobuf.mk
index d8be76d..d46bda2 100644
package/python-protobuf/python-protobuf.mk +1 -0
@@ -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))
Signature · 1 line
2.8.0.rc3.226.g39d4020
PATCH 1/3 python-protobuf: Allow host building
Hello,
Quoted 3 lines · William A. Kennington III
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.
Quoted 2 lines
Google-Bug-Id: 33072942
Change-Id: Id09f461bda3f9c7a0bd6b5c36a6a8fa92e4adb27
Please remove those two lines.
Quoted 11 lines
Signed-off-by William A. Kennington III <[email protected]>--- package/python-protobuf/python-protobuf.mk | 1 + 1 file changed, 1 insertion(+)package/python-protobuf/python-protobuf.mk +0
-0
package/python-protobuf/python-protobuf.mk PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf · line 17
Quoted 5 lines
package/python-protobuf/python-protobuf.mk +1
-0@@ -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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 2/3 nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
In reply to William A. Kennington IIIWe 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
--- 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
package/Config.in +1 -0
@@ -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"
package/nanopb/Config.in new file +8 -0
@@ -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
package/nanopb/nanopb.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 e6dbaf58574c54e67b6bdfdee71f62d52d261e77a5f8e3961b7a6a0abbf06a86
nanopb-69e9c1fc8162956feffa32e07a97c53bdb92f5ef.tar.gz
package/nanopb/nanopb.mk new file +17 -0
@@ -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))
Signature · 1 line
2.8.0.rc3.226.g39d4020
PATCH 2/3 nanopb: Init at 69e9c1fc8162956feffa32e07a97c53bdb92f5ef
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.
Quoted 2 lines · William A. Kennington III
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
Quoted 3 lines
Change-Id: I3f80c809efbe7c237de9b9de901d048247b4c6c1
Google-Bug-Id: 33072942
Those two lines should be removed.
Quoted 5 lines
Signed-off-by William A. Kennington III <[email protected]>package/nanopb/nanopb.hash new file +2
-0+# Locally calculated +sha256 e6dbaf58574c54e67b6bdfdee71f62d52d261e77a5f8e3961b7a6a0abbf06a86nanopb-69e9c1fc8162956feffa32e07a97c53bdb92f5ef.tar.gz
Here the line is wrapped while it should not.
Quoted 7 lines
package/nanopb/nanopb.mk new file +1
-0@@ -0,0 +1,27 @@ +################################################################################
package/nanopb/nanopb.mk line 11
Quoted 10 lines
package/nanopb/nanopb.mk new file +10
-0+# +# 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.
package/nanopb/nanopb.mk line 13
Quoted 1 line
package/nanopb/nanopb.mk new file +1
-0+# 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.
Quoted 5 lines
package/nanopb/nanopb.mk new file +4
-0+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.
Quoted 5 lines
package/nanopb/nanopb.mk new file +4
-0+endef + +define NANOPB_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C$(@D)/generator/proto
Line has been wrapped.
Quoted 5 lines
package/nanopb/nanopb.mk new file +3
-0+endef + +# We don't actually need to install anything as you include the libraryfiles
+# 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.
Quoted 2 lines
+$(eval $(host-generic-package))
+$(eval $(generic-package))
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 3/3 pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072
In reply to William A. Kennington IIIUsing an unstable release as upstream has no release tags yet.
Google-Bug-Id: 33072942
--- 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
package/Config.in +1 -0
@@ -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
package/pblog/Config.in new file +8 -0
@@ -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
package/pblog/pblog.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 f5908706afe15041983f163da735db751dda82f20c84e60c0c59584d609f10eb
pblog-e2e17544950eedac4f3bc59926aed8604d755072.tar.gz
package/pblog/pblog.mk new file +16 -0
@@ -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))
Signature · 1 line
2.8.0.rc3.226.g39d4020
PATCH 3/3 pblog: Init at e2e17544950eedac4f3bc59926aed8604d755072
Hello,
Like the other patches, this patch is badly wrapped and therefore does not apply. Its title should be just:
pblog: new package
package/pblog/Config.in line 4
Quoted 10 lines · William A. Kennington III
package/pblog/Config.in new file +4
-0@@ -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.
Quoted 9 lines
package/pblog/pblog.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally calculated +sha256 f5908706afe15041983f163da735db751dda82f20c84e60c0c59584d609f10ebpblog-e2e17544950eedac4f3bc59926aed8604d755072.tar.gz
Badly wrapped.
Quoted 7 lines
package/pblog/pblog.mk new file +1
-0@@ -0,0 +1,27 @@ +################################################################################
package/pblog/pblog.mk line 11
Quoted 10 lines
package/pblog/pblog.mk new file +10
-0+# +# 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.
package/pblog/pblog.mk line 13
Quoted 1 line
package/pblog/pblog.mk new file +1
-0+PBLOG_DEPENDENCIES = host-nanopb
So, the target nanopb package is useless?
Quoted 4 lines
package/pblog/pblog.mk new file +3
-0+ +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.
Quoted 6 lines
package/pblog/pblog.mk new file +4
-0+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.
Quoted 5 lines
package/pblog/pblog.mk new file +3
-0+ +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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
v2 cover pblog: new package
In reply to William A. Kennington IIIAdd 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
Signature · 1 line
2.11.0
PATCH v2 1/3 python-protobuf: Allow host building
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.
--- package/python-protobuf/python-protobuf.mk | 1 + 1 file changed, 1 insertion(+)
package/python-protobuf/python-protobuf.mk +1 -0
@@ -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))
Signature · 1 line
2.11.0
PATCH v2 1/3 python-protobuf: Allow host building
William, All,
On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
Quoted 14 lines
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 <[email protected]>--- package/python-protobuf/python-protobuf.mk | 1 + 1 file changed, 1 insertion(+)package/python-protobuf/python-protobuf.mk +0
-0
package/python-protobuf/python-protobuf.mk PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf · line 17
Quoted 5 lines
package/python-protobuf/python-protobuf.mk +1
-0@@ -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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/3 python-protobuf: Allow host building
Quoted 20 lines · Yann E. MORIN
William, All,
On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
Quoted 17 lines
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 <[email protected]>--- package/python-protobuf/python-protobuf.mk | 1 + 1 file changed, 1 insertion(+)package/python-protobuf/python-protobuf.mk +0
-0@@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf PYTHON_PROTOBUF_SETUP_TYPE = setuptools PYTHON_PROTOBUF_SUBDIR = python
Quoted 7 lines
package/python-protobuf/python-protobuf.mk PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf · line 17
Quoted 2 lines
package/python-protobuf/python-protobuf.mk +1
-0+$(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
Quoted 6 lines
Note: this is valid for the following patch as awell, of course.
Regards,
Yann E. MORIN.
Signature · 6 lines
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
PATCH v2 1/3 python-protobuf: Allow host building
In reply to William A. Kennington IIIWlliam, All,
On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
Quoted 14 lines
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 <[email protected]>--- package/python-protobuf/python-protobuf.mk | 1 + 1 file changed, 1 insertion(+)package/python-protobuf/python-protobuf.mk +0
-0
package/python-protobuf/python-protobuf.mk PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf · line 16
Quoted 4 lines
package/python-protobuf/python-protobuf.mk +1
-0@@ -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.
Quoted 8 lines
package/python-protobuf/python-protobuf.mk +0
-0$(eval $(python-package))Signature · 6 lines
2.11.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 2/3 nanopb: new package
In reply to William A. Kennington IIIWe 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.
--- 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
package/Config.in +1 -0
@@ -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"
package/nanopb/Config.in new file +8 -0
@@ -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
package/nanopb/nanopb.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 d29305a235f9a58c95ffd999d258d7dd2c2cbb8b81312a4138dfe5802ff2c8e8 nanopb-afdbca39edfaef58073f661d23300e1133c4e8af.tar.gz
package/nanopb/nanopb.mk new file +25 -0
@@ -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))
Signature · 1 line
2.11.0
PATCH v2 2/3 nanopb: new package
William, All,
On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
Quoted 2 lines
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...
Quoted 16 lines
Signed-off-by William A. Kennington III <[email protected]>--- 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.mkpackage/Config.in +0
-0
package/Config.in endif · line 1365
Quoted 4 lines
package/Config.in +1
-0@@ -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
Quoted 9 lines
package/Config.in +0
-0source "package/openblas/Config.in" source "package/orc/Config.in" source "package/p11-kit/Config.in"package/nanopb/Config.in new file +0
-0
package/nanopb/Config.in line 8
Quoted 8 lines
package/nanopb/Config.in new file +8
-0@@ -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.
Quoted 27 lines
package/nanopb/nanopb.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally calculated +sha256 d29305a235f9a58c95ffd999d258d7dd2c2cbb8b81312a4138dfe5802ff2c8e8 nanopb-afdbca39edfaef58073f661d23300e1133c4e8af.tar.gzpackage/nanopb/nanopb.mk new file +13
-0@@ -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 +
package/nanopb/nanopb.mk line 23
Quoted 10 lines
package/nanopb/nanopb.mk new file +10
-0+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? ;-)
package/nanopb/nanopb.mk line 25
Quoted 2 lines
package/nanopb/nanopb.mk new file +2
-0+$(eval $(host-generic-package)) +$(eval $(generic-package))
If the target variant is really required, then this should be reversed.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 2/3 nanopb: new package
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.
Quoted 145 lines · Yann E. MORIN
William, All,
On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly:
Quoted 2 lines
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...
Quoted 16 lines
Signed-off-by William A. Kennington III <[email protected]>--- 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.mkpackage/Config.in +0
-0package/Config.in endif · line 1365
Quoted 4 lines
package/Config.in +1
-0@@ -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
package/nanopb/Config.in line 4
Quoted 13 lines
package/Config.in +0
-0source "package/openblas/Config.in" source "package/orc/Config.in" source "package/p11-kit/Config.in"package/nanopb/Config.in new file +4
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_NANOPB + bool "nanopb" + help + Nanopb is a small code-size Protocol Buffers implementation inansi C.
package/nanopb/Config.in line 8
Quoted 4 lines
package/nanopb/Config.in new file +4
-0+ 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.
package/nanopb/nanopb.hash line 2
Quoted 8 lines
package/nanopb/nanopb.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally calculated +sha256 d29305a235f9a58c95ffd999d258d7dd2c2cbb8b81312a4138dfe5802ff2c8e8nanopb-afdbca39edfaef58073f661d23300e1133c4e8af.tar.gz
package/nanopb/nanopb.mk
Quoted 7 lines
package/nanopb/nanopb.mk new file +0
-0@@ -0,0 +1,25 @@+################################################################################
package/nanopb/nanopb.mk line 4
Quoted 4 lines
package/nanopb/nanopb.mk new file +3
-0+# +# nanopb +#+################################################################################
package/nanopb/nanopb.mk
Quoted 10 lines
package/nanopb/nanopb.mk new file +10
-0+ +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
package/nanopb/nanopb.mk
Quoted 4 lines
package/nanopb/nanopb.mk new file +4
-0+endef + +define NANOPB_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C$(@D)/generator/proto
package/nanopb/nanopb.mk
Quoted 3 lines
package/nanopb/nanopb.mk new file +3
-0+endef + +# We don't actually need to install anything as you include the libraryfiles
package/nanopb/nanopb.mk line 23
Quoted 1 line
package/nanopb/nanopb.mk new file +1
-0+# 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? ;-)
package/nanopb/nanopb.mk line 25
Quoted 2 lines
package/nanopb/nanopb.mk new file +2
-0+$(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. |
Quoted 2 lines
'------------------------------^-------^------------------^--------------------'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170118/ee3500b8/attachment.html>
PATCH v2 3/3 pblog: new package
In reply to William A. Kennington IIIUsing an unstable release as upstream has no release tags yet.
--- 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
package/Config.in +1 -0
@@ -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
package/pblog/Config.in new file +8 -0
@@ -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
package/pblog/pblog.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 6d3ca5bfdaa16dc788876ac90fb025514b2b285b39251425e480d546ef044f13 pblog-93b05307000ee3d6b7e4276f1cbb51d71fee4b09.tar.gz
package/pblog/pblog.mk new file +34 -0
@@ -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))
Signature · 1 line
2.11.0