From c08ca9353fabb595de1011cf9d6db6ff6cc06ce3 Mon Sep 17 00:00:00 2001 From: Fan Xin Date: Mon, 5 Jun 2017 13:51:10 +0900 Subject: acpica: Upgrade 20150515 -> 20170303 1. Upgrade acpica from 20150515 to 20170303 2. Rebase the patch file for 20170303 Signed-off-by: Fan Xin Signed-off-by: Ross Burton --- meta/recipes-extended/acpica/acpica_20150515.bb | 49 ------------------- meta/recipes-extended/acpica/acpica_20170303.bb | 49 +++++++++++++++++++ .../files/manipulate-fds-instead-of-FILE.patch | 57 +++++++++++----------- 3 files changed, 78 insertions(+), 77 deletions(-) delete mode 100644 meta/recipes-extended/acpica/acpica_20150515.bb create mode 100644 meta/recipes-extended/acpica/acpica_20170303.bb diff --git a/meta/recipes-extended/acpica/acpica_20150515.bb b/meta/recipes-extended/acpica/acpica_20150515.bb deleted file mode 100644 index 1326ebd59e..0000000000 --- a/meta/recipes-extended/acpica/acpica_20150515.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "ACPICA tools for the development and debug of ACPI tables" -DESCRIPTION = "The ACPI Component Architecture (ACPICA) project provides an \ -OS-independent reference implementation of the Advanced Configuration and \ -Power Interface Specification (ACPI). ACPICA code contains those portions of \ -ACPI meant to be directly integrated into the host OS as a kernel-resident \ -subsystem, and a small set of tools to assist in developing and debugging \ -ACPI tables." - -HOMEPAGE = "http://www.acpica.org/" -SECTION = "console/tools" - -LICENSE = "BSD | GPLv2" -LIC_FILES_CHKSUM = "file://generate/unix/readme.txt;md5=204407e197c1a01154a48f6c6280c3aa" - -COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" - -DEPENDS = "bison flex" - -SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \ - file://no-werror.patch \ - file://rename-yy_scan_string-manually.patch \ - file://manipulate-fds-instead-of-FILE.patch \ - " -SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c" -SRC_URI[sha256sum] = "61204ec56d71bc9bfa2ee2ade4c66f7e8541772ac72ef8ccc20b3f339cc96374" -UPSTREAM_CHECK_URI = "https://acpica.org/downloads" - -S = "${WORKDIR}/acpica-unix2-${PV}" - -EXTRA_OEMAKE = "CC='${CC}' 'OPT_CFLAGS=-Wall'" - -do_install() { - install -D -p -m0755 generate/unix/bin*/iasl ${D}${bindir}/iasl - install -D -p -m0755 generate/unix/bin*/acpibin ${D}${bindir}/acpibin - install -D -p -m0755 generate/unix/bin*/acpiexec ${D}${bindir}/acpiexec - install -D -p -m0755 generate/unix/bin*/acpihelp ${D}${bindir}/acpihelp - install -D -p -m0755 generate/unix/bin*/acpinames ${D}${bindir}/acpinames - install -D -p -m0755 generate/unix/bin*/acpisrc ${D}${bindir}/acpisrc - install -D -p -m0755 generate/unix/bin*/acpixtract ${D}${bindir}/acpixtract -} - -# iasl*.bb is a subset of this recipe, so RREPLACE it -PROVIDES = "iasl" -RPROVIDES_${PN} += "iasl" -RREPLACES_${PN} += "iasl" -RCONFLIGHTS_${PN} += "iasl" - -NATIVE_INSTALL_WORKS = "1" -BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/acpica/acpica_20170303.bb b/meta/recipes-extended/acpica/acpica_20170303.bb new file mode 100644 index 0000000000..12dfc6da3f --- /dev/null +++ b/meta/recipes-extended/acpica/acpica_20170303.bb @@ -0,0 +1,49 @@ +SUMMARY = "ACPICA tools for the development and debug of ACPI tables" +DESCRIPTION = "The ACPI Component Architecture (ACPICA) project provides an \ +OS-independent reference implementation of the Advanced Configuration and \ +Power Interface Specification (ACPI). ACPICA code contains those portions of \ +ACPI meant to be directly integrated into the host OS as a kernel-resident \ +subsystem, and a small set of tools to assist in developing and debugging \ +ACPI tables." + +HOMEPAGE = "http://www.acpica.org/" +SECTION = "console/tools" + +LICENSE = "BSD | GPLv2" +LIC_FILES_CHKSUM = "file://generate/unix/readme.txt;md5=204407e197c1a01154a48f6c6280c3aa" + +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" + +DEPENDS = "bison flex" + +SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \ + file://no-werror.patch \ + file://rename-yy_scan_string-manually.patch \ + file://manipulate-fds-instead-of-FILE.patch;striplevel=2 \ + " +SRC_URI[md5sum] = "48ef4314fb4ffdd0c96f14dcf20544e1" +SRC_URI[sha256sum] = "b2d81e84107ac9a02be86ea43cbea7afa8fd4b4150270bc88c2d4c9fea0b8aad" +UPSTREAM_CHECK_URI = "https://acpica.org/downloads" + +S = "${WORKDIR}/acpica-unix2-${PV}" + +EXTRA_OEMAKE = "CC='${CC}' 'OPT_CFLAGS=-Wall'" + +do_install() { + install -D -p -m0755 generate/unix/bin*/iasl ${D}${bindir}/iasl + install -D -p -m0755 generate/unix/bin*/acpibin ${D}${bindir}/acpibin + install -D -p -m0755 generate/unix/bin*/acpiexec ${D}${bindir}/acpiexec + install -D -p -m0755 generate/unix/bin*/acpihelp ${D}${bindir}/acpihelp + install -D -p -m0755 generate/unix/bin*/acpinames ${D}${bindir}/acpinames + install -D -p -m0755 generate/unix/bin*/acpisrc ${D}${bindir}/acpisrc + install -D -p -m0755 generate/unix/bin*/acpixtract ${D}${bindir}/acpixtract +} + +# iasl*.bb is a subset of this recipe, so RREPLACE it +PROVIDES = "iasl" +RPROVIDES_${PN} += "iasl" +RREPLACES_${PN} += "iasl" +RCONFLIGHTS_${PN} += "iasl" + +NATIVE_INSTALL_WORKS = "1" +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch b/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch index 6944bb7aa0..5610ed9beb 100644 --- a/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch +++ b/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch @@ -1,6 +1,6 @@ -From 33a57979738e5ab13950ec1c0e7298e41ef50929 Mon Sep 17 00:00:00 2001 -From: Patrick Ohly -Date: Thu, 23 Feb 2017 18:10:47 +0100 +From 69171c22f3872ecb4c1ab27985e93ca44084595e Mon Sep 17 00:00:00 2001 +From: Fan Xin +Date: Mon, 5 Jun 2017 13:26:38 +0900 Subject: [PATCH] aslfiles.c: manipulate fds instead of FILE Copying what stdout/stderr point to is not portable and fails with @@ -12,60 +12,61 @@ writes into. This works on the platforms that Yocto targets. Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Patrick Ohly + +Rebase on acpica 20170303 + +Signed-off-by: Fan Xin --- - source/compiler/aslfiles.c | 20 +++++++++++--------- - 1 file changed, 11 insertions(+), 9 deletions(-) + acpica-unix2-20170303/source/compiler/aslfiles.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) -diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c -index 947e465..7a352b4 100644 ---- a/source/compiler/aslfiles.c -+++ b/source/compiler/aslfiles.c -@@ -44,6 +44,11 @@ +diff --git a/acpica-unix2-20170303/source/compiler/aslfiles.c b/acpica-unix2-20170303/source/compiler/aslfiles.c +index 809090c..97898b1 100644 +--- a/acpica-unix2-20170303/source/compiler/aslfiles.c ++++ b/acpica-unix2-20170303/source/compiler/aslfiles.c +@@ -44,6 +44,10 @@ #include "aslcompiler.h" #include "acapps.h" - + #include "dtcompiler.h" +#include +#include +#include +#include -+ + #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslfiles") - -@@ -569,6 +574,8 @@ FlOpenMiscOutputFiles ( +@@ -607,6 +611,8 @@ FlOpenMiscOutputFiles ( if (Gbl_DebugFlag) { -+ int fd; ++ int fd; + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG); if (!Filename) { -@@ -582,20 +589,15 @@ FlOpenMiscOutputFiles ( - /* TBD: hide this behind a FlReopenFile function */ +@@ -618,10 +624,10 @@ FlOpenMiscOutputFiles ( + /* Open the debug file as STDERR, text mode */ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename; - Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = - freopen (Filename, "w+t", stderr); -- + - if (!Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle) + fd = open(Filename, O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); + if (fd < 0 || + dup2(fd, fileno(stderr))) { -- /* -- * A problem with freopen is that on error, -- * we no longer have stderr. -- */ - Gbl_DebugFlag = FALSE; -- memcpy (stderr, stdout, sizeof (FILE)); - FlFileError (ASL_FILE_DEBUG_OUTPUT, ASL_MSG_DEBUG_FILENAME); - AslAbort (); + /* + * A problem with freopen is that on error, we no longer +@@ -635,6 +641,8 @@ FlOpenMiscOutputFiles ( + exit (1); } -+ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = stderr; ++ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = stderr; ++ AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT); AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT); + } -- -2.1.4 +1.9.1 -- cgit 1.2.3-korg