diff mbox

[2/2] acpica: new package

Message ID 1459016777-27952-2-git-send-email-nunes.erico@gmail.com
State Superseded
Headers show

Commit Message

Erico Nunes March 26, 2016, 6:26 p.m. UTC
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.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
---
 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

Comments

Romain Naour July 2, 2016, 9:54 a.m. UTC | #1
Hi Erico,

Le 26/03/2016 à 19:26, Erico Nunes a écrit :
> 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.
> 
> Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
> ---
>  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
> 
> diff --git a/package/Config.in b/package/Config.in
> index cca553c..6a283eb 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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"
> diff --git a/package/acpica/Config.in b/package/acpica/Config.in
> new file mode 100644
> index 0000000..8c33d0f
> --- /dev/null
> +++ b/package/acpica/Config.in
> @@ -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
> diff --git a/package/acpica/acpica.hash b/package/acpica/acpica.hash
> new file mode 100644
> index 0000000..2798792
> --- /dev/null
> +++ b/package/acpica/acpica.hash
> @@ -0,0 +1,2 @@
> +# locally computed hash
> +sha256 c0c68c7a8e9b1f4f66895b5950023042cb8e619fd92dab288010c8bd023d3270 acpica-unix2-20160212.tar.gz
> diff --git a/package/acpica/acpica.mk b/package/acpica/acpica.mk
> new file mode 100644
> index 0000000..40ba009
> --- /dev/null
> +++ b/package/acpica/acpica.mk
> @@ -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

> +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

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

With that fixed:
  Reviewed-by: Romain Naour <romain.naour@gmail.com>

Build tested with musl, uclibc and static build.
Tested-by: Romain Naour <romain.naour@gmail.com>

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

Best regards,
Romain Naour

> +
> +$(eval $(generic-package))
>
Erico Nunes July 2, 2016, 10:45 a.m. UTC | #2
Hi Romain,

thank you very much for your review and testing.

On Sat, Jul 2, 2016 at 11:54 AM, Romain Naour <romain.naour@smile.fr> wrote:
> 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.

> 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
Peter Korsgaard July 3, 2016, 8:15 a.m. UTC | #3
>>>>> "Erico" == Erico Nunes <nunes.erico@gmail.com> writes:

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

 > On Sat, Jul 2, 2016 at 11:54 AM, Romain Naour <romain.naour@smile.fr> wrote:
 >> 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.

 >> 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.
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index cca553c..6a283eb 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/acpica/Config.in b/package/acpica/Config.in
new file mode 100644
index 0000000..8c33d0f
--- /dev/null
+++ b/package/acpica/Config.in
@@ -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
diff --git a/package/acpica/acpica.hash b/package/acpica/acpica.hash
new file mode 100644
index 0000000..2798792
--- /dev/null
+++ b/package/acpica/acpica.hash
@@ -0,0 +1,2 @@ 
+# locally computed hash
+sha256 c0c68c7a8e9b1f4f66895b5950023042cb8e619fd92dab288010c8bd023d3270 acpica-unix2-20160212.tar.gz
diff --git a/package/acpica/acpica.mk b/package/acpica/acpica.mk
new file mode 100644
index 0000000..40ba009
--- /dev/null
+++ b/package/acpica/acpica.mk
@@ -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))