README 5.7 KB

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