Go to previous topic
Go to next topic
Last Post 27 Jan 2017 12:36 PM by  Brian Frohlich
Automatically execute runmakenandboot if boot disc inserted in SD slot?
 1 Replies
Author Messages
Joshua Pagnotta
New Member
New Member
Posts:25


--
08 Dec 2016 06:09 PM

    We were looking at ways to make it easier for end users to upgrade the image for our devices. We currently use the runmakenandboot script to flash our rootfs and boot into a RAM filesystem each boot. To upgrade we use the mkLogicFat script to make a bootable disc and interrupt the u-boot sequence and execute runmakenandboot. Do you have any suggestions for automating this such that if an SD card with a boot partition is detected in automatically executes that script so they can just insert a new image disc we supply them and power on to get the new image loaded rather than needing to hook up a console terminal and execute commands?

    Brian Frohlich
    New Member
    New Member
    Posts:6


    --
    27 Jan 2017 12:36 PM

    Do something like this.

    make a boot.scr file using the ideas below.

    ================================================

    if test $ver31 = undefined; then


      echo "RUN BOOT SCRIPT"


      run makeyaffsboot


      setenv ver31 0


         saveenv


    else


     echo "SKIP BOOT SCRIPT"


    fi


    run _defaultboot


    ================================================

     

    The first time there is a cold boot, the script will run and burn the new image.

    Change the verXX each release and supply a new SD card.

     

    Hope this helps.




    ---