summaryrefslogtreecommitdiff
path: root/target/linux/layerscape/README
blob: eaeee32e8c0a6280420aac7b2e6d9a13b3dc7477 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Layerscape Quick Start

1. Layerscape target support
----------------------------
* ARMv8 64-bit
  LS1012ARDB LS1012AFRDM LS1043ARDB LS1046ARDB LS1088ARDB LS2088ARDB

* ARMv8 32-bit
  LS1012ARDB LS1012AFRDM LS1043ARDB LS1046ARDB


2. Build
--------

2.1 make menuconfig
-------------------
* For single device

  Target System:   "NXP Layerscape".
  Subtarget:       "ARMv8 64-bit based boards" or "ARMv8 32-bit based boards"
  Target Profile:  (select device you want to build)

  For example, build firmware for 64-bit ls1043ardb.
  +---------------------------------------------+
  | Target System (NXP Layerscape)  --->        |
  |---------------------------------------------|
  | Subtarget (ARMv8 64-bit based boards)  ---> |
  |---------------------------------------------|
  | Target Profile (ls1043ardb-armv8_64b)  ---> |
  +---------------------------------------------+

* For multiple devices

  Target System:   "NXP Layerscape".
  Subtarget:       "ARMv8 64-bit based boards" or "ARMv8 32-bit based boards"
  Target Profile:  "Multiple devices"
  Target Devices:  (select devices you want to build)

  For example, build firmware for all 64-bit devices.
  Target Devices  --->
  +-----------------------------------------------------------------+
  | [*] Enable all profiles by default                              |
  |-----------------------------------------------------------------|
  | [ ] Use a per-device root filesystem that adds profile packages |
  |-----------------------------------------------------------------|
  | [*] ls1012afrdm-armv8_64b  ----                                 |
  |-----------------------------------------------------------------|
  | [*] ls1012ardb-armv8_64b  ----                                  |
  |-----------------------------------------------------------------|
  | [*] ls1043ardb-armv8_64b  ----                                  |
  |-----------------------------------------------------------------|
  | [*] ls1046ardb-armv8_64b  ----                                  |
  |-----------------------------------------------------------------|
  | [*] ls1088ardb-armv8_64b  ----                                  |
  |-----------------------------------------------------------------|
  | [*] ls2088ardb-armv8_64b  ----                                  |
  +-----------------------------------------------------------------+

  Note: per-device root filesystem hasn't been supported for now.

2.2 make (or make -j<n>)
------------------------

2.3 Final firmware
------------------
Final firmware would be in bin/targets/layerscape/<subtarget>/, and
named as lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin.


3. Program firmware to NOR/QSPI flash
-------------------------------------
* LS1043ARDB (NOR flash)

  Start up from bank0, and program firmware to bank4 with below commands.
  Switch to bank4 to start up LEDE.

  => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
  => protect off all
  => erase 64000000 +$filesize
  => cp.b a0000000 64000000 $filesize
  => cpld reset altbank

* LS2088ARDB (NOR flash)

  Start up from bank0, and program firmware to bank4 with below commands.
  Switch to bank4 to start up LEDE.

  => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
  => protect off all
  => erase 584000000 +$filesize
  => cp.b a0000000 584000000 $filesize
  => qix altbank

* LS1012ARDB (QSPI flash)

  Start up from bank1, and program firmware to bank2 with below commands.
  Switch to bank2 to start up LEDE.

  => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
  => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
  => sf probe 0:0
  => sf erase 0 +$filesize
  => sf write a0000000 0 $filesize
  => reset

* LS1012AFRDM (QSPI flash)

  LS1012AFRDM board only has one bank. Start up board, and program firmware
  with below commands. Reset to start up LEDE.

  => tftp 96000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
  => sf probe 0:0
  => sf erase 0 +$filesize
  => sf write 96000000 0 $filesize
  => reset

* LS1046ARDB (QSPI flash)

  Start up from bank1, and program firmware to bank2 with below commands.
  Switch to bank2 to start up LEDE.

  => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
  => sf probe 0:1
  => sf erase 0 +$filesize
  => sf write a0000000 0 $filesize
  => cpld reset altbank

* LS1088ARDB (QSPI flash)

  Start up from bank0, and program firmware to bank1 with below commands.
  Switch to bank1 to start up LEDE.

  => tftp a0000000 lede-layerscape-<subtarget>-<device>-squashfs-firmware.bin
  => sf probe 0:1
  => sf erase 0 +$filesize
  => sf write a0000000 0 $filesize
  => qix altbank

  Note: old version u-boot of ls1088ardb may use below commands to switch to
  bank1 instead of 'qix altbank'.
  => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21


4. Other references and sources
-------------------------------
- NXP LSDK site: https://lsdk.github.io/

- NXP LSDK github: https://github.com/qoriq-open-source

- LEDE documentation: https://lede-project.org/docs/start