README.p2020rdb 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. Overview
  2. --------
  3. P2020RDB is a Low End Dual core platform supporting the P2020 processor
  4. of QorIQ series. P2020 is an e500 based dual core SOC.
  5. Building U-boot
  6. -----------
  7. To build the u-boot for P2020RDB:
  8. make P2020RDB_config
  9. make
  10. NOR Flash Banks
  11. -----------
  12. RDB board for P2020 has two flash banks. They are both present on boot.
  13. Booting by default is always from the boot bank at 0xef00_0000.
  14. Memory Map
  15. ----------
  16. 0xef00_0000 - 0xef7f_ffff Alternate bank 8MB
  17. 0xe800_0000 - 0xefff_ffff Boot bank 8MB
  18. 0xef78_0000 - 0xef7f_ffff Alternate u-boot address 512KB
  19. 0xeff8_0000 - 0xefff_ffff Boot u-boot address 512KB
  20. Switch settings to boot from the NOR flash banks
  21. ------------------------------------------------
  22. SW4[8]=0 default NOR Flash bank
  23. SW4[8]=1 Alternate NOR Flash bank
  24. Flashing Images
  25. ---------------
  26. To place a new u-boot image in the alternate flash bank and then boot
  27. with that new image temporarily, use this:
  28. tftp 1000000 u-boot.bin
  29. erase ef780000 ef7fffff
  30. cp.b 1000000 ef780000 80000
  31. Now to boot from the alternate bank change the SW4[8] from 0 to 1.
  32. To program the image in the boot flash bank:
  33. tftp 1000000 u-boot.bin
  34. protect off all
  35. erase eff80000 ffffffff
  36. cp.b 1000000 eff80000 80000
  37. Using the Device Tree Source File
  38. ---------------------------------
  39. To create the DTB (Device Tree Binary) image file,
  40. use a command similar to this:
  41. dtc -b 0 -f -I dts -O dtb p2020rdb.dts > p2020rdb.dtb
  42. Likely, that .dts file will come from here;
  43. linux-2.6/arch/powerpc/boot/dts/p2020rdb.dts
  44. Booting Linux
  45. -------------
  46. Place a linux uImage in the TFTP disk area.
  47. tftp 1000000 uImage.p2020rdb
  48. tftp 2000000 rootfs.ext2.gz.uboot
  49. tftp c00000 p2020rdb.dtb
  50. bootm 1000000 2000000 c00000
  51. Implementing AMP(Asymmetric MultiProcessing)
  52. ---------------------------------------------
  53. 1. Build kernel image for core0:
  54. a. $ make 85xx/p1_p2_rdb_defconfig
  55. b. $ make menuconfig
  56. - un-select "Processor support"->
  57. "Symetric multi-processing support"
  58. c. $ make uImage
  59. d. $ cp arch/powerpc/boot/uImage /tftpboot/uImage.core0
  60. 2. Build kernel image for core1:
  61. a. $ make 85xx/p1_p2_rdb_defconfig
  62. b. $ make menuconfig
  63. - Un-select "Processor support"->
  64. "Symetric multi-processing support"
  65. - Select "Advanced setup" ->
  66. "Prompt for advanced kernel configuration options"
  67. - Select
  68. "Set physical address where the kernel is loaded"
  69. and set it to 0x20000000, assuming core1 will
  70. start from 512MB.
  71. - Select "Set custom page offset address"
  72. - Select "Set custom kernel base address"
  73. - Select "Set maximum low memory"
  74. - "Exit" and save the selection.
  75. c. $ make uImage
  76. d. $ cp arch/powerpc/boot/uImage /tftpboot/uImage.core1
  77. 3. Create dtb for core0:
  78. $ dtc -I dts -O dtb -f -b 0
  79. arch/powerpc/boot/dts/p2020rdb_camp_core0.dts >
  80. /tftpboot/p2020rdb_camp_core0.dtb
  81. 4. Create dtb for core1:
  82. $ dtc -I dts -O dtb -f -b 1
  83. arch/powerpc/boot/dts/p2020rdb_camp_core1.dts >
  84. /tftpboot/p2020rdb_camp_core1.dtb
  85. 5. Bring up two cores separately:
  86. a. Power on the board, under u-boot prompt:
  87. => setenv <serverip>
  88. => setenv <ipaddr>
  89. => setenv bootargs root=/dev/ram rw console=ttyS0,115200
  90. b. Bring up core1's kernel first:
  91. => setenv bootm_low 0x20000000
  92. => setenv bootm_size 0x10000000
  93. => tftp 21000000 uImage.core1
  94. => tftp 22000000 ramdiskfile
  95. => tftp 20c00000 p2020rdb_camp_core1.dtb
  96. => interrupts off
  97. => bootm start 21000000 22000000 20c00000
  98. => bootm loados
  99. => bootm ramdisk
  100. => bootm fdt
  101. => fdt boardsetup
  102. => fdt chosen $initrd_start $initrd_end
  103. => bootm prep
  104. => cpu 1 release $bootm_low - $fdtaddr -
  105. c. Bring up core0's kernel(on the same u-boot console):
  106. => setenv bootm_low 0
  107. => setenv bootm_size 0x20000000
  108. => tftp 1000000 uImage.core0
  109. => tftp 2000000 ramdiskfile
  110. => tftp c00000 p2020rdb_camp_core0.dtb
  111. => bootm 1000000 2000000 c00000
  112. Please note only core0 will run u-boot, core1 starts kernel directly
  113. after "cpu release" command is issued.