README 3.3 KB

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