AnsweredAssumed Answered

How to boot i.MX6 Yocto BSP from NAND Flash ?

Question asked by Otto Blom on Sep 18, 2014
Latest reply on Sep 23, 2014 by Otto Blom

Hi There,


We have a custom board that is similar to the imx6q sabresd (+NAND flash) that we are working on porting the new Yocto BSP to. What works so far


1. Booting LTIB BSP from SD card and NAND Flash

2. Booting Yocto BSP from SD card (by modifying mx6qsabresd.h & mx6qsabre_common.h)

3. Reading & Writing NAND Flash in Yocto u-boot (2013.04)


However, when attempting to boot the Yocto U-boot from NAND flash there is no bootloader console output. The same binary (but w/o the header - u-boot.imx) written to the SD card (with the 0x400 offset) works OK. I know one needs to modify uboot to have the environment read from the nand-flash, however its my impression that at the very minimum there should be some console output using the same uboot binary. Which is where I might be mistaken. Are there any other modifications needed ? I use the following command to program uboot to Flash.


kobs-ng init -v --chip_0_device_path=/dev/mtd0 u-boot.bin


Programming my LTIB-based uboot using this works OK, so that narrows down the problem to the actual content of the new Yocto u-boot.bin. Hexdumping the mtd0 partition reveals some differences in the first few hundred bytes, but I'm not sure if its significant


@ubuntu:/project/yocto/build1$ hexdump -C ltib_uboot -n 1000

00000000  00 00 67 fb ff ff 46 43  42 20 00 00 00 01 50 3c  |..g...FCB ....P<|

00000010  19 06 00 00 00 00 00 08  00 00 40 08 00 00 40 00  |..........@...@.|

00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 04 00  |................|

00000030  00 00 00 02 00 00 00 02  00 00 04 00 00 00 0a 00  |................|

00000040  00 00 03 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000060  00 00 00 00 00 00 00 00  00 00 00 02 00 00 00 05  |................|

00000070  00 00 b9 00 00 00 b9 00  00 00 00 01 00 00 cf 07  |................|

00000080  00 00 00 00 00 00 00 08  00 00 00 00 00 00 00 00  |................|

00000090  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

00000200  1c 0f 17 1f 05 00 00 00  00 00 19 00 00 15 19 00  |................|

00000210  00 15 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000220  00 13 00 00 00 00 16 00  00 00 16 00 00 13 00 00  |................|

00000230  00 0f 00 00 00 0a 00 00  00 00 00 00 00 00 00 00  |................|

00000240  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 16 00  |................|

00000260  00 00 0f 00 00 16 00 00  00 16 00 00 00 00 1c 00  |................|

00000270  00 1b 19 00 00 00 00 00  00 00 19 00 00 00 00 00  |................|

00000280  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

 

 

@ubuntu:/project/yocto/build1$ hexdump -C uboot_yocto -n 1000

00000000  00 00 d3 fc ff ff 46 43  42 20 00 00 00 01 50 3c  |......FCB ....P<|

00000010  19 06 00 00 00 00 00 08  00 00 40 08 00 00 40 00  |..........@...@.|

00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 04 00  |................|

00000030  00 00 00 02 00 00 00 02  00 00 04 00 00 00 0a 00  |................|

00000040  00 00 03 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000060  00 00 00 00 00 00 00 00  00 00 00 02 00 00 00 05  |................|

00000070  00 00 02 01 00 00 02 01  00 00 00 01 00 00 cf 07  |................|

00000080  00 00 00 00 00 00 00 08  00 00 00 00 00 00 00 00  |................|

00000090  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

00000200  1c 0f 17 1f 05 00 00 00  00 00 19 00 00 15 19 00  |................|

00000210  00 15 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000220  00 13 00 00 00 00 16 00  00 00 16 00 00 13 00 00  |................|

00000230  00 0f 00 00 00 0a 00 00  00 00 00 00 00 00 00 00  |................|

00000240  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 16 00  |................|

00000260  00 00 0f 00 00 16 1c 00  00 16 1c 00 00 00 1c 00  |................|

00000270  00 1b 19 00 00 00 00 00  00 00 19 00 00 00 00 00  |................|

00000280  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

000003e8

 

Also, performing a "nand dump 0" in the LTIB u-boot shows the same data as in the new Yocto u-boot. That proves that the Yocto u-boot can read the Flash OK.

 

Any hints on what the problem could be would be appreciated

 

Thanks,

 

/Otto

 

 


 

 

 

 

 

Andrew Krenz

Outcomes