/
build.txt
130 lines (97 loc) · 4.44 KB
/
build.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
U-Boot Build Instructions
=========================
This document describes how to compile U-Boot and how to change U-Boot configuration
Build Procedure
----------------
1. install required packages:
# sudo apt-get install libssl-dev
# sudo apt-get install device-tree-compiler
# sudo apt-get install swig libpython-dev
2. Set the cross compiler:
# export CROSS_COMPILE=/path/to/toolchain/aarch64-linux-gnu
3. Clean-up old residuals:
# make mrproper
4. Configure the U-Boot:
# make <defconfig_file>
- For the Armada-70x0/80x0 DB board use "mvebu_db_armada8k_defconfig"
- For the Armada-80x0 MacchiatoBin use "make mvebu_mcbin-88f8040_defconfig"
- For the Armada-3700 DB board use "make mvebu_db-88f3720_defconfig"
- For the Armada-3700 EsspressoBin use "make mvebu_espressobin-88f3720_defconfig"
5. Configure the device-tree and build the U-Boot image:
All device-tree files are located in ./arch/arm/dts/ folder.
Information about the different configuration available for the
development board is located in:
- For A37x0: ./doc/mvebu/a3700/armada-3700-db-setup.txt
- For A70x0: ./doc/mvebu/a7k-a8k/armada70x0-db-setup.txt
- For A80x0: ./doc/mvebu/a7k-a8k/armada80x0-db-setup.txt
In order to compile u-boot with a specific device-tree, use the following:
# make DEVICE_TREE=<name>
- For the Armada-70x0 DB use "make DEVICE_TREE=armada-7040-db[-X]"
- For the Armada-80x0 DB use "make DEVICE_TREE=armada-8040-db[-X]"
- For the Armada-80x0 MacchiatoBin use "make DEVICE_TREE=armada-8040-mcbin"
- For the Armada-37x0 DB use "make DEVICE_TREE=armada-3720-ddrX-db[-X]"
- For the Armada-37x0 EsspressoBin use "make armada-3720-espressobin"
(X represents possible configuration)
The U-Boot compilation generates u-boot.bin - the U-Boot image
NOTE:
The u-boot.bin should not be used as a stand-alone image.
The ARM Trusted Firmware (ATF) build process uses this image to generate the
flash image.
Configuration update
---------------------
To update the U-Boot configuration, refer to doc/README.kconfig
Boot Device Selection
---------------------
The following options are available:
- Boot from SPI boot
- Boot from eMMC boot
eMMC boot device
-----------------
The Armada-3700 and armada-8k supports eMMC as the boot device on the target.
The default boot device on this platform is SPI NOR flash.
In order to change the boot device to eMMC, set the following parameter
the default configuration:
- CONFIG_MVEBU_MMC_BOOT=y
If "menuconfig" is used, navigate to the following location:
-> Command line interface
-> Misc commands
-> MVEBU commands
-> Flash for image
and select "eMMC flash boot".
If select SDIO eMMC as boot device, the Macro parameters should be:
#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_MMC_ENV_PART 0
If select eMMC as boot device, the Macro parameters should be:
#define CONFIG_SYS_MMC_ENV_DEV 1
#define CONFIG_SYS_MMC_ENV_PART 1/2
The eMMC has 2 boot partitions (BOOT0 and BOOT1) and a user data partition (DATA).
The boot partitions are numbered as partition 1 and 2 in MMC driver.
Number 0 is used for user data partition and should not be utilized for storing
boot images and U-Boot environment in RAW mode since it will break file system
structures usually located here.
The default boot partition is BOOT0. It is selected by the following parameter:
CONFIG_SYS_MMC_ENV_PART=1
Valid values for this parameter are 1 for BOOT0 and 2 for BOOT1.
Never use partition number 0 here!
Both parameters can be changed in the "include/configs/mvebu_armada-37xx.h"
or "include/configs/mvebu_armada-8k.h" depend on the device.
Note that this configuration is only available when "Flash for image"
selects "eMMC flash boot" device as described above.
The selected partition will be used by U-Boot "bubt" and "savenv" commands
for flashing the boot image and saving U-Boot configuration.
Boot Device Selection for Armada-8k/7k Build
-------------------------------------------
The following options are available for A8K and A7K boot:
- Boot from SPI NAND
SPI NAND boot device
--------------------
The Armada-7K and ARMADA-8K supports SPI NAND flash as the boot device on the target.
In order to burn the image and save enviroment variables to SPI NAND flash,
please enable SPI NAND driver at first by set the following parameter to <Y>:
CONFIG_MVEBU_NAND_BOOT=y
If "menuconfig" is used, navigate to the following location:
-> Command line interface
-> Misc commands
-> MVEBU commands
-> Flash for image
and select "NAND flash boot".