layerscape: define only one package for ls-rcw
[openwrt/staging/wigyori.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 * LS1012ARDB (QSPI flash)
75 Start up from bank1, and program firmware to bank2 with below commands.
76 Switch to bank2 to start up OpenWrt.
77
78 => tftp a0000000 <firmware_name>-firmware.bin
79 => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
80 => sf probe 0:0
81 => sf erase 0 +$filesize
82 => sf write a0000000 0 $filesize
83 => reset
84
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.
88
89 => tftp a0000000 <firmware_name>-firmware.bin
90 => protect off all
91 => erase 64000000 +$filesize
92 => cp.b a0000000 64000000 $filesize
93 => cpld reset altbank
94
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.
98
99 => tftp a0000000 <firmware_name>-firmware.bin
100 => sf probe 0:1
101 => sf erase 0 +$filesize
102 => sf write a0000000 0 $filesize
103 => cpld reset altbank
104
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.
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 => qix altbank
114
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
118
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.
122
123 => tftp a0000000 <firmware_name>-firmware.bin
124 => protect off all
125 => erase 584000000 +$filesize
126 => cp.b a0000000 584000000 $filesize
127 => qix altbank
128
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.
135
136 To program sdcard.img, please use linux command described in 3.1 on a
137 linux machine.
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.)
141
142 => tftp 96000000 <firmware_name>-firmware.bin
143 => sf probe 0:0
144 => sf erase 0 +$filesize
145 => sf write 96000000 0 $filesize
146 => reset
147
148
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,
155
156 => setenv ethaddr 00:04:9F:04:65:4b
157 => setenv eth1addr 00:04:9F:04:65:4c
158
159
160 5. Other references
161 -------------------
162 - NXP LSDK site: https://lsdk.github.io/
163 - OpenWrt documentation: https://openwrt.org/docs/start