Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] Improve powerpc-utils with librtas
@ 2015-05-08  4:27 Sam Bobroff
  2015-05-08  4:27 ` [Buildroot] [PATCH 1/2] librtas: new package Sam Bobroff
  2015-05-08  4:27 ` [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas Sam Bobroff
  0 siblings, 2 replies; 14+ messages in thread
From: Sam Bobroff @ 2015-05-08  4:27 UTC (permalink / raw)
  To: buildroot


Many useful functions are missing from powerpc-utils when built by
buildroot, because they depend on librtas which is not included.

This set adds the librtas package, a small patch to fix a problem with
it's make install target, and tweaks the powerpc-utils config
to include it. This makes the following additional programs available
from powerpc-utils:

* uesensor
* set_poweron_time
* drmgr
* lsslot
* activate_firmware
* rtas_ibm_get_vpd
* serv_config
* rtas_event_decode
* sys_ident


Sam Bobroff (2):
  librtas: new package
  powerpc-utils: remove --without-librtas

 package/Config.in                          |    1 +
 package/librtas/Config.in                  |    9 +++++++++
 package/librtas/librtas.mk                 |   27 +++++++++++++++++++++++++++
 package/librtas/missing-librtas.so.1.patch |   11 +++++++++++
 package/powerpc-utils/Config.in            |    1 +
 package/powerpc-utils/powerpc-utils.mk     |    3 +--
 6 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 package/librtas/Config.in
 create mode 100644 package/librtas/librtas.mk
 create mode 100644 package/librtas/missing-librtas.so.1.patch

-- 
1.7.10.4

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

* [Buildroot] [PATCH 1/2] librtas: new package
  2015-05-08  4:27 [Buildroot] [PATCH 0/2] Improve powerpc-utils with librtas Sam Bobroff
@ 2015-05-08  4:27 ` Sam Bobroff
  2015-05-08  4:52   ` Baruch Siach
  2015-05-08  4:27 ` [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas Sam Bobroff
  1 sibling, 1 reply; 14+ messages in thread
From: Sam Bobroff @ 2015-05-08  4:27 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
---
 package/Config.in                          |    1 +
 package/librtas/Config.in                  |    9 +++++++++
 package/librtas/librtas.mk                 |   27 +++++++++++++++++++++++++++
 package/librtas/missing-librtas.so.1.patch |   11 +++++++++++
 4 files changed, 48 insertions(+)
 create mode 100644 package/librtas/Config.in
 create mode 100644 package/librtas/librtas.mk
 create mode 100644 package/librtas/missing-librtas.so.1.patch

diff --git a/package/Config.in b/package/Config.in
index af4d2b7..51de1c0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -832,6 +832,7 @@ menu "Hardware handling"
 	source "package/libphidget/Config.in"
 	source "package/libqmi/Config.in"
 	source "package/libraw1394/Config.in"
+	source "package/librtas/Config.in"
 	source "package/librtlsdr/Config.in"
 	source "package/libserial/Config.in"
 	source "package/libserialport/Config.in"
diff --git a/package/librtas/Config.in b/package/librtas/Config.in
new file mode 100644
index 0000000..bf0a705
--- /dev/null
+++ b/package/librtas/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBRTAS
+	bool "librtas"
+	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+	help
+	  The librtas package provides an interface for Run-Time Abstraction
+	  Services (RTAS) calls on PAPR platforms. The libraries allow users to
+	  examine and manipulate hardware, and parse RTAS events.
+
+	  http://librtas.sourceforge.net/
diff --git a/package/librtas/librtas.mk b/package/librtas/librtas.mk
new file mode 100644
index 0000000..d13c876
--- /dev/null
+++ b/package/librtas/librtas.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# librtas
+#
+################################################################################
+
+LIBRTAS_VERSION = 1.3.13
+LIBRTAS_SITE = http://downloads.sourceforge.net/project/librtas
+LIBRTAS_LICENSE = Common Public License Version 1.0
+LIBRTAS_LICENSE_FILES = COPYRIGHT
+LIBRTAS_INSTALL_STAGING = YES
+LIBRTAS_INSTALL_TARGET = YES
+
+define LIBRTAS_BUILD_CMDS
+	$(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_LD)"
+endef
+
+define LIBRTAS_INSTALL_STAGING_CMDS
+	$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+define LIBRTAS_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+
+$(eval $(generic-package))
diff --git a/package/librtas/missing-librtas.so.1.patch b/package/librtas/missing-librtas.so.1.patch
new file mode 100644
index 0000000..de21d66
--- /dev/null
+++ b/package/librtas/missing-librtas.so.1.patch
@@ -0,0 +1,11 @@
+diff -purN librtas-1.3.12.orig/librtas_src/Makefile librtas-1.3.12/librtas_src/Makefile
+--- librtas-1.3.12.orig/librtas_src/Makefile	2015-04-09 10:45:19.772381633 +1000
++++ librtas-1.3.12/librtas_src/Makefile	2015-04-09 10:45:57.968604762 +1000
+@@ -33,6 +33,7 @@ install:
+ 	@$(call install_lib,$(LIBRTAS),$(DESTDIR))
+ 	@$(call install_inc,$(HEADERS),$(DESTDIR))
+ 	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME)
++	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME).1
+ 
+ uninstall:
+ 	@$(call uninstall_lib,$(LIBRTAS),$(DESTDIR))
-- 
1.7.10.4

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

* [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas
  2015-05-08  4:27 [Buildroot] [PATCH 0/2] Improve powerpc-utils with librtas Sam Bobroff
  2015-05-08  4:27 ` [Buildroot] [PATCH 1/2] librtas: new package Sam Bobroff
@ 2015-05-08  4:27 ` Sam Bobroff
  2015-05-08  4:57   ` Baruch Siach
  1 sibling, 1 reply; 14+ messages in thread
From: Sam Bobroff @ 2015-05-08  4:27 UTC (permalink / raw)
  To: buildroot

Now that librtas is available, remove --without-librtas and make the
rtas-dependant functions available.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
---
 package/powerpc-utils/Config.in        |    1 +
 package/powerpc-utils/powerpc-utils.mk |    3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/powerpc-utils/Config.in b/package/powerpc-utils/Config.in
index eded41e..a754899 100644
--- a/package/powerpc-utils/Config.in
+++ b/package/powerpc-utils/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_POWERPC_UTILS
 	bool "powerpc-utils"
 	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
 	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBRTAS
 	help
 	  System utilities for PowerPC machines.
 
diff --git a/package/powerpc-utils/powerpc-utils.mk b/package/powerpc-utils/powerpc-utils.mk
index 3b30458..3fb9e24 100644
--- a/package/powerpc-utils/powerpc-utils.mk
+++ b/package/powerpc-utils/powerpc-utils.mk
@@ -6,11 +6,10 @@
 
 POWERPC_UTILS_VERSION = 1.2.24
 POWERPC_UTILS_SITE = http://downloads.sourceforge.net/project/powerpc-utils/powerpc-utils
-POWERPC_UTILS_DEPENDENCIES = zlib
+POWERPC_UTILS_DEPENDENCIES = zlib librtas
 POWERPC_UTILS_LICENSE = Common Public License Version 1.0
 POWERPC_UTILS_LICENSE_FILES = COPYRIGHT
 
-POWERPC_UTILS_CONF_OPTS = --without-librtas
 POWERPC_UTILS_CONF_ENV = \
 	ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no)
 
