Projecte

General

Perfil

Compex WPJ342 » Historial » Versió 15

Roger Pueyo Centelles, 24-07-2014 13:55

1 1 Roger Pueyo Centelles
h1. Compex WPJ342
2
3
This document explains several ways to compile compile qMp for a "Compex WPJ342":http://www.compex.com.sg/productdetailinfo.asp?model=WPJ342&acc1Panel=2.
4
5
h2. Standard compilation
6
7 4 Roger Pueyo Centelles
1) Get the OpenWrt Attitude Adjustment 12.09 SDK for the WPJ342 from Compex: http://www.compex.com.sg/openwrtdownload.aspx
8 1 Roger Pueyo Centelles
9 4 Roger Pueyo Centelles
2) Save the OpenWrt SDK file to your working directory and extract it (as of 23rd July 2014, the latest version is sdkowrt-140604.tar.bz2, which comes inside the file b140604.rar):
10 1 Roger Pueyo Centelles
11
<pre>
12 4 Roger Pueyo Centelles
tar -xf sdkowrt-140604.tar.bz2
13 1 Roger Pueyo Centelles
</pre>
14
15
and enter to the newly created directory "sdkowrt-140604".
16
17
3) By default this SDK builds the firmware for the WPJ344 board, not the WPJ342. The Makefile file needs to be slightly changed. Open it with your text editor and find the section "standard_config:":
18
19
<pre>
20
standard_config:
21
	cp $(CONFIG_PATH)/wpj344.config $(OWRT_DIST_LOCAL_PATH)/.config
22
	rm -rf $(OWRT_DIST_LOCAL_PATH)/tmp
23
</pre>
24
25
Replace it with:
26
27
<pre>
28
standard_config:
29
	cp $(CONFIG_PATH)/wpj342.config $(OWRT_DIST_LOCAL_PATH)/.config
30
	rm -rf $(OWRT_DIST_LOCAL_PATH)/tmp
