Help - Search - Members - Calendar
Full Version: Intel Asl Compiler Iasl: Compiling From Scratch
Project OS X Forums > Snow Leopard Guides & Tutorials > Tools
Pages: 1, 2
THe KiNG
So what's the trick to compile acpiexec on latest source?
Is the only one that fail on compile, same osunixff errors...
Slice
QUOTE (THe KiNG @ Aug 23 2011, 06:34 PM) *
So what's the trick to compile acpiexec on latest source?
Is the only one that fail on compile, same osunixff errors...

Didn't check because the program has no sense with mach_kernel protected memory vs Windows and Linux.
Yes it works but without hardware, you can use it to check arithmetics only.
Slice
Latest IASL
CODE
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20110922-32 [Oct 13 2011]
Copyright (c) 2000 - 2011 Intel Corporation

Click to view attachment

And acpiexec to experiments with it.
CODE
Intel ACPI Component Architecture
AML Execution/Debug Utility version 20110922-32 [Oct 13 2011]
Copyright (c) 2000 - 2011 Intel Corporation

Loading Acpi table from file /DSDT1.aml
ACPI: RSDP 0x5ed20 0002C (v02 I_TEST)
ACPI: XSDT 0x1006b0 00064 (v01                 00000000      00000000)
ACPI: TEST 0x5eda0 00024 (v01                 00000000      00000000)
ACPI: BAD! 0x5ede0 00024 (v01                 00000000      00000000)
ACPI: FACP 0x5ee20 000F4 (v03                 00000000      00000000)
ACPI: DSDT @ 0x0x5e0a0 Table override, replaced with:
ACPI: DSDT 0x806000 06009 (v02 Apple  MacBook  00010001 INTL 20100528)
ACPI: FACS 0x5ed60 00040
ACPI: SSDT 0x5df20 00030 (v01  Intel     Many 00000001 INTL 20030424)
ACPI: SSDT 0x5df60 00030 (v01  Intel     Many 00000001 INTL 20030424)
ACPI: OEM1 0x5dfa0 00038 (v01  Intel     Many 00000001 INTL 20030918)
ACPI: OEMX 0x5dfe0 000B0 (v02  MyOEM     Test 00000432 INTL 20100331)
ACPI: ECDT 0x5de60 0004E (v01  Intel Template 00000001 INTL 20110316)
Parsing all Control Methods:
Table [DSDT](id 0001) - 906 Objects with 93 Devices 256 Methods 28 Regions
Parsing all Control Methods:
Table [SSDT](id 0002) - 1 Objects with 0 Devices 1 Methods 0 Regions
Parsing all Control Methods:
Table [SSDT](id 0003) - 1 Objects with 0 Devices 1 Methods 0 Regions
tbxface-0635 [02] TbLoadNamespace       : ACPI Tables successfully acquired
evgpeblk-0521 [04] EvCreateGpeBlock      : GPE 00 to 3F [_GPE] 8 regs on int 0x0
evgpeblk-0521 [04] EvCreateGpeBlock      : GPE 60 to 77 [_GPE] 3 regs on int 0x0
Completing Region/Field/Buffer/Package initialization:............................................................................
.................................
Initialized 28/28 Regions 18/18 Fields 31/31 Buffers 32/32 Packages (919 nodes)

Click to view attachment
Slice
Funny
CODE
MacDell:NewTables slice$ iasl -TAPIC
Created ACPI table template for [APIC], written to "apic.asl"
MacDell:NewTables slice$ iasl -TFACS
Created ACPI table template for [FACS], written to "facs.asl"
MacDell:NewTables slice$ iasl -TFACP
Created ACPI table template for [FACP], written to "facp.asl"
MacDell:NewTables slice$ iasl -TSLIC
Created ACPI table template for [SLIC], written to "slic.asl"
MacDell:NewTables slice$ iasl -TOSFR
OSFR, Unrecognized ACPI table signature
MacDell:NewTables slice$ iasl -TTCPA
Created ACPI table template for [TCPA], written to "tcpa.asl"
MacDell:NewTables slice$ iasl -TOEMB
OEMB, Unrecognized ACPI table signature
MacDell:NewTables slice$ iasl -THPET
Created ACPI table template for [HPET], written to "hpet.asl"
MacDell:NewTables slice$ iasl -TASF!
Created ACPI table template for [ASF!], written to "asf!.asl"
nesnfsn
QUOTE (zhell @ Jun 16 2009, 06:22 AM) *
Compiling Intel's ASL Compiler iasl

