diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-20 16:49:37 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-21 00:29:29 +0100 |
| commit | 8ceb769eab14066c9a5fc6a68284de9c1f5637fe (patch) | |
| tree | 46deb2d4478038f43d7af0c1c3902755eac72de6 /scripts/poky-nokia800-flashutil | |
| parent | 08127d444e05d8d33ce39abdce677655bd4766ea (diff) | |
| download | poky-8ceb769eab14066c9a5fc6a68284de9c1f5637fe.tar.gz | |
Remove obsolete scripts/classes
(From OE-Core rev: 25efcd45c83a81d78f73b5da852e575b108b3fb5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/poky-nokia800-flashutil')
| -rwxr-xr-x | scripts/poky-nokia800-flashutil | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/scripts/poky-nokia800-flashutil b/scripts/poky-nokia800-flashutil deleted file mode 100755 index f1ffa5ae6f..0000000000 --- a/scripts/poky-nokia800-flashutil +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # Copyright (C) 2008 OpenedHand Ltd. | ||
| 3 | # Contact: andrew@openedhand.com | ||
| 4 | # | ||
| 5 | # Erase the partition given in $3 (default: rootfs) and flash the contents | ||
| 6 | # of image given in $1 into the image $2. | ||
| 7 | |||
| 8 | if [ ! -r "$1" ]; then | ||
| 9 | echo "Usage: $0 <image> <destimage> [<partition>]" | ||
| 10 | exit -1 | ||
| 11 | fi | ||
| 12 | |||
| 13 | uboot_offset=0 | ||
| 14 | config_offset=64 | ||
| 15 | kernel_offset=256 | ||
| 16 | initfs_offset=1280 | ||
| 17 | rootfs_offset=2304 # chinook | ||
| 18 | |||
| 19 | # This value should be selected for Diablo based firmwares | ||
| 20 | # It also require patching qemu to get proper size of flash partitions | ||
| 21 | # (by default qemu has Chinook split). | ||
| 22 | #rootfs_offset=3328 # diablo | ||
| 23 | |||
| 24 | if [ ! -e "$2" ]; then | ||
| 25 | echo "foo" | ||
| 26 | # Making an empty/erased flash image. Need a correct echo behavior. | ||
| 27 | dd if=/dev/zero of=$2 bs=268435456 count=0 seek=1 | ||
| 28 | bash -c 'echo -en \\0377\\0377\\0377\\0377\\0377\\0377\\0377\\0377 > .8b' | ||
| 29 | cat .8b .8b > .16b # OOB is 16 bytes | ||
| 30 | cat .16b .16b .16b .16b .16b .16b .16b .16b > .8sec | ||
| 31 | cat .8sec .8sec .8sec .8sec .8sec .8sec .8sec .8sec > .64sec | ||
| 32 | cat .64sec .64sec .64sec .64sec .64sec .64sec .64sec .64sec > .512sec | ||
| 33 | cat .512sec .512sec .512sec .512sec > .2ksec | ||
| 34 | cat .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec .2ksec > .16k | ||
| 35 | cat .16k .16k .16k .16k .16k .16k .16k .16k > .128k | ||
| 36 | # N800 NAND is 512k sectors big | ||
| 37 | cat .128k .128k .128k .128k >> $2 | ||
| 38 | rm -rf .8b .16b .8sec .64sec .512sec .2ksec .16k .128k | ||
| 39 | fi | ||
| 40 | |||
| 41 | if [ "$3" != "" ]; then | ||
| 42 | case "$3" in | ||
| 43 | config) | ||
| 44 | partition=/dev/mtd1 | ||
| 45 | page=$config_offset | ||
| 46 | ;; | ||
| 47 | initfs) | ||
| 48 | partition=/dev/mtd3 | ||
| 49 | page=$initfs_offset | ||
| 50 | ;; | ||
| 51 | rootfs) | ||
| 52 | partition=/dev/mtd4 | ||
| 53 | page=$rootfs_offset | ||
| 54 | ;; | ||
| 55 | *) | ||
| 56 | echo "Unknown partition $2" | ||
| 57 | exit -1 | ||
| 58 | esac | ||
| 59 | else | ||
| 60 | partition=/dev/mtd4 | ||
| 61 | page=$rootfs_offset | ||
| 62 | fi | ||
| 63 | |||
| 64 | dd if=$1 of=$2 conv=notrunc bs=2048 seek=$page | ||
