README.bcm7xxx 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. Summary
  2. =======
  3. This document describes how to use U-Boot on the Broadcom 7445 SoC, as
  4. a third stage bootloader loaded by Broadcom's BOLT bootloader.
  5. BOLT loads U-Boot as a generic ELF binary. Some U-Boot features such
  6. as networking are not yet available but other important features are,
  7. including:
  8. - ext4 file system traversal
  9. - support for loading FIT images
  10. - advanced scripting
  11. - support for FIT-provided DTBs instead of relying on the
  12. BOLT-provided DTB
  13. A customized version of this port has been used in production. The
  14. same approach may work on other BCM7xxx boards, with some
  15. configuration adjustments and memory layout experimentation.
  16. Build
  17. =====
  18. make bcm7445_defconfig
  19. make
  20. ${CROSS_COMPILE}strip u-boot
  21. Run
  22. ===
  23. Flash the u-boot binary into board storage, then invoke it from BOLT.
  24. For example:
  25. BOLT> boot -bsu -elf flash0.u-boot1
  26. This port assumes that I-cache and D-cache are already enabled when
  27. U-Boot is entered.
  28. Flattened Image Tree Support
  29. ============================
  30. What follows is an example FIT image source file. Build it with:
  31. mkimage -f image.its image.itb
  32. Booting the resulting image.itb was tested on BOLT v1.20, with the
  33. following kernels:
  34. https://github.com/Broadcom/stblinux-3.14
  35. https://github.com/Broadcom/stblinux-4.1
  36. https://github.com/Broadcom/stblinux-4.9
  37. and with a generic ARMv7 root file system.
  38. image.its:
  39. /dts-v1/;
  40. / {
  41. description = "BCM7445 FIT";
  42. images {
  43. kernel@1 {
  44. description = "Linux kernel";
  45. /*
  46. * This kernel image output format can be
  47. * generated with:
  48. *
  49. * make vmlinux
  50. * ${CROSS_COMPILE}objcopy -O binary -S vmlinux vmlinux.bin
  51. * gzip -9 vmlinux.bin
  52. *
  53. * For stblinux-3.14, the specific Broadcom
  54. * board type should be configured in the
  55. * kernel, for example CONFIG_BCM7445D0=y.
  56. */
  57. data = /incbin/("<vmlinux.bin.gz>");
  58. type = "kernel";
  59. arch = "arm";
  60. os = "linux";
  61. compression = "gzip";
  62. load = <0x8000>;
  63. entry = <0x8000>;
  64. hash@1 {
  65. algo = "sha256";
  66. };
  67. };
  68. ramdisk@1 {
  69. description = "Initramfs root file system";
  70. data = /incbin/("<initramfs.cpio.gz>");
  71. type = "ramdisk";
  72. arch = "arm";
  73. os = "linux";
  74. compression = "gzip";
  75. /*
  76. * Set the environment variable initrd_high to
  77. * 0xffffffff, and set "load" and "entry" here
  78. * to 0x0 to keep initramfs in-place and to
  79. * accommodate stblinux bmem/CMA reservations.
  80. */
  81. load = <0x0>;
  82. entry = <0x0>;
  83. hash@1 {
  84. algo = "sha256";
  85. };
  86. };
  87. fdt@1 {
  88. description = "Device tree dumped from BOLT";
  89. /*
  90. * This DTB should be similar to the
  91. * BOLT-generated device tree, after BOLT has
  92. * done its runtime modifications to it. For
  93. * example, it can be dumped from within
  94. * U-Boot (at ${fdtcontroladdr}), after BOLT
  95. * has loaded U-Boot. The result can be added
  96. * to the Linux source tree as a .dts file.
  97. *
  98. * To support modifications to the device tree
  99. * in-place in U-Boot, add to Linux's
  100. * arch/arm/boot/dts/Makefile:
  101. *
  102. * DTC_FLAGS ?= -p 4096
  103. *
  104. * This will leave some padding in the DTB and
  105. * thus reserve room for node additions.
  106. *
  107. * Also, set the environment variable fdt_high
  108. * to 0xffffffff to keep the DTB in-place and
  109. * to accommodate stblinux bmem/CMA
  110. * reservations.
  111. */
  112. data = /incbin/("<bolt-<version>.dtb");
  113. type = "flat_dt";
  114. arch = "arm";
  115. compression = "none";
  116. hash@1 {
  117. algo = "sha256";
  118. };
  119. };
  120. };
  121. configurations {
  122. default = "conf@bcm7445";
  123. conf@bcm7445 {
  124. description = "BCM7445 configuration";
  125. kernel = "kernel@1";
  126. ramdisk = "ramdisk@1";
  127. fdt = "fdt@1";
  128. };
  129. };
  130. };