README 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. Layerscape Quick Start
  2. 1. Layerscape target support
  3. ----------------------------
  4. * ARMv8 64-bit
  5. LS1012ARDB LS1012AFRWY LS1043ARDB LS1046ARDB LS1088ARDB LS2088ARDB
  6. (SD card boot support on LS1043ARDB/LS1046ARDB/LS1088ARDB)
  7. * ARMv8 32-bit
  8. LS1012ARDB LS1012AFRWY LS1043ARDB LS1046ARDB
  9. * ARMv7
  10. LS1021ATWR
  11. (SD card boot support on LS1021ATWR)
  12. 2. Build
  13. --------
  14. Before configuration and build, update and install package feeds.
  15. $ ./scripts/feeds update -a
  16. $ ./scripts/feeds install -a
  17. * make menuconfig
  18. Target System: "NXP Layerscape"
  19. Subtarget: (Select subtarget)
  20. Target Profile: (Select device, or "Multiple devices")
  21. Target Devices: (Select devices. Available when Target Profile is "Multiple devices")
  22. Target Images: (Disable "GZip images" if don't want to unzip manually to use the images.)
  23. Note: The first time make menuconfig would create a .config file which
  24. would include all dependencies for selected target. After that, make
  25. menuconfig still could be used to modify packages. If want to change
  26. other target, please remove .config and make menuconfig to select again.
  27. Otherwise the packages selected in .config would be a mess.
  28. * make download (or make download -j<n>)
  29. * make (or make -j<n>)
  30. * Final firmware/image
  31. Path: bin/targets/layerscape/<subtarget>/
  32. Firmware for flash: openwrt-layerscape-<subtarget>-<device>-<rootfs>-firmware.bin
  33. Image for SD card: openwrt-layerscape-<subtarget>-<device>-<rootfs>-sdcard.img
  34. 3. Program NOR/QSPI flash or SD card
  35. ------------------------------------
  36. The firmware.bin or sdcard.img is an all-in-one image including all things for
  37. OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.)
  38. If you want to install all things into flash, please use firmware.bin.
  39. If you want to install all things into SD card, please use sdcard.img.
  40. 3.1 Program sdcard.img to SD card
  41. ---------------------------------
  42. sdcard.img could be programmed to SD card in either u-boot environment
  43. or linux environment. After programming, configure the board to boot
  44. from SD card.
  45. * u-boot environment
  46. => tftp a0000000 <image_name>-sdcard.img
  47. => mmc write a0000000 0 a0000
  48. Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB.
  49. blk_num = filesize / 512.
  50. * linux environment
  51. $ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx
  52. Note: Need to check the SD card device name to replace "mmcblkx".
  53. 3.2 Program firmware.bin to flash
  54. ---------------------------------
  55. * LS1012ARDB (QSPI flash)
  56. Start up from bank1, and program firmware to bank2 with below commands.
  57. Switch to bank2 to start up OpenWrt.
  58. => tftp a0000000 <firmware_name>-firmware.bin
  59. => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
  60. => sf probe 0:0
  61. => sf erase 0 +$filesize
  62. => sf write a0000000 0 $filesize
  63. => reset
  64. * LS1043ARDB (NOR flash)
  65. Start up from bank0, and program firmware to bank4 with below commands.
  66. Switch to bank4 to start up OpenWrt.
  67. => tftp a0000000 <firmware_name>-firmware.bin
  68. => protect off all
  69. => erase 64000000 +$filesize
  70. => cp.b a0000000 64000000 $filesize
  71. => cpld reset altbank
  72. * LS1046ARDB (QSPI flash)
  73. Start up from bank1, and program firmware to bank2 with below commands.
  74. Switch to bank2 to start up OpenWrt.
  75. => tftp a0000000 <firmware_name>-firmware.bin
  76. => sf probe 0:1
  77. => sf erase 0 +$filesize
  78. => sf write a0000000 0 $filesize
  79. => cpld reset altbank
  80. * LS1088ARDB (QSPI flash)
  81. Start up from bank0, and program firmware to bank1 with below commands.
  82. Switch to bank1 to start up OpenWrt.
  83. => tftp a0000000 <firmware_name>-firmware.bin
  84. => sf probe 0:1
  85. => sf erase 0 +$filesize
  86. => sf write a0000000 0 $filesize
  87. => qix altbank
  88. Note: old version u-boot of ls1088ardb may use below commands to switch to
  89. bank1 instead of 'qix altbank'.
  90. => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
  91. * LS2088ARDB (NOR flash)
  92. Start up from bank0, and program firmware to bank4 with below commands.
  93. Switch to bank4 to start up OpenWrt.
  94. => tftp a0000000 <firmware_name>-firmware.bin
  95. => protect off all
  96. => erase 584000000 +$filesize
  97. => cp.b a0000000 584000000 $filesize
  98. => qix altbank
  99. 3.3 Program LS1012AFRWY
  100. -----------------------
  101. * LS1012AFRWY (QSPI flash + SD card)
  102. LS1012AFRWY only supports 2MB QSPI flash. We have to put u-boot, and
  103. some firmwares on QSPI flash, and kernel/dtb/rootfs on SD card.
  104. So both firmware.bin and sdcard.img are needed for OpenWrt starting up.
  105. To program sdcard.img, please use linux command described in 3.1 on a
  106. linux machine.
  107. To program firmware.bin, start up board from QSPI flash, and program
  108. firmware with below commands. Reset to start up OpenWrt. (LS1012AFRWY
  109. supports only one bank.)
  110. => tftp 96000000 <firmware_name>-firmware.bin
  111. => sf probe 0:0
  112. => sf erase 0 +$filesize
  113. => sf write 96000000 0 $filesize
  114. => reset
  115. 4. Known issues and limitation
  116. ------------------------------
  117. * u-boot may fail to read MAC addresses from EEPROM on some boards and there
  118. won't be MAC addresses set in environment. This may cause kernel fails to
  119. probe these network interfaces. The workaround is to set MAC addresses
  120. manually, for example,
  121. => setenv ethaddr 00:04:9F:04:65:4b
  122. => setenv eth1addr 00:04:9F:04:65:4c
  123. 5. Other references
  124. -------------------
  125. - NXP LSDK site: https://lsdk.github.io/
  126. - OpenWrt documentation: https://openwrt.org/docs/start