Ports: Add ACPICA tools port

This commit is contained in:
Liav A 2022-05-27 10:32:57 +03:00 committed by Linus Groh
parent 3667d7e93c
commit d1c9089fcd
5 changed files with 81 additions and 0 deletions

View file

@ -6,6 +6,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| Port | Name | Version | Website |
|-----------------------------------------------------|-----------------------------------------------------------------|--------------------------|--------------------------------------------------------------------------------|
| [`acpica-tools`](acpica-tools/) | ACPI Component Architecture Project Userspace Utilities | 20220331 | https://acpica.org/downloads |
| [`Another-World`](Another-World/) | Another World Bytecode Interpreter | | https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter |
| [`angband`](angband/) | Angband | 4.2.4 | https://rephial.org |
| [`bash`](bash/) | GNU Bash | 5.1.16 | https://www.gnu.org/software/bash/ |

16
Ports/acpica-tools/package.sh Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=acpica-tools
version=20220331
workdir="acpica-unix-${version}"
auth_type=sha256
files="https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz acpica-unix-${version}.tar.gz acaff68b14f1e0804ebbfc4b97268a4ccbefcfa053b02ed9924f2b14d8a98e21"
build() {
run make iasl
run make acpixtract
# FIXME: Make "run make acpiexec" to work
run make acpihelp
run make acpisrc
run make acpibin
}

View file

@ -0,0 +1,25 @@
From bf6a3c66f9f4a536ad7bab3eb7f149c7062de851 Mon Sep 17 00:00:00 2001
From: Liav A <liavalb@gmail.com>
Date: Fri, 27 May 2022 10:18:35 +0300
Subject: [PATCH 1/2] Stop compiler warnings on dangling pointer
---
source/components/utilities/utdebug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c
index f789e68..fd18f5c 100644
--- a/source/components/utilities/utdebug.c
+++ b/source/components/utilities/utdebug.c
@@ -182,7 +182,7 @@ void
AcpiUtInitStackPtrTrace (
void)
{
- ACPI_SIZE CurrentSp;
+ static ACPI_SIZE CurrentSp;
AcpiGbl_EntryStackPointer = &CurrentSp;
--
2.36.0

View file

@ -0,0 +1,29 @@
From a62c4eb1dcf574cd1f02224cd1120e3435864413 Mon Sep 17 00:00:00 2001
From: Liav A <liavalb@gmail.com>
Date: Fri, 27 May 2022 10:19:35 +0300
Subject: [PATCH 2/2] Disable sprintf debug message due to formatting errors
---
source/compiler/dtfield.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/source/compiler/dtfield.c b/source/compiler/dtfield.c
index f931631..f9fb310 100644
--- a/source/compiler/dtfield.c
+++ b/source/compiler/dtfield.c
@@ -280,9 +280,9 @@ DtCompileString (
if (Length > ByteLength)
{
- sprintf (AslGbl_MsgBuffer,
- "Maximum %u characters, found %u characters [%s]",
- ByteLength, Length, Field->Value);
+ //sprintf (AslGbl_MsgBuffer,
+ // "Maximum %u characters, found %u characters [%s]",
+ // ByteLength, Length, Field->Value);
DtError (ASL_ERROR, ASL_MSG_STRING_LENGTH, Field, AslGbl_MsgBuffer);
Length = ByteLength;
}
--
2.36.0

View file

@ -0,0 +1,10 @@
# Patches for nyancat on SerenityOS
## `0001--Stop-compiler-warnings-on-dangling-pointer.patch`
Use static variable to prevent using a dangling pointer from a previous stack trace.
## `0002-Disable-sprintf-debug-message-due-to-formatting-erro.patch`
Disable sprintf debug message with formatting issues.