Skip to content

Build for armv6 (gcc 10.2) #28

Build for armv6 (gcc 10.2)

Build for armv6 (gcc 10.2) #28

Workflow file for this run

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: arm-linux-gnueabihf
CROSS_PATH: /opt/cross
CROSS_PATH_ARCH: /opt/cross/armv6
CROSS_TOOLS_ARM: armv8.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-