FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/cfgmagic/feature.pirhack-ffs @ 388:821a26f90968
doc/RVTMUX: minor fixes
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 10 Jun 2014 20:59:32 +0000 |
parents | 6e7410f7975c |
children | 042c178ebac5 |
rev | line source |
---|---|
207
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 # Concerning the FFS, there is one fundamental difference between the gtamodem |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 # and pirelli targets: whereas the content of Openmoko's modem FFS is directly |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 # fit for reuse by our fw (resulting from the phylogenetic proximity of the two |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 # firmwares), Pirelli's original FFS has the same format, but its content is so |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 # different that trying to reuse it would be more trouble than it is worth. |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 # (And Pirelli's FFS contains no IMEI or RF calibration data to boot!) |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 # |
269
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
8 # Therefore, I (FC developer Space Falcon) have decided that when targeting the |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
9 # Pirelli, it would be better for us to start from our own blank FFS than to |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
10 # deal with the original. However, because there is no single correct answer |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
11 # as to which region of the flash chip we should use (other than needing to be |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
12 # in the flash2 bank so we can use the more efficient multibank flash driver), |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
13 # this feature pirhack-ffs takes two required arguments: the number of the |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
14 # first flash2 sector to be used for the FFS and the total number of sectors |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
15 # to be used. For example, this setting: |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
16 # |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
17 # feature pirhack-ffs 24 7 |
226
4d706a4134b0
FFS in gsm-fw: generate the legacy block info table at run time
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
207
diff
changeset
|
18 # |
269
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
19 # will configure our GSM fw to put its FFS in the last 7 256 KiB sectors of the |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
20 # 2nd flash chip select, which coincidentally form an independent read/write |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
21 # bank, and are part of the flash2 region which appears to be "unused" by the |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
22 # original firmware. Or you can use all of this "unused" area like this: |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
23 # |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
24 # feature pirhack-ffs 18 13 |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
25 # |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
26 # The sum of the two numbers must not exceed 31, i.e., the end of our FFS must |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
27 # be at or before the end of the "large sectors" main part of flash2. |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
28 # Specifying feature pirhack-ffs 0 18 will make our FFS use the same sectors |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
29 # as the original, but attempting to reuse the original FFS without reformatting |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
30 # is NOT recommended or supported. |
207
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 if [ $TARGET != pirelli ] |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 then |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 echo \ |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 "Error: feature pirhack-ffs is applicable only to target pirelli" 1>&2 |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 exit 1 |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 fi |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 |
269
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
39 if [ $# != 3 ] |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
40 then |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
41 echo "feature pirhack-ffs: two arguments required" 1>&2 |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
42 exit 1 |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
43 fi |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
44 |
207
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 FFS_IN_RAM=0 |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 CONFIG_PIRHACK_FFS=1 |
269
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
47 CONFIG_PIRHACK_FFS_START=$2 |
6e7410f7975c
gsm-fw feature pirhack-ffs: require explicit selection of sectors to be used
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
226
diff
changeset
|
48 CONFIG_PIRHACK_FFS_NBLOCKS=$3 |
207
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 CONFIG_FLASH_WRITE=1 |
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 export_to_c CONFIG_PIRHACK_FFS |
226
4d706a4134b0
FFS in gsm-fw: generate the legacy block info table at run time
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
207
diff
changeset
|
51 export_to_c CONFIG_PIRHACK_FFS_START |
4d706a4134b0
FFS in gsm-fw: generate the legacy block info table at run time
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
207
diff
changeset
|
52 export_to_c CONFIG_PIRHACK_FFS_NBLOCKS |
207
c70c077243dd
gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 export_to_c CONFIG_FLASH_WRITE |