31
</pre>
32
33
4) Run @make@ to compile OpenWrt (without qMp, by now):
34
35
<pre>
36
make
37
</pre>
38
39 3 Roger Pueyo Centelles
This will take a while and will download several megabytes of files to ~/dl-openwrt. If you want extra verbosity, run @make V=99@ to get details of the compilation.
40 2 Roger Pueyo Centelles
41 5 Roger Pueyo Centelles
5) The compilation will fail, since the @hotplug2@ package sources are no longer available at the destination stated in its Makefile. Edit @openwrt/package/hotplug2/Makefile@ with your favourite editor and replace this:
42
43
<pre>
44
PKG_SOURCE_PROTO:=svn
45
PKG_SOURCE_VERSION:=$(PKG_REV)
46
PKG_SOURCE_SUBDIR:=hotplug2-$(PKG_VERSION)
47
PKG_SOURCE_URL:=http://svn.nomi.cz/svn/isteve/hotplug2
48
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
49
#PKG_SOURCE_URL:=http://isteve.bofh.cz/~isteve/hotplug2
50
#PKG_MD5SUM:=ea2c01d027b4002e4e6b0ff266f51a51
51
</pre>
52
53
with this:
54
55
<pre>
56
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
57
PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
58
PKG_MD5SUM:=7bab8ba67555a8400424f3c92ec67579
59
</pre>
60
61
See https://dev.openwrt.org/changeset/41503 for details.
62
63
6) Retry compilation:
64
65
<pre>
66
make
67 6 Roger Pueyo Centelles
</pre>
68 5 Roger Pueyo Centelles
69 7 Roger Pueyo Centelles
7) Compilation should finish successfully, showing this last message and no more errors:
70 5 Roger Pueyo Centelles
71 7 Roger Pueyo Centelles
<pre>
72
make[1]: Leaving directory '/B/qMp/WPJ342/WPJ342_36088/openwrt'
73
</pre>
74
75
8) The binary file openwrt-ar71xx-generic-wpj342-squashfs-factory.img in the @openwrt/bin/ar71xx/@ directory:
76
77
<pre>
78
$ ls openwrt/bin/ar71xx/openwrt-ar71xx-generic-wpj342-squashfs-factory.img 
79
openwrt/bin/ar71xx/openwrt-ar71xx-generic-wpj342-squashfs-factory.img
80
</pre>
81
82
Now OpenWrt is compiled. qMp packages still have to be added to the compilation.
83
84
9) Enter the @openwrt@ directory and edit the file @feeds.conf.default@ and add the following line:
85
86
<pre>
87
src-git qmp git://qmp.cat/qmp.git
88 14 Roger Pueyo Centelles
src-git routing git://github.com/openwrt-routing/packages.git 
89
</pre>
90
91
If you intend to compile qMp 3.0.1 Clearance, add instead these two lines:
92
93
<pre>
94
src-git qmp git://qmp.cat/qmp.git
95 13 Roger Pueyo Centelles
src-svn routing https://github.com/openwrt-routing/packages@670
96 7 Roger Pueyo Centelles
</pre>
97
98
10) Update and install the feeds:
99
<pre>
100
./scripts/feeds update -a
101
./scripts/feeds install -a
102
</pre>
103
104
11) Using @menuconfig@ select the @qmp-small-node@ package:
105
106
<pre>
107
make menuconfig
108
</pre>
109
110
Browse to @qMp@ and select @qmp-small-node@:
111
112
<pre>
113
<*> qmp-small-node................... Required addons for small qMp mesh node
114
</pre>
115
116
12) Exit saving the configuration.
117
118
13) Compile again:
119
120
<pre>
121
make
122
</pre>
123
124 9 Roger Pueyo Centelles
14) After the compilation process, the qMp image for the Compex WPJ342 is located at *openwrt/bin/ar71xx/openwrt-ar71xx-generic-wpj342-squashfs-factory.img*. You can flash it using your preferred method (web interface, TFPT, etc.). If you use TFTP, it seems that the board does not reboot automatically after writing the image to the NAND flash memory, so this must be done manually.
125
126
15) The image comes without a password for the @root@ user. Log in via @telnet@ or using the web interface and set it.
127
128 10 Roger Pueyo Centelles
p=. !{width:500px}Compex_WPJ342-qMp_3.0.1_Clearance.jpg!:http://dev.qmp.cat/attachments/download/157/Compex_WPJ342-qMp_3.0.1_Clearance.jpg
129
qMp 3.0.1 Clearance running on a Compex WPJ342The NC software architecture diagram. Click on the image to see it full-size.
130 9 Roger Pueyo Centelles
131 2 Roger Pueyo Centelles
h2. Compiling with the latest OpenWrt Attitude Adjustment 12.09 revision
132
133
The OpenWrt SDK provided by Compex is based on Attitude Adjustment 12.09 revision 36088, which does not contain several bugfixes and repository changes included in the following ones. It can be a good idea to build OpenWrt from the last revision, still version Attitude Adjustment 12.09.
134
135
1) Follow steps 1 to 3 in the [[Compex_WPJ342#Standard-compilation|Standard Compilation]] section.
136
137
2) Check the latest revision number for OpenWrt. Go to https://dev.openwrt.org/changeset and get the last change/revision number (as of 23rd July 2014 it is *41811*).
138
139
3) Edit the Makefile with your favourite text editor and replace this:
140
141
<pre>
142 1 Roger Pueyo Centelles
OWRT_DIST_SVN_REV = 36088
143 3 Roger Pueyo Centelles
144
...
145
146 2 Roger Pueyo Centelles
OWRT_PKGS_SVN_REV = 36089
147
</pre>
148
149 1 Roger Pueyo Centelles
with the latest revision:
150
151 2 Roger Pueyo Centelles
<pre>
152
OWRT_DIST_SVN_REV = 41811
153 3 Roger Pueyo Centelles
154
...
155
156 2 Roger Pueyo Centelles
OWRT_PKGS_SVN_REV = 41811
157
</pre>
158
159
4) Check the latest revision number for LuCi. Go to http://svn.luci.subsignal.org and get the last revision number (as of 23rd July 2014 it is *10459*).
160
161
5) Edit the Makefile with your favourite text editor and replace this:
162
163
<pre>
164
FEEDS_LUCI_SVN_REV = 9656
165
</pre>
166
167
with the latest revision:
168 1 Roger Pueyo Centelles
169
<pre>
170
FEEDS_LUCI_SVN_REV = 10459
171 4 Roger Pueyo Centelles
</pre>
172 7 Roger Pueyo Centelles
173
6) Edit the file @config/wpj342.config@ with your favourite editor. Replace this:
174
175
<pre>
176
# CONFIG_PACKAGE_libip6tc is not set
177
</pre>
178
179 12 Roger Pueyo Centelles
with this:
180
181 7 Roger Pueyo Centelles
<pre>
182
CONFIG_PACKAGE_libip6tc=y
183
</pre>
184
185 12 Roger Pueyo Centelles
7) Run @make@ to start compilation:
186 7 Roger Pueyo Centelles
187 12 Roger Pueyo Centelles
<pre>
188
make
189
</pre>
190
191
or @make V=99@ for extra verbosity.
192 4 Roger Pueyo Centelles
193 15 Roger Pueyo Centelles
8) Compilation should finish successfully. The binary file openwrt-ar71xx-generic-wpj342-squashfs-factory.img in the @openwrt/bin/ar71xx/@ directory:
194
195
<pre>
196
$ ls openwrt/bin/ar71xx/openwrt-ar71xx-generic-wpj342-squashfs-factory.img 
197
openwrt/bin/ar71xx/openwrt-ar71xx-generic-wpj342-squashfs-factory.img
198
</pre>
199
200
Now OpenWrt is compiled. qMp packages still have to be added to the compilation.
201
202
9) Enter the @openwrt@ directory and edit the file @feeds.conf.default@.
203
204
Remove @;for-12.09.x" from the line @src-git routing git://github.com/openwrt-routing/packages.git;for-12.09.x@ and add the qMp packages feed. From this:
205
206
<pre>
207
src-git routing git://github.com/openwrt-routing/packages.git;for-12.09.x
208
</pre>
209
210
to this:
211
212
<pre>
213
src-git routing git://github.com/openwrt-routing/packages.git
214
src-git qmp git://qmp.cat/qmp.git
215
</pre>
216
217 4 Roger Pueyo Centelles
h2. Compiling from OpenWrt trunk
218
219
1) Get the OpenWrt trunk SDK for the WPJ342 from Compex: http://www.compex.com.sg/openwrtdownload.aspx
220
221
2) Save the OpenWrt SDK file to your working directory and extract it (as of 23rd July 2014, the latest version is sdk-r40719-b140527-ath10k.tar.bz2):
222
223
<pre>
224
tar -xf sdk-r40719-b140527-ath10k.tar.bz2
225
</pre>
226
227
3) Enter the newly created directory @sdk-r40719-b140527-ath10k@.
228
229
4) If you want to compile with the latest trunk revision, check the latest revision number for OpenWrt. Go to https://dev.openwrt.org/changeset and get the last change/revision number (as of 23rd July 2014 it is *41811*). Edit the Makefile and replace this:
230
231
<pre>
232
OWRT_DIST_SVN_REV = 40719
233
</pre>
234
235
with:
236
237
<pre>
238
OWRT_DIST_SVN_REV = 41811
239
</pre>
240
241
5) Run @make@, or @make V=99@ for extra compilation verbosity:
242
243
<pre>
244
make
245 2 Roger Pueyo Centelles
</pre>