Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] openssl: disable apps for NOMMU
@ 2012-10-16 11:59 Gustavo Zacarias
  2012-10-21 19:15 ` Peter Korsgaard
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo Zacarias @ 2012-10-16 11:59 UTC (permalink / raw)
  To: buildroot

The openssl binary uses fork() so disable the option and build for !MMU.
Fixes
http://autobuild.buildroot.net/results/45a9b84c16caadbf77b6fc43d7a0001c981a4c87/build-end.log

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/openssl/Config.in  |    2 ++
 package/openssl/openssl.mk |    9 +++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/package/openssl/Config.in b/package/openssl/Config.in
index 6ba644a..2187023 100644
--- a/package/openssl/Config.in
+++ b/package/openssl/Config.in
@@ -12,6 +12,8 @@ config BR2_PACKAGE_OPENSSL
 config BR2_PACKAGE_OPENSSL_BIN
 	bool "openssl binary"
 	depends on BR2_PACKAGE_OPENSSL
+	# uses fork()
+	depends on BR2_USE_MMU
 	help
 	  Install the openssl binary to the target file system. This is a
 	  command line tool for doing various crypthographic stuff.
diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
index 0917344..d283046 100644
--- a/package/openssl/openssl.mk
+++ b/package/openssl/openssl.mk
@@ -13,6 +13,15 @@ OPENSSL_DEPENDENCIES = zlib
 OPENSSL_TARGET_ARCH = generic32
 OPENSSL_CFLAGS = $(TARGET_CFLAGS)
 
+ifeq ($(BR2_USE_MMU),)
+define OPENSSL_DISABLE_APPS
+	$(SED) '/^build_apps/! s/build_apps//' $(@D)/Makefile.org
+	$(Q)touch $(@D)/apps/openssl
+endef
+endif
+
+OPENSSL_PRE_CONFIGURE_HOOKS += OPENSSL_DISABLE_APPS
+
 ifeq ($(BR2_PACKAGE_OPENSSL_OCF),y)
 	OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
 	OPENSSL_DEPENDENCIES += ocf-linux
-- 
1.7.8.6

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

* [Buildroot] [PATCH] openssl: disable apps for NOMMU
  2012-10-16 11:59 [Buildroot] [PATCH] openssl: disable apps for NOMMU Gustavo Zacarias
@ 2012-10-21 19:15 ` Peter Korsgaard
  2012-10-21 19:42   ` Gustavo Zacarias
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2012-10-21 19:15 UTC (permalink / raw)
  To: buildroot

>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> The openssl binary uses fork() so disable the option and build for !MMU.
 Gustavo> Fixes
 Gustavo> http://autobuild.buildroot.net/results/45a9b84c16caadbf77b6fc43d7a0001c981a4c87/build-end.log

 Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
 Gustavo> ---
 Gustavo>  package/openssl/Config.in  |    2 ++
 Gustavo>  package/openssl/openssl.mk |    9 +++++++++
 Gustavo>  2 files changed, 11 insertions(+), 0 deletions(-)

 Gustavo> diff --git a/package/openssl/Config.in b/package/openssl/Config.in
 Gustavo> index 6ba644a..2187023 100644
 Gustavo> --- a/package/openssl/Config.in
 Gustavo> +++ b/package/openssl/Config.in
 Gustavo> @@ -12,6 +12,8 @@ config BR2_PACKAGE_OPENSSL
 Gustavo>  config BR2_PACKAGE_OPENSSL_BIN
 Gustavo>  	bool "openssl binary"
 Gustavo>  	depends on BR2_PACKAGE_OPENSSL
 Gustavo> +	# uses fork()
 Gustavo> +	depends on BR2_USE_MMU
 Gustavo>  	help
 Gustavo>  	  Install the openssl binary to the target file system. This is a
 Gustavo>  	  command line tool for doing various crypthographic stuff.
 Gustavo> diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
 Gustavo> index 0917344..d283046 100644
 Gustavo> --- a/package/openssl/openssl.mk
 Gustavo> +++ b/package/openssl/openssl.mk
 Gustavo> @@ -13,6 +13,15 @@ OPENSSL_DEPENDENCIES = zlib
 Gustavo>  OPENSSL_TARGET_ARCH = generic32
 Gustavo>  OPENSSL_CFLAGS = $(TARGET_CFLAGS)
 
 Gustavo> +ifeq ($(BR2_USE_MMU),)

Why is this not BR2_PACKAGE_OPENSSL_BIN instead?

 Gustavo> +define OPENSSL_DISABLE_APPS
 Gustavo> +	$(SED) '/^build_apps/! s/build_apps//' $(@D)/Makefile.org
 Gustavo> +	$(Q)touch $(@D)/apps/openssl
 Gustavo> +endef
 Gustavo> +endif
 Gustavo> +
 Gustavo> +OPENSSL_PRE_CONFIGURE_HOOKS += OPENSSL_DISABLE_APPS
 Gustavo> +
 Gustavo>  ifeq ($(BR2_PACKAGE_OPENSSL_OCF),y)
 Gustavo>  	OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
 Gustavo>  	OPENSSL_DEPENDENCIES += ocf-linux
 Gustavo> -- 
 Gustavo> 1.7.8.6


-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] openssl: disable apps for NOMMU
  2012-10-21 19:15 ` Peter Korsgaard
