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