Skip to contentSkip to conversation

acpitool: new package

PATCH New Erico Nunes 3 participants 7 messages Mar 26, 2016 – Jul 3, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 acpitool: new package

acpitool is a small, convenient command-line ACPI client.

---
 package/Config.in              |  1 +
 package/acpitool/Config.in     | 11 +++++++++++
 package/acpitool/acpitool.hash |  2 ++
 package/acpitool/acpitool.mk   | 13 +++++++++++++
 4 files changed, 27 insertions(+)
 create mode 100644 package/acpitool/Config.in
 create mode 100644 package/acpitool/acpitool.hash
 create mode 100644 package/acpitool/acpitool.mk
package/Config.in +1 -0
index 1467f33..cca553c 100644
@@ -340,6 +340,7 @@ menu "Firmware"
 endmenu
 	source "package/a10disp/Config.in"
 	source "package/acpid/Config.in"
+	source "package/acpitool/Config.in"
 	source "package/am335x-pru-package/Config.in"
 	source "package/avrdude/Config.in"
 	source "package/bcache-tools/Config.in"
package/acpitool/Config.in new file +11 -0
new file mode 100644
index 0000000..7992e0f
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_ACPITOOL
+	bool "acpitool"
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  A small, convenient command-line ACPI client with a lot of
+	  features for Linux
+
+	  http://acpitool.sourceforge.net
+
+comment "acpitool needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
package/acpitool/acpitool.hash new file +2 -0
new file mode 100644
index 0000000..e25dc54
@@ -0,0 +1,2 @@
+# locally computed hash
+sha256 004fb6cd43102918b6302cf537a2db7ceadda04aef2e0906ddf230f820dad34f acpitool-0.5.1.tar.bz2
package/acpitool/acpitool.mk new file +13 -0
new file mode 100644
index 0000000..f663fbb
@@ -0,0 +1,13 @@
+################################################################################
+#
+# acpitool
+#
+################################################################################
+
+ACPITOOL_VERSION = 0.5.1
+ACPITOOL_SOURCE = acpitool-$(ACPITOOL_VERSION).tar.bz2
+ACPITOOL_SITE = http://downloads.sourceforge.net/sourceforge/acpitool
+ACPITOOL_LICENSE = GPLv2+
+ACPITOOL_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 acpica: new package

The ACPI Component Architecture (ACPICA) project provides an operating system (OS)-independent reference implementation of the Advanced Configuration and Power Interface Specification (ACPI).

It contains tools such as acpidump, iasl, acpixtract, etc.

The only issue that has been found is that it used uname to determine the architecture for the target, and this has been worked around by putting the target architecture directly instead.

---
 package/Config.in          |  1 +
 package/acpica/Config.in   |  9 +++++++++
 package/acpica/acpica.hash |  2 ++
 package/acpica/acpica.mk   | 26 ++++++++++++++++++++++++++
 4 files changed, 38 insertions(+)
 create mode 100644 package/acpica/Config.in
 create mode 100644 package/acpica/acpica.hash
 create mode 100644 package/acpica/acpica.mk
package/Config.in +1 -0
index cca553c..6a283eb 100644
@@ -339,6 +339,7 @@ menu "Firmware"
 	source "package/zd1211-firmware/Config.in"
 endmenu
 	source "package/a10disp/Config.in"
+	source "package/acpica/Config.in"
 	source "package/acpid/Config.in"
 	source "package/acpitool/Config.in"
 	source "package/am335x-pru-package/Config.in"
package/acpica/Config.in new file +9 -0
new file mode 100644
index 0000000..8c33d0f
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_ACPICA
+	bool "acpica"
+	help
+	  The ACPI Component Architecture (ACPICA) project provides an
+	  operating system (OS)-independent reference implementation of
+	  the Advanced Configuration and Power Interface Specification
+	  (ACPI).
+
+	  https://www.acpica.org
package/acpica/acpica.hash new file +2 -0
new file mode 100644
index 0000000..2798792
@@ -0,0 +1,2 @@
+# locally computed hash
+sha256 c0c68c7a8e9b1f4f66895b5950023042cb8e619fd92dab288010c8bd023d3270 acpica-unix2-20160212.tar.gz
package/acpica/acpica.mk new file +26 -0
new file mode 100644
index 0000000..40ba009
@@ -0,0 +1,26 @@
+################################################################################
+#
+# acpica
+#
+################################################################################
+
+ACPICA_VERSION = 20160212
+ACPICA_SOURCE = acpica-unix2-$(ACPICA_VERSION).tar.gz
+ACPICA_SITE = https://acpica.org/sites/acpica/files
+ACPICA_LICENSE = GPLv2
+ACPICA_LICENSE_FILES = source/include/acpi.h
+ACPICA_DEPENDENCIES = host-bison host-flex
+
+define ACPICA_CONFIGURE_CMDS
+	$(SED) 's/uname -m/echo $(TARGET_ARCH)/' $(@D)/generate/unix/Makefile.common
+endef
+
+define ACPICA_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) HOST=_LINUX CC=$(TARGET_CC) all
+endef
+
+define ACPICA_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 acpica: new package

