Skip to content

Commit

Permalink
[no ci] Workflow: prepare firmware images (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda authored Oct 11, 2024
1 parent 688aaaa commit 752fa7f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- master
schedule:
- cron: '30 23 * * *'
- cron: '30 22 * * *'
workflow_dispatch:

env:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: image
on:
schedule:
- cron: '30 23 * * *'
workflow_dispatch:

env:
SIGMASTAR: ssc30kd ssc30kq ssc325 ssc333 ssc335 ssc335de ssc337 ssc337de ssc338q ssc377 ssc377d ssc377de ssc378de
INGENIC: t10 t10l t20 t20l t20x t21n t30a t30a1 t30l t30n t30x t31a t31al t31l t31lc t31n t31x

jobs:
toolchain:
name: Image
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
link=https://github.com/openipc/firmware/releases/download/latest
create() {
uboot=u-boot-$1-nor.bin
firmware=openipc.$2-nor-$3.tgz
release=images/openipc-$1-nor-$3.bin
mkdir -p images output
if ! wget -nv $link/$uboot -O output/$1.bin; then
echo -e "Download failed: $link/$uboot\n"
return 0
fi
if ! wget -nv $link/$firmware -O output/$2.tgz; then
echo -e "Download failed: $link/$firmware\n"
return 0
fi
tar -xf output/$2.tgz -C output
dd if=/dev/zero bs=1K count=5000 status=none | tr '\000' '\377' > $release
dd if=output/$1.bin of=$release bs=1K seek=0 conv=notrunc status=none
dd if=output/uImage.$2 of=$release bs=1K seek=320 conv=notrunc status=none
dd if=output/rootfs.squashfs.$2 of=$release bs=1K seek=2368 conv=notrunc status=none
rm -rf output
echo -e "Created: $release\n"
}
for soc in $SIGMASTAR; do
create $soc $soc lite
create $soc $soc ultimate
done
for soc in $INGENIC; do
create $soc ${soc:0:3} lite
create $soc ${soc:0:3} ultimate
done
- name: Upload
uses: softprops/action-gh-release@v2
with:
tag_name: images
files: images/*.bin
File renamed without changes.
File renamed without changes.

0 comments on commit 752fa7f

Please sign in to comment.