No announcement yet.

fw-upgrade, firmware.img

  • Filter
  • Time
  • Show
Clear All
new posts

  • fw-upgrade, firmware.img


    Looking to perform a firmware upgrade via webserver. Is there something special needed to write to the /var/firmware.img file?

    I build an image, using (from image.bin). the generated file works as expected using the tftp.

    From within our application ... not doing anything special ...
    1. open, write binary
    f = fopen( "/var/firmware.img", "wb")

    2. many fwrites. the webserver we use gives us data in 256 chunks max (i am not sure why, but the last packet is 56 bytes??)
    fwrites( data, 1, datalen, f )

    3. and finally close the file

    PRIOR to attempting (running)
    /bin/fw-upgrade -l -f /var/firmware.img
    AFTER the attempt, this is NO LONGER running in the process list.

    and AFTER a reboot, the firmware was not upgraded.

    please advise.

  • #2
    Hi, I use fw-upgrade using a system call from my application and everything works fine. Previously I download the firmware.bin file to the XPort using ftp

    The system cal that I'm using is:

    "fw-upgrade -d -f /mnt/flash/root/firmware.bin"

    Have you tried changing file extension to from .img to .bin?

    Hope this can help you


    • #3
      using the latest sdk ( ... the startup:
      /bin/fw-upgrade -l -f /var/firmware.img

      is "given" by the sdk itself (when selecting the fw-upgrade via make menuconfig). it is unclear why your startup is different.

      ALSO noted that the library (libfwug.a) is dated 2011-12-20. this doesn't seem to get re-built ... ??? is that correct?



      • #4
        Yes you are correct, library (libfwug.a) won't re-built. Library (libfwug.a) is part of Linux SDK


        • #5
          When does "fw-upgrade" do the update?

          I am having trouble updating the image.

          I FTP an uncompressed linux+ROMFS image into /var and call it firmware.img as per the SDK instructions.

          I check in the task list:
          58 root 47 S /bin/fw-upgrade -l -f /var/firmware.img
          and see that fw-upgrade is actually running.

          I then do a reboot, but the firmware never updates.

          What am I missing? When is fw-upgrade supposed to do the job?

          I'm reasonably new to this. I've done all my development using an NFS share and deployed a target with an ROMFS image that I loaded though DBUG. I now have to do an update and would like it to work through Linux so I don't have to get to the serial port etc.

          Thanks, Shaun


          • #6

            we can't directly use uncompressed 'linux+ROMFS, image for firmware upgrade process. We need to fallow certain procedure before uploading image into device using FTP.

            Fallow the instructions present in Linux SDK user guide "sample update precess Implementation" under "Firmware Upgrade".

            Installing a compressed linux+ROMFS image and erasing the flash area used for the JFFS2 /usr/local partition:
            For MatchPort AR
   images/imagez.bin:kernel:0x40000:ROMFS: erase:0x400000:-1 /tmp/uclinux-kernel-and-romfs-and-erase-jffs2-area.bin
            For XPort Pro
   images/imagez.bin:kernel:0x40000:ROMFS: erase:0x800000:-1 /tmp/uclinux-kernel-and-romfs-and-erase-jffs2-area.bin

            Updating via a FTP Client
            To update the target via FTP with an image file generated by
            1. From your host system, launch a FTP session to the target. Note that this can be done when the target is running Linux provided that the root file system is ROMFS, and a JFFS2 partition is not mounted.
            $ ftp <target-ip>
            2. Log in to prompt (default username and password is root:root).
            3. Change to binary mode.
            ftp> binary 200 Type set to I.
            4. Push the firmware update file to the target. Note that firmware updates must be pushed to /var/firmware.img.
            ftp> put uclinux-kernel-and-romfs-and-erase-jffs2-area.bin /var/firmware.img