Skip to content

Commit

Permalink
Merge branch 'arm' of github.com:FyraLabs/cr-boot into arm
Browse files Browse the repository at this point in the history
  • Loading branch information
ellyq committed Dec 5, 2023
2 parents 07bd226 + 9a7dd09 commit 37f0895
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 4 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build cr-boot for ARM64 (Google/Kukui)

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: registry.fedoraproject.org/fedora-minimal:39

steps:
- name: Install dependencies
run: |
dnf5 update -y
dnf5 install -y git make gcc gcc-aarch64-linux-gnu ccache flex bison elfutils-devel parted vboot-utils golang xz bc tar
- uses: actions/checkout@v3
with:
submodules: true

- name: Add Git safe directory
run: |
git config --global --add safe.directory $(pwd)
- name: Setup enviroment variables
run: |
echo "PATH=$PATH:$HOME/go/bin" >> $GITHUB_ENV
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "CCACHE_DIR=$(pwd)/ccache" >> $GITHUB_ENV
echo "UROOT_COMMIT=$(git rev-parse HEAD:u-root)" >> $GITHUB_ENV
echo "KERNEL_COMMIT=$(git rev-parse HEAD:kernel)" >> $GITHUB_ENV
echo "ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-" >> $GITHUB_ENV
- name: Setup Go cache
uses: actions/cache@v3
with:
path: ${{ env.GOCACHE }}
key: go-${{ env.UROOT_COMMIT }}
restore-keys: |
go-
- name: Setup ccache cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.KERNEL_COMMIT }}-${{ hashFiles('kernel.config') }}
restore-keys: |
ccache-${{ env.KERNEL_COMMIT }}-
ccache-
- name: Install u-root
run: go install github.com/u-root/u-root@$UROOT_COMMIT

- name: Copy ARM64 kernel configuration
run: configs/kernel.mt8183 kernel/.config

- name: Build cr-boot
run: make CC="ccache gcc" -j$(nproc)

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: cr-boot
path: build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build cr-boot
name: Build cr-boot for x86_64 platforms

on:
push:
Expand Down Expand Up @@ -55,10 +55,10 @@ jobs:
- name: Install u-root
run: go install github.com/u-root/u-root@$UROOT_COMMIT

- name: Copy cr-boot kernel config
run: cp kernel.config kernel/.config
- name: Copy cr-boot kernel config for x86
run: cp configs/kernel.x86 kernel/.config

- name: Build cr-boot
- name: Build cr-boot for x86_64
run: make CC="ccache gcc" -j$(nproc)

- name: Upload build artifacts
Expand Down

0 comments on commit 37f0895

Please sign in to comment.