blob: 02be0994fcdbc8f5ea139825e1b824ce6326d578 [file] [log] [blame]
Stefano Babic17b60372016-06-08 10:50:20 +02001Board information
2-----------------
3
4The SBC produced by Phytec has a SOM based on a i.MX6Q.
5The SOM is sold in two versions, with eMMC or with NAND. Support
6here is for the SOM with NAND.
7The evaluation board "phyBoard-Mira" is thought to be used
8together with the SOM.
9
10More information on the board can be found on manufacturer's
11website:
12
13http://www.phytec.de/produkt/single-board-computer/phyboard-mira/
14http://www.phytec.de/fileadmin/user_upload/images/content/1.Products/SOMs/phyCORE-i.MX6/L-808e_1.pdf
15
16Building U-Boot
17-------------------------------
18
19$ make pcm058_defconfig
20$ make
21
22This generates the artifacts SPL and u-boot.img.
23The SOM can boot from NAND or from SD-Card, having the SPI-NOR
24as second option.
25The dip switch "DIP-1" on the board let choose between
26NAND and SD.
27
28DIP-1 set to off: Boot first from NAND, then try SPI
29DIP-1 set to on: Boot first from SD, then try SPI
30
31The bootloader was tested with DIP-1 set to on. If a SD-card
32is present, then the RBL tries to load SPL from the SD Card, if not,
33RBL loads from SPI-NOR. The SPL tries then to load from the same
34device where SPL was loaded (SD or SPI). Booting from NAND is
35not supported.
Niel Fourie8ee19072020-05-19 14:01:43 +020036
37Flashing U-Boot onto an SD card
38-------------------------------
39
40After a successful build, the generated SPL and U-boot binaries can be copied
41to an SD card. Adjust the SD card device as necessary:
42
43$ sudo dd if=u-boot-with-spl.imx of=/dev/mmcblk0 bs=1k seek=1
44
45This is equivalent to separately copying the SPL and U-boot using:
46
47$ sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1
48$ sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 bs=1k seek=197
49
50The default bootscripts expect a kernel fit-image file named "fitImage" in the
51first partition and Linux ext4 rootfs in the second partition.
52
53Flashing U-boot to the SPI Flash, for booting Linux from NAND
54-------------------------------------------------------------
55
56The SD card created above can also be used to install the SPL and U-boot into
57the SPI flash. Boot U-boot from the SD card as above, and stop at the autoboot.
58
59Then, clear the SPI flash:
60
61=> sf probe
62=> sf erase 0x0 0x1000000
63
64Load the SPL from raw MMC into memory and copy to the SPI. The SPL is maximum
65392*512-byte blocks in size therefore 0x188 blocks, totaling 0x31000 bytes:
66
67=> mmc read ${loadaddr} 0x2 0x188
68=> sf write ${loadaddr} 0x400 0x31000
69
70Load the U-boot binary into memory and copy to the SPI. U-boot should fit into
71640KiB, so 0x500 512-byte blocks, totalling 0xA0000 bytes:
72
73=> mmc read ${loadaddr} 0x18a 0x500
74=> sf write ${loadaddr} 0x40000 0xA0000
75
76The default NAND bootscripts expect a single MTD partition named "rootfs",
77which in turn contains the UBI volumes "fit" (which contains the kernel fit-
78image) and "root" (which contains a ubifs root filesystem).
79
80The "bootm_size" variable in the environment
81--------------------------------------------
82
83By default, U-boot relocates the device tree towards the upper end of the RAM,
84which kernels using CONFIG_HIGHMEM=y may not be able to access during early
85boot. With the bootm_size variable set to 0x30000000, U-boot relocates the
86device tree to below this address instead.