xref: /openbmc/u-boot/doc/README.odroid (revision 32c81ea6)
1 U-boot for Odroid X2/U3
2========================
3
41. Summary
5==========
6This is a quick instruction for setup Odroid boards based on Exynos4412.
7Board config: odroid_config
8
92. Supported devices
10====================
11This U-BOOT config can be used on two boards:
12- Odroid U3
13- Odroid X2
14with CPU Exynos 4412 rev 2.0 and 2GB of RAM
15
163. Boot sequence
17================
18iROM->BL1->(BL2 + TrustZone)->U-BOOT
19
20This version of U-BOOT doesn't implement SPL but it is required(BL2)
21and can be found in "boot.tar.gz" from here:
22http://dev.odroid.com/projects/4412boot/wiki/FrontPage?action=download&value=boot.tar.gz
23or here:
24http://odroid.in/guides/ubuntu-lfs/boot.tar.gz
25
264. Boot media layout
27====================
28The table below shows SD/eMMC cards layout for U-boot.
29The block offset is starting from 0 and the block size is 512B.
30 -------------------------------------
31|  Binary   | Block offset| part type |
32|   name    | SD   | eMMC |(eMMC only)|
33 -------------------------------------
34| Bl1       | 1    | 0    |  1 (boot) |
35| Bl2       | 31   | 30   |  1 (boot) |
36| U-boot    | 63   | 62   |  1 (boot) |
37| Tzsw      | 2111 | 2110 |  1 (boot) |
38| Uboot Env | 2500 | 2500 |  0 (user) |
39 -------------------------------------
40
415. Prepare the SD boot card - with SD card reader
42=================================================
43To prepare bootable media you need boot binaries provided by hardkernel.
44File "boot.tar.gz" (link in point 3.) contains:
45- E4412_S.bl1.HardKernel.bin
46- E4412_S.tzsw.signed.bin
47- bl2.signed.bin
48- sd_fusing.sh
49- u-boot.bin
50
51This is all you need to boot this board. But if you want to use your custom
52u-boot then you need to change u-boot.bin with your own u-boot binary*
53and run the script "sd_fusing.sh" - this script is valid only for SD card.
54
55*note:
56The proper binary file of current U-boot is u-boot-dtb.bin.
57
58quick steps for Linux:
59- extract boot.tar.gz
60- put any SD card into the SD reader
61- check the device with "dmesg"
62- run ./sd_fusing.sh /dev/sdX - where X is SD card device (but not a partition)
63Check if Hardkernel U-boot is booting, and next do the same with your U-boot.
64
656. Prepare the eMMC boot card
66   with a eMMC card reader (boot from eMMC card slot)
67=====================================================
68To boot the device from the eMMC slot you should use a special card reader
69which supports eMMC partiion switch. All of the boot binaries are stored
70on the eMMC boot partition which is normally hidden.
71
72The "sd_fusing.sh" script can be used after updating offsets of binaries
73according to the table from point 4. Be sure that you are working on the right
74eMMC partition - its size is usually very small, about 1-4 MiB.
75
767. Prepare the eMMC boot card
77   with a SD card reader (boot from SD card slot)
78=================================================
79If you have an eMMC->microSD adapter you can prepare the card as in point 5.
80But then the device can boot only from the SD card slot.
81
828. Prepare the boot media using Hardkernel U-boot
83=================================================
84You can update the U-boot to the custom one if you have an working bootloader
85delivered with the board on a eMMC/SD card. Then follow the steps:
86- install the android fastboot tool
87- connect a micro usb cable to the board
88- on the U-boot prompt, run command: fastboot (as a root)
89- on the host, run command: "fastboot flash bootloader u-boot-dtb.bin"
90- the custom U-boot should start after the board resets.
91
929. Partition layout
93====================
94Default U-boot environment is setup for fixed partiion layout.
95
96Partition table: MSDOS. Disk layout and files as listed in the table below.
97 ----- ------ ------ ------ -------- ---------------------------------
98| Num | Name |  FS  | Size | Offset |         Reguired files          |
99|     |      | Type |  MiB |  MiB   |                                 |
100 ----- ------ ------ ------ -------- ---------------------------------
101|  1  | BOOT | fat  |  100 |   2    |  kernel, fdt**                  |
102|  2  | ROOT | ext4 |   -  |        |  any Linux system               |
103 ----- ------ ------ ------ -------- ---------------------------------
104
105**note:
106Supported fdt files are:
107- exynos4412-odroidx2.dtb
108- exynos4412-odroidu3.dtb
109
110Supported kernel files are:
111- Image.itb
112- zImage
113- uImage
114
115The default environmental variable "dfu_alt_info" is set* for above layout.
116Each partition size is just an example, dfu_alt_info tries init two partitions.
117The size of each is not important.
118
119*note:
120$dfu_alt_info is set on a boot time and it is concatenated using two variables:
121- $dfu_alt_boot(set dynamically)
122- $dfu_alt_system(from current env).
123
124To add any changes to dfu_alt_info - please modify $dfu_alt_system only.
125Changes are visible after board reset.
126
12710. The environment and booting the kernel
128==========================================
129There are three macros defined in config for various boot options:
130Two for both, kernel with device tree support and also without it:
131- boot_uimg - load uImage
132- boot_zimg - load zImage
133If proper fdt file exists then it will be automatically loaded,
134so for old kernel types, please remove fdt file from boot partition.
135
136The third boot option for multi image support (more info: doc/uImage.FIT/)
137- boot_fit - for binary file: "Image.itb"
138
139Default boot command: "autoboot"
140And the boot sequence is:
141- boot_fit - if "Image.itb" exists
142- boot_zimg - if "zImage" exists
143- boot_uimg - if "uImage" exists
144