2005-10-06 15:08:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# ---------------------------------------------------------
|
|
|
|
# Set the platform defines
|
|
|
|
# ---------------------------------------------------------
|
2005-10-08 22:22:48 +00:00
|
|
|
echo -n "/* Integrator configuration implied " > tmp.fil
|
2008-05-20 14:00:29 +00:00
|
|
|
echo " by Makefile target */" >> tmp.fil
|
2005-10-08 22:22:48 +00:00
|
|
|
echo -n "#define CONFIG_INTEGRATOR" >> tmp.fil
|
|
|
|
echo " /* Integrator board */" >> tmp.fil
|
|
|
|
echo -n "#define CONFIG_ARCH_INTEGRATOR" >> tmp.fil
|
|
|
|
echo " 1 /* Integrator/AP */" >> tmp.fil
|
2005-10-06 15:08:18 +00:00
|
|
|
# ---------------------------------------------------------
|
2005-10-08 22:22:48 +00:00
|
|
|
# Set the core module defines according to Core Module
|
2005-10-06 15:08:18 +00:00
|
|
|
# ---------------------------------------------------------
|
|
|
|
cpu="arm_intcm"
|
2005-10-08 22:22:48 +00:00
|
|
|
variant="unknown core module"
|
2005-10-06 15:08:18 +00:00
|
|
|
|
2008-01-02 14:54:45 +00:00
|
|
|
if [ "$1" = "" ]
|
2005-10-06 15:08:18 +00:00
|
|
|
then
|
2005-10-08 22:22:48 +00:00
|
|
|
echo "$0:: No parameters - using arm_intcm"
|
2005-10-06 15:08:18 +00:00
|
|
|
else
|
|
|
|
case "$1" in
|
2005-10-08 22:22:48 +00:00
|
|
|
ap7_config)
|
|
|
|
cpu="arm_intcm"
|
|
|
|
variant="unported core module CM7TDMI"
|
|
|
|
;;
|
|
|
|
|
|
|
|
ap966)
|
|
|
|
cpu="arm_intcm"
|
|
|
|
variant="unported core module CM966E-S"
|
|
|
|
;;
|
|
|
|
|
|
|
|
ap922_config)
|
|
|
|
cpu="arm_intcm"
|
|
|
|
variant="unported core module CM922T"
|
|
|
|
;;
|
|
|
|
|
2005-10-06 15:08:18 +00:00
|
|
|
integratorap_config | \
|
|
|
|
ap_config)
|
|
|
|
cpu="arm_intcm"
|
2005-10-08 22:22:48 +00:00
|
|
|
variant="unspecified core module"
|
2005-10-06 15:08:18 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ap720t_config)
|
|
|
|
cpu="arm720t"
|
2008-05-20 14:00:29 +00:00
|
|
|
echo -n "#define CONFIG_CM720T" >> tmp.fil
|
|
|
|
echo " 1 /* CPU core is ARM720T */ " >> tmp.fil
|
2005-10-08 22:22:48 +00:00
|
|
|
variant="Core module CM720T"
|
2005-10-06 15:08:18 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ap922_XA10_config)
|
|
|
|
cpu="arm_intcm"
|
2005-10-08 22:22:48 +00:00
|
|
|
variant="unported core module CM922T_XA10"
|
2008-05-20 14:00:29 +00:00
|
|
|
echo -n "#define CONFIG_CM922T_XA10" >> tmp.fil
|
|
|
|
echo " 1 /* CPU core is ARM922T_XA10 */" >> tmp.fil
|
2005-10-06 15:08:18 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ap920t_config)
|
|
|
|
cpu="arm920t"
|
2005-10-08 22:22:48 +00:00
|
|
|
variant="Core module CM920T"
|
2008-05-20 14:00:29 +00:00
|
|
|
echo -n "#define CONFIG_CM920T" >> tmp.fil
|
2005-10-08 22:22:48 +00:00
|
|
|
echo " 1 /* CPU core is ARM920T */" >> tmp.fil
|
2005-10-06 15:08:18 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ap926ejs_config)
|
|
|
|
cpu="arm926ejs"
|
2005-10-08 22:22:48 +00:00
|
|
|
variant="Core module CM926EJ-S"
|
|
|
|
echo -n "#define CONFIG_CM926EJ_S" >> tmp.fil
|
|
|
|
echo " 1 /* CPU core is ARM926EJ-S */ " >> tmp.fil
|
2005-10-06 15:08:18 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
ap946es_config)
|
|
|
|
cpu="arm946es"
|
2005-10-08 22:22:48 +00:00
|
|
|
variant="Core module CM946E-S"
|
|
|
|
echo -n "#define CONFIG_CM946E_S" >> tmp.fil
|
|
|
|
echo " 1 /* CPU core is ARM946E-S */ " >> tmp.fil
|
2005-10-06 15:08:18 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2005-10-08 22:22:48 +00:00
|
|
|
echo "$0:: Unknown core module"
|
|
|
|
variant="unknown core module"
|
2005-10-06 15:08:18 +00:00
|
|
|
cpu="arm_intcm"
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2008-01-02 14:54:45 +00:00
|
|
|
if [ "$cpu" = "arm_intcm" ]
|
2005-10-06 15:08:18 +00:00
|
|
|
then
|
|
|
|
echo "/* Core module undefined/not ported */" >> tmp.fil
|
2005-10-08 22:22:48 +00:00
|
|
|
echo "#define CONFIG_ARM_INTCM 1" >> tmp.fil
|
|
|
|
echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> tmp.fil
|
2008-05-20 14:00:29 +00:00
|
|
|
echo -n " /* CM may not have " >> tmp.fil
|
2005-10-08 22:22:48 +00:00
|
|
|
echo "multiple SSRAM mapping */" >> tmp.fil
|
2008-05-20 14:00:29 +00:00
|
|
|
echo -n "#undef CONFIG_CM_SPD_DETECT " >> tmp.fil
|
|
|
|
echo -n " /* CM may not support SPD " >> tmp.fil
|
2005-10-08 22:22:48 +00:00
|
|
|
echo "query */" >> tmp.fil
|
2008-05-20 14:00:29 +00:00
|
|
|
echo -n "#undef CONFIG_CM_REMAP " >> tmp.fil
|
2005-10-08 22:22:48 +00:00
|
|
|
echo -n " /* CM may not support " >> tmp.fil
|
2008-05-20 14:00:29 +00:00
|
|
|
echo "remapping */" >> tmp.fil
|
|
|
|
echo -n "#undef CONFIG_CM_INIT " >> tmp.fil
|
2005-10-08 22:22:48 +00:00
|
|
|
echo -n " /* CM may not have " >> tmp.fil
|
|
|
|
echo "initialization reg */" >> tmp.fil
|
2008-05-20 14:00:29 +00:00
|
|
|
echo -n "#undef CONFIG_CM_TCRAM " >> tmp.fil
|
|
|
|
echo " /* CM may not have TCRAM */" >> tmp.fil
|
2005-10-06 15:08:18 +00:00
|
|
|
fi
|
2006-09-01 17:49:50 +00:00
|
|
|
|
|
|
|
mkdir -p ${obj}include
|
|
|
|
mkdir -p ${obj}board/integratorap
|
|
|
|
mv tmp.fil ${obj}include/config.h
|
2005-10-06 15:08:18 +00:00
|
|
|
# ---------------------------------------------------------
|
2005-10-08 22:22:48 +00:00
|
|
|
# Ensure correct core object loaded first in U-Boot image
|
2005-10-06 15:08:18 +00:00
|
|
|
# ---------------------------------------------------------
|
2006-09-01 17:49:50 +00:00
|
|
|
sed -r 's/CPU_FILE/cpu\/'$cpu'\/start.o/; s/#.*//' ${src}board/integratorap/u-boot.lds.template > ${obj}board/integratorap/u-boot.lds
|
2005-10-06 15:08:18 +00:00
|
|
|
# ---------------------------------------------------------
|
|
|
|
# Complete the configuration
|
|
|
|
# ---------------------------------------------------------
|
2006-09-01 17:49:50 +00:00
|
|
|
$MKCONFIG -a integratorap arm $cpu integratorap;
|
2005-10-08 22:22:48 +00:00
|
|
|
echo "Variant:: $variant with core $cpu"
|
|
|
|
|