diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-03 10:14:33 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-03 10:14:33 +0300 |
commit | 332e159dd29ec7a54d3483b6fdb6ce858e377afc (patch) | |
tree | 83f53b44732cbe444c022d4da14e82fe6ab796e4 | |
parent | 877504a823195b33b9cea74ced19492b91e2a0ed (diff) |
load_nandsim.sh: use dochere for help output
Because it is cleaner.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rwxr-xr-x | load_nandsim.sh | 78 |
1 files changed, 40 insertions, 38 deletions
diff --git a/load_nandsim.sh b/load_nandsim.sh index de1ac74..a03b307 100755 --- a/load_nandsim.sh +++ b/load_nandsim.sh @@ -13,44 +13,46 @@ if grep -q "NAND simulator" /proc/mtd; then fi if [ "$#" -lt "1" ]; then - echo "Load NAND simulator to simulate flash of a specified size." - echo "" - echo "Usage: ./load_nandsim.sh <size in MiB> <eraseblock size in KiB>" - echo " <page size (512 or 2048)>" - echo "" - echo "Only the first parameter is mandatory. Default eraseblock size" - echo "is 16KiB, default NAND page size is 512 bytes." - echo "" - echo "Only the following combinations are supported:" - echo "--------------------------------------------------" - echo "| size (MiB) | EB size (KiB) | Page size (bytes) |" - echo "--------------------------------------------------" - echo "| 16 | 16 | 512 |" - echo "| 32 | 16 | 512 |" - echo "| 64 | 16 | 512 |" - echo "| 128 | 16 | 512 |" - echo "| 256 | 16 | 512 |" - echo "| 64 | 64 | 2048 |" - echo "| 64 | 128 | 2048 |" - echo "| 64 | 256 | 2048 |" - echo "| 64 | 512 | 2048 |" - echo "| 128 | 64 | 2048 |" - echo "| 128 | 128 | 2048 |" - echo "| 128 | 256 | 2048 |" - echo "| 128 | 512 | 2048 |" - echo "| 256 | 64 | 2048 |" - echo "| 256 | 128 | 2048 |" - echo "| 256 | 256 | 2048 |" - echo "| 256 | 512 | 2048 |" - echo "| 512 | 64 | 2048 |" - echo "| 512 | 128 | 2048 |" - echo "| 512 | 256 | 2048 |" - echo "| 512 | 512 | 2048 |" - echo "| 1024 | 64 | 2048 |" - echo "| 1024 | 128 | 2048 |" - echo "| 1024 | 256 | 2048 |" - echo "| 1024 | 512 | 2048 |" - echo "--------------------------------------------------" + cat 1>&2 <<EOF +Load NAND simulator to simulate flash of a specified size. + +Usage: ${0##*/} <size in MiB> <eraseblock size in KiB> \\ + <page size (512 or 2048)> + +Only the first parameter is mandatory. Default eraseblock size +is 16KiB, default NAND page size is 512 bytes. + +Only the following combinations are supported: +-------------------------------------------------- +| size (MiB) | EB size (KiB) | Page size (bytes) | +-------------------------------------------------- +| 16 | 16 | 512 | +| 32 | 16 | 512 | +| 64 | 16 | 512 | +| 128 | 16 | 512 | +| 256 | 16 | 512 | +| 64 | 64 | 2048 | +| 64 | 128 | 2048 | +| 64 | 256 | 2048 | +| 64 | 512 | 2048 | +| 128 | 64 | 2048 | +| 128 | 128 | 2048 | +| 128 | 256 | 2048 | +| 128 | 512 | 2048 | +| 256 | 64 | 2048 | +| 256 | 128 | 2048 | +| 256 | 256 | 2048 | +| 256 | 512 | 2048 | +| 512 | 64 | 2048 | +| 512 | 128 | 2048 | +| 512 | 256 | 2048 | +| 512 | 512 | 2048 | +| 1024 | 64 | 2048 | +| 1024 | 128 | 2048 | +| 1024 | 256 | 2048 | +| 1024 | 512 | 2048 | +-------------------------------------------------- +EOF exit 1 fi |