kernel: backport improved checksum function for ARM64
[openwrt/openwrt.git] / target / linux / layerscape / README
1
2 Layerscape Quick Start
3
4 1. Layerscape target support
5 ----------------------------
6 * ARMv8 64-bit
7 LS1012ARDB LS1012AFRWY LS1043ARDB LS1046ARDB LS1088ARDB LS2088ARDB
8 (SD card boot support on LS1043ARDB/LS1046ARDB/LS1088ARDB)
9
10 * ARMv7
11 LS1021ATWR LS1021AIOT
12 (SD card boot support on LS1021ATWR/LS1021AIOT)
13
14
15 2. Build
16 --------
17 Before configuration and build, update and install package feeds.
18
19 $ ./scripts/feeds update -a
20 $ ./scripts/feeds install -a
21
22 * make menuconfig
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.)
28
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.
34
35 * make download (or make download -j<n>)
36
37 * make (or make -j<n>)
38
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
43
44
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.
51
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
56 from SD card.
57
58 * u-boot environment
59
60 => tftp a0000000 <image_name>-sdcard.img
61 => mmc write a0000000 0 a0000
62
63 Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB.
64 blk_num = filesize / 512.
65
66 * linux environment
67
68 $ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx
69
70 Note: Need to check the SD card device name to replace "mmcblkx".
71
72 3.2 Program firmware.bin to flash
73 ---------------------------------
74 * LS1012FRDM (QSPI flash)
75 Board have only one nor flash bank. Those commands will replace stock
76 bootloader and firmware. Please refer point 4 for MAC recovery.
77
78 => tftp a0000000 <firmware_name>-firmware.bin
79 => sf probe 0:0
80 => sf erase 0 +$filesize
81 => sf write a0000000 0 $filesize
82 => reset
83
84 * LS1012ARDB (QSPI flash)
85 Start up from bank1, and program firmware to bank2 with below commands.
86 Switch to bank2 to start up OpenWrt.
87
88 => tftp a0000000 <firmware_name>-firmware.bin
89 => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
90 => sf probe 0:0
91 => sf erase 0 +$filesize
92 => sf write a0000000 0 $filesize
93 => reset
94
95 * LS1043ARDB (NOR flash)
96 Start up from bank0, and program firmware to bank4 with below commands.
97 Switch to bank4 to start up OpenWrt.
98
99 => tftp a0000000 <firmware_name>-firmware.bin
100 => protect off all
101 => erase 64000000 +$filesize
102 => cp.b a0000000 64000000 $filesize
103 => cpld reset altbank
104
105 * LS1046ARDB (QSPI flash)
106 Start up from bank1, and program firmware to bank2 with below commands.
107 Switch to bank2 to start up OpenWrt.
108
109 => tftp a0000000 <firmware_name>-firmware.bin
110 => sf probe 0:1
111 => sf erase 0 +$filesize
112 => sf write a0000000 0 $filesize
113 => cpld reset altbank
114
115 * LS1088ARDB (QSPI flash)
116 Start up from bank0, and program firmware to bank1 with below commands.
117 Switch to bank1 to start up OpenWrt.
118
119 => tftp a0000000 <firmware_name>-firmware.bin
120 => sf probe 0:1
121 => sf erase 0 +$filesize
122 => sf write a0000000 0 $filesize
123 => qix altbank
124
125 Note: old version u-boot of ls1088ardb may use below commands to switch to
126 bank1 instead of 'qix altbank'.
127 => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
128
129 * LS2088ARDB (NOR flash)
130 Start up from bank0, and program firmware to bank4 with below commands.
131 Switch to bank4 to start up OpenWrt.
132
133 => tftp a0000000 <firmware_name>-firmware.bin
134 => protect off all
135 => erase 584000000 +$filesize
136 => cp.b a0000000 584000000 $filesize
137 => qix altbank
138
139 3.3 Program LS1012AFRWY
140 -----------------------
141 * LS1012AFRWY (QSPI flash + SD card)
142 LS1012AFRWY only supports 2MB QSPI flash. We have to put u-boot, and
143 some firmwares on QSPI flash, and kernel/dtb/rootfs on SD card.
144 So both firmware.bin and sdcard.img are needed for OpenWrt starting up.
145
146 To program sdcard.img, please use linux command described in 3.1 on a
147 linux machine.
148 To program firmware.bin, start up board from QSPI flash, and program
149 firmware with below commands. Reset to start up OpenWrt. (LS1012AFRWY
150 supports only one bank.)
151
152 => tftp 96000000 <firmware_name>-firmware.bin
153 => sf probe 0:0
154 => sf erase 0 +$filesize
155 => sf write 96000000 0 $filesize
156 => reset
157
158
159 4. Known issues and limitation
160 ------------------------------
161 * u-boot may fail to read MAC addresses from EEPROM on some boards and there
162 won't be MAC addresses set in environment. This may cause kernel fails to
163 probe these network interfaces. The workaround is to set MAC addresses
164 manually, for example,
165
166 => setenv ethaddr 00:04:9F:04:65:4b
167 => setenv eth1addr 00:04:9F:04:65:4c
168 => saveenv
169
170
171 5. Other references
172 -------------------
173 - NXP LSDK site: https://lsdk.github.io/
174 - OpenWrt documentation: https://openwrt.org/docs/start