forked from geissdoerfer/shepherd
-
Notifications
You must be signed in to change notification settings - Fork 2
90 lines (73 loc) · 3.06 KB
/
build_pru_gcc.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
name: Build Pru
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
workflow_call:
jobs:
pru-tests:
runs-on: ubuntu-latest
env:
# as in roles/sheep/vars/main.yml
gcc_pru_cc_release: "pru-elf-2023.05.amd64"
gcc_pru_support_branch: "linux-4.19-rproc"
# weblinks
link_gcc: "https://github.com/dinuxbg/gnupru/releases/download/2023.05/"
link_pssp: "https://github.com/dinuxbg/pru-software-support-package.git"
# env for makefile
PRU_GCC: "${{ github.workspace }}/pru-elf" # was /pru-elf-2022.05.amd64 before
PRU_GCC_SUPPORT: "${{ github.workspace }}/pru-software-support-package"
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Install dependency 🔧
run: sudo apt install build-essential
- name: prepare directories 📓
run: |
mkdir -p ${{ env.PRU_GCC }}/bin
mkdir -p ${{ env.PRU_GCC_SUPPORT }}
- name: Download GCC cross-compiler for PRU ⚔
run: "wget -q --tries 3 ${{ env.link_gcc }}${{ env.gcc_pru_cc_release }}.tar.xz --output-document=gcc-pru.tar.xz"
working-directory: "${{ github.workspace }}"
- name: Extract GCC cross-compiler ⚔
run: "tar -xf gcc-pru.tar.xz"
#run: "tar -xf gcc-pru.tar.xz -C ${{ env.PRU_GCC }}"
working-directory: "${{ github.workspace }}"
- name: Install PSSP dependency 🔧
run: "git clone --branch ${{ env.gcc_pru_support_branch }} ${{ env.link_pssp }}"
working-directory: "${{ github.workspace }}"
- name: temporary size-hack for PRU0 🕚
run: "sudo cp software/firmware/lib/am335xl.pru0 ${{ env.PRU_GCC }}/pru-elf/lib/device-specs/am335xl.pru0"
working-directory: "${{ github.workspace }}"
- name: Build PRU0 - SHP EMU 🧱
run: |
make TYPE=EMU
${{ env.PRU_GCC }}/bin/pru-size gen_gcc/pru0-shepherd-EMU-fw.elf
working-directory: "software/firmware/pru0-shepherd-fw/"
- name: Clean Programmer 🧹
run: make clean
working-directory: "software/firmware/pru0-programmer/"
- name: Build PRU0 - SHP HRV 🧱
run: |
make TYPE=HRV
${{ env.PRU_GCC }}/bin/pru-size gen_gcc/pru0-shepherd-HRV-fw.elf
working-directory: "software/firmware/pru0-shepherd-fw/"
- name: Build PRU1 🧱
run: |
make
${{ env.PRU_GCC }}/bin/pru-size gen_gcc/pru1-shepherd-fw.elf
working-directory: "software/firmware/pru1-shepherd-fw/"
- name: Build SWD Programmer 🧱
run: |
make
${{ env.PRU_GCC }}/bin/pru-size gen_gcc/pru0-programmer-SWD-fw.elf
working-directory: "software/firmware/pru0-programmer/"
- name: Clean Programmer 🧹
run: make clean
working-directory: "software/firmware/pru0-programmer/"
- name: Build SBW Programmer 🧱
run: |
make PROTO=SBW
${{ env.PRU_GCC }}/bin/pru-size gen_gcc/pru0-programmer-SBW-fw.elf
working-directory: "software/firmware/pru0-programmer/"