comparison gsm-fw/cfgmagic/processconf.sh @ 207:c70c077243dd

gsm-fw: beginning of config magic for FFS
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 25 Dec 2013 08:40:20 +0000
parents df335d255ac4
children 2a26785fb5a2
comparison
equal deleted inserted replaced
206:9539929b3414 207:c70c077243dd
2 # The top level Makefile invokes this Bourne shell script after ensuring 2 # The top level Makefile invokes this Bourne shell script after ensuring
3 # that the build.conf file is present. The job of this script is to grok 3 # that the build.conf file is present. The job of this script is to grok
4 # that configuration file and to produce include/config.{h,mk,m4} files 4 # that configuration file and to produce include/config.{h,mk,m4} files
5 # corresponding to the selected configuration. 5 # corresponding to the selected configuration.
6 # 6 #
7 # The current directory is expected to be the top level of nuc-fw, i.e., 7 # The current directory is expected to be the top level of gsm-fw, i.e.,
8 # all fragments are sourced as cfgmagic/blah. 8 # all fragments are sourced as cfgmagic/blah.
9 # Don't run this script directly - let the Makefile do it for you. 9 # Don't run this script directly - let the Makefile do it for you.
10 10
11 set -e 11 set -e
12 . cfgmagic/functions 12 . cfgmagic/functions
14 c_export_list= 14 c_export_list=
15 mk_export_list= 15 mk_export_list=
16 m4_export_list= 16 m4_export_list=
17 17
18 # some defaults 18 # some defaults
19 FFS_IN_RAM=1
19 RVTMUX_UART_port=IrDA 20 RVTMUX_UART_port=IrDA
20 RVTMUX_UART_baud=115200 21 RVTMUX_UART_baud=115200
21 22
22 . ./build.conf 23 . ./build.conf
23 24
34 MODEM) 35 MODEM)
35 CONFIG_RVTMUX_ON_MODEM=1 36 CONFIG_RVTMUX_ON_MODEM=1
36 export_to_c CONFIG_RVTMUX_ON_MODEM 37 export_to_c CONFIG_RVTMUX_ON_MODEM
37 ;; 38 ;;
38 *) 39 *)
39 echo "Error: unknown RTVMUX_UART_port=$RTVMUX_UART_port" 1>&2 40 echo "Error: unknown RVTMUX_UART_port=$RVTMUX_UART_port" 1>&2
40 exit 1 41 exit 1
41 ;; 42 ;;
42 esac 43 esac
43 44
44 TR_BAUD_CONFIG=TR_BAUD_$RVTMUX_UART_baud 45 TR_BAUD_CONFIG=TR_BAUD_$RVTMUX_UART_baud
45 export_to_c TR_BAUD_CONFIG 46 export_to_c TR_BAUD_CONFIG
47
48 # FFS in RAM
49 export_to_c FFS_IN_RAM
50 export_to_m4 FFS_IN_RAM
51 if [ $FFS_IN_RAM = 1 ]
52 then
53 if [ -z "$RAMFFS_BLKSIZE_LOG2" -o -z "$RAMFFS_NBLOCKS" ]
54 then
55 echo \
56 "Error: RAMFFS_BLKSIZE_LOG2 and RAMFFS_NBLOCKS need to be defined" 1>&2
57 exit 1
58 fi
59 export_to_c RAMFFS_BLKSIZE_LOG2
60 export_to_m4 RAMFFS_BLKSIZE_LOG2
61 export_to_c RAMFFS_NBLOCKS
62 export_to_m4 RAMFFS_NBLOCKS
63 fi
46 64
47 # At some point the list of build components will probably become 65 # At some point the list of build components will probably become
48 # dependent on feature or maybe even target configurations, but for 66 # dependent on feature or maybe even target configurations, but for
49 # now it is static. 67 # now it is static.
50 68