-- 
1.7.10.4

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

* [Buildroot] [PATCH 1/2] librtas: new package
  2015-05-08  4:27 ` [Buildroot] [PATCH 1/2] librtas: new package Sam Bobroff
@ 2015-05-08  4:52   ` Baruch Siach
  2015-05-08  5:37     ` Sam Bobroff
  2015-05-08  7:42     ` Peter Korsgaard
  0 siblings, 2 replies; 14+ messages in thread
From: Baruch Siach @ 2015-05-08  4:52 UTC (permalink / raw)
  To: buildroot

Hi Sam,

On Fri, May 08, 2015 at 02:27:48PM +1000, Sam Bobroff wrote:
> diff --git a/package/librtas/librtas.mk b/package/librtas/librtas.mk
> new file mode 100644
> index 0000000..d13c876
> --- /dev/null
> +++ b/package/librtas/librtas.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# librtas
> +#
> +################################################################################
> +
> +LIBRTAS_VERSION = 1.3.13
> +LIBRTAS_SITE = http://downloads.sourceforge.net/project/librtas
> +LIBRTAS_LICENSE = Common Public License Version 1.0
> +LIBRTAS_LICENSE_FILES = COPYRIGHT
> +LIBRTAS_INSTALL_STAGING = YES
> +LIBRTAS_INSTALL_TARGET = YES

