File use_external_pmtool_bins.patch of Package firmwarekit
---
acpicompile/acpicompile.c | 4 ++++
acpitable.c | 15 +++++----------
2 files changed, 9 insertions(+), 10 deletions(-)
--- a/acpicompile/acpicompile.c
+++ b/acpicompile/acpicompile.c
@@ -83,10 +83,14 @@ static void do_table(char *filename)
int errlineno;
/* Compile the dsdt or ssdt .dsl with iasl */
+/*
if (access("plugins", R_OK))
sprintf(command, "../plugins/iasl -vi -vs -w3 %s", filename);
else
sprintf(command, "plugins/iasl -vi -vs -w3 %s", filename);
+*/
+
+ sprintf(command, "/usr/bin/iasl -vi -vs -w3 %s", filename);
/* analyse output of the iasl compiler */
--- a/acpitable.c
+++ b/acpitable.c
@@ -173,7 +173,6 @@ out:
void extract_acpi_tables(void)
{
int ret, i;
- char cmd_prefix[1024];
char ssdt_filename[1024];
char command[4096];
@@ -181,20 +180,16 @@ void extract_acpi_tables(void)
* are located (should exist after compiling "acpicompile" plugin).
* Since we're standalone, we could be called from a few different
* places. */
- if (access("plugins", R_OK))
- sprintf(cmd_prefix, "../plugins/");
- else
- sprintf(cmd_prefix, "plugins/");
/* create hex-dump format of all acpi tables in file 'acpi.dump' */
- sprintf(command, "%sacpidump -o acpi.dump 2> /dev/null", cmd_prefix);
+ sprintf(command, "/usr/sbin/acpidump -o acpi.dump 2> /dev/null");
ret=system(command);
if (access("acpi.dump", R_OK))
fprintf(stderr,"WARN (acpidump): failed to create acpi.dump.\n");
/* use 'acpidump' file to extract tables
* in binary format, <table>.dat */
- sprintf(command, "%sacpixtract -a acpi.dump > /dev/null 2> /dev/null", cmd_prefix);
+ sprintf(command, "/usr/bin/acpixtract -a acpi.dump > /dev/null 2> /dev/null");
ret=system(command);
if (access("DSDT.dat", R_OK)) {
ret = system("cat /proc/acpi/dsdt > DSDT.dat");
@@ -205,17 +200,17 @@ void extract_acpi_tables(void)
}
/* Disassemble DSDT.dat with iasl, will create DSDT.dsl */
- sprintf(command, "%siasl -d DSDT.dat > /dev/null 2> /dev/null", cmd_prefix);
+ sprintf(command, "/usr/bin/iasl -d DSDT.dat > /dev/null 2> /dev/null");
ret = system(command);
/* Include ACPI table for external symbol resolution (if they exist) */
- sprintf(command, "%siasl -d -e DSDT.dat SSDT.dat > /dev/null 2> /dev/null", cmd_prefix);
+ sprintf(command, "/usr/bin/iasl -d -e DSDT.dat SSDT.dat > /dev/null 2> /dev/null");
ret=system(command);
for (i = 1;i<10;i++) {
sprintf(ssdt_filename, "SSDT%d.dat", i);
if (!access(ssdt_filename, R_OK)) {
- sprintf(command, "%siasl -d -e DSDT.dat %s > /dev/null 2> /dev/null", cmd_prefix, ssdt_filename);
+ sprintf(command, "/usr/bin/iasl -d -e DSDT.dat %s > /dev/null 2> /dev/null", ssdt_filename);
ret = system(command);
/* current iasl has an issue with arugment counts in SSDT's, work around this */
ret=system("sed -i -e \"s/^ACPI Error.*Argument count mismatch for method.*//g\" SSDT*.dsl");