FLAS-30 #resolve Add Readme and chip-update-firmware.sh
This commit is contained in:
parent
a560977076
commit
9f7457d2b8
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.firmware
|
17
README.md
Normal file
17
README.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# CHIP-tools
|
||||||
|
A collection of scripts for working with CHIP
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
1) [sunxi-tools](https://github.com/linux-sunxi/sunxi-tools.git)
|
||||||
|
2) **uboot-tools** from your package manager
|
||||||
|
|
||||||
|
## Included Tools
|
||||||
|
### chip-update-firmware
|
||||||
|
This tool is used to download the latest firmware release for CHIP and run **chip-fel-flash** with the newest firmware.
|
||||||
|
|
||||||
|
### chip-fel-flash
|
||||||
|
This tool is used to flash a local firmware image to a connected CHIP over FEL
|
||||||
|
|
||||||
|
### chip-fel-upload
|
||||||
|
This tool is used to upload uboot, a linux kernel and an initramfs and launch into it
|
||||||
|
|
27
chip-update-firmware.sh
Executable file
27
chip-update-firmware.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
FW_DIR="$(pwd)/.firmware"
|
||||||
|
FW_IMAGE_DIR="${FW_DIR}/images"
|
||||||
|
S3_URL="https://s3-ap-northeast-1.amazonaws.com/stak-images/firmware/chip/stable/5/images"
|
||||||
|
|
||||||
|
function require_directory {
|
||||||
|
if [[ ! -d "${1}" ]]; then
|
||||||
|
mkdir -p "${1}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function cache_download {
|
||||||
|
if [[ ! -f "${1}/${2}" ]]; then
|
||||||
|
wget -P "${FW_IMAGE_DIR}" "${S3_URL}/${2}" ||
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
require_directory "${FW_IMAGE_DIR}"
|
||||||
|
cache_download "${FW_IMAGE_DIR}" rootfs.ubi
|
||||||
|
cache_download "${FW_IMAGE_DIR}" sun5i-r8-chip.dtb
|
||||||
|
cache_download "${FW_IMAGE_DIR}" sunxi-spl.bin
|
||||||
|
cache_download "${FW_IMAGE_DIR}" uboot-env.bin
|
||||||
|
cache_download "${FW_IMAGE_DIR}" zImage
|
||||||
|
cache_download "${FW_IMAGE_DIR}" u-boot-dtb.bin
|
||||||
|
|
||||||
|
BUILDROOT_OUTPUT_DIR="${FW_DIR}" ./chip-fel-flash.sh
|
Loading…
Reference in New Issue
Block a user