Not needed, this is the default.

> +
> +define LIBRTAS_BUILD_CMDS
> +	$(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_LD)"
> +endef
> +
> +define LIBRTAS_INSTALL_STAGING_CMDS
> +	$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
> +endef
> +
> +define LIBRTAS_INSTALL_TARGET_CMDS
> +	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> +endef
> +
> +
> +$(eval $(generic-package))
> diff --git a/package/librtas/missing-librtas.so.1.patch b/package/librtas/missing-librtas.so.1.patch
> new file mode 100644
> index 0000000..de21d66
> --- /dev/null
> +++ b/package/librtas/missing-librtas.so.1.patch
> @@ -0,0 +1,11 @@

Please add your Sign-off here.

> +diff -purN librtas-1.3.12.orig/librtas_src/Makefile librtas-1.3.12/librtas_src/Makefile
> +--- librtas-1.3.12.orig/librtas_src/Makefile	2015-04-09 10:45:19.772381633 +1000
> ++++ librtas-1.3.12/librtas_src/Makefile	2015-04-09 10:45:57.968604762 +1000
> +@@ -33,6 +33,7 @@ install:
> + 	@$(call install_lib,$(LIBRTAS),$(DESTDIR))
> + 	@$(call install_inc,$(HEADERS),$(DESTDIR))
> + 	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME)
> ++	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME).1
> + 
> + uninstall:
> + 	@$(call uninstall_lib,$(LIBRTAS),$(DESTDIR))

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas
  2015-05-08  4:27 ` [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas Sam Bobroff
@ 2015-05-08  4:57   ` Baruch Siach
  2015-05-11  0:43     ` Sam Bobroff
  0 siblings, 1 reply; 14+ messages in thread
From: Baruch Siach @ 2015-05-08  4:57 UTC (permalink / raw)
  To: buildroot

Hi Sam,

On Fri, May 08, 2015 at 02:27:49PM +1000, Sam Bobroff wrote:
> Now that librtas is available, remove --without-librtas and make the
> rtas-dependant functions available.
> 
> Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
> ---
>  package/powerpc-utils/Config.in        |    1 +
>  package/powerpc-utils/powerpc-utils.mk |    3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/powerpc-utils/Config.in b/package/powerpc-utils/Config.in
> index eded41e..a754899 100644
> --- a/package/powerpc-utils/Config.in
> +++ b/package/powerpc-utils/Config.in
> @@ -2,6 +2,7 @@ config BR2_PACKAGE_POWERPC_UTILS
>  	bool "powerpc-utils"
>  	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>  	select BR2_PACKAGE_ZLIB
> +	select BR2_PACKAGE_LIBRTAS
>  	help
>  	  System utilities for PowerPC machines.
>  
> diff --git a/package/powerpc-utils/powerpc-utils.mk b/package/powerpc-utils/powerpc-utils.mk
> index 3b30458..3fb9e24 100644
> --- a/package/powerpc-utils/powerpc-utils.mk
> +++ b/package/powerpc-utils/powerpc-utils.mk
> @@ -6,11 +6,10 @@
>  
>  POWERPC_UTILS_VERSION = 1.2.24
>  POWERPC_UTILS_SITE = http://downloads.sourceforge.net/project/powerpc-utils/powerpc-utils
> -POWERPC_UTILS_DEPENDENCIES = zlib
> +POWERPC_UTILS_DEPENDENCIES = zlib librtas

Why not make librtas an optional dependency? Something like:

ifeq ($(BR2_PACKAGE_LIBRTAS),y)
POWERPC_UTILS_DEPENDENCIES += librtas
POWERPC_UTILS_CONF_OPTS = --with-librtas
else
POWERPC_UTILS_CONF_OPTS = --without-librtas
endif

>  POWERPC_UTILS_LICENSE = Common Public License Version 1.0
>  POWERPC_UTILS_LICENSE_FILES = COPYRIGHT
>  
> -POWERPC_UTILS_CONF_OPTS = --without-librtas
>  POWERPC_UTILS_CONF_ENV = \
>  	ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no)

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 1/2] librtas: new package
  2015-05-08  4:52   ` Baruch Siach
