aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Dannenberg2018-08-31 13:09:00 -0500
committerAndreas Dannenberg2018-09-13 13:43:39 -0500
commit00f62b3e8b3b02a17b8d08686f1a907d6a395ff9 (patch)
tree95775d7d1f7902a2e9a64d2a6039a46ceb1c3929 /gen_its.sh
downloadk3-image-gen-00f62b3e8b3b02a17b8d08686f1a907d6a395ff9.tar.gz
k3-image-gen-00f62b3e8b3b02a17b8d08686f1a907d6a395ff9.tar.xz
k3-image-gen-00f62b3e8b3b02a17b8d08686f1a907d6a395ff9.zip
Introduce framework to build SYSFW and config data into an ITB
In order to be able to consume system firmware (SYSFW) as well as the associated configuration data from the boot media introduce a framework that allows building the SYSFW image itself as well as the different domain-specific configuration fragments (board, pm, rm, and sec) into an image tree blob (ITB) file called sysfw.itb. To establish a known-good starting point for development and testing use U-Boot commit 7501705610 ("arm: K3: am654: Update board config for v2018.07a enforcement in 2018.08 release of sysfw") as a baseline for the AM654x board configuration data. Furthermore integrate SYSFW v2018.08b as released on 09/12/2018 by way of download URL. See included README.md for a more complete description. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Diffstat (limited to 'gen_its.sh')
-rwxr-xr-xgen_its.sh68
1 files changed, 68 insertions, 0 deletions
diff --git a/gen_its.sh b/gen_its.sh
new file mode 100755
index 000000000..3f7d57642
--- /dev/null
+++ b/gen_its.sh
@@ -0,0 +1,68 @@
1#!/bin/sh
2#
3# Script to generate FIT image source for System Firmware (SYSFW) and
4# associated configuration data based on a given SYSFW binary image plus
5# multiple domain-specific fragments in binary format all specified via
6# command line.
7#
8# Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
9# Andreas Dannenberg <dannenberg@ti.com>
10#
11# Redistribution and use in source and binary forms, with or without
12# modification, are permitted provided that the following conditions
13# are met:
14#
15# Redistributions of source code must retain the above copyright
16# notice, this list of conditions and the following disclaimer.
17#
18# Redistributions in binary form must reproduce the above copyright
19# notice, this list of conditions and the following disclaimer in the
20# documentation and/or other materials provided with the
21# distribution.
22#
23# Neither the name of Texas Instruments Incorporated nor the names of
24# its contributors may be used to endorse or promote products derived
25# from this software without specific prior written permission.
26#
27# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38#
39# usage: $0 <bin_name> [<bin_name> [<bin_name] ...]
40#
41
42cat << __HEADER_EOF
43/dts-v1/;
44
45/ {
46 description = "SYSFW and Config Fragments";
47 #address-cells = <1>;
48
49 images {
50__HEADER_EOF
51
52for bin_name in $*
53do
54 cat << __CFG_IMAGE_EOF
55 $(basename $bin_name) {
56 description = "$(basename $bin_name .bin)";
57 data = /incbin/("$bin_name");
58 type = "firmware";
59 arch = "arm";
60 compression = "none";
61 };
62__CFG_IMAGE_EOF
63done
64
65cat << __ITS_EOF
66 };
67};
68__ITS_EOF