Message ID | 20230914165046.3687491-1-wojciech.nizinski@grinn-global.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] board/freescale/common/imx: imx8-bootloader-prepare: enable error checking | expand |
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 $@
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
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 $@
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(+)