How to downgrade U-Boot keeping your settings

  • Why does it makes sense to downgrade U-Boot?

    F&S modules that are not customized are shipped only with U-Boot installed. This is done because most of our customers install their own kernel, root file system etc..
    But U-Boot versions differ too and can have an impact to your kernel.
    For example fsimx6v2.x release is a version that doesn't use devicetrees. With the newer kernel provided with version 3.0 this has changed. Now U-Boot provides an additional partition for the device tree and wants to use it when starting the kernel.
    If you are developing on a fsimx6v2.x release without devicetrees (and you want to stay with it) you have to downgrade the U-Boot bootloader to be compatible.
    So be aware that modules equipped with a new bootloader do not have to be compatible with your older version. In this case it is recommended to replace your U-Boot bootloader.

    How to downgrade U-Boot?

    F&S provides a script that downgrades your bootloader and restore your network address(es) afterwards. You can adjust it to your needs. The script runs in two iterations. First it exports the network address(es) and an additional variable in RAM and replaces the bootloader. Then it performs a reboot. In the second step the script checks if the additional variable is available. If so it knows that the first step has already been processed and won't repeat it. Now it sets the network adress(es) back as it had been before.
    You can add more variables that you want to keep save during the downgrade. The text file of the script needs to be compiled with the mkimage tool. The result is an image with a checksum. To compile tpye:

    1. mkimage -A arm -O u-boot -T script -C none -n "Update script" -d update.txt update.scr

    This is how the script looks like:

    Best Regards
    Your F&S Support Team

    F&S Elektronik Systeme GmbH