layerscape: update build guide in README
[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 LS1012AFRDM LS1043ARDB LS1046ARDB LS1088ARDB LS2088ARDB
8
9 * ARMv8 32-bit
10 LS1012ARDB LS1012AFRDM LS1043ARDB LS1046ARDB
11
12
13 2. Build
14 --------
15 Before configuration and build, update and install package feeds.
16
17 $ ./scripts/feeds update -a
18 $ ./scripts/feeds install -a
19
20 2.1 make menuconfig
21 -------------------
22 * For single device
23
24 Target System: "NXP Layerscape".
25 Subtarget: "ARMv8 64-bit based boards" or "ARMv8 32-bit based boards"
26 Target Profile: (select device you want to build)
27
28 For example, build firmware for 64-bit ls1043ardb.
29 +---------------------------------------------+
30 | Target System (NXP Layerscape) ---> |
31 |---------------------------------------------|
32 | Subtarget (ARMv8 64-bit based boards) ---> |
33 |---------------------------------------------|
34 | Target Profile (ls1043ardb-armv8_64b) ---> |
35 +---------------------------------------------+
36
37 * For multiple devices
38
39 Target System: "NXP Layerscape".
40 Subtarget: "ARMv8 64-bit based boards" or "ARMv8 32-bit based boards"
41 Target Profile: "Multiple devices"
42 Target Devices: (select devices you want to build)
43
44 For example, build firmware for all 64-bit devices.
45 Target Devices --->
46 +-----------------------------------------------------------------+
47 | [*] Enable all profiles by default |
48 |-----------------------------------------------------------------|
49 | [ ] Use a per-device root filesystem that adds profile packages |
50 |-----------------------------------------------------------------|
51 | [*] ls1012afrdm-armv8_64b ---- |
52 |-----------------------------------------------------------------|
53 | [*] ls1012ardb-armv8_64b ---- |
54 |-----------------------------------------------------------------|
55 | [*] ls1043ardb-armv8_64b ---- |
56 |-----------------------------------------------------------------|
57 | [*] ls1046ardb-armv8_64b ---- |
58 |-----------------------------------------------------------------|
59 | [*] ls1088ardb-armv8_64b ---- |
60 |-----------------------------------------------------------------|
61 | [*] ls2088ardb-armv8_64b ---- |
62 +-----------------------------------------------------------------+
63
64 Note: per-device root filesystem hasn't been supported for now.
65
66 2.2 make (or make -j<n>)
67 ------------------------
68
69 2.3 Final firmware
70 ------------------
71 Final firmware would be in bin/targets/layerscape/<subtarget>/, and
72 named as lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin.
73
74
75 3. Program firmware to NOR/QSPI flash
76 -------------------------------------
77 * LS1043ARDB (NOR flash)
78
79 Start up from bank0, and program firmware to bank4 with below commands.
80 Switch to bank4 to start up LEDE.
81
82 => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
83 => protect off all
84 => erase 64000000 +$filesize
85 => cp.b a0000000 64000000 $filesize
86 => cpld reset altbank
87
88 * LS2088ARDB (NOR flash)
89
90 Start up from bank0, and program firmware to bank4 with below commands.
91 Switch to bank4 to start up LEDE.
92
93 => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
94 => protect off all
95 => erase 584000000 +$filesize
96 => cp.b a0000000 584000000 $filesize
97 => qix altbank
98
99 * LS1012ARDB (QSPI flash)
100
101 Start up from bank1, and program firmware to bank2 with below commands.
102 Switch to bank2 to start up LEDE.
103
104 => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
105 => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
106 => sf probe 0:0
107 => sf erase 0 +$filesize
108 => sf write a0000000 0 $filesize
109 => reset
110
111 * LS1012AFRDM (QSPI flash)
112
113 LS1012AFRDM board only has one bank. Start up board, and program firmware
114 with below commands. Reset to start up LEDE.
115
116 => tftp 96000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
117 => sf probe 0:0
118 => sf erase 0 +$filesize
119 => sf write 96000000 0 $filesize
120 => reset
121
122 * LS1046ARDB (QSPI flash)
123
124 Start up from bank1, and program firmware to bank2 with below commands.
125 Switch to bank2 to start up LEDE.
126
127 => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
128 => sf probe 0:1
129 => sf erase 0 +$filesize
130 => sf write a0000000 0 $filesize
131 => cpld reset altbank
132
133 * LS1088ARDB (QSPI flash)
134
135 Start up from bank0, and program firmware to bank1 with below commands.
136 Switch to bank1 to start up LEDE.
137
138 => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
139 => sf probe 0:1
140 => sf erase 0 +$filesize
141 => sf write a0000000 0 $filesize
142 => qix altbank
143
144 Note: old version u-boot of ls1088ardb may use below commands to switch to
145 bank1 instead of 'qix altbank'.
146 => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
147
148
149 4. Other references and sources
150 -------------------------------
151 - NXP LSDK site: https://lsdk.github.io/
152
153 - NXP LSDK github: https://github.com/qoriq-open-source
154
155 - LEDE documentation: https://lede-project.org/docs/start