kernel: disable CONFIG_PCIE_BUS_PERFORMANCE
[openwrt/openwrt.git] / target / linux / layerscape / README
1
2 Layerscape Quick Start
3
4 This is a quick start guide for Layerscape specific usage, like introducing
5 how to configure, build, and deploy OpenWrt to Layerscape boards, so that
6 users can bring up the board without difficulty.
7
8
9 1. Target support
10 ----------------------------
11 * ARMv8 64-bit
12 LS1012ARDB (QSPI NOR boot)
13 LS1012AFRDM (QSPI NOR boot)
14 LS1012AFRWY (QSPI NOR boot)
15 LS1043ARDB (NOR boot | SD card boot)
16 LS1046ARDB (QSPI NOR boot | SD card boot)
17 LS1046AFRWY (QSPI NOR boot | SD card boot)
18 LS1088ARDB (QSPI NOR boot | SD card boot)
19 LS2088ARDB (NOR boot)
20 LX2160ARDB Rev2.0 (FlexSPI NOR boot | SD card boot)
21
22 * ARMv7
23 LS1021ATWR (NOR boot | SD card boot)
24 LS1021AIOT (SD card boot)
25
26
27 2. Build
28 --------
29 Before configuration and build, update and install package feeds.
30
31 $ ./scripts/feeds update -a
32 $ ./scripts/feeds install -a
33
34 * make menuconfig
35 Target System: "NXP Layerscape"
36 Subtarget: (Select subtarget)
37 Target Profile: (Select device, or "Multiple devices")
38 Target Devices: (Select devices. Available when Target Profile is "Multiple devices")
39 Target Images: (Disable "GZip images" if you don't want to unzip manually to use the images.)
40
41 Note: The first time make menuconfig would create a .config file which
42 would include all dependencies for selected target. After that, make
43 menuconfig still could be used to modify packages. If want to change
44 other target, please remove .config and make menuconfig to select again.
45 Otherwise the packages selected in .config would be a mess.
46
47 * make download (or make download -j<n>)
48
49 * make (or make -j<n>)
50
51 * Final firmware/image
52 Path: bin/targets/layerscape/<subtarget>/
53 Firmware for flash: openwrt-layerscape-<subtarget>-<device>-<rootfs>-firmware.bin
54 Image for SD card: openwrt-layerscape-<subtarget>-<device>-<rootfs>-sdcard.img.gz
55 Sysupgrade images: openwrt-layerscape-<subtarget>-<device>-<rootfs>-sysupgrade.bin
56
57
58 3. Deploy
59 ---------
60 The firmware.bin or sdcard.img is an all-in-one image including all things
61 for OpenWrt staring up except LS1012AFRWY (Refer to 3.3).
62 If you want to install all things into flash, please use firmware.bin.
63 If you want to install all things into SD card, please use sdcard.img.
64
65 3.1 Program sdcard.img to SD card
66 ---------------------------------
67 sdcard.img could be programmed to SD card in either u-boot environment
68 or linux environment. After programming, configure the board to boot
69 from SD card. (sdcard.img images are gz-iped to save space. Please extract them first.)
70
71 * u-boot environment
72
73 => tftp a0000000 <image_name>-sdcard.img
74 => mmc write a0000000 0 a0000
75
76 Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB.
77 blk_num = filesize / 512.
78
79 * linux environment
80
81 $ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx
82
83 Note: Need to check the SD card device name to replace "mmcblkx".
84
85 3.2 Program firmware.bin to flash
86 ---------------------------------
87 * LS1012ARDB
88 Start up from bank1, and program firmware to bank2 with below commands.
89 Switch to bank2 to start up OpenWrt.
90
91 => tftp a0000000 <firmware_name>-firmware.bin
92 => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
93 => sf probe 0:0
94 => sf erase 0 +$filesize
95 => sf write a0000000 0 $filesize
96 => reset
97
98 * LS1043ARDB
99 Start up from bank0, and program firmware to bank4 with below commands.
100 Switch to bank4 to start up OpenWrt.
101
102 => tftp a0000000 <firmware_name>-firmware.bin
103 => protect off all
104 => erase 64000000 +$filesize
105 => cp.b a0000000 64000000 $filesize
106 => cpld reset altbank
107
108 * LS1046ARDB
109 Start up from bank1, and program firmware to bank2 with below commands.
110 Switch to bank2 to start up OpenWrt.
111
112 => tftp a0000000 <firmware_name>-firmware.bin
113 => sf probe 0:1
114 => sf erase 0 +$filesize
115 => sf write a0000000 0 $filesize
116 => cpld reset altbank
117
118 * LS2088ARDB
119 Start up from bank0, and program firmware to bank4 with below commands.
120 Switch to bank4 to start up OpenWrt.
121
122 => tftp a0000000 <firmware_name>-firmware.bin
123 => protect off all
124 => erase 584000000 +$filesize
125 => cp.b a0000000 584000000 $filesize
126 => qix altbank
127
128 * LS1012FRDM/LS1046AFRWY
129 Board has only one bank. Those commands will replace stock bootloader
130 and firmware.
131
132 => tftp a0000000 <firmware_name>-firmware.bin
133 => sf probe 0:0
134 => sf erase 0 +$filesize
135 => sf write a0000000 0 $filesize
136 => reset
137
138 * LS1088ARDB/LX2160ARDB Rev2.0
139 Start up from bank0, and program firmware to bank1 with below commands.
140 Switch to bank1 to start up OpenWrt.
141
142 => tftp a0000000 <firmware_name>-firmware.bin
143 => sf probe 0:1
144 => sf erase 0 +$filesize
145 => sf write a0000000 0 $filesize
146 => qix altbank
147
148 Note: old version u-boot of ls1088ardb may use below commands to switch to
149 bank1 instead of 'qix altbank'.
150 => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
151
152 * LS1021ATWR
153 Start up from bank0, and program firmware to bank4 with below commands.
154 Switch to bank4 to start up OpenWrt.
155
156 => tftp a0000000 <firmware_name>-firmware.bin
157 => protect off all
158 => erase 64000000 +$filesize
159 => cp.b a0000000 64000000 $filesize
160 => boot_bank 1
161
162 3.3 Program LS1012AFRWY
163 -----------------------
164 * LS1012AFRWY (QSPI flash + SD card)
165 LS1012AFRWY only supports 2MB QSPI flash. We have to put u-boot, and
166 some firmwares on QSPI flash, and kernel/dtb/rootfs on SD card.
167 So both firmware.bin and sdcard.img are needed for OpenWrt starting up.
168
169 To program sdcard.img, please use linux command described in 3.1 on a
170 linux machine.
171 To program firmware.bin, start up board from QSPI flash, and program
172 firmware with below commands. Reset to start up OpenWrt. (LS1012AFRWY
173 supports only one bank.)
174
175 => tftp 96000000 <firmware_name>-firmware.bin
176 => sf probe 0:0
177 => sf erase 0 +$filesize
178 => sf write 96000000 0 $filesize
179 => reset
180
181
182 4. Known issues and limitation
183 ------------------------------
184 * U-boot may fail to read MAC addresses from EEPROM on some boards and there
185 won't be MAC addresses set in environment. This may cause kernel fails to
186 probe these network interfaces. The workaround is to set MAC addresses
187 manually, for example,
188
189 => setenv ethaddr 00:04:9F:04:65:4b
190 => setenv eth1addr 00:04:9F:04:65:4c
191 => saveenv
192
193 * In case users want to refer Layerscape SDK doc for network configuration,
194 like TSN (Time-Sensitive Networking) on LS1028A, the OpenWrt LAN/WAN router
195 setting should be removed before that.
196
197 # ubus call network.interface.lan remove
198 # ubus call network.interface.wan remove
199 # ubus call network.interface.wan6 remove
200
201 And firewall may be needed to stop.
202
203 # /etc/init.d/firewall stop
204
205
206 5. Other references
207 -------------------
208 - NXP LSDK source: https://lsdk.github.io/
209
210 - NXP LSDK site: https://www.nxp.com/design/software/embedded-software/linux-software-and-development-tools/layerscape-software-development-kit:LAYERSCAPE-SDK
211
212 - OpenWrt documentation: https://openwrt.org/docs/start