Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # --------------------------------------------------------- |
| 3 | # Set the platform defines |
| 4 | # --------------------------------------------------------- |
| 5 | echo -n "/* Integrator configuration implied " > tmp.fil |
| 6 | echo " by Makefile target */" >> tmp.fil |
| 7 | echo -n "#define CONFIG_INTEGRATOR" >> tmp.fil |
| 8 | echo " /* Integrator board */" >> tmp.fil |
| 9 | echo -n "#define CONFIG_ARCH_CINTEGRATOR" >> tmp.fil |
| 10 | echo " 1 /* Integrator/CP */" >> tmp.fil |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 11 | |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 12 | cpu="arm_intcm" |
| 13 | variant="unknown core module" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 14 | |
Wolfgang Denk | 111d606 | 2008-01-02 15:54:45 +0100 | [diff] [blame] | 15 | if [ "$1" = "" ] |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 16 | then |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 17 | echo "$0:: No parameters - using arm_intcm" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 18 | else |
| 19 | case "$1" in |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 20 | ap966) |
| 21 | cpu="arm_intcm" |
| 22 | variant="unported core module CM966E-S" |
| 23 | ;; |
| 24 | |
| 25 | ap922_config) |
| 26 | cpu="arm_intcm" |
| 27 | variant="unported core module CM922T" |
| 28 | ;; |
| 29 | |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 30 | integratorcp_config | \ |
| 31 | cp_config) |
| 32 | cpu="arm_intcm" |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 33 | variant="unspecified core module" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 34 | ;; |
| 35 | |
| 36 | cp922_XA10_config) |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 37 | cpu="arm_intcm" |
| 38 | variant="unported core module CM922T_XA10" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 39 | echo -n "#define CONFIG_CM922T_XA10" >> tmp.fil |
| 40 | echo " 1 /* CPU core is ARM922T_XA10 */" >> tmp.fil |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 41 | ;; |
| 42 | |
| 43 | cp920t_config) |
| 44 | cpu="arm920t" |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 45 | variant="Core module CM920T" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 46 | echo -n "#define CONFIG_CM920T" >> tmp.fil |
| 47 | echo " 1 /* CPU core is ARM920T */" >> tmp.fil |
| 48 | ;; |
| 49 | |
| 50 | cp926ejs_config) |
| 51 | cpu="arm926ejs" |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 52 | variant="Core module CM926EJ-S" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 53 | echo -n "#define CONFIG_CM926EJ_S" >> tmp.fil |
| 54 | echo " 1 /* CPU core is ARM926EJ-S */ " >> tmp.fil |
| 55 | ;; |
| 56 | |
| 57 | |
| 58 | cp946es_config) |
| 59 | cpu="arm946es" |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 60 | variant="Core module CM946E-S" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 61 | echo -n "#define CONFIG_CM946E_S" >> tmp.fil |
| 62 | echo " 1 /* CPU core is ARM946E-S */ " >> tmp.fil |
| 63 | ;; |
| 64 | |
| 65 | cp1136_config) |
| 66 | cpu="arm1136" |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 67 | variant="Core module CM1136EJF-S" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 68 | echo -n "#define CONFIG_CM1136EJF_S" >> tmp.fil |
| 69 | echo " 1 /* CPU core is ARM1136JF-S */ " >> tmp.fil |
| 70 | ;; |
| 71 | |
| 72 | *) |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 73 | echo "$0:: Unknown core module" |
| 74 | variant="unknown core module" |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 75 | cpu="arm_intcm" |
| 76 | ;; |
| 77 | |
| 78 | esac |
| 79 | |
| 80 | fi |
| 81 | |
Wolfgang Denk | 111d606 | 2008-01-02 15:54:45 +0100 | [diff] [blame] | 82 | if [ "$cpu" = "arm_intcm" ] |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 83 | then |
| 84 | echo "/* Core module undefined/not ported */" >> tmp.fil |
| 85 | echo "#define CONFIG_ARM_INTCM 1" >> tmp.fil |
| 86 | echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> tmp.fil |
| 87 | echo -n " /* CM may not have " >> tmp.fil |
| 88 | echo "multiple SSRAM mapping */" >> tmp.fil |
| 89 | echo -n "#undef CONFIG_CM_SPD_DETECT " >> tmp.fil |
| 90 | echo -n " /* CM may not support SPD " >> tmp.fil |
| 91 | echo "query */" >> tmp.fil |
| 92 | echo -n "#undef CONFIG_CM_REMAP " >> tmp.fil |
| 93 | echo -n " /* CM may not support " >> tmp.fil |
| 94 | echo "remapping */" >> tmp.fil |
| 95 | echo -n "#undef CONFIG_CM_INIT " >> tmp.fil |
| 96 | echo -n " /* CM may not have " >> tmp.fil |
| 97 | echo "initialization reg */" >> tmp.fil |
| 98 | echo -n "#undef CONFIG_CM_TCRAM " >> tmp.fil |
| 99 | echo " /* CM may not have TCRAM */" >> tmp.fil |
| 100 | fi |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 101 | |
| 102 | mkdir -p ${obj}include |
| 103 | mkdir -p ${obj}board/integratorcp |
| 104 | mv tmp.fil ${obj}include/config.h |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 105 | # --------------------------------------------------------- |
| 106 | # Ensure correct core object loaded first in U-Boot image |
| 107 | # --------------------------------------------------------- |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 108 | sed -r 's/CPU_FILE/cpu\/'$cpu'\/start.o/; s/#.*//' ${src}board/integratorcp/u-boot.lds.template > ${obj}board/integratorcp/u-boot.lds |
Wolfgang Denk | 7f88a5e | 2005-10-06 17:08:18 +0200 | [diff] [blame] | 109 | # --------------------------------------------------------- |
| 110 | # Complete the configuration |
| 111 | # --------------------------------------------------------- |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 112 | $MKCONFIG -a integratorcp arm $cpu integratorcp; |
Wolfgang Denk | 88bd743 | 2005-10-09 00:22:48 +0200 | [diff] [blame] | 113 | echo "Variant:: $variant with core $cpu" |
| 114 | |