SPI Flash Image generation
-
Hi all, we have the Onion Omega2S+ integrated into a product which is getting into production stage.
In order to speed up the test process, we'd like to programm the Omega in ICT. I'd like to know how to build a complete image to be programmed directly on the SPI flash memory. I understand that this image should include the u-boot and firmware partition. But I'm not sure if there is any other partition that should be included into it.
I appreciate if there is any document or link which will help me in undertanding how to build this complete image.
Best regards,
Matias.
-
Hi Matias,if you want to know the partition of the Omega2S ,you can use the cmd :
cat proc/mtd
to check the detail.
-
And if you complete the Omega2S firmware and you need to update the customized-firmware, maybe you can reference below two ways:
- Manual Firmware Installation,using the CMD :
sysupgrade <FIRMWARE FILE NAME>
You can use the USB Port or Micro-SD to copy the firmware to Omega2S.
Reference the operation: https://docs.onion.io/omega2-docs/manual-firmware-installation.html#
2)Firmware Flashing With Web Recovery Mode
Reference the operation: https://docs.onion.io/omega2-docs/Firmware-Flashing-Web-Recovery.html
- Manual Firmware Installation,using the CMD :
-
Hi @matiaslao,
It's possible to use a flash programmer (external hardware) to write all of the partitions to the flash storage at once.First, create the image: use the flash programmer to read and create a binary image of an Omega2 that's setup how you want it,
Then, write the image to other devices: use the flash programmer to write the image to other Omega2 devices.
This is similar to the cloning process described in the FAQs.
The key differences are:Cloning Flash Programmer Use Linux to create partition image Use a flash programmer (external) hardware to create an image of the flash Clones only the overlay partition Duplicates all partitions on the flash
Our recommendation
We recommend against using a flash programmer to write complete images to the flash.
For one thing, thefactory
(akaart
) partition holds wifi radio configuration and MAC addresses that are programmed at the factory and are unique to each device.
If thefactory
partition is overwritten, you will need to boot the device (either into the bootloader or Linux) to, at minimum, write unique MAC addresses to thefactory
partition.If you're already booting into Linux, then it makes sense to use the
sysupgrade
command to install a firmware image as @JeffZhou mentioned above.This process will only update the
firmware
andkernel
partitions, leaving the bootloader andfactory
partitions as they are.As a second option, in case this isn't helpful since you need to "clone" the firmware setup of a device, we recommend looking at this FAQ post: https://community.onion.io/topic/4563/faq-is-it-possible-to-clone-the-firmware-running-on-an-omega2-device-and-copy-it-to-other-omega2-units
It doesn't overwrite the factory partition, but there are other trade-offs.