From patchwork Sun Apr 12 14:58:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 237686 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Sun, 12 Apr 2020 16:58:40 +0200 Subject: [PATCH 1/1] tools/imximage: accept // as comment line start Message-ID: <20200412145840.32672-1-xypron.glpk@gmx.de> arch/arm/mach-imx/spl_sd.cfg contains comments. These cannot be parsed by 'mkimage -T imximage'. We cannot use '#' in spl_sd.cfg as this leads to a build error. So let's use "//" to mark comment lines. Signed-off-by: Heinrich Schuchardt --- arch/arm/mach-imx/spl_qspi.cfg | 14 +++++++------- arch/arm/mach-imx/spl_sd.cfg | 14 +++++++------- tools/imximage.c | 7 +++++-- 3 files changed, 19 insertions(+), 16 deletions(-) -- 2.25.1 diff --git a/arch/arm/mach-imx/spl_qspi.cfg b/arch/arm/mach-imx/spl_qspi.cfg index 88956e626f..6e79adb0da 100644 --- a/arch/arm/mach-imx/spl_qspi.cfg +++ b/arch/arm/mach-imx/spl_qspi.cfg @@ -1,7 +1,7 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ - */ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ +// #define __ASSEMBLY__ #include @@ -9,9 +9,9 @@ IMAGE_VERSION 2 BOOT_FROM qspi -/* - * Secure boot support - */ +// +// Secure boot support +// #ifdef CONFIG_SECURE_BOOT CSF CONFIG_CSF_SIZE #endif diff --git a/arch/arm/mach-imx/spl_sd.cfg b/arch/arm/mach-imx/spl_sd.cfg index dbaee81535..b14becc2ce 100644 --- a/arch/arm/mach-imx/spl_sd.cfg +++ b/arch/arm/mach-imx/spl_sd.cfg @@ -1,7 +1,7 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ - */ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/ +// #define __ASSEMBLY__ #include @@ -9,9 +9,9 @@ IMAGE_VERSION 2 BOOT_FROM sd -/* - * Secure boot support - */ +// +// Secure boot support +// #ifdef CONFIG_IMX_HAB CSF CONFIG_CSF_SIZE #endif diff --git a/tools/imximage.c b/tools/imximage.c index d7edd3c52f..4f62d57790 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -772,8 +772,11 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, char *name) if (token == NULL) break; - /* Drop all text starting with '#' as comments */ - if (token[0] == '#') + /* + * Drop all text starting with '#' or "//" as comments + */ + if (token[0] == '#' || + (token[0] == '/' && token[1] == '/')) break; parse_cfg_fld(imxhdr, &cmd, token, name,