
Hi Fabio,
On Tue, Apr 30, 2019 at 6:17 PM Fabio Estevam festevam@gmail.com wrote:
Hi Shyam,
On Tue, Apr 30, 2019 at 7:34 AM Shyam Saini shyam.saini@amarulasolutions.com wrote:
IMX6 platform has two stage boot loaders like SPL and U-Boot proper. For each stage we need to burn the image on to flash with respective offsets.
This patch create a single image using binman, so that user can get rid of burning different stage boot images.
without this patch:
$ sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1 $ sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 bs=1k seek=69
with this patch:
$ sudo dd if=u-boot-imx6-with-spl.bin of=/dev/mmcblk0 bs=1k seek=1
This would be easily extended to single image creation for other imx6 soc boards.
This was tested on engicam imx6qdl and imx6ul boards
Reviewed-by: Jagan Teki jagan@amarulasolutions.com Signed-off-by: Shyam Saini shyam.saini@amarulasolutions.com
I like the idea, but this breaks the build for mx6sabresd_defconfig:
COPY spl/u-boot-spl.bin CFGS spl/u-boot-spl.cfgout MKIMAGE SPL BINMAN u-boot-imx6-with-spl.bin Wrote map file './image.map' to show errors binman: Node '/binman/u-boot-img': Offset 0x11000 (69632) overlaps with previous entry '/binman/blob' ending at 0x11c00 (72704) Makefile:1374: recipe for target 'u-boot-imx6-with-spl.bin' failed make: *** [u-boot-imx6-with-spl.bin] Error 1
Look like few of boards are crossing size > 68K which is the default CONFIG_SPL_PAD_TO value.
This is the value in sabresd case, ₹ cat image.map ImagePos Offset Size Name <none> 00000000 0009c8b8 main-section <none> 00000000 00011c00 blob <none> 00011000 0008b8b8 u-boot-img
But if this the case the existing u-boot right from board/freescale/mx6sabresd/README $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69
will override the SPL, isn't it?
I am interested to see if this solution could load u-boot-imx6-with-spl.bin via imx_usb_loader in Serial Download Mode.
Currently it is not possible to load SPL + u-boot-dtb.img + FIT via imx_usb_loader. Does it work with your proposal?
Sure, will try.