bc0c0d0d1629577bbe2cb763d54798cb77bfdb71
[oweals/u-boot.git] / board / freescale / mx6sabresd / README
1 How to use and build U-Boot on mx6sabresd:
2 ----------------------------------
3
4 Currently there are four methods for booting mx6sabresd boards:
5
6 1. Booting from SD card via normal U-Boot (u-boot.imx)
7
8 2. Booting from eMMC via normal U-Boot
9
10 3. Booting via SPL (SPL and u-boot.img)
11
12 4. Booting via Falcon mode (SPL launches the kernel directly)
13
14
15 1. Booting from SD card via normal U-Boot
16 -----------------------------------------
17
18 $ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
19
20 or
21
22 $ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
23
24 $ make
25
26 This will generate the image called u-boot.imx.
27
28 - Flash the u-boot.imx binary into the SD card:
29
30 $ sudo dd if=u-boot.imx of=/dev/sdb bs=1K seek=1 && sync
31
32
33 2. Booting from eMMC via normal U-Boot
34 --------------------------------------
35
36 $ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
37
38 or
39
40 $ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
41
42 $ make
43
44 This will generate the image called u-boot.imx.
45
46 - Flash the u-boot.imx binary into the eMMC:
47
48 Set SW6 to download mode: 00001100
49
50 Plug a usb cable to USB-OTG and load the u-boot image using the imx_usb_loader
51 tool (https://github.com/boundarydevices/imx_usb_loader):
52
53 $ sudo ./imx_usb u-boot.imx
54
55 In U-boot change the eMMC partition config:
56
57 => mmc partconf 2 1 0 0
58
59 Mount the eMMC in the host PC:
60
61 => ums 0 mmc 2
62
63 Flash the u-boot.imx binary
64
65 $ sudo dd if=u-boot.imx of=/dev/sdX bs=1K seek=1 && sync
66
67 Set SW6 to eMMC 8-bit boot: 11010110
68
69
70 3. Booting via SPL
71 ------------------
72
73 Other method for building U-Boot on mx6qsabresd and mx6qpsabresd is
74 through SPL. In order to do so:
75
76 $ make mx6sabresd_spl_defconfig
77 $ make
78
79 This will generate the SPL image called SPL and the u-boot.img.
80
81 - Flash the SPL image into the SD card:
82
83 $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
84
85 - Flash the u-boot.img image into the SD card:
86
87 $ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 && sync
88
89
90 4. Booting via Falcon mode
91 --------------------------
92
93 $ make mx6sabresd_spl_defconfig
94 $ make
95
96 This will generate the SPL image called SPL and the u-boot.img.
97
98 - Flash the SPL image into the SD card:
99
100 $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 oflag=sync status=none && sync
101
102 - Flash the u-boot.img image into the SD card:
103
104 $ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 oflag=sync status=none && sync
105
106 Create a partition for root file system and extract it there:
107
108 $ sudo tar xvf rootfs.tar.gz -C /media/root
109
110 The SD card must have enough space for raw "args" and "kernel".
111 To configure Falcon mode for the first time, on U-Boot do the following commands:
112
113 - Setup the IP server:
114
115 # setenv serverip <server_ip_address>
116
117 - Download dtb file:
118
119 # dhcp ${fdt_addr} imx6q-sabresd.dtb
120
121 - Download kernel image:
122
123 # dhcp ${loadaddr} uImage
124
125 - Write kernel at 2MB offset:
126
127 # mmc write ${loadaddr} 0x1000 0x4000
128
129 - Setup kernel bootargs:
130
131 # setenv bootargs "console=ttymxc0,115200 root=/dev/mmcblk1p1 rootfstype=ext4 rootwait quiet rw"
132
133 - Prepare args:
134
135 # spl export fdt ${loadaddr} - ${fdt_addr}
136
137 - Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors)
138
139 # mmc write 18000000 0x800 0x800
140
141 - Press KEY_VOL_UP key, power up the board and then SPL binary will
142 launch the kernel directly.