From 75a430946744e45a4de2e78673360fbae3339e52 Mon Sep 17 00:00:00 2001 From: Grzegorz Daniluk <grzegorz.daniluk@cern.ch> Date: Mon, 21 Sep 2015 17:32:27 +0200 Subject: [PATCH] flash: fix the flash sector size for SPEC --- include/flash.h | 2 +- tools/sdbfs.README | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/flash.h b/include/flash.h index eea3783..a78d383 100644 --- a/include/flash.h +++ b/include/flash.h @@ -11,7 +11,7 @@ #include "types.h" -#define FLASH_BLOCKSIZE 512 +#define FLASH_BLOCKSIZE 65536 /* Flash interface functions */ void flash_init(void); diff --git a/tools/sdbfs.README b/tools/sdbfs.README index 2a8d5e6..e023a0e 100644 --- a/tools/sdbfs.README +++ b/tools/sdbfs.README @@ -30,6 +30,10 @@ To create the filesystem image: "gensdbfs tools/sdbfs /tmp/sdb-wrpc.bin" (please note that empty files have no data to be stored, so no space is wasted on disk for them and the output file is short). +To create the flash filesystem image, don't forget about setting the sector +size. For flash chip on SPEC card, it is 64k: +gensdbfs -b 65536 tools/sdbfs /tmp/sdb-wrpc.bin + To check: "sdb-read -l /tmp/sdb-wrpc.bin": 46696c6544617461:2e202020 @ 00000000-0000037f . @@ -56,4 +60,4 @@ The next boot of lm32 will show it found the files: file 0x63616c69 @ 768, name calibration To read the flash: "tools/flash-read 0 320 > /tmp/flash.bin", -and then check the flash image file: "sdb-read -l /tmp/flash.bin". \ No newline at end of file +and then check the flash image file: "sdb-read -l /tmp/flash.bin". -- GitLab