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