]> Git Repo - u-boot.git/blame - board/integratorcp/split_by_variant.sh
Major PCMCIA Cleanup to make code better readable and maintainable.
[u-boot.git] / board / integratorcp / split_by_variant.sh
CommitLineData
87cb6862
WD
1#!/bin/sh
2# ---------------------------------------------------------
3# Set the platform defines
4# ---------------------------------------------------------
5echo -n "/* Integrator configuration implied " > tmp.fil
6echo " by Makefile target */" >> tmp.fil
7echo -n "#define CONFIG_INTEGRATOR" >> tmp.fil
8echo " /* Integrator board */" >> tmp.fil
9echo -n "#define CONFIG_ARCH_CINTEGRATOR" >> tmp.fil
10echo " 1 /* Integrator/CP */" >> tmp.fil
87cb6862 11
96782c63
WD
12cpu="arm_intcm"
13variant="unknown core module"
87cb6862
WD
14
15if [ "$1" == "" ]
16then
96782c63 17 echo "$0:: No parameters - using arm_intcm"
87cb6862
WD
18else
19 case "$1" in
96782c63
WD
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
87cb6862
WD
30 integratorcp_config | \
31 cp_config)
32 cpu="arm_intcm"
96782c63 33 variant="unspecified core module"
87cb6862
WD
34 ;;
35
36 cp922_XA10_config)
96782c63
WD
37 cpu="arm_intcm"
38 variant="unported core module CM922T_XA10"
87cb6862
WD
39 echo -n "#define CONFIG_CM922T_XA10" >> tmp.fil
40 echo " 1 /* CPU core is ARM922T_XA10 */" >> tmp.fil
87cb6862
WD
41 ;;
42
43 cp920t_config)
44 cpu="arm920t"
96782c63 45 variant="Core module CM920T"
87cb6862
WD
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"
96782c63 52 variant="Core module CM926EJ-S"
87cb6862
WD
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"
96782c63 60 variant="Core module CM946E-S"
87cb6862
WD
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"
96782c63 67 variant="Core module CM1136EJF-S"
87cb6862
WD
68 echo -n "#define CONFIG_CM1136EJF_S" >> tmp.fil
69 echo " 1 /* CPU core is ARM1136JF-S */ " >> tmp.fil
70 ;;
71
72 *)
96782c63
WD
73 echo "$0:: Unknown core module"
74 variant="unknown core module"
87cb6862
WD
75 cpu="arm_intcm"
76 ;;
77
78 esac
79
80fi
81
82if [ "$cpu" == "arm_intcm" ]
83then
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
100fi
101mv tmp.fil ./include/config.h
102# ---------------------------------------------------------
103# Ensure correct core object loaded first in U-Boot image
104# ---------------------------------------------------------
96782c63 105sed -r 's/CPU_FILE/cpu\/'$cpu'\/start.o/; s/#.*//' board/integratorcp/u-boot.lds.template > board/integratorcp/u-boot.lds
87cb6862
WD
106# ---------------------------------------------------------
107# Complete the configuration
108# ---------------------------------------------------------
109./mkconfig -a integratorcp arm $cpu integratorcp;
96782c63
WD
110echo "Variant:: $variant with core $cpu"
111
This page took 0.04893 seconds and 4 git commands to generate.