aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Gagniuc2021-03-29 12:05:13 -0500
committerTom Rini2021-04-14 15:23:01 -0400
commitd8a395109e127cda11bcfceae2f7200c785e8443 (patch)
tree7d8f9531cadff69f0493ddb132b21d4e19a2dab5
parent55e7a1a4350c70d685684111a48e1875e04aad8b (diff)
spl: fit: Warn if FIT contains "fpga" property in config node
Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") requires that FPGA images be referenced through the "loadables" in the config node. This means that "fpga" properties in config nodes are deprecated. Given that there are likely FIT images which use "fpga", let's not break those right away. Print a warning message that such use is deprecated, and give users a couple of releases to update their Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
-rw-r--r--common/spl/spl_fit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 514ec9138f1..496fabc4e71 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -529,6 +529,12 @@ __weak bool spl_load_simple_fit_skip_processing(void)
return false;
}
+static void warn_deprecated(const char *msg)
+{
+ printf("DEPRECATED: %s\n", msg);
+ printf("\tSee doc/uImage.FIT/source_file_format.txt\n");
+}
+
static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node,
struct spl_image_info *fpga_image)
{
@@ -562,6 +568,8 @@ static int spl_fit_load_fpga(struct spl_fit_info *ctx,
if (node < 0)
return node;
+ warn_deprecated("'fpga' property in config node. Use 'loadables'");
+
/* Load the image and set up the fpga_image structure */
ret = spl_load_fit_image(info, sector, ctx, node, &fpga_image);
if (ret) {