diff --git a/.github/workflows/th1520.yml b/.github/workflows/th1520.yml index 438639f56369..e18f65c12e36 100644 --- a/.github/workflows/th1520.yml +++ b/.github/workflows/th1520.yml @@ -153,10 +153,36 @@ jobs: ] if: ${{ always() && !cancelled() && needs.kernel.result == 'success' }} steps: + - name: Install software + run: | + sudo apt update && \ + sudo apt install -y fastboot - name: 'Download artifact' uses: actions/download-artifact@v4 - name: Download th1520 u-boot run: | wget ${TH1520_IMAGE_BASE_URL}/${TH1520_IMAGE_DATE}/${TH1520_UBOOT} - name: 'List all downloaded files' - run: ls -R $GITHUB_WORKSPACE \ No newline at end of file + run: ls -R $GITHUB_WORKSPACE + - name: Decompress image files + run: | + zstd -d ./th1520-linux-64lp64/*.zst + zstd -d ./th1520-linux-64lp64-xt/*.zst + - name: 'Burn images into board' + run: | + init_cp2112.sh + # hold boot -> press reset -> flash uboot to ram -> press reboot -> flash uboot,root,boot + # --hold boot key and reset-- + board_reset_to_boot.sh + # --flash u-boot-- + fastboot flash ram ${TH1520_UBOOT} + # --reset board-- + sleep 2 + fastboot reboot + # --flash root & boot-- + fastboot flash uboot ${TH1520_UBOOT} + sleep 2 + fastboot flash boot ./th1520-linux-64lp64-xt/boot*.ext4 && fastboot flash root ./th1520-linux-64lp64-xt/root*.ext4 + # --reset board-- + board_reset.sh + \ No newline at end of file