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