buildroot #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: buildroot | |
on: | |
workflow_dispatch: | |
inputs: | |
git-address: | |
description: 'git-address' | |
required: true | |
default: 'https://github.com/buildroot/buildroot.git' | |
branches-tags: | |
description: 'branches-tags' | |
required: true | |
default: '2023.08.4' | |
board: | |
description: 'board' | |
required: true | |
default: 'tcrpfriend' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Clone source code | |
run: | | |
git clone ${{github.event.inputs.git-address}} /opt/buildroot | |
cd /opt/buildroot | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libelf-dev | |
- name: Bring over config files from redpill-load | |
run: | | |
mkdir /opt/config-files | |
cd /opt/config-files | |
git clone -b develop https://github.com/pocopico/redpill-load.git | |
ls -ltr /opt/config-files/redpill-load/config | |
- name: Build | |
run: | | |
mkdir /opt/firmware | |
cd /opt/buildroot | |
git checkout ${{github.event.inputs.branches-tags}} | |
git pull origin ${{github.event.inputs.branches-tags}} | |
cp -rf /home/runner/work/tcrpfriend/tcrpfriend/buildroot/* . | |
cp -rf /opt/config-files/redpill-load/config /home/runner/work/tcrpfriend/tcrpfriend/buildroot/board/tcrpfriend/rootfs-overlay/root/ | |
chmod 777 board/tcrpfriend/rootfs-overlay/root/*.sh | |
chmod 777 board/tcrpfriend/rootfs-overlay/root/tools/* | |
VERSION=`grep "BOOTVER=" /home/runner/work/tcrpfriend/tcrpfriend/buildroot/board/tcrpfriend/rootfs-overlay/root/boot.sh | awk -F\" '{print $2}'` | |
echo "Version: ${VERSION}" | |
echo '---start make---' | |
make ${{github.event.inputs.board}}_defconfig | |
make | |
cp -r /opt/buildroot/output/images /opt/firmware | |
- name: Upload buildroot-${{github.event.inputs.branches-tags}}-${{github.event.inputs.board}} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: buildroot-${{github.event.inputs.branches-tags}}-${{github.event.inputs.board}} | |
path: /opt/firmware |