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.gz
43 Sysupgrade images: openwrt-layerscape-<subtarget>-<device>-<rootfs>-sysupgrade.bin
46 3. Program NOR/QSPI flash or SD card
47 ------------------------------------
48 The firmware.bin or sdcard.img (after extract from gz) is an all-in-one image including all
49 things for OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.)
50 If you want to install all things into flash, please use firmware.bin.
51 If you want to install all things into SD card, please use sdcard.img.
53 3.1 Program sdcard.img to SD card
54 ---------------------------------
55 sdcard.img could be programmed to SD card in either u-boot environment
56 or linux environment. After programming, configure the board to boot
57 from SD card. (sdcard.img images are gz-iped to save space. Please extract them first.)
61 => tftp a0000000 <image_name>-sdcard.img
62 => mmc write a0000000 0 a0000
64 Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB.
65 blk_num = filesize / 512.
69 $ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx
71 Note: Need to check the SD card device name to replace "mmcblkx".
73 3.2 Program firmware.bin to flash
74 ---------------------------------
75 * LS1012FRDM (QSPI flash)
76 Board have only one nor flash bank. Those commands will replace stock
77 bootloader and firmware. Please refer point 4 for MAC recovery.
79 => tftp a0000000 <firmware_name>-firmware.bin
81 => sf erase 0 +$filesize
82 => sf write a0000000 0 $filesize
85 * LS1012ARDB (QSPI flash)
86 Start up from bank1, and program firmware to bank2 with below commands.
87 Switch to bank2 to start up OpenWrt.
89 => tftp a0000000 <firmware_name>-firmware.bin
90 => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
92 => sf erase 0 +$filesize
93 => sf write a0000000 0 $filesize
96 * LS1043ARDB (NOR flash)
97 Start up from bank0, and program firmware to bank4 with below commands.
98 Switch to bank4 to start up OpenWrt.
100 => tftp a0000000 <firmware_name>-firmware.bin
102 => erase 64000000 +$filesize
103 => cp.b a0000000 64000000 $filesize
104 => cpld reset altbank
106 * LS1046ARDB (QSPI flash)
107 Start up from bank1, and program firmware to bank2 with below commands.
108 Switch to bank2 to start up OpenWrt.
110 => tftp a0000000 <firmware_name>-firmware.bin
112 => sf erase 0 +$filesize
113 => sf write a0000000 0 $filesize
114 => cpld reset altbank
116 * LS1088ARDB (QSPI flash)
117 Start up from bank0, and program firmware to bank1 with below commands.
118 Switch to bank1 to start up OpenWrt.
120 => tftp a0000000 <firmware_name>-firmware.bin
122 => sf erase 0 +$filesize
123 => sf write a0000000 0 $filesize
126 Note: old version u-boot of ls1088ardb may use below commands to switch to
127 bank1 instead of 'qix altbank'.
128 => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
130 * LS2088ARDB (NOR flash)
131 Start up from bank0, and program firmware to bank4 with below commands.
132 Switch to bank4 to start up OpenWrt.
134 => tftp a0000000 <firmware_name>-firmware.bin
136 => erase 584000000 +$filesize
137 => cp.b a0000000 584000000 $filesize
140 3.3 Program LS1012AFRWY
141 -----------------------
142 * LS1012AFRWY (QSPI flash + SD card)
143 LS1012AFRWY only supports 2MB QSPI flash. We have to put u-boot, and
144 some firmwares on QSPI flash, and kernel/dtb/rootfs on SD card.
145 So both firmware.bin and sdcard.img are needed for OpenWrt starting up.
147 To program sdcard.img, please use linux command described in 3.1 on a
149 To program firmware.bin, start up board from QSPI flash, and program
150 firmware with below commands. Reset to start up OpenWrt. (LS1012AFRWY
151 supports only one bank.)
153 => tftp 96000000 <firmware_name>-firmware.bin
155 => sf erase 0 +$filesize
156 => sf write 96000000 0 $filesize
160 4. Known issues and limitation
161 ------------------------------
162 * u-boot may fail to read MAC addresses from EEPROM on some boards and there
163 won't be MAC addresses set in environment. This may cause kernel fails to
164 probe these network interfaces. The workaround is to set MAC addresses
165 manually, for example,
167 => setenv ethaddr 00:04:9F:04:65:4b
168 => setenv eth1addr 00:04:9F:04:65:4c
174 - NXP LSDK site: https://lsdk.github.io/
175 - OpenWrt documentation: https://openwrt.org/docs/start