* [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size
@ 2022-08-13 12:03 Fabio Estevam
2022-08-14 17:25 ` Marek Vasut
2022-09-22 13:33 ` sbabic
0 siblings, 2 replies; 5+ messages in thread
From: Fabio Estevam @ 2022-08-13 12:03 UTC (permalink / raw)
To: sbabic; +Cc: marex, u-boot, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
When running the script to sign SPL/U-Boot on a kontron-sl-mx8mm board,
the fit_block_size was calculated as 0x1000 instead of 0x1020.
Add an extra parenthesis pair to fix it.
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Hi Stefano,
This one applies against u-boot-imx.
Since this one has not reached mainline yet, it is OK
if you want to squash this change in the original commit.
doc/imx/habv4/csf_examples/mx8m/csf.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/imx/habv4/csf_examples/mx8m/csf.sh b/doc/imx/habv4/csf_examples/mx8m/csf.sh
index 6898513be51f..7d267a7218d3 100644
--- a/doc/imx/habv4/csf_examples/mx8m/csf.sh
+++ b/doc/imx/habv4/csf_examples/mx8m/csf.sh
@@ -40,7 +40,7 @@ dd if=csf_spl.bin of=flash.bin bs=1 seek=${spl_dd_offset} conv=notrunc
# fitImage tree
fit_block_base=$(printf "0x%x" $(( $(sed -n "/CONFIG_SYS_TEXT_BASE=/ s@.*=@@p" .config) - $(sed -n "/CONFIG_FIT_EXTERNAL_OFFSET=/ s@.*=@@p" .config) - 0x200 - 0x40)) )
fit_block_offset=$(printf "0x%s" $(fdtget -t x u-boot.dtb /binman/imx-boot/uboot offset))
-fit_block_size=$(printf "0x%x" $(( ( $(fdtdump u-boot.itb 2>/dev/null | sed -n "/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1) + 0x20 )) )
+fit_block_size=$(printf "0x%x" $(( ( ($(fdtdump u-boot.itb 2>/dev/null | sed -n "/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1)) + 0x20 )) )
sed -i "/Blocks = / s@.*@ Blocks = $fit_block_base $fit_block_offset $fit_block_size \"flash.bin\", \\\\@" csf_fit.tmp
# U-Boot
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size
2022-08-13 12:03 [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size Fabio Estevam
@ 2022-08-14 17:25 ` Marek Vasut
2022-09-20 18:46 ` Fabio Estevam
2022-09-22 13:33 ` sbabic
1 sibling, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2022-08-14 17:25 UTC (permalink / raw)
To: Fabio Estevam, sbabic; +Cc: u-boot, Fabio Estevam
On 8/13/22 14:03, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> When running the script to sign SPL/U-Boot on a kontron-sl-mx8mm board,
> the fit_block_size was calculated as 0x1000 instead of 0x1020.
>
> Add an extra parenthesis pair to fix it.
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> Hi Stefano,
>
> This one applies against u-boot-imx.
>
> Since this one has not reached mainline yet, it is OK
> if you want to squash this change in the original commit.
>
> doc/imx/habv4/csf_examples/mx8m/csf.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/doc/imx/habv4/csf_examples/mx8m/csf.sh b/doc/imx/habv4/csf_examples/mx8m/csf.sh
> index 6898513be51f..7d267a7218d3 100644
> --- a/doc/imx/habv4/csf_examples/mx8m/csf.sh
> +++ b/doc/imx/habv4/csf_examples/mx8m/csf.sh
> @@ -40,7 +40,7 @@ dd if=csf_spl.bin of=flash.bin bs=1 seek=${spl_dd_offset} conv=notrunc
> # fitImage tree
> fit_block_base=$(printf "0x%x" $(( $(sed -n "/CONFIG_SYS_TEXT_BASE=/ s@.*=@@p" .config) - $(sed -n "/CONFIG_FIT_EXTERNAL_OFFSET=/ s@.*=@@p" .config) - 0x200 - 0x40)) )
> fit_block_offset=$(printf "0x%s" $(fdtget -t x u-boot.dtb /binman/imx-boot/uboot offset))
> -fit_block_size=$(printf "0x%x" $(( ( $(fdtdump u-boot.itb 2>/dev/null | sed -n "/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1) + 0x20 )) )
> +fit_block_size=$(printf "0x%x" $(( ( ($(fdtdump u-boot.itb 2>/dev/null | sed -n "/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1)) + 0x20 )) )
> sed -i "/Blocks = / s@.*@ Blocks = $fit_block_base $fit_block_offset $fit_block_size \"flash.bin\", \\\\@" csf_fit.tmp
Reviewed-by: Marek Vasut <marex@denx.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size
2022-08-14 17:25 ` Marek Vasut
@ 2022-09-20 18:46 ` Fabio Estevam
2022-09-21 14:22 ` Stefano Babic
0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2022-09-20 18:46 UTC (permalink / raw)
To: sbabic, Tom Rini; +Cc: u-boot, Fabio Estevam, Marek Vasut
Hi Stefano and Tom,
On Sun, Aug 14, 2022 at 2:25 PM Marek Vasut <marex@denx.de> wrote:
>
> On 8/13/22 14:03, Fabio Estevam wrote:
> > From: Fabio Estevam <festevam@denx.de>
> >
> > When running the script to sign SPL/U-Boot on a kontron-sl-mx8mm board,
> > the fit_block_size was calculated as 0x1000 instead of 0x1020.
> >
> > Add an extra parenthesis pair to fix it.
> >
> > Signed-off-by: Fabio Estevam <festevam@denx.de>
> > ---
> > Hi Stefano,
> >
> > This one applies against u-boot-imx.
> >
> > Since this one has not reached mainline yet, it is OK
> > if you want to squash this change in the original commit.
> >
> > doc/imx/habv4/csf_examples/mx8m/csf.sh | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/doc/imx/habv4/csf_examples/mx8m/csf.sh b/doc/imx/habv4/csf_examples/mx8m/csf.sh
> > index 6898513be51f..7d267a7218d3 100644
> > --- a/doc/imx/habv4/csf_examples/mx8m/csf.sh
> > +++ b/doc/imx/habv4/csf_examples/mx8m/csf.sh
> > @@ -40,7 +40,7 @@ dd if=csf_spl.bin of=flash.bin bs=1 seek=${spl_dd_offset} conv=notrunc
> > # fitImage tree
> > fit_block_base=$(printf "0x%x" $(( $(sed -n "/CONFIG_SYS_TEXT_BASE=/ s@.*=@@p" .config) - $(sed -n "/CONFIG_FIT_EXTERNAL_OFFSET=/ s@.*=@@p" .config) - 0x200 - 0x40)) )
> > fit_block_offset=$(printf "0x%s" $(fdtget -t x u-boot.dtb /binman/imx-boot/uboot offset))
> > -fit_block_size=$(printf "0x%x" $(( ( $(fdtdump u-boot.itb 2>/dev/null | sed -n "/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1) + 0x20 )) )
> > +fit_block_size=$(printf "0x%x" $(( ( ($(fdtdump u-boot.itb 2>/dev/null | sed -n "/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1)) + 0x20 )) )
> > sed -i "/Blocks = / s@.*@ Blocks = $fit_block_base $fit_block_offset $fit_block_size \"flash.bin\", \\\\@" csf_fit.tmp
>
> Reviewed-by: Marek Vasut <marex@denx.de>
Could you please consider applying this one as a fix to 2022.10?
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size
2022-09-20 18:46 ` Fabio Estevam
@ 2022-09-21 14:22 ` Stefano Babic
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Babic @ 2022-09-21 14:22 UTC (permalink / raw)
To: Fabio Estevam, sbabic, Tom Rini
Cc: u-boot, Fabio Estevam, Marek Vasut, Tim Harvey
Hi Fabio,
On 20.09.22 20:46, Fabio Estevam wrote:
> Hi Stefano and Tom,
>
> On Sun, Aug 14, 2022 at 2:25 PM Marek Vasut <marex@denx.de> wrote:
>>
>> On 8/13/22 14:03, Fabio Estevam wrote:
>>> From: Fabio Estevam <festevam@denx.de>
>>>
>>> When running the script to sign SPL/U-Boot on a kontron-sl-mx8mm board,
>>> the fit_block_size was calculated as 0x1000 instead of 0x1020.
>>>
>>> Add an extra parenthesis pair to fix it.
>>>
>>> Signed-off-by: Fabio Estevam <festevam@denx.de>
>>> ---
>>> Hi Stefano,
>>>
>>> This one applies against u-boot-imx.
>>>
>>> Since this one has not reached mainline yet, it is OK
>>> if you want to squash this change in the original commit.
>>>
>>> doc/imx/habv4/csf_examples/mx8m/csf.sh | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/doc/imx/habv4/csf_examples/mx8m/csf.sh b/doc/imx/habv4/csf_examples/mx8m/csf.sh
>>> index 6898513be51f..7d267a7218d3 100644
>>> --- a/doc/imx/habv4/csf_examples/mx8m/csf.sh
>>> +++ b/doc/imx/habv4/csf_examples/mx8m/csf.sh
>>> @@ -40,7 +40,7 @@ dd if=csf_spl.bin of=flash.bin bs=1 seek=${spl_dd_offset} conv=notrunc
>>> # fitImage tree
>>> fit_block_base=$(printf "0x%x" $(( $(sed -n "/CONFIG_SYS_TEXT_BASE=/ s@.*=@@p" .config) - $(sed -n "/CONFIG_FIT_EXTERNAL_OFFSET=/ s@.*=@@p" .config) - 0x200 - 0x40)) )
>>> fit_block_offset=$(printf "0x%s" $(fdtget -t x u-boot.dtb /binman/imx-boot/uboot offset))
>>> -fit_block_size=$(printf "0x%x" $(( ( $(fdtdump u-boot.itb 2>/dev/null | sed -n "/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1) + 0x20 )) )
>>> +fit_block_size=$(printf "0x%x" $(( ( ($(fdtdump u-boot.itb 2>/dev/null | sed -n "/^...totalsize:/ s@.*\(0x[0-9a-f]\+\).*@\1@p") + 0x1000 - 0x1 ) & ~(0x1000 - 0x1)) + 0x20 )) )
>>> sed -i "/Blocks = / s@.*@ Blocks = $fit_block_base $fit_block_offset $fit_block_size \"flash.bin\", \\\\@" csf_fit.tmp
>>
>> Reviewed-by: Marek Vasut <marex@denx.de>
>
> Could you please consider applying this one as a fix to 2022.10?
>
> Thanks
I picked up this and "kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be
selected", together with Marek's "Deduplicate i.MX8M SNVS LPGPR unlock"
and the two patches from Tim. CI is running, I will send then the small
PR to Tom if everything is nice.
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size
2022-08-13 12:03 [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size Fabio Estevam
2022-08-14 17:25 ` Marek Vasut
@ 2022-09-22 13:33 ` sbabic
1 sibling, 0 replies; 5+ messages in thread
From: sbabic @ 2022-09-22 13:33 UTC (permalink / raw)
To: Fabio Estevam, u-boot
> From: Fabio Estevam <festevam@denx.de>
> When running the script to sign SPL/U-Boot on a kontron-sl-mx8mm board,
> the fit_block_size was calculated as 0x1000 instead of 0x1020.
> Add an extra parenthesis pair to fix it.
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> Reviewed-by: Marek Vasut <marex@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-22 13:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-13 12:03 [PATCH] mx8m: csf.sh: Fix the calculation of fit_block_size Fabio Estevam
2022-08-14 17:25 ` Marek Vasut
2022-09-20 18:46 ` Fabio Estevam
2022-09-21 14:22 ` Stefano Babic
2022-09-22 13:33 ` sbabic
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.