README 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. Layerscape Quick Start
  2. 1. Layerscape target support
  3. ----------------------------
  4. * ARMv8 64-bit
  5. LS1012ARDB LS1012AFRDM LS1043ARDB LS1046ARDB LS1088ARDB LS2088ARDB
  6. * ARMv8 32-bit
  7. LS1012ARDB LS1012AFRDM LS1043ARDB LS1046ARDB
  8. 2. Build
  9. --------
  10. Before configuration and build, update and install package feeds.
  11. $ ./scripts/feeds update -a
  12. $ ./scripts/feeds install -a
  13. 2.1 make menuconfig
  14. -------------------
  15. * For single device
  16. Target System: "NXP Layerscape".
  17. Subtarget: "ARMv8 64-bit based boards" or "ARMv8 32-bit based boards"
  18. Target Profile: (select device you want to build)
  19. For example, build firmware for 64-bit ls1043ardb.
  20. +---------------------------------------------+
  21. | Target System (NXP Layerscape) ---> |
  22. |---------------------------------------------|
  23. | Subtarget (ARMv8 64-bit based boards) ---> |
  24. |---------------------------------------------|
  25. | Target Profile (ls1043ardb-armv8_64b) ---> |
  26. +---------------------------------------------+
  27. * For multiple devices
  28. Target System: "NXP Layerscape".
  29. Subtarget: "ARMv8 64-bit based boards" or "ARMv8 32-bit based boards"
  30. Target Profile: "Multiple devices"
  31. Target Devices: (select devices you want to build)
  32. For example, build firmware for all 64-bit devices.
  33. Target Devices --->
  34. +-----------------------------------------------------------------+
  35. | [*] Enable all profiles by default |
  36. |-----------------------------------------------------------------|
  37. | [*] Use a per-device root filesystem that adds profile packages |
  38. |-----------------------------------------------------------------|
  39. | [*] ls1012afrdm-armv8_64b ---> |
  40. |-----------------------------------------------------------------|
  41. | [*] ls1012ardb-armv8_64b ---> |
  42. |-----------------------------------------------------------------|
  43. | [*] ls1043ardb-armv8_64b ---> |
  44. |-----------------------------------------------------------------|
  45. | [*] ls1046ardb-armv8_64b ---> |
  46. |-----------------------------------------------------------------|
  47. | [*] ls1088ardb-armv8_64b ---> |
  48. |-----------------------------------------------------------------|
  49. | [*] ls2088ardb-armv8_64b ---> |
  50. +-----------------------------------------------------------------+
  51. Note: The first time make menuconfig would create a .config file which
  52. would include all dependencies for selected target. After that, make
  53. menuconfig still could be used to modify packages. If want to change
  54. other target, please remove .config and make menuconfig to select again.
  55. Otherwise the packages selected in .config would be a mess.
  56. 2.2 make (or make -j<n>)
  57. ------------------------
  58. 2.3 Final firmware
  59. ------------------
  60. Final firmware would be in bin/targets/layerscape/<subtarget>/, and
  61. named as openwrt-layerscape-<subtarget>-<device>-<rootfs>-firmware.bin.
  62. 3. Program firmware to NOR/QSPI flash
  63. -------------------------------------
  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>.bin
  68. => protect off all
  69. => erase 64000000 +$filesize
  70. => cp.b a0000000 64000000 $filesize
  71. => cpld reset altbank
  72. * LS2088ARDB (NOR flash)
  73. Start up from bank0, and program firmware to bank4 with below commands.
  74. Switch to bank4 to start up OpenWrt.
  75. => tftp a0000000 <firmware_name>.bin
  76. => protect off all
  77. => erase 584000000 +$filesize
  78. => cp.b a0000000 584000000 $filesize
  79. => qix altbank
  80. * LS1012ARDB (QSPI flash)
  81. Start up from bank1, and program firmware to bank2 with below commands.
  82. Switch to bank2 to start up OpenWrt.
  83. => tftp a0000000 <firmware_name>.bin
  84. => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
  85. => sf probe 0:0
  86. => sf erase 0 +$filesize
  87. => sf write a0000000 0 $filesize
  88. => reset
  89. * LS1012AFRDM (QSPI flash)
  90. LS1012AFRDM board only has one bank. Start up board, and program firmware
  91. with below commands. Reset to start up OpenWrt.
  92. => tftp 96000000 <firmware_name>.bin
  93. => sf probe 0:0
  94. => sf erase 0 +$filesize
  95. => sf write 96000000 0 $filesize
  96. => reset
  97. * LS1046ARDB (QSPI flash)
  98. Start up from bank1, and program firmware to bank2 with below commands.
  99. Switch to bank2 to start up OpenWrt.
  100. => tftp a0000000 <firmware_name>.bin
  101. => sf probe 0:1
  102. => sf erase 0 +$filesize
  103. => sf write a0000000 0 $filesize
  104. => cpld reset altbank
  105. * LS1088ARDB (QSPI flash)
  106. Start up from bank0, and program firmware to bank1 with below commands.
  107. Switch to bank1 to start up OpenWrt.
  108. => tftp a0000000 <firmware_name>.bin
  109. => sf probe 0:1
  110. => sf erase 0 +$filesize
  111. => sf write a0000000 0 $filesize
  112. => qix altbank
  113. Note: old version u-boot of ls1088ardb may use below commands to switch to
  114. bank1 instead of 'qix altbank'.
  115. => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
  116. 4. Known issues and limitation
  117. ------------------------------
  118. * u-boot may fail to read MAC addresses from EEPROM on some boards and there
  119. won't be MAC addresses set in environment. This may cause kernel fails to
  120. probe these network interfaces. The workaround is to set MAC addresses
  121. manually, for example,
  122. => setenv ethaddr 00:04:9F:04:65:4b
  123. => setenv eth1addr 00:04:9F:04:65:4c
  124. 5. Other references and sources
  125. -------------------------------
  126. - NXP LSDK site: https://lsdk.github.io/
  127. - NXP LSDK github: https://github.com/qoriq-open-source
  128. - LEDE documentation: https://lede-project.org/docs/start