From f7009bfa08001850c056471cbc17ffffccb39db3 Mon Sep 17 00:00:00 2001 From: Robert Moore Date: Tue, 25 Mar 2014 07:58:36 -0700 Subject: [PATCH] AcpiDump: Add support to generate acpidump release. This pactch adds AcpiDump release automation support. Lv Zheng. --- generate/linux/acpipkg | 44 ----------- generate/linux/libacpica.sh | 78 +++++++++++++------ generate/linux/receive | 76 ------------------ .../os_specific/service_layers/oslinuxtbl.c | 4 +- source/os_specific/service_layers/osunixdir.c | 2 +- source/tools/acpisrc/astable.c | 9 +++ 6 files changed, 67 insertions(+), 146 deletions(-) delete mode 100644 generate/linux/acpipkg delete mode 100644 generate/linux/receive diff --git a/generate/linux/acpipkg b/generate/linux/acpipkg deleted file mode 100644 index 42b53845c..000000000 --- a/generate/linux/acpipkg +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# acpipkg -# -# This script generates patches, tars, and executables, for -# distribution. -# -# - -pushd ~ - -DATE=`date +%Y%m%d` - -echo Removing old files in output/ -rm -rf output/* - -echo generating tar and diff -receive -tar czf output/acpica-linux-$DATE.tar.gz linux/drivers/acpi linux/include/linux/acpi.h -diff -Naur -X bin/dontdiff /usr/src/linux linux > output/acpi-$DATE.diff -gzip output/acpi-$DATE.diff - -echo generating other-files diff -# generate other-files diff -diff -Naur -X bin/dontdiff /usr/src/linux/Documentation/Configure.help linux/Documentation/Configure.help > output/acpi-other-files-$DATE.diff -diff -Naur -X bin/dontdiff /usr/src/linux/Makefile linux/Makefile >> output/acpi-other-files-$DATE.diff -diff -Naur -X bin/dontdiff /usr/src/linux/include/linux linux/include/linux >> output/acpi-other-files-$DATE.diff -diff -Naur -X bin/dontdiff /usr/src/linux/arch/i386 linux/arch/i386 >> output/acpi-other-files-$DATE.diff -diff -Naur -X bin/dontdiff /usr/src/linux/arch/ia64 linux/arch/ia64 >> output/acpi-other-files-$DATE.diff -gzip output/acpi-other-files-$DATE.diff - -mkdir -p output/temp -echo Making Linux iasl -cp /root/desk/acpica-unix-$DATE.tar.gz output/temp -cd output/temp -tar xzf acpica-unix-$DATE.tar.gz -cd compiler -make >/dev/null -cp iasl ~/output -cd ~/ -rm -rf output/temp - -popd - diff --git a/generate/linux/libacpica.sh b/generate/linux/libacpica.sh index b2ad2649a..512dacf3c 100755 --- a/generate/linux/libacpica.sh +++ b/generate/linux/libacpica.sh @@ -22,6 +22,9 @@ linux_dirs() drivers/acpi/acpica \ include/acpi \ include/acpi/platform \ + tools/power/acpi/common \ + tools/power/acpi/os_specific/service_layers \ + tools/power/acpi/tools/acpidump \ " echo $dirs } @@ -31,6 +34,7 @@ acpica_privs() local incs incs="\ + acapps.h \ accommon.h \ acdebug.h acdispat.h \ acevents.h \ @@ -56,15 +60,15 @@ acpica_drivers_paths() local paths incs inc paths="\ - components/dispatcher - components/events - components/executer - components/hardware - components/namespace - components/parser - components/resources - components/tables - components/utilities + components/dispatcher \ + components/events \ + components/executer \ + components/hardware \ + components/namespace \ + components/parser \ + components/resources \ + components/tables \ + components/utilities \ " incs=`acpica_privs` for inc in $incs; do @@ -73,25 +77,38 @@ acpica_drivers_paths() echo $paths } +acpica_tools_paths() +{ + local paths incs inc + + paths="\ + common/getopt.c \ + os_specific/service_layers/oslinuxtbl.c \ + os_specific/service_layers/osunixdir.c \ + os_specific/service_layers/osunixmap.c \ + tools/acpidump \ + " + echo $paths +} + acpica_exclude_paths() { local paths paths="\ - include/acpi/acdisasm.h - include/acpi/acapps.h - include/acpi/platform/accygwin.h - include/acpi/platform/acefi.h - include/acpi/platform/acfreebsd.h - include/acpi/platform/achaiku.h - include/acpi/platform/acintel.h - include/acpi/platform/acmacosx.h - include/acpi/platform/acmsvc.h - include/acpi/platform/acnetbsd.h - include/acpi/platform/acos2.h - include/acpi/platform/acwin.h - include/acpi/platform/acwin64.h - drivers/acpi/acpica/utclib.c + include/acpi/acdisasm.h \ + include/acpi/platform/accygwin.h \ + include/acpi/platform/acefi.h \ + include/acpi/platform/acfreebsd.h \ + include/acpi/platform/achaiku.h \ + include/acpi/platform/acintel.h \ + include/acpi/platform/acmacosx.h \ + include/acpi/platform/acmsvc.h \ + include/acpi/platform/acnetbsd.h \ + include/acpi/platform/acos2.h \ + include/acpi/platform/acwin.h \ + include/acpi/platform/acwin64.h \ + drivers/acpi/acpica/utclib.c \ " echo $paths } @@ -331,6 +348,21 @@ linuxize_hierarchy_noref() mkdir -p include/acpi mv -f source/include/* include/acpi + # Making tools/power/acpi files + paths=`acpica_tools_paths` + for path in $paths; do + if [ -d source/$path ]; then + echo " Moving directory $path..." + mkdir -p tools/power/acpi/$path + mv source/$path/*.[ch] tools/power/acpi/$path/ + fi + if [ -f source/$path ]; then + echo " Moving file $path..." + mkdir -p `dirname tools/power/acpi/$path` + mv source/$path tools/power/acpi/$path + fi + done + # Removing non-Linux files paths=`acpica_exclude_paths` for path in $paths; do diff --git a/generate/linux/receive b/generate/linux/receive deleted file mode 100644 index acec08972..000000000 --- a/generate/linux/receive +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# -# receive -# -# This script takes the zip files generated by ship, and puts them -# in the proper places in a Linux kernel tree. -# -# -# - -DUMPDIR=/root/received - -LINUXDIR=/root/linux/ - -SRCDIR=/root/desk - -ACPISUBDIRS="utilities dispatcher events hardware executer namespace\ - parser resources tables debugger" - -ACPIVER="linuxdebug" - -if [ -n "$1" -a "$1" = "new" ]; then - LINUXVER="linux-new" -else - LINUXVER="linux" -fi - -echo Clearing $DUMPDIR -rm -rf $DUMPDIR -mkdir $DUMPDIR -mkdir -p $DUMPDIR/drivers/acpi - -echo "Unzipping to $DUMPDIR" -unzip $SRCDIR/$ACPIVER.zip -d $DUMPDIR/drivers/acpi >/dev/null -unzip $SRCDIR/$LINUXVER.zip -d $DUMPDIR >/dev/null - -echo Flattening directory structure -mv $DUMPDIR/drivers/acpi/interpreter/* $DUMPDIR/drivers/acpi -rmdir $DUMPDIR/drivers/acpi/interpreter -rm -rf $DUMPDIR/drivers/acpi/ia64 - -echo Deleting extraneous files/dirs -rm -f $DUMPDIR/drivers/acpi/utilities/utclib.c -rm -f $DUMPDIR/drivers/acpi/parser/psfind.c -rm -f $DUMPDIR/drivers/acpi/include/platform/acwin.h -rm -f $DUMPDIR/drivers/acpi/include/platform/acefi.h -rm -f $DUMPDIR/drivers/acpi/include/platform/acmsvc.h -rm -f $DUMPDIR/drivers/acpi/include/platform/acfreebsd.h -find $DUMPDIR -name "*.scc" |xargs rm - -echo Copying Subdirectory Makefiles -for i in $ACPISUBDIRS; do - cp $DUMPDIR/drivers/acpi/subdirectories/Makefile \ - $DUMPDIR/drivers/acpi/$i -done -rm -rf $DUMPDIR/drivers/acpi/subdirectories - -#echo Moving OSPM includes to include directory -#mkdir -p $DUMPDIR/drivers/acpi/ospm/include -#find $DUMPDIR/drivers/acpi/ospm -name "*.h" | xargs -i mv {} \ -# $DUMPDIR/drivers/acpi/ospm/include - -echo Fixing line-termination -(cd $DUMPDIR;d2u) >/dev/null - -echo Fixing permissions -chmod -R a-x $DUMPDIR -chmod -R u+rw $DUMPDIR -find $DUMPDIR -type d|xargs chmod a+x - -echo "Copying to acpi directory" -rm -rf $LINUXDIR/drivers/acpi -cp -r $DUMPDIR/* $LINUXDIR - -echo Done. - diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c index d08f7491f..9e3fe2c21 100644 --- a/source/os_specific/service_layers/oslinuxtbl.c +++ b/source/os_specific/service_layers/oslinuxtbl.c @@ -127,9 +127,9 @@ /* List of information about obtained ACPI tables */ -typedef struct table_info +typedef struct osl_table_info { - struct table_info *Next; + struct osl_table_info *Next; UINT32 Instance; char Signature[ACPI_NAME_SIZE]; diff --git a/source/os_specific/service_layers/osunixdir.c b/source/os_specific/service_layers/osunixdir.c index 21bc24e2c..c60031193 100644 --- a/source/os_specific/service_layers/osunixdir.c +++ b/source/os_specific/service_layers/osunixdir.c @@ -113,7 +113,7 @@ * *****************************************************************************/ -#include +#include "acpi.h" #include #include diff --git a/source/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c index ecd87c907..5975c2e62 100644 --- a/source/tools/acpisrc/astable.c +++ b/source/tools/acpisrc/astable.c @@ -709,6 +709,10 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"PR_MACRO_ARG", SRC_TYPE_STRUCT}, {"PR_OPERATOR_INFO", SRC_TYPE_STRUCT}, + /* AcpiDump utility */ + + {"AP_DUMP_ACTION", SRC_TYPE_STRUCT}, + /* AcpiHelp utility */ {"AH_AML_OPCODE", SRC_TYPE_STRUCT}, @@ -720,6 +724,11 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"AX_TABLE_INFO", SRC_TYPE_STRUCT}, + /* OS service layers */ + + {"EXTERNAL_FIND_INFO", SRC_TYPE_STRUCT}, + {"OSL_TABLE_INFO", SRC_TYPE_STRUCT}, + {NULL, 0} };