2011-04-26 09:43:31     busybox, httpd and firmware updates

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-04-26 09:43:31     busybox, httpd and firmware updates

billy walton (UNITED KINGDOM)

Message: 100169   






I am using the httpd from busybox on 2010R1 and i am trying to write a cgi script to update the firmware on the flash.




I cant seem to find many detailed examples for this.




So far, i can succesfully upload the image file from the browser to the embedded system, remove the header content at the beginning of the uploaded file and at the end.


I think thats all the decoding i need to do on the file as its a binary upload


Now, before i write the new file to flash, i want to validate that the uploaded file really is an image file, on my ubuntu machine i have the identify command, but cant seem to find that on the uclinux dist, can anyone suggest a way i can validate the image before writing to flash? im using the busybox hush shell.  Is there a nice busybox applet which could help me here?




Many thanks








2011-04-26 12:46:01     Re: busybox, httpd and firmware updates

Mike Frysinger (UNITED STATES)

Message: 100174   


write your own simple C app to validate things.  installing `file` and/or `identify` on the embedded system just to read a few magic bytes is overkill.