diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-08-08 07:41:33 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-08-08 07:41:33 +0000 |
commit | 29346602b44a28a29e12afc4ec60ab91ed7f0a9c (patch) | |
tree | 5389cd189cf1ad5adf41a9e3ecf90035d2a86729 /scripts/poky-nokia800-flashutil | |
parent | 17606f8e06a470d99558381f0471442b3ca72f3b (diff) | |
download | poky-29346602b44a28a29e12afc4ec60ab91ed7f0a9c.tar.gz |
poky-nokia800-flashutil: merged offsets from Andrew script and added Diablo notes
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5024 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts/poky-nokia800-flashutil')
-rwxr-xr-x | scripts/poky-nokia800-flashutil | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/poky-nokia800-flashutil b/scripts/poky-nokia800-flashutil index 0d6dcaa976..f1ffa5ae6f 100755 --- a/scripts/poky-nokia800-flashutil +++ b/scripts/poky-nokia800-flashutil | |||
@@ -10,6 +10,17 @@ if [ ! -r "$1" ]; then | |||
10 | exit -1 | 10 | exit -1 |
11 | fi | 11 | fi |
12 | 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 | |||
13 | if [ ! -e "$2" ]; then | 24 | if [ ! -e "$2" ]; then |
14 | echo "foo" | 25 | echo "foo" |
15 | # Making an empty/erased flash image. Need a correct echo behavior. | 26 | # Making an empty/erased flash image. Need a correct echo behavior. |
@@ -31,15 +42,15 @@ if [ "$3" != "" ]; then | |||
31 | case "$3" in | 42 | case "$3" in |
32 | config) | 43 | config) |
33 | partition=/dev/mtd1 | 44 | partition=/dev/mtd1 |
34 | page=64 | 45 | page=$config_offset |
35 | ;; | 46 | ;; |
36 | initfs) | 47 | initfs) |
37 | partition=/dev/mtd3 | 48 | partition=/dev/mtd3 |
38 | page=1280 | 49 | page=$initfs_offset |
39 | ;; | 50 | ;; |
40 | rootfs) | 51 | rootfs) |
41 | partition=/dev/mtd4 | 52 | partition=/dev/mtd4 |
42 | page=2304 | 53 | page=$rootfs_offset |
43 | ;; | 54 | ;; |
44 | *) | 55 | *) |
45 | echo "Unknown partition $2" | 56 | echo "Unknown partition $2" |
@@ -47,7 +58,7 @@ if [ "$3" != "" ]; then | |||
47 | esac | 58 | esac |
48 | else | 59 | else |
49 | partition=/dev/mtd4 | 60 | partition=/dev/mtd4 |
50 | page=2304 | 61 | page=$rootfs_offset |
51 | fi | 62 | fi |
52 | 63 | ||
53 | dd if=$1 of=$2 conv=notrunc bs=2048 seek=$page | 64 | dd if=$1 of=$2 conv=notrunc bs=2048 seek=$page |