3 # Licensed under the terms of the GNU GPL License version 2 or later.
4 # Author: Piotr Dymacz <pepe2k@gmail.com>, based on mkits.sh.
6 # Qualcomm SDK (QSDK) sysupgrade compatible images for IPQ40xx, IPQ806x
7 # and IPQ807x use FIT format together with 'dumpimage' tool from U-Boot
8 # for verifying and extracting them. Based on 'images' sections names,
9 # corresponding mtd partitions are flashed.
10 # This is a simple script for generating FIT images tree source files,
11 # compatible with the QSDK sysupgrade format. Resulting images can be
12 # used for initial (factory -> OpenWrt) installation and would work
13 # both in CLI and GUI. The script is also universal in a way it allows
14 # to include as many sections as needed.
18 echo "Usage: `basename $0` output img0_name img0_file [[img1_name img1_file] ...]"
22 # We need at least 3 arguments
23 [ "$#" -lt 3 ] && usage
28 # Create a default, fully populated DTS file
33 description = \"OpenWrt factory image\";
38 while [ -n "$1" -a -n "$2" ]; do
46 description = \"${name}\";
47 data = /incbin/(\"${file}\");
50 compression = \"none\";