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