-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[no ci] Workflow: prepare firmware images (#1573)
- Loading branch information
Showing
4 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
branches: | ||
- master | ||
schedule: | ||
- cron: '30 23 * * *' | ||
- cron: '30 22 * * *' | ||
workflow_dispatch: | ||
|
||
env: | ||
|
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
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.