@ 2015-05-08  5:37     ` Sam Bobroff
  2015-05-08  7:42     ` Peter Korsgaard
  1 sibling, 0 replies; 14+ messages in thread
From: Sam Bobroff @ 2015-05-08  5:37 UTC (permalink / raw)
  To: buildroot

On 08/05/15 14:52, Baruch Siach wrote:
> Hi Sam,
> 
> On Fri, May 08, 2015 at 02:27:48PM +1000, Sam Bobroff wrote:
>> diff --git a/package/librtas/librtas.mk b/package/librtas/librtas.mk
>> new file mode 100644
>> index 0000000..d13c876
>> --- /dev/null
>> +++ b/package/librtas/librtas.mk
>> @@ -0,0 +1,27 @@
>> +################################################################################
>> +#
>> +# librtas
>> +#
>> +################################################################################
>> +
>> +LIBRTAS_VERSION = 1.3.13
>> +LIBRTAS_SITE = http://downloads.sourceforge.net/project/librtas
>> +LIBRTAS_LICENSE = Common Public License Version 1.0
>> +LIBRTAS_LICENSE_FILES = COPYRIGHT
>> +LIBRTAS_INSTALL_STAGING = YES
>> +LIBRTAS_INSTALL_TARGET = YES
> 
> Not needed, this is the default.

OK.

> 
>> +
>> +define LIBRTAS_BUILD_CMDS
>> +	$(MAKE) -C $(@D) CC="$(TARGET_CC)" LD="$(TARGET_LD)"
>> +endef
>> +
>> +define LIBRTAS_INSTALL_STAGING_CMDS
>> +	$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
>> +endef
>> +
>> +define LIBRTAS_INSTALL_TARGET_CMDS
>> +	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
>> +endef
>> +
>> +
>> +$(eval $(generic-package))
>> diff --git a/package/librtas/missing-librtas.so.1.patch b/package/librtas/missing-librtas.so.1.patch
>> new file mode 100644
>> index 0000000..de21d66
>> --- /dev/null
>> +++ b/package/librtas/missing-librtas.so.1.patch
>> @@ -0,0 +1,11 @@
> 
> Please add your Sign-off here.

OK. Will do.

> 
>> +diff -purN librtas-1.3.12.orig/librtas_src/Makefile librtas-1.3.12/librtas_src/Makefile
>> +--- librtas-1.3.12.orig/librtas_src/Makefile	2015-04-09 10:45:19.772381633 +1000
>> ++++ librtas-1.3.12/librtas_src/Makefile	2015-04-09 10:45:57.968604762 +1000
>> +@@ -33,6 +33,7 @@ install:
>> + 	@$(call install_lib,$(LIBRTAS),$(DESTDIR))
>> + 	@$(call install_inc,$(HEADERS),$(DESTDIR))
>> + 	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME)
>> ++	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME).1
>> + 
>> + uninstall:
>> + 	@$(call uninstall_lib,$(LIBRTAS),$(DESTDIR))
> 

Thanks for the comments.

Sam.

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

* [Buildroot] [PATCH 1/2] librtas: new package
  2015-05-08  4:52   ` Baruch Siach
  2015-05-08  5:37     ` Sam Bobroff
