-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.sh
More file actions
35 lines (25 loc) · 887 Bytes
/
init.sh
File metadata and controls
35 lines (25 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Determine toolpath if not set already
relativepath="./" # Define relative path to go from this script to the root level of the tool
if [[ ! -v toolpath ]]; then scriptpath=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ); toolpath=$(realpath --canonicalize-missing $scriptpath/$relativepath); fi
# Abort on Error
set -e
# Load Configuration
source "${toolpath}/config.sh"
# Install Requirements
apt-get install acpica-tools bc
# Create Folder if not existing yet
mkdir -p "${acpi_working_folder}"
# Change Current Working Directory
cd "${acpi_working_folder}" || exit
# Create Folder Structure to later generate uncompressed CPIO Archive
mkdir -p kernel/firmware/acpi
# Extract the Machine ACPI Tables
acpidump >acpidump
acpixtract -a acpidump
# Execute Single Scripts
if [[ "${disassemble_all}" == "yes" ]]
then
# Disassemble all Tables
iasl -d *.dat
fi