AcpiDump: Add support to generate acpidump release.

This pactch adds AcpiDump release automation support. Lv Zheng.
This commit is contained in:
Robert Moore 2014-03-25 07:58:36 -07:00
parent c3dee8a500
commit f7009bfa08
6 changed files with 67 additions and 146 deletions

View File

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

View File

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

View File

@ -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.

View File

@ -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];

View File

@ -113,7 +113,7 @@
*
*****************************************************************************/
#include <acpi.h>
#include "acpi.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -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}
};