What is on the NAND when it is shipped from the factory? [ANSWERED]

Moderators: Oren.R, Aviad.H

triacta_aa
Posts: 7
Joined: Tue Aug 02, 2016 6:46 pm

What is on the NAND when it is shipped from the factory? [ANSWERED]

Postby triacta_aa » Wed Aug 03, 2016 4:08 pm

Hi!

For the DART-6UL Starter Kit, I'm just wondering if the NAND comes pre-programmed with a U-Boot environment that I can use to TFTP an image, or do I need to use the recovery SD-card and run the yocto-nand.sh to initialize the NAND.

Same question for the DART-6UL CPU when it is shipped to us from the factory. We're trying to avoid having to use an SD card for producing our final product. If we can simply insert the SOM into our board and boot the NAND into a factory-installed U-BOOT, we could use this to TFTP boot our image and write it to NAND. Is this possible? Any thoughts or recommendations?

Thanks!

Leonid.S
Posts: 15
Joined: Wed Dec 31, 2014 2:37 pm

Re: What is on the NAND when it is shipped from the factory?

Postby Leonid.S » Thu Aug 04, 2016 7:33 am

Hello,
The SOM shipped preloaded with u-boot, so it is possible.
The best way to bring up the SOM without SD is to download the kernel via tftp and setup NFS file system.
Please follow our Wiki page: http://variwiki.com/index.php?title=VAR ... _Utilizing
When the SOM is running from NFS you can burn the NAND using our yocto-nand.sh script.
Thank you, Leonid.

triacta_aa
Posts: 7
Joined: Tue Aug 02, 2016 6:46 pm

Re: What is on the NAND when it is shipped from the factory?

Postby triacta_aa » Thu Aug 04, 2016 6:41 pm

Hi Leonid!

Please excuse my newbie questions. I'm not an expert in U-boot. I have several more questions.

I already followed the TFTP/NFS boot procedure in your Wiki page, but the boot switches were set to "00" SD card. However, I am still confused as to the state of the SOM when shipped from the factory. Where is U-boot pre-loaded? Is it on the:

    SD-card
    NAND flash
    NOR flash
    internal 96KB ROM
    internal 128KB ROM ?
I started this project when one Starter Kit was already in-use, so I don't know the initial state of the NAND-flash. We also recently received 2 additional Starter Kits. When I set the switches to "10" (ON-OFF for NAND flash), the system did not boot:

http://variwiki.com/index.php?title=DAR ... D_Recovery
"10" Moving the left switch will set the system to boot NAND

I got no response at all on the serial console. This is the same behaviour as when I set the switches to "00" to boot from SD but there is no SD-card present.

This is why I'm asking.

Perhaps I'm mistaken, but it seems that U-boot is programmed on the SD-card and on the NAND flash.
When I setenv / printenv / savenv, it seems that the environment is saved on the device that U-boot was booted from. I tested this after running the NAND recovery. I booted U-boot from NAND, then setenv some variables, then saveenv. When booted from SD card, it did not see these U-boot environment variables. I moved the SOM to our own daughter board and booted it from NAND. I was able to see the variables.


When booted from SD:

Code: Select all

MX6UL_VAR_DART(mmc)==> setenv ALAIN SD
MX6UL_VAR_DART(mmc)==> printenv ALAIN
ALAIN=SD
MX6UL_VAR_DART(mmc)==> saveenv
Saving Environment to MMC...
Writing to MMC(0)=SD... done
MX6UL_VAR_DART(mmc)==>



When booted from NAND:

Code: Select all

X6UL_VAR_DART(nand)==> setenv ALAIN NAND
MX6UL_VAR_DART(nand)==> saveenv
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x5e0000 -- 100% complete.
Writing to NAND... OK
MX6UL_VAR_DART(nand)==>


So, I'm confused. Does the U-boot code get loaded from somewhere other than NAND or SD? Is U-boot the one that is checking the boot switches and deciding where to boot from? Or is the hardware checking the switches, then loading U-boot from the device that the switches are configured to?

It is also my understanding that we can upgrade U-boot. Could you please explain how this can be done?

Thanks a lot!
Alain.

triacta_aa
Posts: 7
Joined: Tue Aug 02, 2016 6:46 pm

Re: What is on the NAND when it is shipped from the factory?

Postby triacta_aa » Thu Aug 04, 2016 10:52 pm

Here's another indication that U-boot is burned to the NAND-flash:

Code: Select all

root@imx6ul-var-dart:/sbin# ./yocto-nand.sh
Yocto nand flash
================================================
 nand-recovery Variscite i.MX6 UltraLite DART
================================================
**********************************************
*** DART-6UL eMMC/nand RECOVERY Version 01 ***
*** Installing Yocto on Nand               ***
*** Using zImage-imx6ul-var-dart-nand_wifi.dtb Device tree          ***
**********************************************
Installing U-BOOT from "/opt/images/Yocto/u-boot-nand-2015.10-r0.img"...
Erasing 128 Kibyte @ 1e0000 -- 100 % complete
Erasing 128 Kibyte @ 1e0000 -- 100 % complete
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Erasing 128 Kibyte @ 1e0000 -- 100 % complete



Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 0 guests