@ 2012-10-21 19:42   ` Gustavo Zacarias
  2012-10-21 20:29     ` Peter Korsgaard
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo Zacarias @ 2012-10-21 19:42 UTC (permalink / raw)
  To: buildroot

On 10/21/12 16:15, Peter Korsgaard wrote:

> Why is this not BR2_PACKAGE_OPENSSL_BIN instead?

Because the change must be done before anything is built.
Since i'm only tweaking the build phase and not the install one in the
build system i need to fake the openssl being built with the touch.
It will then be removed by the BR2_PACKAGE_OPENSSL_BIN knob when it's nommu.
Or maybe i misunderstood what you meant?
Regards.

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

* [Buildroot] [PATCH] openssl: disable apps for NOMMU
  2012-10-21 19:42   ` Gustavo Zacarias
@ 2012-10-21 20:29     ` Peter Korsgaard
  2012-10-22 15:41       ` Gustavo Zacarias
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2012-10-21 20:29 UTC (permalink / raw)
  To: buildroot

>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> On 10/21/12 16:15, Peter Korsgaard wrote:
 >> Why is this not BR2_PACKAGE_OPENSSL_BIN instead?

 Gustavo> Because the change must be done before anything is built.

Ok, but why only on !MMU and not when the user has just decided that
they don't want /usr/bin/openssl (E.G. not enable
BR2_PACKAGE_OPENSSL_BIN)? Why would we want to build (but not install)
it when MMU?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] openssl: disable apps for NOMMU
  2012-10-21 20:29     ` Peter Korsgaard
@ 2012-10-22 15:41       ` Gustavo Zacarias
  0 siblings, 0 replies; 5+ messages in thread
From: Gustavo Zacarias @ 2012-10-22 15:41 UTC (permalink / raw)
  To: buildroot

On 10/21/12 17:29, Peter Korsgaard wrote:

> Ok, but why only on !MMU and not when the user has just decided that
> they don't want /usr/bin/openssl (E.G. not enable
> BR2_PACKAGE_OPENSSL_BIN)? Why would we want to build (but not install)
> it when MMU?

No reason in particular, i was just fixing the bug without considering
tidying other things up.
It will save some glorious 2 seconds of build time when !BIN, but why not?
Regards.

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

end of thread, other threads:[~2012-10-22 15:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16 11:59 [Buildroot] [PATCH] openssl: disable apps for NOMMU Gustavo Zacarias
2012-10-21 19:15 ` Peter Korsgaard
2012-10-21 19:42   ` Gustavo Zacarias
2012-10-21 20:29     ` Peter Korsgaard
2012-10-22 15:41       ` Gustavo Zacarias

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