FreeCalypso > hg > freecalypso-citrine
annotate cfgmagic/feature.fcfam-ffs @ 41:d1d1afdc29b5
configs/fcdev3b-std added
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 17 May 2017 06:02:03 +0000 |
parents | f385e4d87bad |
children |
rev | line source |
---|---|
38
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 # This feature is specific to FreeCalypso family targets, i.e., hardware |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 # designed and built within the FreeCalypso family of projects rather than |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 # pre-existing Calypso devices. FC family devices starting with FCDEV3B |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 # use the 16 MiB flash chip originally discovered on the Pirelli DP-L10, |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 # organized as two chip select banks of 8 MiB each; the first flash bank |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 # is for the firmware, and the second flash bank is ideally suited for |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 # file system storage. |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 # |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 # Because we don't really need an 8 MiB FFS, instead of allocating the |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 # entirety of the second flash bank for one gigantic FFS, our current |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 # convention allocates room for up to 3 potential FFS instances, each |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 # 2 MiB in size. Thus we have FFS location 0, FFS location 1 and |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 # FFS location 2. Our Magnetite firmware always uses FFS location 0; |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 # when running Citrine firmware, it is up to you whether you wish your |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 # Citrine fw to use the same FFS as Magnetite or its own separate FFS |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 # instance. |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 check_target_feature "$1" |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 if [ $# != 2 ] |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 then |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 echo "feature fcfam-ffs: extra argument required" 1>&2 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 exit 1 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 fi |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 FFS_IN_RAM=0 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 CONFIG_AFTERMARKET_FFS=1 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 case "$2" in |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 0) |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 CONFIG_AFTERMARKET_FFS_START=0 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 ;; |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 1) |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 CONFIG_AFTERMARKET_FFS_START=8 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 ;; |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 2) |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 CONFIG_AFTERMARKET_FFS_START=16 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 ;; |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 *) |
39
f385e4d87bad
cfgmagic/feature.fcfam-ffs: copy&paste error
Mychaela Falconia <falcon@freecalypso.org>
parents:
38
diff
changeset
|
40 echo "feature fcfam-ffs: argument must be 0, 1 or 2" 1>&2 |
38
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 exit 1 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 ;; |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 esac |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 CONFIG_AFTERMARKET_FFS_NBLOCKS=8 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 CONFIG_FLASH_WRITE=1 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 export_to_c CONFIG_AFTERMARKET_FFS |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 export_to_c CONFIG_AFTERMARKET_FFS_START |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 export_to_c CONFIG_AFTERMARKET_FFS_NBLOCKS |
24eb59e61b44
implemented feature fcfam-ffs for fcdev3b target
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 export_to_c CONFIG_FLASH_WRITE |