@ 2015-05-08  7:42     ` Peter Korsgaard
  2015-05-10 23:58       ` Sam Bobroff
  2015-05-11  9:31       ` Thomas Petazzoni
  1 sibling, 2 replies; 14+ messages in thread
From: Peter Korsgaard @ 2015-05-08  7:42 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

Hi,

 >> diff --git a/package/librtas/missing-librtas.so.1.patch b/package/librtas/missing-librtas.so.1.patch
 >> new file mode 100644
 >> index 0000000..de21d66
 >> --- /dev/null
 >> +++ b/package/librtas/missing-librtas.so.1.patch
 >> @@ -0,0 +1,11 @@

 > Please add your Sign-off here.

And a description. Why is it needed, has the patch been sent upstream?
What is the status?

 >> +diff -purN librtas-1.3.12.orig/librtas_src/Makefile librtas-1.3.12/librtas_src/Makefile
 >> +--- librtas-1.3.12.orig/librtas_src/Makefile	2015-04-09 10:45:19.772381633 +1000
 >> ++++ librtas-1.3.12/librtas_src/Makefile	2015-04-09 10:45:57.968604762 +1000
 >> +@@ -33,6 +33,7 @@ install:
 >> + 	@$(call install_lib,$(LIBRTAS),$(DESTDIR))
 >> + 	@$(call install_inc,$(HEADERS),$(DESTDIR))
 >> + 	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME)
 >> ++	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME).1
 >> + 
 >> + uninstall:
 >> + 	@$(call uninstall_lib,$(LIBRTAS),$(DESTDIR))


-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/2] librtas: new package
  2015-05-08  7:42     ` Peter Korsgaard
@ 2015-05-10 23:58       ` Sam Bobroff
  2015-05-11  9:31       ` Thomas Petazzoni
  1 sibling, 0 replies; 14+ messages in thread
From: Sam Bobroff @ 2015-05-10 23:58 UTC (permalink / raw)
  To: buildroot

On 08/05/15 17:42, Peter Korsgaard wrote:
>>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
> 
> Hi,
> 
>  >> diff --git a/package/librtas/missing-librtas.so.1.patch b/package/librtas/missing-librtas.so.1.patch
>  >> new file mode 100644
>  >> index 0000000..de21d66
>  >> --- /dev/null
>  >> +++ b/package/librtas/missing-librtas.so.1.patch
>  >> @@ -0,0 +1,11 @@
> 
>  > Please add your Sign-off here.
> 
> And a description. Why is it needed, has the patch been sent upstream?
> What is the status?

OK, I'll add all that to the patch.

Thanks,

Sam.

>  >> +diff -purN librtas-1.3.12.orig/librtas_src/Makefile librtas-1.3.12/librtas_src/Makefile
>  >> +--- librtas-1.3.12.orig/librtas_src/Makefile	2015-04-09 10:45:19.772381633 +1000
>  >> ++++ librtas-1.3.12/librtas_src/Makefile	2015-04-09 10:45:57.968604762 +1000
>  >> +@@ -33,6 +33,7 @@ install:
>  >> + 	@$(call install_lib,$(LIBRTAS),$(DESTDIR))
>  >> + 	@$(call install_inc,$(HEADERS),$(DESTDIR))
>  >> + 	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME)
>  >> ++	@ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME).1
>  >> + 
>  >> + uninstall:
>  >> + 	@$(call uninstall_lib,$(LIBRTAS),$(DESTDIR))
> 
> 

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

