OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 2... Line 2...
2 Layerscape Quick Start 2 Layerscape Quick Start
Line 3... Line 3...
3   3  
4 1. Layerscape target support 4 1. Layerscape target support
5 ---------------------------- 5 ----------------------------
6 * ARMv8 64-bit 6 * ARMv8 64-bit
7 LS1012ARDB LS1012AFRWY LS1043ARDB LS1046ARDB LS1088ARDB LS2088ARDB -  
Line 8... Line 7...
8 (SD card boot support on LS1043ARDB/LS1046ARDB/LS1088ARDB) 7 LS1012ARDB LS1012AFRDM LS1043ARDB LS1046ARDB LS1088ARDB LS2088ARDB
9   8  
10 * ARMv8 32-bit -  
11 LS1012ARDB LS1012AFRWY LS1043ARDB LS1046ARDB -  
12   -  
13 * ARMv7 -  
Line 14... Line 9...
14 LS1021ATWR LS1021AIOT 9 * ARMv8 32-bit
15 (SD card boot support on LS1021ATWR/LS1021AIOT) 10 LS1012ARDB LS1012AFRDM LS1043ARDB LS1046ARDB
16   11  
Line 17... Line 12...
17   12  
18 2. Build 13 2. Build
Line 19... Line 14...
19 -------- 14 --------
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 15 Before configuration and build, update and install package feeds.
35 other target, please remove .config and make menuconfig to select again. -  
36 Otherwise the packages selected in .config would be a mess. 16  
37   -  
38 * make download (or make download -j<n>) -  
39   -  
40 * make (or make -j<n>) -  
Line 41... Line 17...
41   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  
42 * Final firmware/image 28 For example, build firmware for 64-bit ls1043ardb.
-   29 +---------------------------------------------+
-   30 | Target System (NXP Layerscape) ---> |
-   31 |---------------------------------------------|
-   32 | Subtarget (ARMv8 64-bit based boards) ---> |
43 Path: bin/targets/layerscape/<subtarget>/ 33 |---------------------------------------------|
-   34 | Target Profile (ls1043ardb-armv8_64b) ---> |
44 Firmware for flash: openwrt-layerscape-<subtarget>-<device>-<rootfs>-firmware.bin 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 |-----------------------------------------------------------------|
45 Image for SD card: openwrt-layerscape-<subtarget>-<device>-<rootfs>-sdcard.img 57 | [*] ls1046ardb-armv8_64b ---> |
-   58 |-----------------------------------------------------------------|
46   59 | [*] ls1088ardb-armv8_64b ---> |
-   60 |-----------------------------------------------------------------|
-   61 | [*] ls2088ardb-armv8_64b ---> |
-   62 +-----------------------------------------------------------------+
-   63  
-   64 Note: The first time make menuconfig would create a .config file which
-   65 would include all dependencies for selected target. After that, make
-   66 menuconfig still could be used to modify packages. If want to change
-   67 other target, please remove .config and make menuconfig to select again.
-   68 Otherwise the packages selected in .config would be a mess.
-   69  
Line 47... Line -...
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.) -  
Line -... Line 70...
-   70 2.2 make (or make -j<n>)
-   71 ------------------------
52 If you want to install all things into flash, please use firmware.bin. 72  
Line 53... Line 73...
53 If you want to install all things into SD card, please use sdcard.img. 73 2.3 Final firmware
54   74 ------------------
Line 55... Line 75...
55 3.1 Program sdcard.img to SD card 75 Final firmware would be in bin/targets/layerscape/<subtarget>/, and
-   76 named as openwrt-layerscape-<subtarget>-<device>-<rootfs>-firmware.bin.
-   77  
-   78  
56 --------------------------------- 79 3. Program firmware to NOR/QSPI flash
Line 57... Line 80...
57 sdcard.img could be programmed to SD card in either u-boot environment 80 -------------------------------------
Line -... Line 81...
-   81 * LS1043ARDB (NOR flash)
58 or linux environment. After programming, configure the board to boot 82  
Line 59... Line 83...
59 from SD card. 83 Start up from bank0, and program firmware to bank4 with below commands.
-   84 Switch to bank4 to start up OpenWrt.
-   85  
-   86 => tftp a0000000 <firmware_name>.bin
-   87 => protect off all
Line 60... Line -...
60   -  
61 * u-boot environment -  
62   88 => erase 64000000 +$filesize
-   89 => cp.b a0000000 64000000 $filesize
63 => tftp a0000000 <image_name>-sdcard.img 90 => cpld reset altbank
64 => mmc write a0000000 0 a0000 91  
Line 65... Line 92...
65   92 * LS2088ARDB (NOR flash)
66 Note: The default sdcard.img size is 320MB. a0000 is the block number for 320MB. 93  
67 blk_num = filesize / 512. 94 Start up from bank0, and program firmware to bank4 with below commands.
68   95 Switch to bank4 to start up OpenWrt.
69 * linux environment 96  
70   97 => tftp a0000000 <firmware_name>.bin
Line 71... Line 98...
71 $ dd if=./<image_name>-sdcard.img of=/dev/mmcblkx 98 => protect off all
72   -  
73 Note: Need to check the SD card device name to replace "mmcblkx". -  
Line -... Line 99...
-   99 => erase 584000000 +$filesize
-   100 => cp.b a0000000 584000000 $filesize
-   101 => qix altbank
74   102  
75 3.2 Program firmware.bin to flash 103 * LS1012ARDB (QSPI flash)
76 --------------------------------- 104  
77 * LS1012ARDB (QSPI flash) 105 Start up from bank1, and program firmware to bank2 with below commands.
78 Start up from bank1, and program firmware to bank2 with below commands. 106 Switch to bank2 to start up OpenWrt.
Line 79... Line 107...
79 Switch to bank2 to start up OpenWrt. 107  
-   108 => tftp a0000000 <firmware_name>.bin
80   109 => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5
81 => tftp a0000000 <firmware_name>-firmware.bin 110 => sf probe 0:0
Line 82... Line 111...
82 => i2c mw 0x24 0x7 0xfc;i2c mw 0x24 0x3 0xf5 111 => sf erase 0 +$filesize
83 => sf probe 0:0 112 => sf write a0000000 0 $filesize
84 => sf erase 0 +$filesize 113 => reset
85 => sf write a0000000 0 $filesize 114  
86 => reset 115 * LS1012AFRDM (QSPI flash)
Line 87... Line 116...
87   116  
-   117 LS1012AFRDM board only has one bank. Start up board, and program firmware
88 * LS1043ARDB (NOR flash) 118 with below commands. Reset to start up OpenWrt.
89 Start up from bank0, and program firmware to bank4 with below commands. 119  
Line 90... Line 120...
90 Switch to bank4 to start up OpenWrt. 120 => tftp 96000000 <firmware_name>.bin
91   121 => sf probe 0:0
92 => tftp a0000000 <firmware_name>-firmware.bin 122 => sf erase 0 +$filesize
93 => protect off all 123 => sf write 96000000 0 $filesize
94 => erase 64000000 +$filesize 124 => reset
Line 95... Line 125...
95 => cp.b a0000000 64000000 $filesize 125  
96 => cpld reset altbank 126 * LS1046ARDB (QSPI flash)
97   127  
Line 98... Line -...
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 -  
Line 127... Line 128...
127 => protect off all 128 Start up from bank1, and program firmware to bank2 with below commands.
128 => erase 584000000 +$filesize 129 Switch to bank2 to start up OpenWrt.
129 => cp.b a0000000 584000000 $filesize 130  
130 => qix altbank 131 => tftp a0000000 <firmware_name>.bin
Line 158... Line 159...
158   159  
159 => setenv ethaddr 00:04:9F:04:65:4b 160 => setenv ethaddr 00:04:9F:04:65:4b
Line 160... Line 161...
160 => setenv eth1addr 00:04:9F:04:65:4c 161 => setenv eth1addr 00:04:9F:04:65:4c
161   162  
162   163  
-   164 5. Other references and sources
-   165 -------------------------------
-   166 - NXP LSDK site: https://lsdk.github.io/
163 5. Other references 167