split_by_variant.sh 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. #!/bin/sh
  2. mkdir -p ${obj}include
  3. mkdir -p ${obj}board/armltd/integrator
  4. config_file=${obj}include/config.h
  5. if [ "$1" = "ap" ]
  6. then
  7. # ---------------------------------------------------------
  8. # Set the platform defines
  9. # ---------------------------------------------------------
  10. cat > ${config_file} << _EOF
  11. /* Integrator configuration implied by Makefile target */
  12. #define CONFIG_INTEGRATOR /* Integrator board */
  13. #define CONFIG_ARCH_INTEGRATOR 1 /* Integrator/AP */
  14. _EOF
  15. # ---------------------------------------------------------
  16. # Set the core module defines according to Core Module
  17. # ---------------------------------------------------------
  18. cpu="arm_intcm"
  19. variant="unknown core module"
  20. if [ "$2" = "" ]
  21. then
  22. echo "$0:: No parameters - using arm_intcm"
  23. else
  24. case "$2" in
  25. ap7_config)
  26. cpu="arm_intcm"
  27. variant="unported core module CM7TDMI"
  28. ;;
  29. ap966)
  30. cpu="arm_intcm"
  31. variant="unported core module CM966E-S"
  32. ;;
  33. ap922_config)
  34. cpu="arm_intcm"
  35. variant="unported core module CM922T"
  36. ;;
  37. integratorap_config | \
  38. ap_config)
  39. cpu="arm_intcm"
  40. variant="unspecified core module"
  41. ;;
  42. ap720t_config)
  43. cpu="arm720t"
  44. echo "#define CONFIG_CM720T 1 /* CPU core is ARM720T */" \
  45. >> ${config_file}
  46. variant="Core module CM720T"
  47. ;;
  48. ap922_XA10_config)
  49. cpu="arm_intcm"
  50. variant="unported core module CM922T_XA10"
  51. echo "#define CONFIG_CM922T_XA10 1 /* CPU core is ARM922T_XA10 */" \
  52. >> ${config_file}
  53. ;;
  54. ap920t_config)
  55. cpu="arm920t"
  56. variant="Core module CM920T"
  57. echo "#define CONFIG_CM920T 1 /* CPU core is ARM920T */" \
  58. >> ${config_file}
  59. ;;
  60. ap926ejs_config)
  61. cpu="arm926ejs"
  62. variant="Core module CM926EJ-S"
  63. echo "#define CONFIG_CM926EJ_S 1 /* CPU core is ARM926EJ-S */" \
  64. >> ${config_file}
  65. ;;
  66. ap946es_config)
  67. cpu="arm946es"
  68. variant="Core module CM946E-S"
  69. echo "#define CONFIG_CM946E_S 1 /* CPU core is ARM946E-S */" \
  70. >> ${config_file}
  71. ;;
  72. *)
  73. echo "$0:: Unknown core module"
  74. variant="unknown core module"
  75. cpu="arm_intcm"
  76. ;;
  77. esac
  78. fi
  79. case "$cpu" in
  80. arm_intcm)
  81. cat >> ${config_file} << _EOF
  82. /* Core module undefined/not ported */
  83. #define CONFIG_ARM_INTCM 1
  84. #undef CONFIG_CM_MULTIPLE_SSRAM /* CM may not have multiple SSRAM mapping */
  85. #undef CONFIG_CM_SPD_DETECT /* CM may not support SPD query */
  86. #undef CONFIG_CM_REMAP /* CM may not support remapping */
  87. #undef CONFIG_CM_INIT /* CM may not have initialization reg */
  88. #undef CONFIG_CM_TCRAM /* CM may not have TCRAM */
  89. /* May not be processor without cache support */
  90. #define CONFIG_SYS_NO_ICACHE 1
  91. #define CONFIG_SYS_NO_DCACHE 1
  92. _EOF
  93. ;;
  94. arm720t)
  95. cat >> ${config_file} << _EOF
  96. /* May not be processor without cache support */
  97. #define CONFIG_SYS_NO_ICACHE 1
  98. #define CONFIG_SYS_NO_DCACHE 1
  99. _EOF
  100. ;;
  101. esac
  102. else
  103. # ---------------------------------------------------------
  104. # Set the platform defines
  105. # ---------------------------------------------------------
  106. cat >> ${config_file} << _EOF
  107. /* Integrator configuration implied by Makefile target */
  108. #define CONFIG_INTEGRATOR /* Integrator board */
  109. #define CONFIG_ARCH_CINTEGRATOR 1 /* Integrator/CP */
  110. _EOF
  111. cpu="arm_intcm"
  112. variant="unknown core module"
  113. if [ "$2" = "" ]
  114. then
  115. echo "$0:: No parameters - using arm_intcm"
  116. else
  117. case "$2" in
  118. ap966)
  119. cpu="arm_intcm"
  120. variant="unported core module CM966E-S"
  121. ;;
  122. ap922_config)
  123. cpu="arm_intcm"
  124. variant="unported core module CM922T"
  125. ;;
  126. integratorcp_config | \
  127. cp_config)
  128. cpu="arm_intcm"
  129. variant="unspecified core module"
  130. ;;
  131. cp922_XA10_config)
  132. cpu="arm_intcm"
  133. variant="unported core module CM922T_XA10"
  134. echo "#define CONFIG_CM922T_XA10 1 /* CPU core is ARM922T_XA10 */" \
  135. >> ${config_file}
  136. ;;
  137. cp920t_config)
  138. cpu="arm920t"
  139. variant="Core module CM920T"
  140. echo "#define CONFIG_CM920T 1 /* CPU core is ARM920T */" \
  141. >> ${config_file}
  142. ;;
  143. cp926ejs_config)
  144. cpu="arm926ejs"
  145. variant="Core module CM926EJ-S"
  146. echo "#define CONFIG_CM926EJ_S 1 /* CPU core is ARM926EJ-S */" \
  147. >> ${config_file}
  148. ;;
  149. cp946es_config)
  150. cpu="arm946es"
  151. variant="Core module CM946E-S"
  152. echo "#define CONFIG_CM946E_S 1 /* CPU core is ARM946E-S */" \
  153. >> ${config_file}
  154. ;;
  155. cp1136_config)
  156. cpu="arm1136"
  157. variant="Core module CM1136EJF-S"
  158. echo "#define CONFIG_CM1136EJF_S 1 /* CPU core is ARM1136JF-S */" \
  159. >> ${config_file}
  160. ;;
  161. *)
  162. echo "$0:: Unknown core module"
  163. variant="unknown core module"
  164. cpu="arm_intcm"
  165. ;;
  166. esac
  167. fi
  168. if [ "$cpu" = "arm_intcm" ]
  169. then
  170. cat >> ${config_file} << _EOF
  171. /* Core module undefined/not ported */
  172. #define CONFIG_ARM_INTCM 1
  173. #undef CONFIG_CM_MULTIPLE_SSRAM /* CM may not have multiple SSRAM mapping */
  174. #undef CONFIG_CM_SPD_DETECT /* CM may not support SPD query */
  175. #undef CONFIG_CM_REMAP /* CM may not support remapping */
  176. #undef CONFIG_CM_INIT /* CM may not have initialization reg */
  177. #undef CONFIG_CM_TCRAM /* CM may not have TCRAM */
  178. _EOF
  179. fi
  180. fi # ap
  181. # ---------------------------------------------------------
  182. # Complete the configuration
  183. # ---------------------------------------------------------
  184. $MKCONFIG -a -n "${2%%_config}" integrator$1 arm $cpu integrator armltd
  185. echo "Variant: $variant with core $cpu"