* [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas
  2015-05-08  4:57   ` Baruch Siach
@ 2015-05-11  0:43     ` Sam Bobroff
  2015-05-11  4:34       ` Baruch Siach
  0 siblings, 1 reply; 14+ messages in thread
From: Sam Bobroff @ 2015-05-11  0:43 UTC (permalink / raw)
  To: buildroot

On 08/05/15 14:57, Baruch Siach wrote:
> Hi Sam,
> 
> On Fri, May 08, 2015 at 02:27:49PM +1000, Sam Bobroff wrote:
>> Now that librtas is available, remove --without-librtas and make the
>> rtas-dependant functions available.
>>
>> Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
>> ---
>>  package/powerpc-utils/Config.in        |    1 +
>>  package/powerpc-utils/powerpc-utils.mk |    3 +--
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/powerpc-utils/Config.in b/package/powerpc-utils/Config.in
>> index eded41e..a754899 100644
>> --- a/package/powerpc-utils/Config.in
>> +++ b/package/powerpc-utils/Config.in
>> @@ -2,6 +2,7 @@ config BR2_PACKAGE_POWERPC_UTILS
>>  	bool "powerpc-utils"
>>  	depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
>>  	select BR2_PACKAGE_ZLIB
>> +	select BR2_PACKAGE_LIBRTAS
>>  	help
>>  	  System utilities for PowerPC machines.
>>  
>> diff --git a/package/powerpc-utils/powerpc-utils.mk b/package/powerpc-utils/powerpc-utils.mk
>> index 3b30458..3fb9e24 100644
>> --- a/package/powerpc-utils/powerpc-utils.mk
>> +++ b/package/powerpc-utils/powerpc-utils.mk
>> @@ -6,11 +6,10 @@
>>  
>>  POWERPC_UTILS_VERSION = 1.2.24
>>  POWERPC_UTILS_SITE = http://downloads.sourceforge.net/project/powerpc-utils/powerpc-utils
>> -POWERPC_UTILS_DEPENDENCIES = zlib
>> +POWERPC_UTILS_DEPENDENCIES = zlib librtas
> 
> Why not make librtas an optional dependency? Something like:
> 
> ifeq ($(BR2_PACKAGE_LIBRTAS),y)
> POWERPC_UTILS_DEPENDENCIES += librtas
> POWERPC_UTILS_CONF_OPTS = --with-librtas
> else
> POWERPC_UTILS_CONF_OPTS = --without-librtas
> endif
> 
>>  POWERPC_UTILS_LICENSE = Common Public License Version 1.0
>>  POWERPC_UTILS_LICENSE_FILES = COPYRIGHT
>>  
>> -POWERPC_UTILS_CONF_OPTS = --without-librtas
>>  POWERPC_UTILS_CONF_ENV = \
>>  	ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no)
> 
> baruch
> 

Hi Baruch,

I thought about making it optional, but there seemed to be two reasons
to always include it:

* librtas is a small library and it provides a lot of functionality to
powerpc-utils. Why leave it out?

* Distros (AFAIK) always include librtas when providing powerpc-utils,
so it would surprise users to provide a powerpc-utils without it by
default. So if I did make it optional, I think it should be using some
method that caused librtas to be included by default or at least
provided some indication in the menu that they may want to go and enable
librtas. Then I thought this was a bit complicated for a use case that I
couldn't find a reason for.

That said, if you have a reason to make it optional I'll be happy to
make it so. Maybe using a sub-option to add the dependency, and that
could default to yes?

e.g.

[*] powerpc-utils
	[*] RTAS functionality

Cheers,
Sam.

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

* [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas
  2015-05-11  0:43     ` Sam Bobroff
@ 2015-05-11  4:34       ` Baruch Siach
  2015-05-11  5:53         ` Sam Bobroff
  0 siblings, 1 reply; 14+ messages in thread
From: Baruch Siach @ 2015-05-11  4:34 UTC (permalink / raw)
  To: buildroot

Hi Sam,

On Mon, May 11, 2015 at 10:43:27AM +1000, Sam Bobroff wrote:
> On 08/05/15 14:57, Baruch Siach wrote:
> > On Fri, May 08, 2015 at 02:27:49PM +1000, Sam Bobroff wrote:
> >> -POWERPC_UTILS_DEPENDENCIES = zlib
> >> +POWERPC_UTILS_DEPENDENCIES = zlib librtas
> > 
> > Why not make librtas an optional dependency? Something like:
> > 
> > ifeq ($(BR2_PACKAGE_LIBRTAS),y)
> > POWERPC_UTILS_DEPENDENCIES += librtas
> > POWERPC_UTILS_CONF_OPTS = --with-librtas
> > else
> > POWERPC_UTILS_CONF_OPTS = --without-librtas
> > endif
> 
> I thought about making it optional, but there seemed to be two reasons
> to always include it:
> 
> * librtas is a small library and it provides a lot of functionality to
> powerpc-utils. Why leave it out?
> 
> * Distros (AFAIK) always include librtas when providing powerpc-utils,
> so it would surprise users to provide a powerpc-utils without it by
> default. So if I did make it optional, I think it should be using some
> method that caused librtas to be included by default or at least
> provided some indication in the menu that they may want to go and enable
> librtas. Then I thought this was a bit complicated for a use case that I
> couldn't find a reason for.

These are valid reasons. What is the target installed size of librtas compared 
to powerpc-utils?

> That said, if you have a reason to make it optional I'll be happy to
> make it so. Maybe using a sub-option to add the dependency, and that
> could default to yes?
> 
> e.g.
> 
> [*] powerpc-utils
> 	[*] RTAS functionality

Sounds reasonable to me. Let's see what others think.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas
  2015-05-11  4:34       ` Baruch Siach
@ 2015-05-11  5:53         ` Sam Bobroff
  2015-05-11  6:00           ` Baruch Siach
  0 siblings, 1 reply; 14+ messages in thread
From: Sam Bobroff @ 2015-05-11  5:53 UTC (permalink / raw)
  To: buildroot

On Mon, May 11, 2015 at 07:34:45AM +0300, Baruch Siach wrote:
> Hi Sam,
> 
> On Mon, May 11, 2015 at 10:43:27AM +1000, Sam Bobroff wrote:
> > On 08/05/15 14:57, Baruch Siach wrote:
> > > On Fri, May 08, 2015 at 02:27:49PM +1000, Sam Bobroff wrote:
> > >> -POWERPC_UTILS_DEPENDENCIES = zlib
> > >> +POWERPC_UTILS_DEPENDENCIES = zlib librtas
> > > 
> > > Why not make librtas an optional dependency? Something like:
> > > 
> > > ifeq ($(BR2_PACKAGE_LIBRTAS),y)
> > > POWERPC_UTILS_DEPENDENCIES += librtas
> > > POWERPC_UTILS_CONF_OPTS = --with-librtas
> > > else
> > > POWERPC_UTILS_CONF_OPTS = --without-librtas
> > > endif
> > 
> > I thought about making it optional, but there seemed to be two reasons
> > to always include it:
> > 
> > * librtas is a small library and it provides a lot of functionality to
> > powerpc-utils. Why leave it out?
> > 
> > * Distros (AFAIK) always include librtas when providing powerpc-utils,
> > so it would surprise users to provide a powerpc-utils without it by
> > default. So if I did make it optional, I think it should be using some
> > method that caused librtas to be included by default or at least
> > provided some indication in the menu that they may want to go and enable
> > librtas. Then I thought this was a bit complicated for a use case that I
> > couldn't find a reason for.
> 
> These are valid reasons. What is the target installed size of librtas compared 
> to powerpc-utils?

This might be a bit rough but it looks like:

* librtas: 360Kb
* powerpc-utils with librtas: 1,660Kb
.. for a total of  2020Kb

* powerpc-utils without librtas: 484Kb

So it looks like the increase is about 1.5Mb (or 3x, depending on how you look
at it).

> > That said, if you have a reason to make it optional I'll be happy to
> > make it so. Maybe using a sub-option to add the dependency, and that
> > could default to yes?
> > 
> > e.g.
> > 
> > [*] powerpc-utils
> > 	[*] RTAS functionality
> 
> Sounds reasonable to me. Let's see what others think.
> 
> baruch
> 
> -- 
>      http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas
  2015-05-11  5:53         ` Sam Bobroff
@ 2015-05-11  6:00           ` Baruch Siach
  2015-05-11  7:56             ` Peter Korsgaard
  0 siblings, 1 reply; 14+ messages in thread
From: Baruch Siach @ 2015-05-11  6:00 UTC (permalink / raw)
  To: buildroot

Hi Sam,

On Mon, May 11, 2015 at 03:53:03PM +1000, Sam Bobroff wrote:
> On Mon, May 11, 2015 at 07:34:45AM +0300, Baruch Siach wrote:
> > On Mon, May 11, 2015 at 10:43:27AM +1000, Sam Bobroff wrote:
> > > On 08/05/15 14:57, Baruch Siach wrote:
> > > > Why not make librtas an optional dependency?
> > > 
> > > I thought about making it optional, but there seemed to be two reasons
> > > to always include it:
> > > 
> > > * librtas is a small library and it provides a lot of functionality to
> > > powerpc-utils. Why leave it out?
> > > 
> > > * Distros (AFAIK) always include librtas when providing powerpc-utils,
> > > so it would surprise users to provide a powerpc-utils without it by
> > > default. So if I did make it optional, I think it should be using some
> > > method that caused librtas to be included by default or at least
> > > provided some indication in the menu that they may want to go and enable
> > > librtas. Then I thought this was a bit complicated for a use case that I
> > > couldn't find a reason for.
> > 
> > These are valid reasons. What is the target installed size of librtas compared 
> > to powerpc-utils?
> 
> This might be a bit rough but it looks like:
> 
> * librtas: 360Kb
> * powerpc-utils with librtas: 1,660Kb
> .. for a total of  2020Kb
> 
> * powerpc-utils without librtas: 484Kb
> 
> So it looks like the increase is about 1.5Mb (or 3x, depending on how you look
> at it).

This is a significant increase. In this case I think it is best to give the 
user an explicit option like you suggested. Mentioning these numbers in the 
option help text should also be useful, I guess.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas
  2015-05-11  6:00           ` Baruch Siach
@ 2015-05-11  7:56             ` Peter Korsgaard
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2015-05-11  7:56 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

Hi,

>> > These are valid reasons. What is the target installed size of librtas compared 
 >> > to powerpc-utils?
 >> 
 >> This might be a bit rough but it looks like:
 >> 
 >> * librtas: 360Kb
 >> * powerpc-utils with librtas: 1,660Kb
 >> .. for a total of  2020Kb
 >> 
 >> * powerpc-utils without librtas: 484Kb
 >> 
 >> So it looks like the increase is about 1.5Mb (or 3x, depending on how you look
 >> at it).

 > This is a significant increase. In this case I think it is best to give the 
 > user an explicit option like you suggested. Mentioning these numbers in the 
 > option help text should also be useful, I guess.

Yes, I agree for such a big increase in size.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/2] librtas: new package
  2015-05-08  7:42     ` Peter Korsgaard
  2015-05-10 23:58       ` Sam Bobroff
