Skip to content

image

image #64

Workflow file for this run

name: image
on:
schedule:
- cron: '30 23 * * *'
workflow_dispatch:
env:
SIGMASTAR: ssc30kq ssc338q
INGENIC: t31x
TAG_NAME: image
jobs:
toolchain:
name: Image
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
link=https://github.com/libc0607/openipc-firmware/releases/download/latest
create() {
uboot=u-boot-$1-nor.bin
firmware=openipc.$2-nor-fpv_$3.tgz
release=target/openipc-$1-nor-fpv_$3.bin
mkdir -p output target
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 8812au_8812eu
create $soc $soc 8812cu
create $soc $soc 8733bu
create $soc $soc 8192eu
create $soc $soc 8188fu
done
for soc in $INGENIC; do
create $soc ${soc:0:3} 8812au
create $soc ${soc:0:3} 8812cu
create $soc ${soc:0:3} 8812eu
create $soc ${soc:0:3} 8733bu
create $soc ${soc:0:3} 8192eu
create $soc ${soc:0:3} 8188fu
done
- name: Upload
uses: softprops/action-gh-release@v2
with:
tag_name: ${{env.TAG_NAME}}
make_latest: false
files: target/*.bin