imx: move ATF to the back of the FIT to fix loading over yModem
> With yModem the FIT Image is only supplied once, so we can only > seek forward in the yModem supplied image and never backwards. > With the recent changes to the SPL mechanism, including loading > U-Boot first, FDT after, then the loadables, we must also reorder > the FIT image script to make sure that the loadables are last in > the FIT image. > Signed-off-by: Patrick Wildt > Tested-by: Sébastien Szymanski > diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh > b/arch/arm/mach-imx/mkimage_fit_atf.sh > index dd1ca5ad3fd..fe12b7bb4bd 100755 > --- a/arch/arm/mach-imx/mkimage_fit_atf.sh > +++ b/arch/arm/mach-imx/mkimage_fit_atf.sh > @@ -62,6 +62,23 @@ cat << __HEADER_EOF > compression = "none"; > load = <$BL33_LOAD_ADDR>; > }; > +__HEADER_EOF > + > +cnt=1 > +for dtname in $* > +do > + cat << __FDT_IMAGE_EOF > + fdt@$cnt { > + description = "$(basename $dtname .dtb)"; > + data = /incbin/("$dtname"); > + type = "flat_dt"; > + compression = "none"; > + }; > +__FDT_IMAGE_EOF > +cnt=$((cnt+1)) > +done > + > +cat << __HEADER_EOF > atf@1 { > description = "ARM Trusted Firmware"; > os = "arm-trusted-firmware"; > @@ -88,20 +105,6 @@ cat << __HEADER_EOF > __HEADER_EOF > fi > > -cnt=1 > -for dtname in $* > -do > - cat << __FDT_IMAGE_EOF > - fdt@$cnt { > - description = "$(basename $dtname .dtb)"; > - data = /incbin/("$dtname"); > - type = "flat_dt"; > - compression = "none"; > - }; > -__FDT_IMAGE_EOF > -cnt=$((cnt+1)) > -done > - > cat << __CONF_HEADER_EOF > }; > configurations { 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: sba...@denx.de =
Re: imx: move ATF to the back of the FIT to fix loading over yModem
Hi, On 5/8/20 11:59 AM, Patrick Wildt wrote: > With yModem the FIT Image is only supplied once, so we can only > seek forward in the yModem supplied image and never backwards. > With the recent changes to the SPL mechanism, including loading > U-Boot first, FDT after, then the loadables, we must also reorder > the FIT image script to make sure that the loadables are last in > the FIT image. > > Signed-off-by: Patrick Wildt > Thanks to this patch, I was able to push a FIT image (ATF, U-Boot, dtb) using yModem, so: Tested-by: Sébastien Szymanski Regards, -- Sébastien Szymanski, Armadeus Systems Software engineer
Re: imx: move ATF to the back of the FIT to fix loading over yModem
Ping? On Fri, May 08, 2020 at 11:59:47AM +0200, Patrick Wildt wrote: > With yModem the FIT Image is only supplied once, so we can only > seek forward in the yModem supplied image and never backwards. > With the recent changes to the SPL mechanism, including loading > U-Boot first, FDT after, then the loadables, we must also reorder > the FIT image script to make sure that the loadables are last in > the FIT image. > > Signed-off-by: Patrick Wildt > > diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh > b/arch/arm/mach-imx/mkimage_fit_atf.sh > index dd1ca5ad3fd..fe12b7bb4bd 100755 > --- a/arch/arm/mach-imx/mkimage_fit_atf.sh > +++ b/arch/arm/mach-imx/mkimage_fit_atf.sh > @@ -62,6 +62,23 @@ cat << __HEADER_EOF > compression = "none"; > load = <$BL33_LOAD_ADDR>; > }; > +__HEADER_EOF > + > +cnt=1 > +for dtname in $* > +do > + cat << __FDT_IMAGE_EOF > + fdt@$cnt { > + description = "$(basename $dtname .dtb)"; > + data = /incbin/("$dtname"); > + type = "flat_dt"; > + compression = "none"; > + }; > +__FDT_IMAGE_EOF > +cnt=$((cnt+1)) > +done > + > +cat << __HEADER_EOF > atf@1 { > description = "ARM Trusted Firmware"; > os = "arm-trusted-firmware"; > @@ -88,20 +105,6 @@ cat << __HEADER_EOF > __HEADER_EOF > fi > > -cnt=1 > -for dtname in $* > -do > - cat << __FDT_IMAGE_EOF > - fdt@$cnt { > - description = "$(basename $dtname .dtb)"; > - data = /incbin/("$dtname"); > - type = "flat_dt"; > - compression = "none"; > - }; > -__FDT_IMAGE_EOF > -cnt=$((cnt+1)) > -done > - > cat << __CONF_HEADER_EOF > }; > configurations {
imx: move ATF to the back of the FIT to fix loading over yModem
With yModem the FIT Image is only supplied once, so we can only seek forward in the yModem supplied image and never backwards. With the recent changes to the SPL mechanism, including loading U-Boot first, FDT after, then the loadables, we must also reorder the FIT image script to make sure that the loadables are last in the FIT image. Signed-off-by: Patrick Wildt diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh b/arch/arm/mach-imx/mkimage_fit_atf.sh index dd1ca5ad3fd..fe12b7bb4bd 100755 --- a/arch/arm/mach-imx/mkimage_fit_atf.sh +++ b/arch/arm/mach-imx/mkimage_fit_atf.sh @@ -62,6 +62,23 @@ cat << __HEADER_EOF compression = "none"; load = <$BL33_LOAD_ADDR>; }; +__HEADER_EOF + +cnt=1 +for dtname in $* +do + cat << __FDT_IMAGE_EOF + fdt@$cnt { + description = "$(basename $dtname .dtb)"; + data = /incbin/("$dtname"); + type = "flat_dt"; + compression = "none"; + }; +__FDT_IMAGE_EOF +cnt=$((cnt+1)) +done + +cat << __HEADER_EOF atf@1 { description = "ARM Trusted Firmware"; os = "arm-trusted-firmware"; @@ -88,20 +105,6 @@ cat << __HEADER_EOF __HEADER_EOF fi -cnt=1 -for dtname in $* -do - cat << __FDT_IMAGE_EOF - fdt@$cnt { - description = "$(basename $dtname .dtb)"; - data = /incbin/("$dtname"); - type = "flat_dt"; - compression = "none"; - }; -__FDT_IMAGE_EOF -cnt=$((cnt+1)) -done - cat << __CONF_HEADER_EOF }; configurations {