comparison nuc-fw/cfgmagic/post-target @ 88:ccde45a06737

nuc-fw: beginning of the configuration mechanism
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 23 Aug 2013 02:02:59 +0000
parents
children 45911ad957fd
comparison
equal deleted inserted replaced
87:321f6a9ae989 88:ccde45a06737
1 # This shell script fragment is sourced after the selected target.
2 # Here we'll put code that logically goes with the target hw-related
3 # stuff, but which we wish to avoid duplicating in every target.*
4 # fragment.
5
6 # The per-target fragment must have defined CONFIG_IRAM_SIZE, CONFIG_XRAM_SIZE
7 # and CONFIG_FWFLASH_SIZE.
8 if [ -z "$CONFIG_IRAM_SIZE" ]
9 then
10 echo "Error: target.$TARGET failed to define CONFIG_IRAM_SIZE" 1>&2
11 exit 1
12 fi
13
14 if [ -z "$CONFIG_XRAM_SIZE" ]
15 then
16 echo "Error: target.$TARGET failed to define CONFIG_XRAM_SIZE" 1>&2
17 exit 1
18 fi
19
20 if [ -z "$CONFIG_FWFLASH_SIZE" ]
21 then
22 echo "Error: target.$TARGET failed to define CONFIG_FWFLASH_SIZE" 1>&2
23 exit 1
24 fi
25
26 # export them to C and to the m4-based ld script generation logic
27 export_to_c CONFIG_IRAM_SIZE
28 export_to_m4 CONFIG_IRAM_SIZE
29 export_to_c CONFIG_XRAM_SIZE
30 export_to_m4 CONFIG_XRAM_SIZE
31 export_to_c CONFIG_FWFLASH_SIZE
32 export_to_m4 CONFIG_FWFLASH_SIZE
33
34 # Because we'll be using a lot of TI's code that is very liberally sprinkled
35 # with conditionals on their voodoo numbers for CHIPSET etc, we really have
36 # no choice but to continue using these nasty numbers, at least where
37 # possible.
38
39 if [ -z "$DBB_type" ]
40 then
41 echo "Error: target.$TARGET failed to define DBB_type" 1>&2
42 exit 1
43 fi
44
45 case "$DBB_type" in
46 751992*)
47 # This is the only Calypso variant we currently work with,
48 # and we have no authoritative knowledge of the correct
49 # CHIPSET number - only a current best guess.
50 CHIPSET=10
51 # let's hope for the best
52 ;;
53 *)
54 echo "Error: unknown DBB_type=$DBB_type" 1>&2
55 exit 1
56 ;;
57 esac
58 export_to_c CHIPSET
59
60 if [ -z "$ABB_type" ]
61 then
62 echo "Error: target.$TARGET failed to define ABB_type" 1>&2
63 exit 1
64 fi
65
66 case "$ABB_type" in
67 Iota*)
68 ANLG_FAM=2
69 ;;
70 Syren*)
71 ANLG_FAM=3
72 ;;
73 *)
74 echo "Error: unknown ABB_type=$ABB_type" 1>&2
75 exit 1
76 ;;
77 esac
78 export_to_c ANLG_FAM
79
80 # Ensure that device_class is set - various feature configurations
81 # will certainly depend on it.
82 if [ -z "$device_class" ]
83 then
84 echo "Error: target.$TARGET failed to define device_class" 1>&2
85 exit 1
86 fi