comparison gsm-fw/cfgmagic/feature.mokoffs @ 861:6ffebb8cec78

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