Hijack--reading /proc/empeg_kernel?

Posted by: Gary

Hijack--reading /proc/empeg_kernel? - 03/02/2002 02:45

So mlord originally used /dev/flash_kernel to enable kernel flashing over ethernet. At that time, he posted a shell script that would write to that device--and then confirm the flash by reading from the device. The filesizes should match.

Now we use /proc/empeg_kernel. Can you read it to confirm a flash? In my tests, the downloaded filesize is much larger than the correctly uploaded kernel...
Posted by: bonzi

Re: Hijack--reading /proc/empeg_kernel? - 03/02/2002 02:54

Yes, you can read, but something else gets read *after* the kernel you uploaded (probably the whole space allocated for kernel). If you wish to compare downloaded kernel image with the original, compare only up to the length of the originally uploaded file (as Mark is doing in the script he posted when uploading was not fully reliable). Use
dd if=longer_file bs=length_of_shorter_file count=1 | diff shorter_file - 
under Unix (don't know equivalent on Windows, except with cygwin or MKS toolkit).
Posted by: mlord

Re: Hijack--reading /proc/empeg_kernel? - 03/02/2002 10:04

/proc/empeg_kernel is fixed size, 640KBytes I think. When writing a new kernel that is smaller than that size (all existing kernels), some bytes will be left "as was", and when read back the "file" will appear larger than what was written. Just ignore the extra stuff.