readme.txt revision 1.1.1.1.10.1 1 1.1.1.1.10.1 yamt /*
2 1.1.1.1.10.1 yamt * Miscellaneous instructions for building and using the iASL compiler.
3 1.1.1.1.10.1 yamt */
4 1.1.1.1.10.1 yamt Last update 9 December 2013.
5 1.1 jruoho
6 1.1 jruoho
7 1.1.1.1.10.1 yamt 1) Generating iASL from source
8 1.1.1.1.10.1 yamt ------------------------------
9 1.1.1.1.10.1 yamt
10 1.1.1.1.10.1 yamt Generation of the ASL compiler from source code requires these items:
11 1.1.1.1.10.1 yamt
12 1.1.1.1.10.1 yamt 1) The ACPICA source code tree.
13 1.1.1.1.10.1 yamt 2) An ANSI C compiler.
14 1.1.1.1.10.1 yamt 3) The Flex (or Lex) lexical analyzer generator.
15 1.1.1.1.10.1 yamt 4) The Bison (or Yacc) parser generator.
16 1.1.1.1.10.1 yamt
17 1.1.1.1.10.1 yamt There are three major ACPICA source code components that are required to
18 1.1.1.1.10.1 yamt generate the compiler (Basically, the entire ACPICA source tree should
19 1.1.1.1.10.1 yamt be installed):
20 1.1.1.1.10.1 yamt
21 1.1.1.1.10.1 yamt 1) The ASL compiler source.
22 1.1.1.1.10.1 yamt 2) The ACPICA Core Subsystem source. In particular, the Namespace
23 1.1.1.1.10.1 yamt Manager component is used to create an internal ACPI namespace
24 1.1.1.1.10.1 yamt and symbol table, and the AML Interpreter is used to evaluate
25 1.1.1.1.10.1 yamt constant expressions.
26 1.1.1.1.10.1 yamt 3) The "common" source directory that is used for all ACPI components.
27 1.1.1.1.10.1 yamt
28 1.1.1.1.10.1 yamt
29 1.1.1.1.10.1 yamt 1a) Notes for Linux/Unix generation
30 1.1.1.1.10.1 yamt -----------------------------------
31 1.1.1.1.10.1 yamt
32 1.1.1.1.10.1 yamt iASL has been generated with these versions of Flex/Bison:
33 1.1.1.1.10.1 yamt
34 1.1.1.1.10.1 yamt flex: Version 2.5.32
35 1.1.1.1.10.1 yamt bison: Version 2.6.2
36 1.1.1.1.10.1 yamt
37 1.1.1.1.10.1 yamt Other required packages:
38 1.1.1.1.10.1 yamt
39 1.1.1.1.10.1 yamt make
40 1.1.1.1.10.1 yamt gcc C compiler
41 1.1.1.1.10.1 yamt m4 (macro processor required by bison)
42 1.1.1.1.10.1 yamt
43 1.1.1.1.10.1 yamt On Linux/Unix systems, the following commands will build the compiler:
44 1.1.1.1.10.1 yamt
45 1.1.1.1.10.1 yamt cd acpica (or cd acpica/generate/unix)
46 1.1.1.1.10.1 yamt make clean
47 1.1.1.1.10.1 yamt make iasl
48 1.1.1.1.10.1 yamt
49 1.1.1.1.10.1 yamt
50 1.1.1.1.10.1 yamt 1b) Notes for Windows generation
51 1.1.1.1.10.1 yamt --------------------------------
52 1.1.1.1.10.1 yamt
53 1.1.1.1.10.1 yamt On Windows, the Visual Studio 2008 project file appears in this directory:
54 1.1.1.1.10.1 yamt
55 1.1.1.1.10.1 yamt generate/msvc9/AcpiComponents.sln
56 1.1.1.1.10.1 yamt
57 1.1.1.1.10.1 yamt The Windows versions of GNU Flex/Bison must be installed, and they must
58 1.1.1.1.10.1 yamt be installed in a directory that contains no embedded spaces in the
59 1.1.1.1.10.1 yamt pathname. They cannot be installed in the default "c:\Program Files"
60 1.1.1.1.10.1 yamt directory. This is a bug in Bison. The default Windows project file for
61 1.1.1.1.10.1 yamt iASL assumes that these tools are installed at this location:
62 1.1.1.1.10.1 yamt
63 1.1.1.1.10.1 yamt c:\GnuWin32
64 1.1.1.1.10.1 yamt
65 1.1.1.1.10.1 yamt Once the tools are installed, ensure that this path is added to the
66 1.1.1.1.10.1 yamt default system $Path environment variable:
67 1.1.1.1.10.1 yamt
68 1.1.1.1.10.1 yamt c:\GnuWin32\bin
69 1.1.1.1.10.1 yamt
70 1.1.1.1.10.1 yamt Goto: ControlPanel/System/AdvancedSystemSettings/EnvironmentVariables
71 1.1.1.1.10.1 yamt
72 1.1.1.1.10.1 yamt Important: Now Windows must be rebooted to make the system aware of
73 1.1.1.1.10.1 yamt the updated $Path. Otherwise, Bison will not be able to find the M4
74 1.1.1.1.10.1 yamt interpreter library and will fail.
75 1.1.1.1.10.1 yamt
76 1.1.1.1.10.1 yamt iASL has been generated with these versions of Flex/Bison for Windows:
77 1.1.1.1.10.1 yamt
78 1.1.1.1.10.1 yamt Flex for Windows: V2.5.4a
79 1.1.1.1.10.1 yamt Bison for Windows: V2.4.1
80 1.1.1.1.10.1 yamt
81 1.1.1.1.10.1 yamt Flex is available at: http://gnuwin32.sourceforge.net/packages/flex.htm
82 1.1.1.1.10.1 yamt Bison is available at: http://gnuwin32.sourceforge.net/packages/bison.htm
83 1.1.1.1.10.1 yamt
84 1.1.1.1.10.1 yamt
85 1.1.1.1.10.1 yamt
86 1.1.1.1.10.1 yamt 2) Integration as a custom tool for Visual Studio
87 1.1.1.1.10.1 yamt -------------------------------------------------
88 1.1 jruoho
89 1.1 jruoho This procedure adds the iASL compiler as a custom tool that can be used
90 1.1.1.1.10.1 yamt to compile ASL source files. The output is sent to the VC output
91 1.1 jruoho window.
92 1.1 jruoho
93 1.1 jruoho a) Select Tools->Customize.
94 1.1 jruoho
95 1.1 jruoho b) Select the "Tools" tab.
96 1.1 jruoho
97 1.1.1.1.10.1 yamt c) Scroll down to the bottom of the "Menu Contents" window. There you
98 1.1.1.1.10.1 yamt will see an empty rectangle. Click in the rectangle to enter a
99 1.1 jruoho name for this tool.
100 1.1 jruoho
101 1.1.1.1.10.1 yamt d) Type "iASL Compiler" in the box and hit enter. You can now edit
102 1.1 jruoho the other fields for this new custom tool.
103 1.1 jruoho
104 1.1 jruoho e) Enter the following into the fields:
105 1.1 jruoho
106 1.1 jruoho Command: C:\Acpi\iasl.exe
107 1.1.1.1.10.1 yamt Arguments: -vi "$(FilePath)"
108 1.1 jruoho Initial Directory "$(FileDir)"
109 1.1 jruoho Use Output Window <Check this option>
110 1.1 jruoho
111 1.1 jruoho "Command" must be the path to wherever you copied the compiler.
112 1.1.1.1.10.1 yamt "-vi" instructs the compiler to produce messages appropriate for VC.
113 1.1 jruoho Quotes around FilePath and FileDir enable spaces in filenames.
114 1.1 jruoho
115 1.1 jruoho f) Select "Close".
116 1.1 jruoho
117 1.1 jruoho These steps will add the compiler to the tools menu as a custom tool.
118 1.1 jruoho By enabling "Use Output Window", you can click on error messages in
119 1.1 jruoho the output window and the source file and source line will be
120 1.1.1.1.10.1 yamt automatically displayed by VC. Also, you can use F4 to step through
121 1.1 jruoho the messages and the corresponding source line(s).
122 1.1 jruoho
123 1.1 jruoho
124 1.1.1.1.10.1 yamt
125 1.1.1.1.10.1 yamt 3) Integrating iASL into a Visual Studio ASL project build
126 1.1.1.1.10.1 yamt ----------------------------------------------------------
127 1.1 jruoho
128 1.1 jruoho This procedure creates a project that compiles ASL files to AML.
129 1.1 jruoho
130 1.1 jruoho a) Create a new, empty project and add your .ASL files to the project
131 1.1 jruoho
132 1.1 jruoho b) For all ASL files in the project, specify a custom build (under
133 1.1 jruoho Project/Settings/CustomBuild with the following settings (or similar):
134 1.1 jruoho
135 1.1 jruoho Commands:
136 1.1.1.1.10.1 yamt c:\acpi\libraries\iasl.exe -vs -vi "$(InputPath)"
137 1.1 jruoho
138 1.1 jruoho Output:
139 1.1.1.1.10.1 yamt $(InputDir)\$(InputPath).aml
140