-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (54 loc) · 1.82 KB
/
build_armv6.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
name: Build for armv6 (gcc 10.2)
on:
workflow_dispatch:
inputs:
debug:
required: true
type: boolean
description: Debug build
default: true
board:
required: true
type: choice
description: Board type
options:
- FULLSPEC
- STANDARD
default: FULLSPEC
branch:
required: true
type: string
description: Branch to build
jobs:
build:
runs-on: ubuntu-22.04
env:
BUILD_REPOSITORY: ${{ secrets.BUILD_REPOSITORY }}
CROSS_ARCH: aarch64-linux-gnu
CROSS_ARCH: arm-linux-gnueabihf
CROSS_PATH: /opt/cross
CROSS_PATH_ARCH: /opt/cross/armv6
CROSS_TOOLS_ARM: armv6.tar.gz
CROSS_TOOLS_GLIBC: glibc-2.36.tar.gz
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Install additional packages
run: sudo apt install --yes protobuf-compiler
- name: Set up cross compilation environment
run: |
mkdir $CROSS_PATH && cd $CROSS_PATH &&
wget -q $BUILD_REPOSITORY/$CROSS_TOOLS_ARM &&
wget -q $BUILD_REPOSITORY/$CROSS_TOOLS_GLIBC &&
tar zxf $CROSS_TOOLS_ARM && rm $CROSS_TOOLS_ARM &&
tar zxf $CROSS_TOOLS_GLIBC && rm $CROSS_TOOLS_GLIBC &&
ln -s /lib/x86_64-linux-gnu/libmpc.so.3 glibc-2.36/lib &&
ln -s /lib/x86_64-linux-gnu/libmpfr.so.6 glibc-2.36/lib &&
ln -s /lib/x86_64-linux-gnu/libgmp.so.10 glibc-2.36/lib
- name: Cross compile
run: |
export PATH=$CROSS_PATH_ARCH/bin:$PATH &&
export LDFLAGS="-Wl,-rpath-link,$CROSS_PATH_ARCH/$CROSS_ARCH/sys-root/lib" &&
debug=${{ inputs.debug && 'DEBUG=1' || '' }} &&
make -j $(nproc) BOARD=${{ inputs.board }} $debug CROSS_COMPILE=$CROSS_ARCH-