[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bootblocktool and Rescue partition



Hi,

I have some questions about the bootblock (Rescue partition).

Bootblocktool:
I have tried to use the bootblocktool to save some parameters, ie SERNO,
HWREV ...
One parameter can be saved but when i save more than that the board will not
restart!!!
What is wrong?

I have used the example from /apps/bootblocktool/README
"bootblocktool -a HWID 1234 BRAND Axis SERNO 00408C123456"
(See debug printouts at the end of this message)



Rescue partition:
Your documentation says:
"flashit: writes all of the fimage except the rescue partition to flash."
"flashitall: writes the entire fimage to flash."

The flashit seems to overwrite the parameters written by bootblocktool.
Shouldn't they only be overwritten by flashitall? 

When i have a new board with empty flashes i use "flashit". But how does the
rescue code gets into the flash??

The card doesn't start after a flashitall. How should flashitall be used?



// Henrik Löfgren




Bootblocktool printouts (With Debug defined)

[root@nms6001 /]53# bootblocktool -l
bootblocktool -l
open(/dev/cflash0, 0)
 seek to 49152 0 result: 49152 
EMPTYMAGIC!
close


[root@nms6001 /]53# bootblocktool -a HWID 1234 BRAND Axis SERNO 00408C123456
bootblocktool -a HWID 1234 BRAND Axis SERNO 00408C123456
writeParam: HWID=1234
readParam: 'HWID' 
open(/dev/cflash0, 0)
 seek to 49152 0 result: 49152 
close
open(/dev/cflash0, 1)
writeMagic at 0 
 seek to 49152 0 result: 49152 
writeParamAt: 4'HWID'='1234' 
 seek to 49156 0 result: 49156 
close
writeParam: BRAND=Axis
readParam: 'BRAND' 
open(/dev/cflash0, 0)
 seek to 49152 0 result: 49152 
readParamAt: 4
 seek to 49156 0 result: 49156 
 totallen: 11 
 nameLen: 4 
 *name: HWID 
readParamAt: 15
 seek to 49167 0 result: 49167 
 totallen: 65535 
close
open(/dev/cflash0, 1)
writeParamAt: 15'BRAND'='Axis' 
 seek to 49167 0 result: 49167 
close
writeParam: SERNO=00408C123456
readParam: 'SERNO' 
open(/dev/cflash0, 0)
 seek to 49152 0 result: 49152 
readParamAt: 4
 seek to 49156 0 result: 49156 
 totallen: 11 
 nameLen: 4 
 *name: HWID 
readParamAt: 15
 seek to 49167 0 result: 49167 
 totallen: 12 
 nameLen: 5 
 *name: BRAND 
readParamAt: 27
 seek to 49179 0 result: 49179 
 totallen: 65535 
close
open(/dev/cflash0, 1)
writeParamAt: 27'SERNO'='00408C123456' 
 seek to 49179 0 result: 49179 
close

 
[root@nms6001 /]53# bootblocktool -l
bootblocktool -l
open(/dev/cflash0, 0)
 seek to 49152 0 result: 49152 
readParamAt: 4
 seek to 49156 0 result: 49156 
 totallen: 11 
 nameLen: 4 
 *name: HWID 
HWID=1234
readParamAt: 15
 seek to 49167 0 result: 49167 
 totallen: 12 
 nameLen: 5 
 *name: BRAND 
BRAND=Axis
readParamAt: 27
 seek to 49179 0 result: 49179 
 totallen: 20 
 nameLen: 5 
 *name: SERNO 
SERNO=00408C123456
readParamAt: 47
 seek to 49199 0 result: 49199 
 totallen: 65535 
close


[root@nms6001 /]53# reboot
reboot
Restarting system.
*** HARD RESET ***














flashit: writes all of the fimage except the rescue partition to flash. 
flashitall: writes the entire fimage to flash. 

winmail.dat