Hi Erico,

Le 26/03/2016 ? 19:26, Erico Nunes a ?crit :

Quoted 62 lines

The ACPI Component Architecture (ACPICA) project provides an operating system (OS)-independent reference implementation of the Advanced Configuration and Power Interface Specification (ACPI).

It contains tools such as acpidump, iasl, acpixtract, etc.

The only issue that has been found is that it used uname to determine the architecture for the target, and this has been worked around by putting the target architecture directly instead.

---
 package/Config.in          |  1 +
 package/acpica/Config.in   |  9 +++++++++
 package/acpica/acpica.hash |  2 ++
 package/acpica/acpica.mk   | 26 ++++++++++++++++++++++++++
 4 files changed, 38 insertions(+)
 create mode 100644 package/acpica/Config.in
 create mode 100644 package/acpica/acpica.hash
 create mode 100644 package/acpica/acpica.mk
package/Config.in +1 -0
index cca553c..6a283eb 100644
@@ -339,6 +339,7 @@ menu "Firmware"
 	source "package/zd1211-firmware/Config.in"
 endmenu
 	source "package/a10disp/Config.in"
+	source "package/acpica/Config.in"
 	source "package/acpid/Config.in"
 	source "package/acpitool/Config.in"
 	source "package/am335x-pru-package/Config.in"
package/acpica/Config.in new file +9 -0
new file mode 100644
index 0000000..8c33d0f
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_ACPICA
+	bool "acpica"
+	help
+	  The ACPI Component Architecture (ACPICA) project provides an
+	  operating system (OS)-independent reference implementation of
+	  the Advanced Configuration and Power Interface Specification
+	  (ACPI).
+
+	  https://www.acpica.org
package/acpica/acpica.hash new file +2 -0
new file mode 100644
index 0000000..2798792
@@ -0,0 +1,2 @@
+# locally computed hash
+sha256 c0c68c7a8e9b1f4f66895b5950023042cb8e619fd92dab288010c8bd023d3270 acpica-unix2-20160212.tar.gz
package/acpica/acpica.mk new file +0 -0
new file mode 100644
index 0000000..40ba009

package/acpica/acpica.mk line 10

Quoted 10 lines
package/acpica/acpica.mk new file +10 -0
@@ -0,0 +1,26 @@
+################################################################################
+#
+# acpica
+#
+################################################################################
+
+ACPICA_VERSION = 20160212
+ACPICA_SOURCE = acpica-unix2-$(ACPICA_VERSION).tar.gz
+ACPICA_SITE = https://acpica.org/sites/acpica/files
+ACPICA_LICENSE = GPLv2

The license seems to be a BSD like or GPLv2

Quoted 4 lines
package/acpica/acpica.mk new file +4 -0
+ACPICA_LICENSE_FILES = source/include/acpi.h
+ACPICA_DEPENDENCIES = host-bison host-flex
+
+define ACPICA_CONFIGURE_CMDS

package/acpica/acpica.mk line 24

Quoted 10 lines
package/acpica/acpica.mk new file +10 -0
+	$(SED) 's/uname -m/echo $(TARGET_ARCH)/' $(@D)/generate/unix/Makefile.common
+endef
+
+define ACPICA_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) HOST=_LINUX CC=$(TARGET_CC) all
+endef
+
+define ACPICA_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef

Maybe you can use TARGET_CONFIGURE_OPTS like as Peter suggested in [1]

With that fixed:

Build tested with musl, uclibc and static build.

[1]
https://git.busybox.net/buildroot/commit/?id=6d2cb12d5f544a5fd24b14326e85901dfeaf3d31

Best regards,
Romain Naour

Quoted 3 lines
package/acpica/acpica.mk new file +2 -0
+
+$(eval $(generic-package))
#3 lore raw

PATCH 2/2 acpica: new package

Hi Romain,

thank you very much for your review and testing.

Quoted 1 line · Romain Naour

The license seems to be a BSD like or GPLv2

I've look again and indeed it looks like a dual license, I'll update accordingly.

Quoted 1 line

Maybe you can use TARGET_CONFIGURE_OPTS like as Peter suggested in [1]

Ok. By the way, during some more testing after your comment, I've found that it builds without errors but fails to install on non-x86_64 architectures due to the use of "install -s" (install fails attempting to use 'strip' from the host on other architectures).

I'll have that fixed too in a v2.

Thank you

Erico

#4 lore raw

