From 96e1d75be8193ca79e4215a368bf9d7f2362450f Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Wed, 11 Jul 2007 18:39:11 +0200 Subject: [PCS440EP] - Show on the DIAG LEDs, if the SHA1 check failed - now the Flash ST M29W040B is supported (not tested) - fix the "led" command - fix compile error, if BUILD_DIR is used Signed-off-by: Heiko Schocher --- doc/README.sha1 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 doc/README.sha1 (limited to 'doc/README.sha1') diff --git a/doc/README.sha1 b/doc/README.sha1 new file mode 100644 index 0000000000..92dc8fffae --- /dev/null +++ b/doc/README.sha1 @@ -0,0 +1,57 @@ +SHA1 usage: +----------- + +In the U-Boot Image for the pcs440ep board is a SHA1 checksum integrated. +This SHA1 sum is used, to check, if the U-Boot Image in Flash is not +corrupted. + +The following command is available: + +=> help sha1 +sha1 address len [addr] calculate the SHA1 sum [save at addr] + -p calculate the SHA1 sum from the U-Boot image in flash and print + -c check the U-Boot image in flash + +"sha1 -p" + calculates and prints the SHA1 sum, from the Image stored in Flash + +"sha1 -c" + check, if the SHA1 sum from the Image stored in Flash is correct + + +It is possible to calculate a SHA1 checksum from a memoryrange with: + +"sha1 address len" + +If you want to store a new Image in Flash for the pcs440ep board, +which has no SHA1 sum, you can do the following: + +a) cp the new Image on a position in RAM (here 0x300000) + (for this example we use the Image from Flash, stored at 0xfffa0000 and + 0x60000 Bytes long) + +"cp.b fffa0000 300000 60000" + +b) Initialize the SHA1 sum in the Image with 0x00 + The SHA1 sum is stored in Flash at: + CFG_MONITOR_BASE + CFG_MONITOR_LEN + SHA1_SUM_POS + for the pcs440ep Flash: 0xfffa0000 + 0x60000 + -0x20 + = 0xffffffe0 + for the example in RAM: 0x300000 + 0x60000 + -0x20 + = 0x35ffe0 + + note: a SHA1 checksum is 20 bytes long. + +"mw.b 35ffe0 0 14" + +c) now calculate the SHA1 sum from the memoryrange and write + the calculated checksum at the right place: + +"sha1 300000 60000 35ffe0" + +Now you have a U-Boot-Image for the pcs440ep board with the correct SHA1 sum. + +If you do a "./MAKEALL pcs440ep" or a "make all" to get the U-Boot image, +the correct SHA1 sum will be automagically included in the U-Boot image. + +Heiko Schocher, 11 Jul 2007 -- cgit v1.2.1 From 239f05ee4dd4cfe0b50f251b533dcebe9e67c360 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 12 Jul 2007 01:45:34 +0200 Subject: Update CHANGELOG, minor coding style cleanup. Signed-off-by: Wolfgang Denk --- doc/README.sha1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc/README.sha1') diff --git a/doc/README.sha1 b/doc/README.sha1 index 92dc8fffae..7992f7fb4c 100644 --- a/doc/README.sha1 +++ b/doc/README.sha1 @@ -34,11 +34,11 @@ a) cp the new Image on a position in RAM (here 0x300000) b) Initialize the SHA1 sum in the Image with 0x00 The SHA1 sum is stored in Flash at: - CFG_MONITOR_BASE + CFG_MONITOR_LEN + SHA1_SUM_POS - for the pcs440ep Flash: 0xfffa0000 + 0x60000 + -0x20 - = 0xffffffe0 - for the example in RAM: 0x300000 + 0x60000 + -0x20 - = 0x35ffe0 + CFG_MONITOR_BASE + CFG_MONITOR_LEN + SHA1_SUM_POS + for the pcs440ep Flash: 0xfffa0000 + 0x60000 + -0x20 + = 0xffffffe0 + for the example in RAM: 0x300000 + 0x60000 + -0x20 + = 0x35ffe0 note: a SHA1 checksum is 20 bytes long. -- cgit v1.2.1