README 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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
  32. 3. Program NOR/QSPI flash or SD card
  33. ------------------------------------
  34. The firmware.bin or sdcard.img is an all-in-one image including all things for
  35. OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.)
  36. If you want to install all things into flash, please use firmware.bin.
  37. If you want to install all things into SD card, please use sdcard.img.
  38. 3.1 Program sdcard.img to SD card
  39. ---------------------------------
  40. sdcard.img could be programmed to SD card in either u-boot environment
  41. or linux environment. After programming, configure the board to boot
  42. from SD card.
  43. * u-boot environment
  44. => tftp a0000000 <image_name>-sdcard.img
  45. => mmc write a0000000 0 a0000
  46. Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB.
  47. blk_num = filesize / 512.
  48. * linux environment
  49. $ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx
  50. Note: Need to check the SD card device name to replace "mmcblkx".
  51. 3.2 Program firmware.bin to flash
  52. ---------------------------------
  53. * LS1012ARDB (QSPI flash)
  54. Start up from bank1, and program firmware to bank2 with below commands.
  55. Switch to bank2 to start up OpenWrt.
  56. => tftp a0000000 <firmware_name>-firmware.bin
  57. => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
  58. => sf probe 0:0
  59. => sf erase 0 +$filesize
  60. => sf write a0000000 0 $filesize
  61. => reset
  62. * LS1043ARDB (NOR flash)
  63. Start up from bank0, and program firmware to bank4 with below commands.
  64. Switch to bank4 to start up OpenWrt.
  65. => tftp a0000000 <firmware_name>-firmware.bin
  66. => protect off all
  67. => erase 64000000 +$filesize
  68. => cp.b a0000000 64000000 $filesize
  69. => cpld reset altbank
  70. * LS1046ARDB (QSPI flash)
  71. Start up from bank1, and program firmware to bank2 with below commands.
  72. Switch to bank2 to start up OpenWrt.
  73. => tftp a0000000 <firmware_name>-firmware.bin
  74. => sf probe 0:1
  75. => sf erase 0 +$filesize
  76. => sf write a0000000 0 $filesize
  77. => cpld reset altbank
  78. * LS1088ARDB (QSPI flash)
  79. Start up from bank0, and program firmware to bank1 with below commands.
  80. Switch to bank1 to start up OpenWrt.
  81. => tftp a0000000 <firmware_name>-firmware.bin
  82. => sf probe 0:1
  83. => sf erase 0 +$filesize
  84. => sf write a0000000 0 $filesize
  85. => qix altbank
  86. Note: old version u-boot of ls1088ardb may use below commands to switch to
  87. bank1 instead of 'qix altbank'.
  88. => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
  89. * LS2088ARDB (NOR flash)
  90. Start up from bank0, and program firmware to bank4 with below commands.
  91. Switch to bank4 to start up OpenWrt.
  92. => tftp a0000000 <firmware_name>-firmware.bin
  93. => protect off all
  94. => erase 584000000 +$filesize
  95. => cp.b a0000000 584000000 $filesize
  96. => qix altbank
  97. 3.3 Program LS1012AFRWY
  98. -----------------------
  99. * LS1012AFRWY (QSPI flash + SD card)
  100. LS1012AFRWY only supports 2MB QSPI flash. We have to put u-boot, and
  101. some firmwares on QSPI flash, and kernel/dtb/rootfs on SD card.
  102. So both firmware.bin and sdcard.img are needed for OpenWrt starting up.
  103. To program sdcard.img, please use linux command described in 3.1 on a
  104. linux machine.
  105. To program firmware.bin, start up board from QSPI flash, and program
  106. firmware with below commands. Reset to start up OpenWrt. (LS1012AFRWY
  107. supports only one bank.)
  108. => tftp 96000000 <firmware_name>-firmware.bin
  109. => sf probe 0:0
  110. => sf erase 0 +$filesize
  111. => sf write 96000000 0 $filesize
  112. => reset
  113. 4. Known issues and limitation
  114. ------------------------------
  115. * u-boot may fail to read MAC addresses from EEPROM on some boards and there
  116. won't be MAC addresses set in environment. This may cause kernel fails to
  117. probe these network interfaces. The workaround is to set MAC addresses
  118. manually, for example,
  119. => setenv ethaddr 00:04:9F:04:65:4b
  120. => setenv eth1addr 00:04:9F:04:65:4c
  121. 5. Other references
  122. -------------------
  123. - NXP LSDK site: https://lsdk.github.io/
  124. - OpenWrt documentation: https://openwrt.org/docs/start