@ 2015-05-11  9:31       ` Thomas Petazzoni
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2015-05-11  9:31 UTC (permalink / raw)
  To: buildroot

Dear Peter Korsgaard,

On Fri, 08 May 2015 09:42:27 +0200, Peter Korsgaard wrote:

>  >> diff --git a/package/librtas/missing-librtas.so.1.patch b/package/librtas/missing-librtas.so.1.patch
>  >> new file mode 100644
>  >> index 0000000..de21d66
>  >> --- /dev/null
>  >> +++ b/package/librtas/missing-librtas.so.1.patch
>  >> @@ -0,0 +1,11 @@
> 
>  > Please add your Sign-off here.
> 
> And a description. Why is it needed, has the patch been sent upstream?
> What is the status?

And patch should be named 0001-<foo>.patch.

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

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

end of thread, other threads:[~2015-05-11  9:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-08  4:27 [Buildroot] [PATCH 0/2] Improve powerpc-utils with librtas Sam Bobroff
2015-05-08  4:27 ` [Buildroot] [PATCH 1/2] librtas: new package Sam Bobroff
2015-05-08  4:52   ` Baruch Siach
2015-05-08  5:37     ` Sam Bobroff
2015-05-08  7:42     ` Peter Korsgaard
2015-05-10 23:58       ` Sam Bobroff
2015-05-11  9:31       ` Thomas Petazzoni
2015-05-08  4:27 ` [Buildroot] [PATCH 2/2] powerpc-utils: remove --without-librtas Sam Bobroff
2015-05-08  4:57   ` Baruch Siach
2015-05-11  0:43     ` Sam Bobroff
2015-05-11  4:34       ` Baruch Siach
2015-05-11  5:53         ` Sam Bobroff
2015-05-11  6:00           ` Baruch Siach
2015-05-11  7:56             ` Peter Korsgaard

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