blob: ccc5e16066fd13b82322be46f397504faf2020de [file] [log] [blame]
Tom Rini5d4dbf12013-07-08 12:15:18 -04001Summary
2=======
3
4This document covers various features of the 'am335x_evm' build, and some of
5the related build targets (am335x_evm_uartN, etc).
6
7Hardware
8========
9
10The binary produced by this board supports, based on parsing of the EEPROM
11documented in TI's reference designs:
12- AM335x GP EVM
13- AM335x EVM SK
14- Beaglebone White
15- Beaglebone Black
16
17Falcon Mode
18===========
19
20The default build includes "Falcon Mode" (see doc/README.falcon) via NAND,
21eMMC (or raw SD cards) and FAT SD cards. Our default behavior currently is
22to read a 'c' on the console while in SPL at any point prior to loading the
23OS payload (so as soon as possible) to opt to booting full U-Boot. Also
24note that while one can program Falcon Mode "in place" great care needs to
25be taken by the user to not 'brick' their setup. As these are all eval
26boards with multiple boot methods, recovery should not be an issue in this
27worst-case however.
28
29Falcon Mode: eMMC
30=================
31
32The recommended layout in this case is:
33
34MMC BLOCKS |--------------------------------| LOCATION IN BYTES
350x0000 - 0x007F : MBR or GPT table : 0x000000 - 0x020000
360x0080 - 0x00FF : ARGS or FDT file : 0x010000 - 0x020000
370x0100 - 0x01FF : SPL.backup1 (first copy used) : 0x020000 - 0x040000
380x0200 - 0x02FF : SPL.backup2 (second copy used) : 0x040000 - 0x060000
390x0300 - 0x06FF : U-Boot : 0x060000 - 0x0e0000
400x0700 - 0x08FF : U-Boot Env + Redundant : 0x0e0000 - 0x120000
410x0900 - 0x28FF : Kernel : 0x120000 - 0x520000
42
43Note that when we run 'spl export' it will prepare to boot the kernel.
44This includes relocation of the uImage from where we loaded it to the entry
45point defined in the header. As these locations overlap by default, it
46would leave us with an image that if written to MMC will not boot, so
47instead of using the loadaddr variable we use 0x81000000 in the following
48example. In this example we are loading from the network, for simplicity,
49and assume a valid partition table already exists and 'mmc dev' has already
50been run to select the correct device. Also note that if you previously
51had a FAT partition (such as on a Beaglebone Black) it is not enough to
52write garbage into the area, you must delete it from the partition table
53first.
54
55# Ensure we are able to talk with this mmc device
56U-Boot # mmc rescan
57U-Boot # tftp 81000000 am335x/MLO
58# Write to two of the backup locations ROM uses
59U-Boot # mmc write 81000000 100 100
60U-Boot # mmc write 81000000 200 100
61# Write U-Boot to the location set in the config
62U-Boot # tftp 81000000 am335x/u-boot.img
63U-Boot # mmc write 81000000 300 400
64# Load kernel and device tree into memory, perform export
65U-Boot # tftp 81000000 am335x/uImage
66U-Boot # run findfdt
67U-Boot # tftp ${fdtaddr} am335x/${fdtfile}
68U-Boot # run mmcargs
69U-Boot # spl export fdt 81000000 - ${fdtaddr}
70# Write the updated device tree to MMC
71U-Boot # mmc write ${fdtaddr} 80 80
72# Write the uImage to MMC
73U-Boot # mmc write 81000000 900 2000
74
75Falcon Mode: FAT SD cards
76=========================
77
78In this case the additional file is written to the filesystem. In this
79example we assume that the uImage and device tree to be used are already on
80the FAT filesystem (only the uImage MUST be for this to function
81afterwards) along with a Falcon Mode aware MLO and the FAT partition has
82already been created and marked bootable:
83
84U-Boot # mmc rescan
85# Load kernel and device tree into memory, perform export
86U-Boot # load mmc 0:1 ${loadaddr} uImage
87U-Boot # run findfdt
88U-Boot # load mmc 0:1 ${fdtaddr} ${fdtfile}
89U-Boot # run mmcargs
90U-Boot # spl export fdt ${loadaddr} - ${fdtaddr}
91
92This will print a number of lines and then end with something like:
93 Using Device Tree in place at 80f80000, end 80f85928
94 Using Device Tree in place at 80f80000, end 80f88928
95So then you:
96
97U-Boot # fatwrite mmc 0:1 0x80f80000 args 8928
98
99Falcon Mode: NAND
100=================
101
102In this case the additional data is written to another partition of the
103NAND. In this example we assume that the uImage and device tree to be are
104already located on the NAND somewhere (such as fileystem or mtd partition)
105along with a Falcon Mode aware MLO written to the correct locations for
106booting and mtdparts have been configured correctly for the board:
107
108U-Boot # nand read ${loadaddr} kernel
109U-Boot # load nand rootfs ${fdtaddr} /boot/am335x-evm.dtb
110U-Boot # run nandargs
111U-Boot # spl export fdt ${loadaddr} - ${fdtaddr}
112U-Boot # nand erase.part u-boot-spl-os
113U-Boot # nand write ${fdtaddr} u-boot-spl-os