OpenWrt – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 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 * ARMv8 32-bit
11 LS1012ARDB LS1012AFRWY LS1043ARDB LS1046ARDB
12  
13 * ARMv7
14 LS1021ATWR LS1021AIOT
15 (SD card boot support on LS1021ATWR/LS1021AIOT)
16  
17  
18 2. Build
19 --------
20 Before configuration and build, update and install package feeds.
21  
22 $ ./scripts/feeds update -a
23 $ ./scripts/feeds install -a
24  
25 * make menuconfig
26 Target System: "NXP Layerscape"
27 Subtarget: (Select subtarget)
28 Target Profile: (Select device, or "Multiple devices")
29 Target Devices: (Select devices. Available when Target Profile is "Multiple devices")
30 Target Images: (Disable "GZip images" if don't want to unzip manually to use the images.)
31  
32 Note: The first time make menuconfig would create a .config file which
33 would include all dependencies for selected target. After that, make
34 menuconfig still could be used to modify packages. If want to change
35 other target, please remove .config and make menuconfig to select again.
36 Otherwise the packages selected in .config would be a mess.
37  
38 * make download (or make download -j<n>)
39  
40 * make (or make -j<n>)
41  
42 * Final firmware/image
43 Path: bin/targets/layerscape/<subtarget>/
44 Firmware for flash: openwrt-layerscape-<subtarget>-<device>-<rootfs>-firmware.bin
45 Image for SD card: openwrt-layerscape-<subtarget>-<device>-<rootfs>-sdcard.img
46  
47  
48 3. Program NOR/QSPI flash or SD card
49 ------------------------------------
50 The firmware.bin or sdcard.img is an all-in-one image including all things for
51 OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.)
52 If you want to install all things into flash, please use firmware.bin.
53 If you want to install all things into SD card, please use sdcard.img.
54  
55 3.1 Program sdcard.img to SD card
56 ---------------------------------
57 sdcard.img could be programmed to SD card in either u-boot environment
58 or linux environment. After programming, configure the board to boot
59 from SD card.
60  
61 * u-boot environment
62  
63 => tftp a0000000 <image_name>-sdcard.img
64 => mmc write a0000000 0 a0000
65  
66 Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB.
67 blk_num = filesize / 512.
68  
69 * linux environment
70  
71 $ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx
72  
73 Note: Need to check the SD card device name to replace "mmcblkx".
74  
75 3.2 Program firmware.bin to flash
76 ---------------------------------
77 * LS1012ARDB (QSPI flash)
78 Start up from bank1, and program firmware to bank2 with below commands.
79 Switch to bank2 to start up OpenWrt.
80  
81 => tftp a0000000 <firmware_name>-firmware.bin
82 => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
83 => sf probe 0:0
84 => sf erase 0 +$filesize
85 => sf write a0000000 0 $filesize
86 => reset
87  
88 * LS1043ARDB (NOR flash)
89 Start up from bank0, and program firmware to bank4 with below commands.
90 Switch to bank4 to start up OpenWrt.
91  
92 => tftp a0000000 <firmware_name>-firmware.bin
93 => protect off all
94 => erase 64000000 +$filesize
95 => cp.b a0000000 64000000 $filesize
96 => cpld reset altbank
97  
98 * LS1046ARDB (QSPI flash)
99 Start up from bank1, and program firmware to bank2 with below commands.
100 Switch to bank2 to start up OpenWrt.
101  
102 => tftp a0000000 <firmware_name>-firmware.bin
103 => sf probe 0:1
104 => sf erase 0 +$filesize
105 => sf write a0000000 0 $filesize
106 => cpld reset altbank
107  
108 * LS1088ARDB (QSPI flash)
109 Start up from bank0, and program firmware to bank1 with below commands.
110 Switch to bank1 to start up OpenWrt.
111  
112 => tftp a0000000 <firmware_name>-firmware.bin
113 => sf probe 0:1
114 => sf erase 0 +$filesize
115 => sf write a0000000 0 $filesize
116 => qix altbank
117  
118 Note: old version u-boot of ls1088ardb may use below commands to switch to
119 bank1 instead of 'qix altbank'.
120 => i2c mw 66 50 20;i2c mw 66 10 20;i2c mw 66 10 21
121  
122 * LS2088ARDB (NOR flash)
123 Start up from bank0, and program firmware to bank4 with below commands.
124 Switch to bank4 to start up OpenWrt.
125  
126 => tftp a0000000 <firmware_name>-firmware.bin
127 => protect off all
128 => erase 584000000 +$filesize
129 => cp.b a0000000 584000000 $filesize
130 => qix altbank
131  
132 3.3 Program LS1012AFRWY
133 -----------------------
134 * LS1012AFRWY (QSPI flash + SD card)
135 LS1012AFRWY only supports 2MB QSPI flash. We have to put u-boot, and
136 some firmwares on QSPI flash, and kernel/dtb/rootfs on SD card.
137 So both firmware.bin and sdcard.img are needed for OpenWrt starting up.
138  
139 To program sdcard.img, please use linux command described in 3.1 on a
140 linux machine.
141 To program firmware.bin, start up board from QSPI flash, and program
142 firmware with below commands. Reset to start up OpenWrt. (LS1012AFRWY
143 supports only one bank.)
144  
145 => tftp 96000000 <firmware_name>-firmware.bin
146 => sf probe 0:0
147 => sf erase 0 +$filesize
148 => sf write 96000000 0 $filesize
149 => reset
150  
151  
152 4. Known issues and limitation
153 ------------------------------
154 * u-boot may fail to read MAC addresses from EEPROM on some boards and there
155 won't be MAC addresses set in environment. This may cause kernel fails to
156 probe these network interfaces. The workaround is to set MAC addresses
157 manually, for example,
158  
159 => setenv ethaddr 00:04:9F:04:65:4b
160 => setenv eth1addr 00:04:9F:04:65:4c
161  
162  
163 5. Other references
164 -------------------
165 - NXP LSDK site: https://lsdk.github.io/
166 - OpenWrt documentation: https://openwrt.org/docs/start