xref: /openbmc/u-boot/doc/README.marvell (revision e14b1169c0c5a1b362b41451006b492bd16f2fff)
1*b6518b1eSIgal LibermanMarvell U-Boot Build Instructions
2*b6518b1eSIgal Liberman=================================
3*b6518b1eSIgal Liberman
4*b6518b1eSIgal LibermanThis document describes how to compile the U-Boot and how to change U-Boot configuration
5*b6518b1eSIgal Liberman
6*b6518b1eSIgal LibermanBuild Procedure
7*b6518b1eSIgal Liberman----------------
8*b6518b1eSIgal Liberman1. Install required packages:
9*b6518b1eSIgal Liberman
10*b6518b1eSIgal Liberman		# sudo apt-get install libssl-dev
11*b6518b1eSIgal Liberman		# sudo apt-get install device-tree-compiler
12*b6518b1eSIgal Liberman		# sudo apt-get install swig libpython-dev
13*b6518b1eSIgal Liberman
14*b6518b1eSIgal Liberman2. Set the cross compiler:
15*b6518b1eSIgal Liberman
16*b6518b1eSIgal Liberman		# export CROSS_COMPILE=/path/to/toolchain/aarch64-marvell-linux-gnu-
17*b6518b1eSIgal Liberman
18*b6518b1eSIgal Liberman3. Clean-up old residuals:
19*b6518b1eSIgal Liberman
20*b6518b1eSIgal Liberman		# make mrproper
21*b6518b1eSIgal Liberman
22*b6518b1eSIgal Liberman4. Configure the U-Boot:
23*b6518b1eSIgal Liberman
24*b6518b1eSIgal Liberman		# make <defconfig_file>
25*b6518b1eSIgal Liberman
26*b6518b1eSIgal Liberman	- For the Armada-70x0/80x0 DB board use "mvebu_db_armada8k_defconfig"
27*b6518b1eSIgal Liberman	- For the Armada-80x0 MacchiatoBin use "make mvebu_mcbin-88f8040_defconfig"
28*b6518b1eSIgal Liberman	- For the Armada-3700 DB board use "make mvebu_db-88f3720_defconfig"
29*b6518b1eSIgal Liberman	- For the Armada-3700 EsspressoBin use "make mvebu_espressobin-88f3720_defconfig"
30*b6518b1eSIgal Liberman
31*b6518b1eSIgal Liberman5. Configure the device-tree and build the U-Boot image:
32*b6518b1eSIgal Liberman
33*b6518b1eSIgal Liberman	Compile u-boot and set the required device-tree using:
34*b6518b1eSIgal Liberman
35*b6518b1eSIgal Liberman		# make DEVICE_TREE=<name>
36*b6518b1eSIgal Liberman
37*b6518b1eSIgal Liberman	NOTE:
38*b6518b1eSIgal Liberman	Compilation with "mvebu_db_armada8k_defconfig" requires explicitly exporting DEVICE_TREE
39*b6518b1eSIgal Liberman	for the requested board.
40*b6518b1eSIgal Liberman	By default, u-boot is compiled with armada-8040-db device-tree.
41*b6518b1eSIgal Liberman        Using A80x0 device-tree on A70x0 might break the device.
42*b6518b1eSIgal Liberman        In order to prevent this, the required device-tree MUST be set during compilation.
43*b6518b1eSIgal Liberman        All device-tree files are located in ./arch/arm/dts/ folder.
44*b6518b1eSIgal Liberman
45*b6518b1eSIgal Liberman	NOTE:
46*b6518b1eSIgal Liberman	The u-boot.bin should not be used as a stand-alone image.
47*b6518b1eSIgal Liberman	The ARM Trusted Firmware (ATF) build process uses this image to generate the
48*b6518b1eSIgal Liberman	flash image.
49*b6518b1eSIgal Liberman
50*b6518b1eSIgal LibermanConfiguration update
51*b6518b1eSIgal Liberman---------------------
52*b6518b1eSIgal Liberman	To update the U-Boot configuration, please refer to doc/README.kconfig
53*b6518b1eSIgal Liberman
54