This is a tool aim to generate common acpi table aml files for multiple platforms. It also provides tools to gather infomations from android device tree.
git clone https://github.com/Project-Aloha/acpi-table-generator.git
cd acpi-table-generatormkdir build && cd build
cmake ..
make
# View generated AML files
ls -lh qcom_sm8850/*.amlUse cross-platform Python test scripts:
# Complete test suite (recommended)
make test
# Or standalone test like:
python3 ../test/aml_validator.py.
├── src/
│ ├── acpi_extractor.c # ACPI table extraction tool
│ └── dummy/
│ ├── *.c # dummy C file for a table
├── include/
│ ├── common.h # Common ACPI structure definitions and macros
│ ├── common/
│ │ ├── *.h # Common structure definitions for a table
│ └── vendor/
│ ├── mtk/
│ │ └── mt1234/
│ │ └── *.h # Placeholder
│ └── qcom/
│ └── sm8850/
│ └── *.h # SM8850 MADT/PPTT/etc configuration
├── build/ # CMake build directory
│ ├── acpi_extractor # ACPI table extraction tool
│ ├── iort_reader # IORT table extraction tool for qcom devcies
│ └── <vendor>/
│ └── <device>/
│ ├── *.aml # Generated AML file
│ ├── *.dsl # iasl disassembled DSL source
│ └── *_iasl.log # iasl execution log
├── test/ # Test tools (Python + Bash)
│ ├── *.py # Complete test suite
├── CMakeLists.txt # CMake configuration file
├── README.md # This file
└── requirements.txt # Python dependencies
Create new directory under include/vendor/ and copy template:
# Create new vendor/platform directory
mkdir -p include/vendor/qcom/sm8xxx
# Copy reference configuration
cp include/vendor/qcom/sm8850/xxxx.h include/vendor/qcom/sm8xxx/xxxx.hEdit include/vendor/qcom/sm8xxx/xxxx.h according to actual hardware.
CMake will automatically detect the new platform:
cd build
cmake ..
make qcom_sm8xxx_xxxxContributions are welcome! Please follow these steps:
- Fork this repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Create a Pull Request
- ✅ Add support for new platforms
- ✅ Improve universal builder
- ✅ Enhance testing tools
- ✅ Fix bugs
- ✅ Improve documentation
-
- Follow existing code style
-
- Add necessary comments
-
- Update relevant documentation
-
- Ensure all tests pass
This project is licensed under GPL-3.0 - see LICENSE file for details.
- Project Homepage: https://github.com/Project-Aloha/acpi-table-generator
- Issue Reports: GitHub Issues
- Discussions: GitHub Discussions
- ACPI Specification 6.6 - ACPI Specification
- ARM CPU Architecture - ARM Architecture Documentation
- ARM IORT - ARM IO Remapping Table
- PCI Sig - PCI Firmware Spec v3.3
- Qualcomm Snapdragon - Qualcomm Snapdragon Processors
- Microsoft SPCR - Microsoft Serial Port Console Redirection Table
- Microsoft DBG2 - Microsoft Debug Port Table 2
🌟 If this project helps you, please give it a Star!