Skip to content

Commit

Permalink
Merge pull request #15 from jto6/github-actions
Browse files Browse the repository at this point in the history
github: Create firmware build workflow
  • Loading branch information
nmenon authored Jun 29, 2024
2 parents aa45501 + 9cef2e5 commit 2fe2a2c
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 3 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Build Upstream
run-name: Running ${{ github.workflow }} by ${{ github.actor }}
on: [push]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- run: echo "Job triggered by ${{ github.event_name }} event"
- run: echo "Building from branch ${{ github.ref }}"
- name: Install missing packages
run: |
sudo apt-get update
sudo apt-get install -y make build-essential python3 \
python3-pyelftools yamllint libgnutls28-dev u-boot-tools mtools \
gcc-aarch64-linux-gnu gcc-arm-none-eabi
- name: Cache git repos
uses: actions/cache@v4
with:
path: .git
key: git-folder
- name: Check out repository code
uses: actions/checkout@v4
- name: Update git submodules
run: make git
- name: Setup cross compiler environment vars
run: |
echo "CROSS_COMPILE_64=aarch64-linux-gnu-" >> $GITHUB_ENV
echo "CROSS_COMPILE_32=arm-none-eabi-" >> $GITHUB_ENV
- name: Build all configs
run: ./MAKEALL
- name: Save build summary
uses: actions/upload-artifact@v4
with:
name: Build_results
path: /tmp/upstream-boot-build/build-summary.txt
- name: Save build errors
uses: actions/upload-artifact@v4
with:
name: Error_results
path: /tmp/upstream-boot-build/error-summary.txt
- name: Deploy am64x_evm_hs_fs firmware
uses: actions/upload-artifact@v4
with:
name: am64x_evm_hs_fs
path: /tmp/upstream-boot-build/deploy/am64x_evm_hs_fs_all
- name: Deploy am62x_evm_hsfs firmware
uses: actions/upload-artifact@v4
with:
name: am62x_evm_hsfs
path: /tmp/upstream-boot-build/deploy/am62x_evm_hsfs_all
- name: Deploy am62x_beagleplay_gp firmware
uses: actions/upload-artifact@v4
with:
name: am62x_beagleplay_gp
path: /tmp/upstream-boot-build/deploy/am62x_beagleplay_gp_all
- name: Deploy am62ax_evm_hs_fs firmware
uses: actions/upload-artifact@v4
with:
name: am62ax_evm_hs_fs
path: /tmp/upstream-boot-build/deploy/am62ax_evm_hs_fs_all
- name: Deploy am62px_evm_hsfs firmware
uses: actions/upload-artifact@v4
with:
name: am62px_evm_hsfs
path: /tmp/upstream-boot-build/deploy/am62px_evm_hsfs_all
- name: Deploy j721e_evm_gp firmware
uses: actions/upload-artifact@v4
with:
name: j721e_evm_gp
path: /tmp/upstream-boot-build/deploy/j721e_evm_gp_all
- name: Deploy j721e_beagleboneai64_gp firmware
uses: actions/upload-artifact@v4
with:
name: j721e_beagleboneai64_gp
path: /tmp/upstream-boot-build/deploy/j721e_beagleboneai64_gp_all
- name: Deploy j7200_evm_hs firmware
uses: actions/upload-artifact@v4
with:
name: j7200_evm_hs
path: /tmp/upstream-boot-build/deploy/j7200_evm_hs_all
- name: Deploy j721s2_evm_hs_fs firmware
uses: actions/upload-artifact@v4
with:
name: j721s2_evm_hs_fs
path: /tmp/upstream-boot-build/deploy/j721s2_evm_hs_fs_all
- run: echo "This job's status is ${{ job.status }}."
2 changes: 1 addition & 1 deletion MAKEALL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

BASE_FOLDER="${BASE_FOLDER:-/tmp/upstream-boot-build/}"
BASE_FOLDER="${BASE_FOLDER:-/tmp/upstream-boot-build}"
BUILD_FOLDER=${BASE_FOLDER}/build
DEPLOY_FOLDER=${BASE_FOLDER}/deploy
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,33 @@ OP-TEE can be specified if desired.
* OPTEE OS: Upstream
* ti-linux-firmware: TI, but hopefully we should upstream the firmware pieces as well.

![build status](https://github.com/nmenon/k3-upstream-boot-build/actions/workflows/main.yml/badge.svg)

# System pre-requisites:
The following lists the pre-requisites for building the bootloader components

* This assumes a x86_64 Linux system for build. If not, adjust appropriately.

## Compiler

https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

Download the following:
* AArch32 GNU/Linux target with hard float (arm-none-linux-gnueabihf)
* AArch64 GNU/Linux target (aarch64-none-linux-gnu)

### Ubuntu
Ubuntu provides ARM cross compiler packages. To use, install with:

apt install gcc-aarch64-linux-gnu gcc-arm-none-eabi

and set your cross compiler env variables:

export CROSS_COMPILE_64=aarch64-linux-gnu-

export CROSS_COMPILE_32=arm-none-eabi-

### Directly from arm.com
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

Also see: https://www.linaro.org/downloads/#gnu_and_llvm You could
optionally use https://snapshots.linaro.org/gnu-toolchain/, but
`CROSS_COMPILE_64` and `CROSS_COMPILE_32` variables need to be
Expand Down

0 comments on commit 2fe2a2c

Please sign in to comment.