view 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
line wrap: on
line source

# This feature is specific to FreeCalypso family targets, i.e., hardware
# designed and built within the FreeCalypso family of projects rather than
# pre-existing Calypso devices.  FC family devices starting with FCDEV3B
# use the 16 MiB flash chip originally discovered on the Pirelli DP-L10,
# organized as two chip select banks of 8 MiB each; the first flash bank
# is for the firmware, and the second flash bank is ideally suited for
# file system storage.
#
# Because we don't really need an 8 MiB FFS, instead of allocating the
# entirety of the second flash bank for one gigantic FFS, our current
# convention allocates room for up to 3 potential FFS instances, each
# 2 MiB in size.  Thus we have FFS location 0, FFS location 1 and
# FFS location 2.  Our Magnetite firmware always uses FFS location 0;
# when running Citrine firmware, it is up to you whether you wish your
# Citrine fw to use the same FFS as Magnetite or its own separate FFS
# instance.

check_target_feature "$1"

if [ $# != 2 ]
then
	echo "feature fcfam-ffs: extra argument required" 1>&2
	exit 1
fi

FFS_IN_RAM=0
CONFIG_AFTERMARKET_FFS=1

case "$2" in
	0)
		CONFIG_AFTERMARKET_FFS_START=0
		;;
	1)
		CONFIG_AFTERMARKET_FFS_START=8
		;;
	2)
		CONFIG_AFTERMARKET_FFS_START=16
		;;
	*)
		echo "feature fcfam-ffs: argument must be 0, 1 or 2" 1>&2
		exit 1
		;;
esac

CONFIG_AFTERMARKET_FFS_NBLOCKS=8
CONFIG_FLASH_WRITE=1

export_to_c	CONFIG_AFTERMARKET_FFS
export_to_c	CONFIG_AFTERMARKET_FFS_START
export_to_c	CONFIG_AFTERMARKET_FFS_NBLOCKS
export_to_c	CONFIG_FLASH_WRITE