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