2017-10-26 10:58:03 +00:00
|
|
|
|
|
|
|
Layerscape Quick Start
|
|
|
|
|
|
|
|
1. Layerscape target support
|
|
|
|
----------------------------
|
|
|
|
* ARMv8 64-bit
|
2018-07-23 08:48:48 +00:00
|
|
|
LS1012ARDB LS1012AFRWY LS1043ARDB LS1046ARDB LS1088ARDB LS2088ARDB
|
|
|
|
(SD card boot support on LS1043ARDB/LS1046ARDB/LS1088ARDB)
|
2017-10-26 10:58:03 +00:00
|
|
|
|
|
|
|
* ARMv8 32-bit
|
2018-07-23 08:48:48 +00:00
|
|
|
LS1012ARDB LS1012AFRWY LS1043ARDB LS1046ARDB
|
|
|
|
|
|
|
|
* ARMv7
|
|
|
|
LS1021ATWR
|
|
|
|
(SD card boot support on LS1021ATWR)
|
2017-10-26 10:58:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
2. Build
|
|
|
|
--------
|
2018-01-08 04:12:16 +00:00
|
|
|
Before configuration and build, update and install package feeds.
|
|
|
|
|
|
|
|
$ ./scripts/feeds update -a
|
|
|
|
$ ./scripts/feeds install -a
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
* make menuconfig
|
|
|
|
Target System: "NXP Layerscape"
|
|
|
|
Subtarget: (Select subtarget)
|
|
|
|
Target Profile: (Select device, or "Multiple devices")
|
|
|
|
Target Devices: (Select devices. Available when Target Profile is "Multiple devices")
|
|
|
|
Target Images: (Disable "GZip images" if don't want to unzip manually to use the images.)
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
Note: The first time make menuconfig would create a .config file which
|
|
|
|
would include all dependencies for selected target. After that, make
|
|
|
|
menuconfig still could be used to modify packages. If want to change
|
|
|
|
other target, please remove .config and make menuconfig to select again.
|
|
|
|
Otherwise the packages selected in .config would be a mess.
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
* make download (or make download -j<n>)
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
* make (or make -j<n>)
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
* Final firmware/image
|
|
|
|
Path: bin/targets/layerscape/<subtarget>/
|
|
|
|
Firmware for flash: openwrt-layerscape-<subtarget>-<device>-<rootfs>-firmware.bin
|
|
|
|
Image for SD card: openwrt-layerscape-<subtarget>-<device>-<rootfs>-sdcard.img
|
2017-10-26 10:58:03 +00:00
|
|
|
|
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
3. Program NOR/QSPI flash or SD card
|
|
|
|
------------------------------------
|
|
|
|
The firmware.bin or sdcard.img is an all-in-one image including all things for
|
|
|
|
OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.)
|
|
|
|
If you want to install all things into flash, please use firmware.bin.
|
|
|
|
If you want to install all things into SD card, please use sdcard.img.
|
|
|
|
|
|
|
|
3.1 Program sdcard.img to SD card
|
|
|
|
---------------------------------
|
|
|
|
sdcard.img could be programmed to SD card in either u-boot environment
|
|
|
|
or linux environment. After programming, configure the board to boot
|
|
|
|
from SD card.
|
|
|
|
|
|
|
|
* u-boot environment
|
|
|
|
|
|
|
|
=> tftp a0000000 <image_name>-sdcard.img
|
|
|
|
=> mmc write a0000000 0 a0000
|
|
|
|
|
|
|
|
Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB.
|
|
|
|
blk_num = filesize / 512.
|
|
|
|
|
|
|
|
* linux environment
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
$ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx
|
|
|
|
|
|
|
|
Note: Need to check the SD card device name to replace "mmcblkx".
|
|
|
|
|
|
|
|
3.2 Program firmware.bin to flash
|
|
|
|
---------------------------------
|
|
|
|
* LS1012ARDB (QSPI flash)
|
2017-10-26 10:58:03 +00:00
|
|
|
Start up from bank1, and program firmware to bank2 with below commands.
|
2018-01-22 08:42:05 +00:00
|
|
|
Switch to bank2 to start up OpenWrt.
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
=> tftp a0000000 <firmware_name>-firmware.bin
|
2017-10-26 10:58:03 +00:00
|
|
|
=> i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
|
|
|
|
=> sf probe 0:0
|
|
|
|
=> sf erase 0 +$filesize
|
|
|
|
=> sf write a0000000 0 $filesize
|
|
|
|
=> reset
|
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
* LS1043ARDB (NOR flash)
|
|
|
|
Start up from bank0, and program firmware to bank4 with below commands.
|
|
|
|
Switch to bank4 to start up OpenWrt.
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
=> tftp a0000000 <firmware_name>-firmware.bin
|
|
|
|
=> protect off all
|
|
|
|
=> erase 64000000 +$filesize
|
|
|
|
=> cp.b a0000000 64000000 $filesize
|
|
|
|
=> cpld reset altbank
|
2017-10-26 10:58:03 +00:00
|
|
|
|
|
|
|
* LS1046ARDB (QSPI flash)
|
|
|
|
Start up from bank1, and program firmware to bank2 with below commands.
|
2018-01-22 08:42:05 +00:00
|
|
|
Switch to bank2 to start up OpenWrt.
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
=> tftp a0000000 <firmware_name>-firmware.bin
|
2017-10-26 10:58:03 +00:00
|
|
|
=> sf probe 0:1
|
|
|
|
=> sf erase 0 +$filesize
|
|
|
|
=> sf write a0000000 0 $filesize
|
|
|
|
=> cpld reset altbank
|
|
|
|
|
|
|
|
* LS1088ARDB (QSPI flash)
|
|
|
|
Start up from bank0, and program firmware to bank1 with below commands.
|
2018-01-22 08:42:05 +00:00
|
|
|
Switch to bank1 to start up OpenWrt.
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
=> tftp a0000000 <firmware_name>-firmware.bin
|
2017-10-26 10:58:03 +00:00
|
|
|
=> sf probe 0:1
|
|
|
|
=> sf erase 0 +$filesize
|
|
|
|
=> sf write a0000000 0 $filesize
|
|
|
|
=> qix altbank
|
|
|
|
|
|
|
|
Note: old version u-boot of ls1088ardb may use below commands to switch to
|
|
|
|
bank1 instead of 'qix altbank'.
|
|
|
|
=> i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
|
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
* LS2088ARDB (NOR flash)
|
|
|
|
Start up from bank0, and program firmware to bank4 with below commands.
|
|
|
|
Switch to bank4 to start up OpenWrt.
|
|
|
|
|
|
|
|
=> tftp a0000000 <firmware_name>-firmware.bin
|
|
|
|
=> protect off all
|
|
|
|
=> erase 584000000 +$filesize
|
|
|
|
=> cp.b a0000000 584000000 $filesize
|
|
|
|
=> qix altbank
|
|
|
|
|
|
|
|
3.3 Program LS1012AFRWY
|
|
|
|
-----------------------
|
|
|
|
* LS1012AFRWY (QSPI flash + SD card)
|
|
|
|
LS1012AFRWY only supports 2MB QSPI flash. We have to put u-boot, and
|
|
|
|
some firmwares on QSPI flash, and kernel/dtb/rootfs on SD card.
|
|
|
|
So both firmware.bin and sdcard.img are needed for OpenWrt starting up.
|
|
|
|
|
|
|
|
To program sdcard.img, please use linux command described in 3.1 on a
|
|
|
|
linux machine.
|
|
|
|
To program firmware.bin, start up board from QSPI flash, and program
|
|
|
|
firmware with below commands. Reset to start up OpenWrt. (LS1012AFRWY
|
|
|
|
supports only one bank.)
|
|
|
|
|
|
|
|
=> tftp 96000000 <firmware_name>-firmware.bin
|
|
|
|
=> sf probe 0:0
|
|
|
|
=> sf erase 0 +$filesize
|
|
|
|
=> sf write 96000000 0 $filesize
|
|
|
|
=> reset
|
|
|
|
|
2017-10-26 10:58:03 +00:00
|
|
|
|
2018-01-22 08:42:05 +00:00
|
|
|
4. Known issues and limitation
|
|
|
|
------------------------------
|
|
|
|
* u-boot may fail to read MAC addresses from EEPROM on some boards and there
|
|
|
|
won't be MAC addresses set in environment. This may cause kernel fails to
|
|
|
|
probe these network interfaces. The workaround is to set MAC addresses
|
|
|
|
manually, for example,
|
|
|
|
|
|
|
|
=> setenv ethaddr 00:04:9F:04:65:4b
|
|
|
|
=> setenv eth1addr 00:04:9F:04:65:4c
|
|
|
|
|
|
|
|
|
2018-07-23 08:48:48 +00:00
|
|
|
5. Other references
|
|
|
|
-------------------
|
2017-10-26 10:58:03 +00:00
|
|
|
- NXP LSDK site: https://lsdk.github.io/
|
2018-07-23 08:48:48 +00:00
|
|
|
- OpenWrt documentation: https://openwrt.org/docs/start
|