mirror of https://github.com/OpenIPC/firmware.git
[no ci] Workflow: prepare firmware images (#1573)
parent
688aaaa828
commit
752fa7ff87
|
@ -4,7 +4,7 @@ on:
|
|||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: '30 23 * * *'
|
||||
- cron: '30 22 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue