BaseTools: Script for converting .aml to .hex
The "-tc" option of the iasl compiler allows to generate a .hex file containing a C array storing AML bytecode. An online discussion suggested that this "-tc" option was specific to the iasl compiler and it shouldn't be relied on. This conversation is available at: https://edk2.groups.io/g/devel/topic/39786201#49659 A way to address this issue is to implement a compiler independent script that takes an AML file as input, and generates a .hex file. This patch implements a Python script that converts an AML file to a .hex file, containing a C array storing AML bytecode. This scipt has been tested with the AML output from the following compilers supported by the EDKII implementation: * Intel ASL compiler * Microsoft ASL compiler Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
c37cce7a84
commit
1549651da6
14
BaseTools/BinWrappers/PosixLike/AmlToHex
Executable file
14
BaseTools/BinWrappers/PosixLike/AmlToHex
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
|
||||
|
||||
# If a ${PYTHON_COMMAND} command is available, use it in preference to python
|
||||
if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
|
||||
python_exe=${PYTHON_COMMAND}
|
||||
fi
|
||||
|
||||
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
|
||||
dir=$(dirname "$full_cmd")
|
||||
exe=$(basename "$full_cmd")
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$exe/$exe.py" "$@"
|
Reference in New Issue
Block a user