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