forked from shantur/rk3399-edk2
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (92 loc) · 3.55 KB
/
build.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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 }}