Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#66070 - 03/02/2002 02:45 Hijack--reading /proc/empeg_kernel?
Gary
stranger

Registered: 03/02/2002
Posts: 25
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...

Top
#66071 - 03/02/2002 02:54 Re: Hijack--reading /proc/empeg_kernel? [Re: Gary]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
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).
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#66072 - 03/02/2002 10:04 Re: Hijack--reading /proc/empeg_kernel? [Re: bonzi]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
/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.

Top