1. You need xCode installed (from the App Store, free download for Lion)
2. Get the current source from http://www.acpica.org/downloads/unix_source_code.php
3. Open Terminal, change dir to where you want to have your source code.
4. Extract the source tarball by running
CODE
tar xf ~/Downloads/acpica-unix-20110623.tar

5. Change directory to "compiler"
CODE
cd compiler

6. Run the following command:
CODE
make

8. You get a file called "iasl" the current directory... this is your ASL compiler biggrin.gif . To install you can just issue:
CODE
sudo cp iasl /usr/bin/

(there is no need to set the permissions, the linker does that for you)


I had d/l acpi-unxi-2011-0922.tar.gz, and my computer is running OS X 10.7.2, with XCode 4.2.

At Step 6 (make command) the following error messages result, and I do not know what to do next in order to follow this guide. I would appreciate some further guidance.

sh-3.2# make
flex -i -s -PAslCompiler -oaslcompilerlex.c ../compiler/aslcompiler.l
bison -v -d -y -pAslCompiler -oaslcompilerparse.c ../compiler/aslcompiler.y
flex -i -s -PDtParser -odtparserlex.c ../compiler/dtparser.l
bison -v -d -y -pDtParser -odtparserparse.c ../compiler/dtparser.y
Copy intermediate file:
aslcompilerparse.h -> aslcompiler.y.h
Copy intermediate file:
dtparserparse.h -> dtparser.y.h
cc -c -D_LINUX -D_GNU_SOURCE -DACPI_ASL_COMPILER -I../include -I../compiler -Wall -Werror -Wstrict-aliasing=0 -oaslcompilerlex.o aslcompilerlex.c
cc -c -D_LINUX -D_GNU_SOURCE -DACPI_ASL_COMPILER -I../include -I../compiler -Wall -Werror -Wstrict-aliasing=0 -oaslcompilerparse.o aslcompilerparse.c
cc -c -D_LINUX -D_GNU_SOURCE -DACPI_ASL_COMPILER -I../include -I../compiler -Wall -Werror -Wstrict-aliasing=0 -odtparserlex.o dtparserlex.c
cc -c -D_LINUX -D_GNU_SOURCE -DACPI_ASL_COMPILER -I../include -I../compiler -Wall -Werror -Wstrict-aliasing=0 -odtparserparse.o dtparserparse.c
cc -c -D_LINUX -D_GNU_SOURCE -DACPI_ASL_COMPILER -I../include -I../compiler -ansi -Wall -Wbad-function-cast -Wdeclaration-after-statement -Werror -Wformat=2 -Wmissing-declarations -Wmissing-prototypes -Wstrict-aliasing=0 -Wstrict-prototypes -Wswitch-default -Wpointer-arith -Wundef -Waddress -Waggregate-return -Wchar-subscripts -Wempty-body -Wlogical-op -Wmissing-declarations -Wmissing-field-initializers -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -Wtype-limits -oadfile.o ../common/adfile.c
cc1: error: unrecognized command line option "-Wlogical-op"
cc1: error: unrecognized command line option "-Wmissing-parameter-type"
cc1: error: unrecognized command line option "-Wold-style-declaration"
cc1: error: unrecognized command line option "-Wtype-limits"
make: *** [adfile.o] Error 1


nesnfsn in sunny South Florida
Slice
Correct makefile to exclude these options.
nesnfsn
Slice:

Please pardon the following wee bit of sarcasm, but how pray tell do I "Correct makefile to exclude these options"?

Btw, thank you for replying. My sarcasm is the result of being up all night trying to identify, isolate and fix a home wireless network problem. Wife and daughter not able to get online, but here I am sending this post wirelessly. Must be my fault, and not their MS Win PCs!!!

nesnfsn
Slice
But a question. Why do you bother to compile the project by yourself if you can't correct makefile?
I already did this and upload the result: iasl ready to use.
nesnfsn
QUOTE (Slice @ Oct 30 2011, 04:09 PM) *
But a question. Why do you bother to compile the project by yourself if you can't correct makefile?
I already did this and upload the result: iasl ready to use.

