[Empeg-technical] Re: download.c and serial programming

wfaulk@empegbbs-noreply.merlins.org wfaulk at empegbbs-noreply.merlins.org
Fri Apr 4 13:51:00 2003


There's one potential problem with the program above.  I'm reuploading it here with a one-line fix (plus two lines of comments).  There's also a minor fix to prevent specifying multiple files.  This is not a show-stopper, as it would only deal with the first one, but it's nice to not have arguments completely ignored.

Also, some usage would help since the command line options have changed.

empeg-download -p /dev/ttya -a 10000 kernel_file.zImage

`-p' specifies the device to use.  It's a required option.

`-a' specifies the address to erase and replace with the given file. 10000 is the correct address for replacement kernels.

The other argument is for the file to upload.  There should be only one file.

You can also specify a `-d' option to assume that the empeg is already in program mode.  This was already in the original download.c, activated by specifying anything after the filename.  Now it's a little more obvious, if not much more useful.

It also now tries to reboot the empeg on its own, just like Tony's upload.exe for Win32.  It also tries to reboot it afterwards.  These reboot attempts can be elided by specifying `-i' and `-r', for the initial reboot and the ending reboot, respectively.  Using them could potentially be useful for uploading multiple things to the empeg's flash, as during upgrades, for example.  Using the `-d' flag assumes the `-i' flag.  




More information about the Empeg-technical mailing list