PATCH 2/2 acpica: new package

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Erico" == Erico Nunes <[email protected]> writes:

Hi Romain,
thank you very much for your review and testing.

Quoted 1 line · Romain Naour

The license seems to be a BSD like or GPLv2

I've look again and indeed it looks like a dual license, I'll update accordingly.

Quoted 8 lines
Quoted 1 line

Maybe you can use TARGET_CONFIGURE_OPTS like as Peter suggested in [1]

Ok. By the way, during some more testing after your comment, I've found that it builds without errors but fails to install on non-x86_64 architectures due to the use of "install -s" (install fails attempting to use 'strip' from the host on other architectures).

I'll have that fixed too in a v2.

Ok. Don't forget to send the v2 patch. I'll mark this patch as changes requested in patchwork.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/2 acpitool: new package

In reply to Erico Nunes

Hi Erico,

Le 26/03/2016 ? 19:26, Erico Nunes a ?crit :

Quoted 1 line

acpitool is a small, convenient command-line ACPI client.

Checked the license and license file.

Build tested with musl, uclibc and static build.

Best regards,
Romain Naour

Quoted 69 lines
---
 package/Config.in              |  1 +
 package/acpitool/Config.in     | 11 +++++++++++
 package/acpitool/acpitool.hash |  2 ++
 package/acpitool/acpitool.mk   | 13 +++++++++++++
 4 files changed, 27 insertions(+)
 create mode 100644 package/acpitool/Config.in
 create mode 100644 package/acpitool/acpitool.hash
 create mode 100644 package/acpitool/acpitool.mk
package/Config.in +1 -0
index 1467f33..cca553c 100644
@@ -340,6 +340,7 @@ menu "Firmware"
 endmenu
 	source "package/a10disp/Config.in"
 	source "package/acpid/Config.in"
+	source "package/acpitool/Config.in"
 	source "package/am335x-pru-package/Config.in"
 	source "package/avrdude/Config.in"
 	source "package/bcache-tools/Config.in"
package/acpitool/Config.in new file +11 -0
new file mode 100644
index 0000000..7992e0f
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_ACPITOOL
+	bool "acpitool"
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  A small, convenient command-line ACPI client with a lot of
+	  features for Linux
+
+	  http://acpitool.sourceforge.net
+
+comment "acpitool needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
package/acpitool/acpitool.hash new file +2 -0
new file mode 100644
index 0000000..e25dc54
@@ -0,0 +1,2 @@
+# locally computed hash
+sha256 004fb6cd43102918b6302cf537a2db7ceadda04aef2e0906ddf230f820dad34f acpitool-0.5.1.tar.bz2
package/acpitool/acpitool.mk new file +13 -0
new file mode 100644
index 0000000..f663fbb
@@ -0,0 +1,13 @@
+################################################################################
+#
+# acpitool
+#
+################################################################################
+
+ACPITOOL_VERSION = 0.5.1
+ACPITOOL_SOURCE = acpitool-$(ACPITOOL_VERSION).tar.bz2
+ACPITOOL_SITE = http://downloads.sourceforge.net/sourceforge/acpitool
+ACPITOOL_LICENSE = GPLv2+
+ACPITOOL_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
#6 lore raw

PATCH 1/2 acpitool: new package

In reply to Erico Nunes
Quoted 32 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Erico" == Erico Nunes <[email protected]> writes:

acpitool is a small, convenient command-line ACPI client.

---
 package/Config.in              |  1 +
 package/acpitool/Config.in     | 11 +++++++++++
 package/acpitool/acpitool.hash |  2 ++
 package/acpitool/acpitool.mk   | 13 +++++++++++++
 4 files changed, 27 insertions(+)
 create mode 100644 package/acpitool/Config.in
 create mode 100644 package/acpitool/acpitool.hash
 create mode 100644 package/acpitool/acpitool.mk
package/Config.in +1 -0
index 1467f33..cca553c 100644
@@ -340,6 +340,7 @@ menu "Firmware"
 endmenu
 	source "package/a10disp/Config.in"
 	source "package/acpid/Config.in"
+	source "package/acpitool/Config.in"
 	source "package/am335x-pru-package/Config.in"
 	source "package/avrdude/Config.in"
 	source "package/bcache-tools/Config.in"
package/acpitool/Config.in new file +0 -0
new file mode 100644
index 0000000..7992e0f

package/acpitool/Config.in line 3

Quoted 3 lines
package/acpitool/Config.in new file +3 -0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_ACPITOOL
+	bool "acpitool"
+	depends on BR2_INSTALL_LIBSTDCPP

I was hessitating if we needed some architecture dependencies as this uses the /proc/acpi kernel interface which is only available on x86/ia64/arm64 - But as this is only a runtime dependency I left it as is.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard