OTA Update suggestions

  • Hi Stefan,


    Thanks for your help.

    I started testing rauc and swupdate with our PicoMODA9.


    Are there any suggestions on how I would go about handling a Single-Copy / Asymmetric/Recovery pattern approach with UBOOT? (from the side of F&S)

    Do I need to make changes to the F&S UBOOT for startups in my recovery/update partition? Or can this be handled otherwise?

    How does the UBOOT choose which partition to mount?


    Best regards

  • Hi Mike,


    I am sorry, most of the configuration of rauc did a colleague, especially the part with uboot. I know that this project has a
    very good documentation and is working reliably but I was not directly involved in the implementation.


    Kind regards,

    Stefan

  • Good day,


    I managed to get a basic A/B Partition update procedure up and running with swupdate.

    Now I have some questions for F&S about the UBOOT.

    • The F&S Linux docmentation mentions the diverse scripts that may be called from ram, usb, sd etc.
      Is it possible to run for example the recovery script on a startup error? For example if the start of the current filesystem fails (broken update); can the UBoot automatically run the recovery script to switch back to my old partition?
      Or do I need to combine it with a GPIO?
    • The scripts in the F&S Linux docs seem rather basic (simple uboot commands);
      Is it possible to read an evironment variable in script and change to the correct ubi-partiton according to the read variable?


    best regards

  • The hush parser that is used as command line interpreter in U-Boot supports simple control commands like the Bourne shell:


    if ... then ... else ... fi

    for ... do ... done

    while ... do ... done

    until ... do ... done


    It also has two test commands that can be used to evaluate expressions


    test for string compares

    itest for integer compares


    setexpr may also be useful to compute a value and store the result in a variable.


    You can call help test, help itest and help setexpr to get more information about these commands.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    thanks for the help.

    Do you also have a suggestion on how to run a script on startup?

    For example, I wish to save a boot script in one of my mtdpartitions and run it on startup.

    Would I just overwrite the bootcmd environment variable? Or is there a better way to do that?


    Best regards

  • The whole boot strategy stuff in our environment is just a sequence of executing the bootcmd. This command simply does the following


    Code
    1. run set_bootargs; run kernel; run fdt


    So the whole magic lies in the variables set_bootargs, kernel and fdt. Each value is set depending on the boot strategy. If you just want to add an own script, you can simply call it in bootcmd as first call in front of run set_bootargs for example.


    There is also a variable preboot that we typically do not set. There you can also call your script. But please note the difference. The content of preboot is executed immediately at start, before the boot delay counts down (which is probably exactly what you want). The content of bootcmd is executed when the Linux system is started, which is considerably later.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.