annotate gsm-fw/cfgmagic/feature.mokoffs @ 881:da9a36515da6

rvinterf: log sent AT commands in ASCII form
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 01:35:33 +0000
parents 6ffebb8cec78
children 042c178ebac5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 # feature mokoffs is applicable only when building gsm-fw for the Openmoko
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 # GTA0x GSM modem. This feature directs our fw to use the original FFS
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 # which contains the factory IMEI + RF calibration data and which the
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 # original mokoN firmware treats as writable.
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 #
861
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
6 # There are 3 different ways in which we can use MokoFFS:
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
7 #
207
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 # feature mokoffs rw -- treat MokoFFS as R/W like the original fw does
861
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
9 # feature mokoffs ro -- use MokoFFS in flash, but disable flash write ops
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
10 # feature mokoffs copy -- copy MokoFFS into RAM on boot, then R/W in RAM only
207
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 if [ $TARGET != gtamodem ]
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 then
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 echo "Error: feature mokoffs is applicable only to target gtamodem" 1>&2
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 exit 1
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 fi
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 CONFIG_MOKOFFS=1
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 export_to_c CONFIG_MOKOFFS
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20
861
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
21 if [ $# != 2 ]
207
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 then
861
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
23 echo "feature mokoffs: extra argument required" 1>&2
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
24 exit 1
207
c70c077243dd gsm-fw: beginning of config magic for FFS
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 fi
861
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
26
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
27 case "$2" in
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
28 rw)
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
29 FFS_IN_RAM=0
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
30 CONFIG_FLASH_WRITE=1
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
31 export_to_c CONFIG_FLASH_WRITE
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
32 ;;
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
33 ro)
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
34 FFS_IN_RAM=0
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
35 CONFIG_FLASH_WRITE=0
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
36 export_to_c CONFIG_FLASH_WRITE
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
37 ;;
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
38 copy)
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
39 FFS_IN_RAM=1
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
40 RAMFFS_BLKSIZE_LOG2=16
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
41 RAMFFS_NBLOCKS=7
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
42 CONFIG_MOKOFFS_COPY=1
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
43 export_to_c CONFIG_MOKOFFS_COPY
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
44 ;;
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
45 *)
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
46 echo "feature mokoffs: argument must be rw, ro or copy" 1>&2
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
47 exit 1
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
48 ;;
6ffebb8cec78 implemented feature mokoffs copy; made it part of the gtamodem-gsm config
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 207
diff changeset
49 esac