uboot-v2011.12-change-kernel-address-in-dataflash.patch 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. From 9fc4787c7a6c797db649831f86e49c4bf9780b4e Mon Sep 17 00:00:00 2001
  2. From: Alexandre Belloni <alexandre.belloni@piout.net>
  3. Date: Mon, 2 Jan 2012 03:51:11 +0100
  4. Subject: [PATCH] Change kernel address in dataflash to match u-boot's size
  5. On at91sam platforms, u-boot grew larger than the allocated size in
  6. dataflash, the layout was:
  7. bootstrap 0x00000000
  8. ubootenv 0x00004200
  9. uboot 0x00008400
  10. kernel 0x00042000
  11. u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
  12. 0x39C00 bytes anymore.
  13. Now, the layout is:
  14. bootstrap 0x00000000
  15. uboot 0x00004000
  16. ubootenv 0x00084000
  17. ubootenv2 0x00088000
  18. kernel 0x0008C000
  19. Signed-off-by: Alexandre Belloni <alexandre.belloni@piout.net>
  20. ---
  21. include/configs/at91sam9260ek.h | 18 ++++++++++++------
  22. include/configs/at91sam9261ek.h | 18 ++++++++++++------
  23. include/configs/at91sam9263ek.h | 10 +++++++---
  24. include/configs/at91sam9rlek.h | 10 +++++++---
  25. 4 files changed, 38 insertions(+), 18 deletions(-)
  26. diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
  27. index db52ee6..b537760 100644
  28. --- a/include/configs/at91sam9260ek.h
  29. +++ b/include/configs/at91sam9260ek.h
  30. @@ -185,10 +185,12 @@
  31. /* bootstrap + u-boot + env + linux in dataflash on CS0 */
  32. #define CONFIG_ENV_IS_IN_DATAFLASH 1
  33. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
  34. -#define CONFIG_ENV_OFFSET 0x4200
  35. +#define CONFIG_ENV_OFFSET 0x84000
  36. #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
  37. -#define CONFIG_ENV_SIZE 0x4200
  38. -#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
  39. +#define CONFIG_ENV_SIZE 0x4000
  40. +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
  41. +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
  42. +#define CONFIG_BOOTCOMMAND "cp.b 0xC008C000 0x22000000 0x210000; bootm"
  43. #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
  44. "root=/dev/mtdblock0 " \
  45. "mtdparts=atmel_nand:-(root) " \
  46. @@ -199,10 +201,12 @@
  47. /* bootstrap + u-boot + env + linux in dataflash on CS1 */
  48. #define CONFIG_ENV_IS_IN_DATAFLASH 1
  49. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
  50. -#define CONFIG_ENV_OFFSET 0x4200
  51. +#define CONFIG_ENV_OFFSET 0x84000
  52. #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
  53. -#define CONFIG_ENV_SIZE 0x4200
  54. -#define CONFIG_BOOTCOMMAND "cp.b 0xD0042000 0x22000000 0x210000; bootm"
  55. +#define CONFIG_ENV_SIZE 0x4000
  56. +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
  57. +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
  58. +#define CONFIG_BOOTCOMMAND "cp.b 0xD008C000 0x22000000 0x210000; bootm"
  59. #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
  60. "root=/dev/mtdblock0 " \
  61. "mtdparts=atmel_nand:-(root) " \
  62. @@ -231,6 +235,8 @@
  63. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  64. #define CONFIG_SYS_LONGHELP 1
  65. #define CONFIG_CMDLINE_EDITING 1
  66. +#define CONFIG_AUTO_COMPLETE
  67. +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  68. /*
  69. * Size of malloc() pool
  70. diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
  71. index 5140b26..fa461da 100644
  72. --- a/include/configs/at91sam9261ek.h
  73. +++ b/include/configs/at91sam9261ek.h
  74. @@ -187,10 +187,12 @@
  75. /* bootstrap + u-boot + env + linux in dataflash on CS0 */
  76. #define CONFIG_ENV_IS_IN_DATAFLASH
  77. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
  78. -#define CONFIG_ENV_OFFSET 0x4200
  79. +#define CONFIG_ENV_OFFSET 0x84000
  80. #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
  81. -#define CONFIG_ENV_SIZE 0x4200
  82. -#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
  83. +#define CONFIG_ENV_SIZE 0x4000
  84. +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
  85. +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
  86. +#define CONFIG_BOOTCOMMAND "cp.b 0xC008C000 0x22000000 0x210000; bootm"
  87. #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
  88. "root=/dev/mtdblock0 " \
  89. "mtdparts=atmel_nand:-(root) " \
  90. @@ -201,10 +203,12 @@
  91. /* bootstrap + u-boot + env + linux in dataflash on CS3 */
  92. #define CONFIG_ENV_IS_IN_DATAFLASH
  93. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + 0x8400)
  94. -#define CONFIG_ENV_OFFSET 0x4200
  95. +#define CONFIG_ENV_OFFSET 0x84000
  96. #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 + CONFIG_ENV_OFFSET)
  97. -#define CONFIG_ENV_SIZE 0x4200
  98. -#define CONFIG_BOOTCOMMAND "cp.b 0xD0042000 0x22000000 0x210000; bootm"
  99. +#define CONFIG_ENV_SIZE 0x4000
  100. +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
  101. +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
  102. +#define CONFIG_BOOTCOMMAND "cp.b 0xD008C000 0x22000000 0x210000; bootm"
  103. #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
  104. "root=/dev/mtdblock0 " \
  105. "mtdparts=atmel_nand:-(root) " \
  106. @@ -233,6 +237,8 @@
  107. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  108. #define CONFIG_SYS_LONGHELP
  109. #define CONFIG_CMDLINE_EDITING
  110. +#define CONFIG_AUTO_COMPLETE
  111. +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  112. /*
  113. * Size of malloc() pool
  114. diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
  115. index 8399246..253bee4 100644
  116. --- a/include/configs/at91sam9263ek.h
  117. +++ b/include/configs/at91sam9263ek.h
  118. @@ -314,10 +314,12 @@
  119. /* bootstrap + u-boot + env + linux in dataflash on CS0 */
  120. #define CONFIG_ENV_IS_IN_DATAFLASH 1
  121. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
  122. -#define CONFIG_ENV_OFFSET 0x4200
  123. +#define CONFIG_ENV_OFFSET 0x84000
  124. #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
  125. -#define CONFIG_ENV_SIZE 0x4200
  126. -#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
  127. +#define CONFIG_ENV_SIZE 0x4000
  128. +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
  129. +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
  130. +#define CONFIG_BOOTCOMMAND "cp.b 0xC008C000 0x22000000 0x210000; bootm"
  131. #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
  132. "root=/dev/mtdblock0 " \
  133. "mtdparts=atmel_nand:-(root) "\
  134. @@ -347,6 +349,8 @@
  135. #define CONFIG_AUTO_COMPLETE
  136. #define CONFIG_SYS_HUSH_PARSER
  137. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  138. +#define CONFIG_AUTO_COMPLETE
  139. +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  140. /*
  141. * Size of malloc() pool
  142. diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
  143. index 79ea1f2..423f523 100644
  144. --- a/include/configs/at91sam9rlek.h
  145. +++ b/include/configs/at91sam9rlek.h
  146. @@ -153,10 +153,12 @@
  147. /* bootstrap + u-boot + env + linux in dataflash on CS0 */
  148. #define CONFIG_ENV_IS_IN_DATAFLASH 1
  149. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
  150. -#define CONFIG_ENV_OFFSET 0x4200
  151. +#define CONFIG_ENV_OFFSET 0x84000
  152. #define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
  153. -#define CONFIG_ENV_SIZE 0x4200
  154. -#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
  155. +#define CONFIG_ENV_SIZE 0x4000
  156. +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE)
  157. +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
  158. +#define CONFIG_BOOTCOMMAND "cp.b 0xC008C000 0x22000000 0x210000; bootm"
  159. #define CONFIG_BOOTARGS "console=ttyS0,115200 " \
  160. "root=/dev/mtdblock0 " \
  161. "mtdparts=atmel_nand:-(root) "\
  162. @@ -183,6 +185,8 @@
  163. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  164. #define CONFIG_SYS_LONGHELP 1
  165. #define CONFIG_CMDLINE_EDITING 1
  166. +#define CONFIG_AUTO_COMPLETE
  167. +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  168. /*
  169. * Size of malloc() pool
  170. --
  171. 1.7.5.4