Menu

Compiling iASL

PHPdev32

Compiling newer versions of iASL is generally easier than old ones, but we can use some of the advances in newer versions to patch older ones.

General Procedure

Download the desired acpi-unix package from acpica.org and expand the gzipped tarball. Patch any necessary files, then make.
If compiling for an older version of OSX, make sure to add CFLAGS and LDFLAGS, like this for Lion on Mountain Lion:

-mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk

Compiling iasl5

export HOST=_APPLE PREFIX=/usr/local
sed -i '' '/Gbl_Files\[ASL_FILE_STDERR\].Handle = stdout/d' ../../source/compiler/asloptions.c

Patch from generate/unix/ using the commands above, then make. To install use make install, specifying a DESTDIR installation root if necessary.

Compiling iasl4

cp ../aclinux.h include/platform
cp ../osunixxf.c os_specific/service_layers
cp ../osunixxf.c .
cp ../acpiosxf.h include
sed -i '' -e "s:LINUX:LINUX -DACPI_USE_ALTERNATE_TIMEOUT:" -e "s: -lrt::" compiler/Makefile
echo '#include <pthread.h>' >>include/platform/acenv.h

Download the files mentioned above from the latest version of acpi-utils, and copy them into the source tree, replacing the older copies, then patch using sed. Make using make -C compiler, then install manually.


Related

Wiki: Home