Because:
(1) I would like to learn how to do this with a 64 bit version of OSX (Lion 10.7.2);
(2) I would like to create an accurate DSDT.aml file; and
(3) Perhaps I should not have been as snarky, but I could not figure out how to "correct" the makefile based upon your response.

The version of iasl that you have prepared for us users is labeled for 32 bit systems, and OSX 10.7.2 is 64 bit. So, absent a premade recent 64 bit version of iasl, wanted to do it myself, but could not.

Thanks for understanding, and my apologies if my sarcasm was a tad too much.
Slice
Don't worry.
Check, 32-bit version works in 64-bit environment. See no sense to look for 64bit version.
nesnfsn
QUOTE (Slice @ Oct 31 2011, 02:49 PM) *
Don't worry.
Check, 32-bit version works in 64-bit environment. See no sense to look for 64bit version.

THANK YOU. I will not be able to try this for a few nights, but when I do, I will provide you my feedback, and hopefully success, and not a slew of mistakes or errors.
STLVNUB
Little script file to download latest source from github and compile.
Click to view attachment
Slice
CODE
Supports ACPI Specification Revision 5.0


Something new in the specification, for examble Boot Graphics Table and UEFI Table.
CODE
/*
* Intel ACPI Component Architecture
* iASL Compiler/Disassembler version 20111123-32 [Dec  3 2011]
* Copyright (c) 2000 - 2011 Intel Corporation
*
* Template for [UEFI] ACPI Table
* Format: [ByteLength]  FieldName : HexFieldValue
*/

[0004]                          Signature : "UEFI"    [UEFI Boot Optimization Table]
[0004]                       Table Length : 00000036
[0001]                           Revision : 01
[0001]                           Checksum : 9B
[0006]                             Oem ID : "INTEL "
[0008]                       Oem Table ID : "TEMPLATE"
[0004]                       Oem Revision : 00000001
[0004]                    Asl Compiler ID : "INTL"
[0004]              Asl Compiler Revision : 20100528

[0016]                    UUID Identifier : 03020100-0504-0706-0809-0A0B0C0D0E0F
[0002]                        Data Offset : 0000

Click to view attachment
Slice
CODE
ACPI tables supported by iASL subsystems in version 20111123:
  ASL and Data Table compilers
  AML and Data Table disassemblers
  ACPI table template generator

       1) DSDT    Differentiated System Description Table
       2) SSDT    Secondary System Description Table
       3) FACP    Fixed ACPI Description Table (FADT)
       4) FACS    Firmware ACPI Control Structure
       5) RSDP    Root System Description Pointer
       6) ASF!    Alert Standard Format table
       7) BOOT    Simple Boot Flag Table
       8) BERT    Boot Error Record Table
       9) BGRT    Boot Graphics Resource Table
      10) CPEP    Corrected Platform Error Polling table
      11) DBGP    Debug Port table
      12) DMAR    DMA Remapping table
      13) ECDT    Embedded Controller Boot Resources Table
      14) EINJ    Error Injection table
      15) ERST    Error Record Serialization Table
      16) FACP    Fixed ACPI Description Table
      17) FPDT    Firmware Performance Data Table
      18) GTDT    Generic Timer Description Table
      19) HEST    Hardware Error Source Table
      20) HPET    High Precision Event Timer table
      21) IVRS    I/O Virtualization Reporting Structure
      22) APIC    Multiple APIC Description Table
      23) MCFG    Memory Mapped Configuration table
      24) MCHI    Management Controller Host Interface table
      25) MPST    Memory Power State Table
      26) MSCT    Maximum System Characteristics Table
      27) PCCT    Platform Communications Channel Table
      28) PMTT    Platform Memory Topology Table
      29) RSDT    Root System Description Table
      30) S3PT    S3 Performance Table
      31) SBST    Smart Battery Specification Table
      32) SLIC    Software Licensing Description Table
      33) SLIT    System Locality Information Table
      34) SPCR    Serial Port Console Redirection table
      35) SPMI    Server Platform Management Interface table
      36) SRAT    System Resource Affinity Table
      37) TCPA    Trusted Computing Platform Alliance table
      38) UEFI    UEFI Boot Optimization Table
      39) WAET    Windows ACPI Emulated Devices Table
      40) WDAT    Watchdog Action Table
      41) WDDT    Watchdog Description Table
      42) WDRT    Watchdog Resource Table
      43) XSDT    Extended System Description Table
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.