...
The Flash-N-Go infrastructure (or FnG infrastructure) is a software product for NXP i.MX Edge devices created by SECO Nothern Europe. Consisting of 3 three parts, Flash-N-Go Boot, Flash-N-Go System and Flash-N-Go Update it provides a convenient means way of booting, flashing, testing and updating of edge devices.
What is …
What is Flash-N-Go System?
Flash-N-Go System is a non-volatile Linux distribution to aid with the initial installation, production test and upgrade tasks but is limited to a small set of features. It is sometimes coined a management or recovery system. Flash-N-Go System is the backbone of the Flash-N-Go infrastructure.
...
Pre-installed in the factory, Flash-N-Go System can be used in the field and during development to upgrade the devices and possibly install all components from scratch.
In production, Flash-N-Go System is used to conduct the production test. This de-couples the testing process from the target-end - system and makes it possible to test devices with customer-specific OS configurations, with limited testing capabilities.
What is Flash-N-Go Boot?
Flash-N-Go Boot is an a simple, non-interactive and open-source bootloader for i.MX6 and i.MX6ULL devices. With its condensed functionalities, it is capable of initializing the RAM dynamically and booting Linux, Android, and Windows CE.
...
Flash-N-Go Boot itself only uses the SoC-internal SRAM for its code and all runtime heap, stack, and data. All other RAM-areas of a device are free to use by boot-scripts and operating systems and as soon as Flash-N-Go Boot has started another binary executable, this, in turn, may also use the SoC-internal SRAM for its own purposes.
By using Flash-N-Go Boot it is possible to use different DDR-memory hardware without adapting the bootloader to the specific RAM configuration, and by this makes the SD-RAM equipment of embedded board very flexible, no pre. Pre-initialization and no matching of the bootloader to board or RAM of DDR-RAM is isn’t necessary.
What is Flash-N-Go Update?
The Flash-N-Go Update software tool provides a an update solution for Flash-N-Go System based i.MX6 devices.
Normally coming as a USB flash drive and , it uses an auto-start feature of the device to bring up the graphical update process. The available operating systems can be directly downloaded , if the device is setup up with internet access and by this provides a way to implement an OTA update behaviorbehaviour.
Basic Flash-N-Go Architecture
The following figure show shows the basic boot-up and file system structure of a Flash-N-Go Boot based system.
...
The Flash-N-Go architecture consists of the bootloader, the recovery, device-specific data and the target operating system. Flash-N-Go System and the target system may use the device-specific data to initialize and configure hardware interfaces like display, touch and network interfaces.
The first stage bootloader Flash-N-Go Boot initializes the board and decides which OS needs to be booted. The decision is based on the availability of boot-able systems, the hardware boot-mode switch and the internal bootselect
setting. The internal boot select setting is stored on the battery-backed RTC, and thus independent of the non-volatile Flash memory (eMMC), but may be impacted by changing the battery.
...
A FAT32 partition is available containing a valid
boot.cfg
fileThe
bootselect
setting set to "regular
" or "initialized
".The boot mode button is not pressed.
Otherwise, the Flash-N-Go Boot bootloader will try to load the Flash-N-Go System that resides in a FAT partition containing the boot-alt.cfg
file.
Flash-N-Go System is a RAM-based system and is loaded completely into SD-RAM memory by the bootloader and runs from the volatile memory. Thus changes made inside the FnG System, like changes inside the /etc
directory will not be stored and lost after reboot. This guarantees a consistent environment after boot and provides a good basis for production tests and installing software.
Because FnG System is designed as a RAM-based system it can be used to change anything on the non-volatile memory including updating Flash-N-Go System itself.
...
The shared device-specific data is currently well-supported on iMX6 and iMX6ULL devices. HweverHowever, i.MX8 devices may use this scheme in the future as well.
...
The current backing-storage type of Flash-N-Go is eMMC (using the Linux naming mmblk0). In addition to the partitions for the basic Flash-N-Go components, there may be some more partitions depending on the system configuration. The basic partition layout for the Flash-N-Go on the iMX6 platform is:
Partition | File System | Contents |
---|---|---|
| none | Flash-N-Go Boot |
| FAT32 | XML based device configuration and touchscreen settings |
| FAT32 | Flash-N-Go System including
|
The target operating system kernel is usually installed in mmcblk0p2
FAT32 partition ans and uses a third partition mmcblk0p3
as a non-volatile rootfs partition. However other partition layouts are possible for the target OS like customer-specific partition layouts or Android-based multi-partition layouts.
Booting Flash-N-Go System
Anchor | ||||
---|---|---|---|---|
|
There are two options of for booting the device into Flash-N-Go System instead of booting the target OS. The first one is pressing down and holding the bootmode switch while the power supply is switched on. The location of the bootmode switch is shown in the following figure
...
Code Block |
---|
FLASH-N-GO:/ |
Alternatively, the bootselect
tool can be used, which is usually provided by Flash-N-Go compatible operating systems using Flash-N-Go System as well as by Flash-N-Go System itself.
...
Code Block | ||
---|---|---|
| ||
FLASH-N-GO:/ bootselect -h Usage: bootselect [-qv] [<bootmode>] When called without parameters, bootselect reads the current boot-mode setting from the RTC-register Options: <bootmode> Writes the given boot-mode into the RTC-register May be one of: initialized regular regularB alternative invalid -v Turns on debug messages on stderr -vv Turns on info messages on stderr -q Turns off warning messages on stderr -qq Turns off all messages on stderr |
For the selection of the target OS the bootselect
tool should be called with the regular
parameter:
Code Block | ||
---|---|---|
| ||
FLASH-N-GO:/ bootselect regular regular |
For the selection of Flash-N-Go System the bootselect
tool should be called with the alternative
parameter:
...
sconfig
is a small command-line tool which that offers functionalities for device configurations like network settings, screen rotation etc. The following code block shows a list of all possible parameters.
...
xconfig
xconfig
is a command-line tool to manipulate the XML-configuration data directly. Care should be taken when using these commands as miss-configured or corrupted XML- configuration data might render a system unusable. The following code block shows a list of all possible parameters.
...
The manual system update considers a manual operating system (OS) installation via a console. The progress can be done locally using mass storage devices or using a network connection. The update process described here requires an Ethernet connection of the device to a development PC, either directly or via intranet. Also, a TFTP-Server or HTTP-Server is required on the development PC. There are several, also free, TFTP-Servers and HTTP-Servers online available. Please make sure that the timeout settings of the TFTP-Server are set to 60 seconds at a minimum. The installation of target OSes, and Flash-N-Go System and Flash-N-Go Boot should work via console one- or two-liners. All device partitioning, deployment actions should be done by shell scripts executed by the simple command. See Booting Flash-N-Go System for instructions on how to boot into the management system.
...
Before updating the target operating system we first need an access to the device. The easiest way to access the target is via the serial console. Simply connect the first RS-232 port of your target system with a COM port of your PC or a USB-to-RS-232 converter using a null-modem cable. With the serial connection set up start your favorite favourite terminal program (e.g. minicom or tera term) with the following settings:
...
The Ethernet can be set up with the sconfig command-line tool, see also sconfig.
...
The common concept of the installation is allays always similar.
Set the download source variable
TFTP
(or URL for newer installation script versions)Download the installation script (with
curl
) andExecute the installation script (with
sh
).
...
Download the Flash-N-Go System files listed bellow below from the Flash-N-Go/FNGSystem/FNGSystem8.0
folder of the support server.
Flash-N-Go-System-8.0-python-3.1.4.ext2
Flash-N-Go-System-8.0-self-init.sh
Flash-N-Go-System-8.0-self-update.sh
Flash-N-Go-System-8.0.cpio.gz
GF_Bootlogo_Flash-N-Go-System.png
boot-alt.cfg
fng_wipe_emmc.sh
Additionally, download the Kernel Files files listed bellow below from the Flash-N-Go/FNGSystem/FNGSystem-8.0/GUFYocto-35.0-r5982-0
directory of the support server. Place them in a subfolder of the TFTP-Server root folder named GUF-Yocto-35.0-r5982-0
...
Download the Flash-N-Go Boot files listed bellow below from the Flash-N-Go/FNGBoot/FNGBoot-v13.0r3476/
directory of the support server.
...
The Flash-N-Go System is designed as a management system to install and update target operating systems , and change the device configurations. Thus it runs with root privileges. This may be a concern for some scenarios. Therefore some security considerations are necessary.
...