All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] board/freescale/common/imx: imx8-bootloader-prepare: enable error checking
@ 2023-09-14 16:50 Wojciech Nizinski
  2024-02-05 16:53 ` Sébastien Szymanski
  2024-04-03 21:08 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 4+ messages in thread
From: Wojciech Nizinski @ 2023-09-14 16:50 UTC (permalink / raw)
  To: buildroot; +Cc: Wojciech Nizinski

Run script with 'errexit' bash option to detect any errors from
subcommands.

It will fix situation where 'ddr_fw.bin' was missing but successfull
build created broken boot image. Post image script report this by:

cat: /home/user/buildroot/output/images/ddr_fw.bin: No such file or
directory

and build finish with success.

Signed-off-by: Wojciech Nizinski <wojciech.nizinski@grinn-global.com>
---
 board/freescale/common/imx/imx8-bootloader-prepare.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/freescale/common/imx/imx8-bootloader-prepare.sh b/board/freescale/common/imx/imx8-bootloader-prepare.sh
index 7ebf15b6ff..8d44e588c5 100755
--- a/board/freescale/common/imx/imx8-bootloader-prepare.sh
+++ b/board/freescale/common/imx/imx8-bootloader-prepare.sh
@@ -73,4 +73,5 @@ main ()
 	exit $?
 }
 
+set -o errexit
 main $@
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] board/freescale/common/imx: imx8-bootloader-prepare: enable error checking
  2023-09-14 16:50 [Buildroot] [PATCH 1/1] board/freescale/common/imx: imx8-bootloader-prepare: enable error checking Wojciech Nizinski
@ 2024-02-05 16:53 ` Sébastien Szymanski
  2024-04-03 21:08 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 4+ messages in thread
From: Sébastien Szymanski @ 2024-02-05 16:53 UTC (permalink / raw)
  To: Wojciech Nizinski, buildroot

Hi Wojciech, All,

I tested your patch and it does work. I have some comments though, see 
below...

On 9/14/23 18:50, Wojciech Nizinski wrote:
> Run script with 'errexit' bash option to detect any errors from
> subcommands.
> 
> It will fix situation where 'ddr_fw.bin' was missing but successfull
> build created broken boot image. Post image script report this by:
> 
> cat: /home/user/buildroot/output/images/ddr_fw.bin: No such file or
> directory
> 
> and build finish with success.
> 
> Signed-off-by: Wojciech Nizinski <wojciech.nizinski@grinn-global.com>
> ---
>   board/freescale/common/imx/imx8-bootloader-prepare.sh | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/board/freescale/common/imx/imx8-bootloader-prepare.sh b/board/freescale/common/imx/imx8-bootloader-prepare.sh
> index 7ebf15b6ff..8d44e588c5 100755
> --- a/board/freescale/common/imx/imx8-bootloader-prepare.sh
> +++ b/board/freescale/common/imx/imx8-bootloader-prepare.sh
> @@ -73,4 +73,5 @@ main ()
>   	exit $?
>   }
>   
> +set -o errexit

For consistency, maybe you should use 'set -e' here. (utils/docker-run 
is the only script that uses '+set -o errexit')

Also, the only way (I am thinking of) to not have the ddr_fw.bin file is 
if the user didn't select the firmware-imx package. Maybe, the script 
should produces an hint to the user about how to get that ddr_fw bin file?

"ddr_fw file not found: did you select firmware-imx package?"

Regards,

>   main $@

-- 
Sébastien Szymanski, Armadeus Systems
Software engineer

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] board/freescale/common/imx: imx8-bootloader-prepare: enable error checking
  2023-09-14 16:50 [Buildroot] [PATCH 1/1] board/freescale/common/imx: imx8-bootloader-prepare: enable error checking Wojciech Nizinski
  2024-02-05 16:53 ` Sébastien Szymanski
@ 2024-04-03 21:08 ` Thomas Petazzoni via buildroot
  2024-05-02  7:50   ` Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-04-03 21:08 UTC (permalink / raw)
  To: Wojciech Nizinski; +Cc: buildroot

On Thu, 14 Sep 2023 18:50:46 +0200
Wojciech Nizinski <wojciech.nizinski@grinn-global.com> wrote:

> Run script with 'errexit' bash option to detect any errors from
> subcommands.
> 
> It will fix situation where 'ddr_fw.bin' was missing but successfull
> build created broken boot image. Post image script report this by:
> 
> cat: /home/user/buildroot/output/images/ddr_fw.bin: No such file or
> directory
> 
> and build finish with success.
> 
> Signed-off-by: Wojciech Nizinski <wojciech.nizinski@grinn-global.com>
> ---
>  board/freescale/common/imx/imx8-bootloader-prepare.sh | 1 +
>  1 file changed, 1 insertion(+)

Applied to master after changing to use set -e. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] board/freescale/common/imx: imx8-bootloader-prepare: enable error checking
  2024-04-03 21:08 ` Thomas Petazzoni via buildroot
@ 2024-05-02  7:50   ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2024-05-02  7:50 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni, Wojciech Nizinski

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Thu, 14 Sep 2023 18:50:46 +0200
 > Wojciech Nizinski <wojciech.nizinski@grinn-global.com> wrote:

 >> Run script with 'errexit' bash option to detect any errors from
 >> subcommands.
 >> 
 >> It will fix situation where 'ddr_fw.bin' was missing but successfull
 >> build created broken boot image. Post image script report this by:
 >> 
 >> cat: /home/user/buildroot/output/images/ddr_fw.bin: No such file or
 >> directory
 >> 
 >> and build finish with success.
 >> 
 >> Signed-off-by: Wojciech Nizinski <wojciech.nizinski@grinn-global.com>
 >> ---
 >> board/freescale/common/imx/imx8-bootloader-prepare.sh | 1 +
 >> 1 file changed, 1 insertion(+)

 > Applied to master after changing to use set -e. Thanks!

Committed to 2024.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-02  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 16:50 [Buildroot] [PATCH 1/1] board/freescale/common/imx: imx8-bootloader-prepare: enable error checking Wojciech Nizinski
2024-02-05 16:53 ` Sébastien Szymanski
2024-04-03 21:08 ` Thomas Petazzoni via buildroot
2024-05-02  7:50   ` Peter Korsgaard

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.