Skip to content

workflow_dispatch:を追加 #4

workflow_dispatch:を追加

workflow_dispatch:を追加 #4

Workflow file for this run

name: Build rk3399-edk2
on:
push:
branches:
- master
workflow_dispatch:
env:
REPO_URL: https://github.com/shantur/rk3399-edk2
REPO_BRANCH: master
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
SSH_ACTIONS: false
UPLOAD_BIN_DIR: false
UPLOAD_FIRMWARE: true
UPLOAD_COWTRANSFER: false
UPLOAD_WETRANSFER: false
TZ: Asia/Shanghai
jobs:
build:
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo -E apt-get update
sudo -E apt-get install build-essential acpica-tools nasm uuid-dev gcc-aarch64-linux-gnu
sudo timedatectl set-timezone "$TZ"
export WORKSPACE=/workspace
sudo mkdir -p /workspace
cd /workspace
sudo chown $USER:$GROUPS /workspace
- name: Clone source code
working-directory: /workspace
run: |
git clone https://github.com/tianocore/edk2.git
pushd edk2
git checkout 46f4c9677c615d862649459392f8f55b3e6567c2
popd
git clone https://github.com/tianocore/edk2-non-osi.git
pushd edk2-non-osi
git checkout 1e2ca640be54d7a4d5d804c4f33894d099432de3
popd
git clone https://github.com/tianocore/edk2-platforms.git
pushd edk2-platforms
git checkout 861c200cda1417539d46fe3b1eba2b582fa72cbb
popd
git clone https://github.com/shantur/rk3399-edk2.git edk2-platforms/Platform/Rockchip
- name: SSH connection to Actions
uses: csexton/debugger-action@master
if: env.SSH_ACTIONS == 'true' || contains(github.event.action, 'ssh')
- name: Compile the firmware
id: compile
run: |
export WORKSPACE=/workspace
export GCC5_AARCH64_PREFIX=aarch64-linux-gnu-
export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-platforms:$WORKSPACE/edk2-non-osi
cd /workspace
. edk2/edksetup.sh
make -C edk2/BaseTools
build -a AARCH64 -t GCC5 -p edk2-platforms/Platform/Rockchip/Rk3399Pkg/Rk3399-SDK.dsc -b DEBUG
edk2-platforms/Platform/Rockchip/Rk3399Pkg/Tools/loaderimage --pack --uboot Build/Rk3399-SDK/DEBUG_GCC5/FV/RK3399_SDK_UEFI.fd RK3399_SDK_UEFI.img
mkdir /workspace/uefi_output
cp /workspace/RK3399_SDK_UEFI.img /workspace/uefi_output
cp /workspace/Build/Rk3399-SDK/DEBUG_GCC5/FV/RK3399_SDK_UEFI.fd /workspace/uefi_output
wget -O /workspace/uefi_output/idbloader.img https://github.com/chainsx/rk3399-edk2/raw/master/Rk3399Pkg/Tools/Bin/idbloader.img
wget -O /workspace/uefi_output/trust.img https://github.com/chainsx/rk3399-edk2/raw/master/Rk3399Pkg/Tools/Bin/trust.img
- name: Check space usage
if: (!cancelled())
run: df -hT
- name: Upload bin directory
uses: actions/upload-artifact@master
if: env.UPLOAD_BIN_DIR == 'true'
with:
name: efi_target
path: /workspace/uefi_output
- name: Organize files
id: organize
if: env.UPLOAD_FIRMWARE == 'true' && !cancelled()
run: |
cd /workspace/uefi_output
echo "::set-env name=FIRMWARE::$PWD"
echo "::set-output name=status::success"
- name: Upload firmware directory
uses: actions/upload-artifact@master
if: steps.organize.outputs.status == 'success' && !cancelled()
with:
name: uefi_firmware
path: ${{ env.FIRMWARE }}