-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable building SDK for Linux AArch64
Rust's cross-compiling is limited so this only works from a Linux host, if you're on macOS it won't work. Signed-off-by: Ivan Velickovic <[email protected]>
- Loading branch information
1 parent
cf88629
commit fca575f
Showing
4 changed files
with
29 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,8 @@ on: | |
branches: [ "main" ] | ||
|
||
jobs: | ||
build_linux_x64: | ||
name: Build SDK (Linux x86-64) | ||
build_linux: | ||
name: Build SDK (Linux x86-64, ARM64) | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout Microkit repository | ||
|
@@ -52,19 +52,30 @@ jobs: | |
echo "$(pwd)/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH | ||
- name: Set version | ||
run: echo "SDK_VERSION=$(./ci/dev_version.sh)" >> $GITHUB_ENV | ||
- name: Build SDK | ||
- name: Build SDK (x86-64) | ||
run: | | ||
python3.9 -m venv pyenv | ||
./pyenv/bin/pip install --upgrade pip setuptools wheel | ||
./pyenv/bin/pip install -r requirements.txt | ||
./pyenv/bin/python build_sdk.py --sel4=seL4 --version ${{ env.SDK_VERSION }} | ||
- name: Upload SDK | ||
./pyenv/bin/python build_sdk.py --sel4=seL4 --version ${{ env.SDK_VERSION }} --tool-target-triple="x86-64-unknown-linux-musl" | ||
- name: Upload SDK (x86-64) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: microkit-sdk-${{ env.SDK_VERSION }}-linux-x86-64 | ||
path: release/microkit-sdk-${{ env.SDK_VERSION }}.tar.gz | ||
build_macos_x64: | ||
name: Build SDK (macOS x86-64) | ||
- name: Build SDK (ARM64) | ||
run: | | ||
python3.9 -m venv pyenv | ||
./pyenv/bin/pip install --upgrade pip setuptools wheel | ||
./pyenv/bin/pip install -r requirements.txt | ||
./pyenv/bin/python build_sdk.py --sel4=seL4 --version ${{ env.SDK_VERSION }} --tool-target-triple="aarch64-unknown-linux-musl" | ||
- name: Upload SDK (ARM64) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: microkit-sdk-${{ env.SDK_VERSION }}-linux-aarch64 | ||
path: release/microkit-sdk-${{ env.SDK_VERSION }}.tar.gz | ||
build_macos: | ||
name: Build SDK (macOS x86-64, ARM64) | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout Microkit repository | ||
|
@@ -81,6 +92,7 @@ jobs: | |
- name: Install SDK dependencies | ||
run: | | ||
rustup target add x86_64-apple-darwin | ||
rustup target add aarch64-apple-darwin | ||
brew tap riscv-software-src/riscv | ||
brew install riscv-tools | ||
brew install pandoc cmake dtc ninja qemu libxml2 [email protected] coreutils texlive qemu | ||
|
@@ -91,52 +103,24 @@ jobs: | |
echo "$(pwd)/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH | ||
- name: Set version | ||
run: echo "SDK_VERSION=$(./ci/dev_version.sh)" >> $GITHUB_ENV | ||
- name: Build SDK | ||
- name: Build SDK (x86-64) | ||
run: | | ||
python3.9 -m venv pyenv | ||
./pyenv/bin/pip install --upgrade pip setuptools wheel | ||
./pyenv/bin/pip install -r requirements.txt | ||
./pyenv/bin/python build_sdk.py --sel4=seL4 --version ${{ env.SDK_VERSION }} --tool-target-triple=x86_64-apple-darwin | ||
- name: Upload SDK | ||
- name: Upload SDK (x86-64) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: microkit-sdk-${{ env.SDK_VERSION }}-macos-x86-64 | ||
path: release/microkit-sdk-${{ env.SDK_VERSION }}.tar.gz | ||
build_macos_arm64: | ||
name: Build SDK (macOS ARM64) | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout Microkit repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
fetch-depth: 0 | ||
- name: Checkout seL4 repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: seL4/seL4 | ||
ref: microkit | ||
path: seL4 | ||
- name: Install SDK dependencies | ||
run: | | ||
rustup target add aarch64-apple-darwin | ||
brew tap riscv-software-src/riscv | ||
brew install riscv-tools | ||
brew install pandoc cmake dtc ninja qemu libxml2 [email protected] coreutils texlive | ||
- name: Install AArch64 GCC toolchain | ||
run: | | ||
wget -O aarch64-toolchain.tar.gz https://sel4-toolchains.s3.us-east-2.amazonaws.com/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-aarch64-none-elf.tar.xz%3Frev%3D09b11f159fc24fdda01e05bb32695dd5%26hash%3D6AAF4239F28AE17389AB3E611DFFE0A6 | ||
tar xf aarch64-toolchain.tar.gz | ||
echo "$(pwd)/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH | ||
- name: Set version | ||
run: echo "SDK_VERSION=$(./ci/dev_version.sh)" >> $GITHUB_ENV | ||
- name: Build SDK | ||
- name: Build SDK (ARM64) | ||
run: | | ||
python3.9 -m venv pyenv | ||
./pyenv/bin/pip install --upgrade pip setuptools wheel | ||
./pyenv/bin/pip install -r requirements.txt | ||
./pyenv/bin/python build_sdk.py --sel4=seL4 --version ${{ env.SDK_VERSION }} | ||
- name: Upload SDK | ||
./pyenv/bin/python build_sdk.py --sel4=seL4 --version ${{ env.SDK_VERSION }} --tool-target-triple=aarch64-apple-darwin | ||
- name: Upload SDK (ARM64) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: microkit-sdk-${{ env.SDK_VERSION }}-macos-aarch64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[target.aarch64-unknown-linux-musl] | ||
linker = "aarch64-none-elf-ld" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters