Skip to content

Commit 36395bc

Browse files
committed
ci: sync build profile
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
1 parent 8cbf633 commit 36395bc

File tree

5 files changed

+123
-4
lines changed

5 files changed

+123
-4
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
# Triggers the workflow on push or pull request events but only for the "main" branch
88
push:
99
branches: [ "main" ]
10+
tags:
11+
- 'v*-[0-9]+.[0-9]+.[0-9]+'
1012

1113
# Allows you to run this workflow manually from the Actions tab
1214
workflow_dispatch:
@@ -30,11 +32,21 @@ jobs:
3032
sudo apt-get install -y --no-install-recommends python3-cryptography python3-minimal python3-pyelftools
3133
sudo apt-get install -y --no-install-recommends bc bison flex libgnutls28-dev libssl-dev python3-dev python3-jsonschema python3-setuptools python3-yaml swig uuid-dev yamllint
3234
35+
- name: Set Variables UBOOT and TI_FIRMWARE
36+
if: startsWith(github.ref, 'refs/tags/')
37+
run: |
38+
TAG="${GITHUB_REF##*/}"
39+
# Everything before the final '-'
40+
echo "UBOOT=${TAG%-*}" >> $GITHUB_ENV
41+
# Everything after the final '-'
42+
echo "TI_FIRMWARE=${TAG##*-}" >> $GITHUB_ENV
43+
3344
- name: Build U-Boot
3445
run: ./build_u-boot.sh
3546

3647
- name: Continuous-Release
3748
uses: softprops/action-gh-release@v2
49+
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
3850
with:
3951
prerelease: true
4052
name: Continuous Release
@@ -44,3 +56,14 @@ jobs:
4456
public/tiboot3.bin
4557
public/tispl.bin
4658
public/u-boot.img
59+
60+
- name: Release
61+
uses: softprops/action-gh-release@v2
62+
if: startsWith(github.ref, 'refs/tags/')
63+
with:
64+
generate_release_notes: true
65+
files: |
66+
public/sysfw.itb
67+
public/tiboot3.bin
68+
public/tispl.bin
69+
public/u-boot.img

build_u-boot.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ ${CC64}gcc --version
1212

1313
DIR=$PWD
1414

15-
TI_FIRMWARE="11.01.01"
16-
TRUSTED_FIRMWARE="v2.13.0"
17-
OPTEE="4.6.0"
18-
UBOOT="v2025.07-rc4-Beagle"
15+
. version.sh
16+
17+
echo "****************************************************"
18+
echo [${UBOOT}:${TRUSTED_FIRMWARE}:${OPTEE}:${TI_FIRMWARE}]
19+
echo "****************************************************"
1920

2021
#rm -rf ./ti-linux-firmware/ || true
2122
if [ ! -d ./ti-linux-firmware/ ] ; then

public/base.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
3+
if ! id | grep -q root; then
4+
echo "must be run as root"
5+
exit
6+
fi
7+
8+
if [ -f ./sysfw.itb ] ; then
9+
rm -rf ./sysfw.itb || true
10+
fi
11+
12+
if [ -f ./tiboot3.bin ] ; then
13+
rm -rf ./tiboot3.bin || true
14+
fi
15+
16+
if [ -f ./tispl.bin ] ; then
17+
rm -rf ./tispl.bin || true
18+
fi
19+
20+
if [ -f ./u-boot.img ] ; then
21+
rm -rf ./u-boot.img || true
22+
fi
23+
24+
wget https://github.com/beagleboard/u-boot-beagley-ai/releases/download/TAG/sysfw.itb
25+
wget https://github.com/beagleboard/u-boot-beagley-ai/releases/download/TAG/tiboot3.bin
26+
wget https://github.com/beagleboard/u-boot-beagley-ai/releases/download/TAG/tispl.bin
27+
wget https://github.com/beagleboard/u-boot-beagley-ai/releases/download/TAG/u-boot.img
28+
29+
if [ -d /boot/firmware/ ] ; then
30+
cp -v ./sysfw.itb /boot/firmware/
31+
cp -v ./tiboot3.bin /boot/firmware/
32+
cp -v ./tispl.bin /boot/firmware/
33+
cp -v ./u-boot.img /boot/firmware/
34+
sync
35+
fi
36+
37+
if [ -d /boot/efi/ ] ; then
38+
cp -v ./sysfw.itb /boot/efi/
39+
cp -v ./tiboot3.bin /boot/efi/
40+
cp -v ./tispl.bin /boot/efi/
41+
cp -v ./u-boot.img /boot/efi/
42+
sync
43+
fi
44+
45+
if [ -b /dev/mmcblk0 ] ; then
46+
mmc bootpart enable 1 2 /dev/mmcblk0
47+
mmc bootbus set single_backward x1 x8 /dev/mmcblk0
48+
mmc hwreset enable /dev/mmcblk0
49+
50+
echo "Clearing eMMC boot0"
51+
52+
echo '0' >> /sys/class/block/mmcblk0boot0/force_ro
53+
54+
echo "dd if=/dev/zero of=/dev/mmcblk0boot0 count=32 bs=128k"
55+
sudo dd if=/dev/zero of=/dev/mmcblk0boot0 count=32 bs=128k
56+
57+
echo "dd if=/boot/firmware/tiboot3.bin of=/dev/mmcblk0boot0 bs=128k"
58+
sudo dd if=/boot/firmware/tiboot3.bin of=/dev/mmcblk0boot0 bs=128k
59+
sync
60+
fi
61+
62+
#

scripts/push-tag.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
wfile=$(mktemp /tmp/builder.XXXXXXXXX)
4+
5+
. version.sh
6+
7+
echo "****************************************************"
8+
echo [${UBOOT}:${TRUSTED_FIRMWARE}:${OPTEE}:${TI_FIRMWARE}]
9+
echo "****************************************************"
10+
11+
cp public/base.sh public/get_n_install.sh
12+
sed -i -e 's:TAG:'${UBOOT}'-'${TI_FIRMWARE}':g' public/get_n_install.sh
13+
14+
echo "${UBOOT}-${TI_FIRMWARE} release" > ${wfile}
15+
16+
git commit -a -F ${wfile} -s
17+
18+
git tag -a ${UBOOT}-${TI_FIRMWARE} -m "${UBOOT}-${TI_FIRMWARE}"
19+
20+
git push origin main --tags

version.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
#https://github.com/beagleboard/ti-linux-firmware.git
4+
TI_FIRMWARE="${TI_FIRMWARE:-11.01.01}"
5+
6+
#https://github.com/TrustedFirmware-A/trusted-firmware-a.git
7+
TRUSTED_FIRMWARE="lts-v2.12.4"
8+
9+
#https://github.com/OP-TEE/optee_os.git
10+
OPTEE="4.6.0"
11+
12+
#https://github.com/beagleboard/u-boot.git
13+
UBOOT="${UBOOT:-v2025.07-rc4-Beagle}"

0 commit comments

Comments
 (0)