Unoffical empeg BBS

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

Page 2 of 2 < 1 2
Topic Options
#78900 - 10/03/2002 13:55 Re: jEmplode - Auto Hijack Update + LogoEdit w/Hijack [Re: mlord]
mschrag
pooh-bah

Registered: 09/09/2000
Posts: 2303
Loc: Richmond, VA
The zImage for 236 = 511940 bytes

If I download /proc/empeg_kernel back off, it is 655360 bytes.

This is on a succesful update ... Am I getting the gunzipped version back off, or something?

Mike

Top
#78901 - 10/03/2002 14:00 Re: jEmplode - Auto Hijack Update + LogoEdit w/Hijack [Re: mschrag]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14497
Loc: Canada
The read-back will always be exactly (640 * 1024) bytes. Ya just have to compare from the beginning only the number of bytes actually sent.

Cheers

Top
#78902 - 10/03/2002 14:00 Re: jEmplode - Auto Hijack Update + LogoEdit w/Hijack [Re: mschrag]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Just compare the first <kernel length> bytes. The rest is trash.
_________________________
Bitt Faulk

Top
#78903 - 10/03/2002 14:01 Re: jEmplode - Auto Hijack Update + LogoEdit w/Hijack [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14497
Loc: Canada
(640 * 1024) == size of kernel flash area. Reading it returns the whole thing, since there is no marker to say how much was "used". Current kernels are about 120KB smaller than that.

Cheers

Top
#78904 - 10/03/2002 14:03 Re: jEmplode - Auto Hijack Update + LogoEdit w/Hijack [Re: mschrag]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
/proc/empeg_kernel will give you the entire flash space no matter what is currently there. My hijack update script that I grabbed from here does this at the end to compare the two:

echo "Readback kernel.."
/usr/bin/ftp ${IPADDRESS} >/dev/null <<-EOF

get /proc/empeg_kernel ${TMPFILE}
quit
EOF

KSIZE=`/bin/ls -l ${ZIMAGE} | awk '{print $5;exit}'`

echo -n "Comparing ${KSIZE} bytes.. "
dd if=${TMPFILE} bs=${KSIZE} count=1 2>/dev/null | diff ${ZIMAGE} -

if [ "$?" = "0" ]; then
echo "Success!"
else
echo "FAILED ($?) -- try again!"
fi
rm -f ${TMPFILE} 2>/dev/null

Top
#78905 - 10/03/2002 14:23 Re: jEmplode - Auto Hijack Update + LogoEdit w/Hijack [Re: mschrag]
mschrag
pooh-bah

Registered: 09/09/2000
Posts: 2303
Loc: Richmond, VA
Thanks guys ...

Top
#78906 - 11/03/2002 02:03 Re: jEmplode - Auto Hijack Update + LogoEdit w/Hijack [Re: mschrag]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Works flawlessly now (as you know). Thanks! (Comparing sent and received kernel image is a bit slow, but that's a small price to pay for reliability.)

Thanks for new 'parent playlist lookup' features, too.
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#78907 - 11/03/2002 07:51 Re: jEmplode - Auto Hijack Update + LogoEdit w/Hijack [Re: bonzi]
mschrag
pooh-bah

Registered: 09/09/2000
Posts: 2303
Loc: Richmond, VA
Yeah -- I'm going to work on the comparison speed ... I think I'll just calculate a CRC while sending and a CRC while receiving and just check that as opposed to downloading the kernel, writing to disk, reading both of them back in and comparing them ... Kind of wasteful.

Mike

Top
Page 2 of 2 < 1 2