Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

      This document covers the design of FirmwareControl plugin  for RPI board. 

Limitations

        1.   RPI box will reboot twice for Firmware upgrade only during first time, after booted for first time which will create more partition, if the  partition table is not more than two. First reboot creates two more partition if its not available and second reboot activates the new image

Design Approach

       Considering the  current requirement, the design approach followed for FirmwareControl plugin is as follows.

         FirmwareControl plugin is to be enabled from Metrological UI for firmware update else request is denied.  Upon  Upon receiving firmware upgrade request, we initially validate the parameters. Execution is proceeded only if parameters are validatedvalid.

      By default RPI is having only SD card support for flashing OS and boot and  have only two partitions,one for Kernel(FAT32)  and other for rootfs(ext3) (mmcblk0p1, mmcblk0p2),  two new partitions are created  as passive bank during run-time using fdisk and mkfs.ext3 command. Device is rebooted after creating partition. Before rebooting command entered is saved in a file and after reboot the same is executed again after reboot.

 URL and given parameters are validated       Package tar file mentioned in request, Pkg.tar.gz file  from  given HTTP server is copied to a file in /tmp of active memory bank. After download Hash values are compared with downloaded file and request to confirm Downloaded file and mentioned one are same.

        

       The tar package is unzipped to find rootfs tarball.

        create new thread to handle rest of the operations.

         rootfs tar ball is copied to passive memory bankDuring installation,  new directory is created in active memory bank and pkg data is unzipped to the new directory and the same is loop mounted to passive memory bank(Bank1).  cmdline.txt is modified for memory bank switch. Device is then rebooted for activating the new image.

       

  • Sequence diagram

          Image Removed

Gliffy Diagram
nameFW Upgrade
pagePin1016


Future Enhancements

   1.  Validate requested firmware version with currently implemented firmware version. Firmware upgrade happens only if the versions are different.

...