| FORUM

FEDEVEL
Platform forum

Question on automatic software update with imx6 and using SD card

neilc , 06-26-2019, 03:19 PM
Hi I am trying to implement automatic software updates with imx6. The plan was to put everything on SD card only when changes are needed, and for the rest of the time leave it as blank. We don't want customers adjusting dip switches as we want everything to be automatic? Is this possible? Currently we have dip switches to convert from usb mode to running on emmc. We are using MFTool.exe to burn the image over usb into the emmc.
-But we want to do all this over an sd card, without having user intervention. Is there a specific boot mode need for imx6 for sd cards? I couldn't find boot information on data sheet. Going to take Yocto course that is offered by FEDEVEL. But was wondering if anyone had any information on doing software updates?
robertferanec , 06-28-2019, 02:37 AM
iMX6 Rex boards usually start from SPI (the fuses are set to go to SPI after reset). In the SPI we have uBoot. Once uBoot (bootloader - a simple small code) is loaded from SPI and once you have uBoot running, then you can decide what to do next.

Normally, I would keep uBoot the same (it is not necessary to update uBoot unless there is a critical error). Then in uBoot you can implement update features ... in uboot you can create chain of commands (or simple scripts) which can be used to update firmware if you need. For example, you can create a "script" which if you run a command from uboot, this command can download new firmware over network and put it on SD card, SATA hardrive, ... or anywhere you need.

Some companies do not use SPI memory and they completely boot up for example from SD card. Disadvantage is, that if the SD card is damaged, it may not be simple to make your board to work again. However, if we have SPI on board, the board will always boot up at least into uBoot and then you can repair the whole system.

Maybe have a look around, how other companies what are using iMX6, how they do the updates?
neilc , 06-28-2019, 12:13 PM
Robert,

Thanks! SPI, you are meaning the eMMC memory on the iMX6 processor? Is there a link to know add scripts to uBoot, I am going through your course right now.

Neil
robertferanec , 07-01-2019, 06:15 AM
- I mean SPI memory.
- The "script" is basically just a chain of commands. Here is an example where you can find it (search for CONFIG_EXTRA_ENV_SETTINGS):
https://github.com/FEDEVEL/openrex-u...enrex_common.h
neilc , 07-07-2019, 10:01 AM
Robert,

Thanks. I am going through your course right now to understand everything before I ask more questions! Your course is amazing. Thank you so much you are making this seemingly complicated task much easier!!! I am going to sign up for your hardware classes, even though I haven't done hardware for 10 years just to understand it! If you have linux device driver classes or other classes let me know. Thanks!!!

Neil
robertferanec , 07-08-2019, 02:51 AM
Thank you very much @neilc.

PS: I do not have any linux driver classes (quite complicated topic)
Use our interactive Discord forum to reply or ask new questions.
Discord invite
Discord forum link (after invitation)

Didn't find what you were looking for?