Versions Compared

Key

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

...

      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 one new partitions are is 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.to update device partition table. This happens only on the first request after image is flashed to device, further firmware update requests skip this step as device has three partitions.

     Upon receiving firmware update request, package      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. 

    During 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).  is mounted to passive bank. the downloaded tar image is untarred to the mounted directory. From the untarred image, kernal and rootfs data is extracted and is loop mounted to  temporary locations in passive memory bank.  The extracted kernal data is copied to memory partition1 (mmcblk0p1) and the existing data is copied to a backup folder.  rootfs is mounted to passive memory bank. cmdline.txt is modified for activating passive memory bank and active memory bank switchto passive. Device is then rebooted for activating the new image.

...