README.adnpesc1 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. SSV ADNP/ESC1 Embedded Softcore Computing
  2. Nios Softcore, Altera Cyclone FPGA
  3. Last Update: February 27, 2004
  4. ====================================================================
  5. This file contains information regarding U-Boot and the SSV Embedded
  6. Nios Softcore Computing platform ADNP/ESC1. For general Nios
  7. information see doc/README.nios.
  8. Most stuff of this file was borrowed and based on README.dk1s10,
  9. the Altera DK-1S10 related information file.
  10. For those interested in contributing ... see HELP WANTED section
  11. in doc/README.nios.
  12. Contents:
  13. 1. Files
  14. 2. Memory Organization
  15. 3. CPU Variations
  16. 4. Examples
  17. 5. Programming U-Boot into FLASH with GERMS
  18. 6. Autoboot
  19. 7. U-Boot environment convention and update philosophy
  20. ====================================================================
  21. 1. Files
  22. =========
  23. board/ssv/adnpesc1/*
  24. include/configs/ADNPESC1.h
  25. include/configs/ADNPESC1_base_32.h
  26. 2. Memory Organization
  27. =======================
  28. For the most part, you can put things pretty much anywhere.
  29. This is pretty flexible for Nios. So here we make some arbitrary
  30. choices & assume that the monitor is placed at the end of a memory
  31. resource. So you must make sure TEXT_BASE is chosen appropriately.
  32. This is very important if you plan to move your memory to another
  33. place as configured at this time!
  34. -The heap is placed below the monitor (U-Boot code).
  35. -Global data is placed below the heap.
  36. -The stack is placed below global data (&grows down).
  37. (see doc/README.adnpesc1_base32 too)
  38. 3. CPU Variations
  39. =================
  40. There are more than one NIOS CPU variation for the ADNP/ESC1 possible.
  41. U-Boot supports the following CPU configurations:
  42. - SSV Basis 32 (make ADNPESC1_base_32_config)
  43. - SSV Basis 32 at DNP evaluation base board 2
  44. (make ADNPESC1_DNPEVA2_base_32_config)
  45. 4. Examples
  46. ============
  47. The hello_world example works fine. To try out you have to change
  48. the default load address from 0x0100_0000 to 0x0204_0000 in
  49. examples/Makefile (the real SDRAM for default board configuration).
  50. 5. Programming U-Boot into FLASH with GERMS
  51. ============================================
  52. The current version of the ADNP/ESC1 port with the default
  53. configuration settings occupies about 97 KBytes of flash.
  54. A minimal configuration occupies less than 70 KByte
  55. (network, SPI, POST and board command support disabled). You
  56. can save more memory by deactivating the Hu-Shell support and
  57. long command help (CONFIG_SYS_HUSH_PARSER, CONFIG_SYS_LONGHELP).
  58. To program U-Boot into the ADNP/ESC1 flash using GERMS do the
  59. following:
  60. 1. Download U-Boot to its target run space in SDRAM:
  61. a. Close jumper RCM_EN# and push the reset button.
  62. b. From the command line, download U-Boot using the
  63. nios-run:
  64. $ nios-run -r u-boot.srec
  65. NOTE: In some cases this want fail. I don't know why,
  66. but try again.
  67. This takes about 1 minute (GERMS is not very speedy here).
  68. After u-boot is downloaded it will be executed. You should
  69. see the following:
  70. U-Boot 1.0.2 (Jan 30 2004 - 12:59:15)
  71. CPU: Nios-32 Rev. 3.3 (0x3038)
  72. Reg file size: 512 LO_LIMIT/HI_LIMIT: 1/30
  73. Board: SSV DilNetPC ADNP/ESC1
  74. Conf.: SSV Base 32 (nios_32)
  75. In: serial
  76. Out: serial
  77. Err: serial
  78. ADNPESC1 >
  79. 2. Quit nios-run and start your terminal application (e.g. start
  80. Hyperterminal or minicom).
  81. 3. Download the u-boot code to RAM. When using Hyperterminal, do the
  82. following:
  83. a. From the u-boot command prompt start a binary download to SDRAM:
  84. at the SSV Basis 32 to SDRAM:
  85. ==> loadb 2000100
  86. b. Download u-boot.bin using kermit.
  87. 4. From the U-Boot command prompt, erase flash:
  88. at the SSV Basis 32 from 0x1000000 to 0x103ffff:
  89. ==> protect off 1:0-3
  90. ==> erase 1:0-3
  91. 5. Copy the binary image from SDRAM to flash:
  92. at the SSV Basis 32 from SDRAM:
  93. ==> cp.b 2000100 1000000 $filesize
  94. U-Boot will now automatically start when the board is powered on or
  95. reset using the SSV Basis 32 configuration without closed RCM jumper.
  96. To start U-Boot with closed RCM Jumper, enter the following GERMS
  97. command:
  98. + g 1000000
  99. 6. Autoboot
  100. ===========
  101. U-Boot will try to boot a valid Nios application from Flash. For this
  102. it will use the deposited Hu-Shell script in environment variable
  103. 'bootcmd' which is looking for a valid Nios application identifier
  104. string in Flash and go on at even its entry address. For more
  105. information see the next chapter.
  106. 7. U-Boot environment convention and update philosophy
  107. ======================================================
  108. U-Boot for the SSV ADNP/ESC1 target knows about many environment
  109. variables used to control the startup process, update process for
  110. raw Nios applications, and optionally file system image updates.
  111. In default configuration there are two Hu-Shell scripts to update
  112. the Nios application and/or the file system image:
  113. 1. Update Nios application (ex. the uCLinux kernel):
  114. run 'appl_update'
  115. 2. Update optional file system image (ex. RomFS image used by uCLinux):
  116. run 'fs_update'
  117. The Nios application can be any programm code generated in relation
  118. to the Nios application identifier -- the string "Nios" at offset
  119. address 0x0c. To use the scripts like described above in a secure way
  120. you have to check-up the next environment variables:
  121. 1. update_allowed
  122. - Update switch -- must be set to '1' (one) to allow any update
  123. - default is '0' (zero)
  124. NOTE: You should avoid to save this variable with non zero
  125. value to Flash. Otherwise it would be allow any
  126. update process at any time!
  127. 2. appl_entry_addr
  128. - Nios application area start address (usually in Flash)
  129. - this is the startup address for autoboot
  130. - each Nios application code we want to update will be copied
  131. to this address
  132. - default is CONFIG_SYS_ADNPESC1_NIOS_APPL_ENTRY
  133. 3. appl_end_addr
  134. - Nios application area end address (usually in Flash)
  135. - will be used to unprotect/erase the Flash area while updating
  136. - default is CONFIG_SYS_ADNPESC1_NIOS_APPL_END
  137. 4. appl_ident_addr
  138. - address of the Nios application identification string
  139. - this is the address checked-up by autoboot
  140. - default is CONFIG_SYS_ADNPESC1_NIOS_APPL_IDENT
  141. 5. appl_ident_str
  142. - the Nios application identification string itself
  143. - default is CONFIG_SYS_ADNPESC1_NIOS_IDENTIFIER
  144. 6. appl_name
  145. - name of file we have to download/update
  146. - default is ADNPESC1/base32/linux.bin
  147. 7. fs_base_addr
  148. - optionally file system area start address (usually in Flash)
  149. - each file system we want to update will be copied to this address
  150. - default is CONFIG_SYS_ADNPESC1_FILESYSTEM_BASE
  151. 8. fs_end_addr
  152. - optionally file system area end address (usually in Flash)
  153. - will be used to unprotect/erase the Flash area while updating
  154. - default is CONFIG_SYS_ADNPESC1_FILESYSTEM_END
  155. 9. fs_name
  156. - name of file we have to download/update
  157. - default is ADNPESC1/base32/romfs.img