Project

General

Profile

Compex WPJ342 » History » Version 13

Roger Pueyo Centelles, 07/24/2014 12:58 PM

1 1 Roger Pueyo Centelles
h1. Compex WPJ342
2 1 Roger Pueyo Centelles
3 1 Roger Pueyo Centelles
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 1 Roger Pueyo Centelles
5 1 Roger Pueyo Centelles
h2. Standard compilation
6 1 Roger Pueyo Centelles
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 1 Roger Pueyo Centelles
<pre>
12 4 Roger Pueyo Centelles
tar -xf sdkowrt-140604.tar.bz2
13 1 Roger Pueyo Centelles
</pre>
14 1 Roger Pueyo Centelles
15 1 Roger Pueyo Centelles
and enter to the newly created directory "sdkowrt-140604".
16 1 Roger Pueyo Centelles
17 1 Roger Pueyo Centelles
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 1 Roger Pueyo Centelles
19 1 Roger Pueyo Centelles
<pre>
20 1 Roger Pueyo Centelles
standard_config:
21 1 Roger Pueyo Centelles
	cp $(CONFIG_PATH)/wpj344.config $(OWRT_DIST_LOCAL_PATH)/.config
22 1 Roger Pueyo Centelles
	rm -rf $(OWRT_DIST_LOCAL_PATH)/tmp
23 1 Roger Pueyo Centelles
</pre>
24 1 Roger Pueyo Centelles
25 1 Roger Pueyo Centelles
Replace it with:
26 1 Roger Pueyo Centelles
27 1 Roger Pueyo Centelles
<pre>
28 1 Roger Pueyo Centelles
standard_config:
29 1 Roger Pueyo Centelles
	cp $(CONFIG_PATH)/wpj342.config $(OWRT_DIST_LOCAL_PATH)/.config
30 1 Roger Pueyo Centelles
	rm -rf $(OWRT_DIST_LOCAL_PATH)/tmp
31 1 Roger Pueyo Centelles
</pre>
32 1 Roger Pueyo Centelles
33 1 Roger Pueyo Centelles
4) Run @make@ to compile OpenWrt (without qMp, by now):
34 1 Roger Pueyo Centelles
35 1 Roger Pueyo Centelles
<pre>
36 1 Roger Pueyo Centelles
make
37 1 Roger Pueyo Centelles
</pre>
38 1 Roger Pueyo Centelles
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 5 Roger Pueyo Centelles
43 5 Roger Pueyo Centelles
<pre>
44 5 Roger Pueyo Centelles
PKG_SOURCE_PROTO:=svn
45 5 Roger Pueyo Centelles
PKG_SOURCE_VERSION:=$(PKG_REV)
46 5 Roger Pueyo Centelles
PKG_SOURCE_SUBDIR:=hotplug2-$(PKG_VERSION)
47 5 Roger Pueyo Centelles
PKG_SOURCE_URL:=http://svn.nomi.cz/svn/isteve/hotplug2
48 5 Roger Pueyo Centelles
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
49 5 Roger Pueyo Centelles
#PKG_SOURCE_URL:=http://isteve.bofh.cz/~isteve/hotplug2
50 5 Roger Pueyo Centelles
#PKG_MD5SUM:=ea2c01d027b4002e4e6b0ff266f51a51
51 5 Roger Pueyo Centelles
</pre>
52 5 Roger Pueyo Centelles
53 5 Roger Pueyo Centelles
with this:
54 5 Roger Pueyo Centelles
55 5 Roger Pueyo Centelles
<pre>
56 5 Roger Pueyo Centelles
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
57 5 Roger Pueyo Centelles
PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
58 5 Roger Pueyo Centelles
PKG_MD5SUM:=7bab8ba67555a8400424f3c92ec67579
59 5 Roger Pueyo Centelles
</pre>
60 5 Roger Pueyo Centelles
61 5 Roger Pueyo Centelles
See https://dev.openwrt.org/changeset/41503 for details.
62 5 Roger Pueyo Centelles
63 5 Roger Pueyo Centelles
6) Retry compilation:
64 5 Roger Pueyo Centelles
65 5 Roger Pueyo Centelles
<pre>
66 5 Roger Pueyo Centelles
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 7 Roger Pueyo Centelles
make[1]: Leaving directory '/B/qMp/WPJ342/WPJ342_36088/openwrt'
73 7 Roger Pueyo Centelles
</pre>
74 7 Roger Pueyo Centelles
75 7 Roger Pueyo Centelles
8) The binary file openwrt-ar71xx-generic-wpj342-squashfs-factory.img in the @openwrt/bin/ar71xx/@ directory:
76 7 Roger Pueyo Centelles
77 7 Roger Pueyo Centelles
<pre>
78 7 Roger Pueyo Centelles
$ ls openwrt/bin/ar71xx/openwrt-ar71xx-generic-wpj342-squashfs-factory.img 
79 7 Roger Pueyo Centelles
openwrt/bin/ar71xx/openwrt-ar71xx-generic-wpj342-squashfs-factory.img
80 7 Roger Pueyo Centelles
</pre>
81 7 Roger Pueyo Centelles
82 7 Roger Pueyo Centelles
Now OpenWrt is compiled. qMp packages still have to be added to the compilation.
83 7 Roger Pueyo Centelles
84 7 Roger Pueyo Centelles
9) Enter the @openwrt@ directory and edit the file @feeds.conf.default@ and add the following line:
85 7 Roger Pueyo Centelles
86 7 Roger Pueyo Centelles
<pre>
87 7 Roger Pueyo Centelles
src-git qmp git://qmp.cat/qmp.git
88 13 Roger Pueyo Centelles
src-svn routing https://github.com/openwrt-routing/packages@670
89 7 Roger Pueyo Centelles
</pre>
90 7 Roger Pueyo Centelles
91 7 Roger Pueyo Centelles
10) Update and install the feeds:
92 7 Roger Pueyo Centelles
<pre>
93 7 Roger Pueyo Centelles
./scripts/feeds update -a
94 7 Roger Pueyo Centelles
./scripts/feeds install -a
95 7 Roger Pueyo Centelles
</pre>
96 7 Roger Pueyo Centelles
97 7 Roger Pueyo Centelles
11) Using @menuconfig@ select the @qmp-small-node@ package:
98 7 Roger Pueyo Centelles
99 7 Roger Pueyo Centelles
<pre>
100 7 Roger Pueyo Centelles
make menuconfig
101 7 Roger Pueyo Centelles
</pre>
102 7 Roger Pueyo Centelles
103 7 Roger Pueyo Centelles
Browse to @qMp@ and select @qmp-small-node@:
104 7 Roger Pueyo Centelles
105 7 Roger Pueyo Centelles
<pre>
106 7 Roger Pueyo Centelles
<*> qmp-small-node................... Required addons for small qMp mesh node
107 7 Roger Pueyo Centelles
</pre>
108 7 Roger Pueyo Centelles
109 7 Roger Pueyo Centelles
12) Exit saving the configuration.
110 7 Roger Pueyo Centelles
111 7 Roger Pueyo Centelles
13) Compile again:
112 7 Roger Pueyo Centelles
113 7 Roger Pueyo Centelles
<pre>
114 7 Roger Pueyo Centelles
make
115 7 Roger Pueyo Centelles
</pre>
116 7 Roger Pueyo Centelles
117 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.
118 9 Roger Pueyo Centelles
119 9 Roger Pueyo Centelles
15) The image comes without a password for the @root@ user. Log in via @telnet@ or using the web interface and set it.
120 9 Roger Pueyo Centelles
121 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
122 10 Roger Pueyo Centelles
qMp 3.0.1 Clearance running on a Compex WPJ342The NC software architecture diagram. Click on the image to see it full-size.
123 9 Roger Pueyo Centelles
124 2 Roger Pueyo Centelles
h2. Compiling with the latest OpenWrt Attitude Adjustment 12.09 revision
125 2 Roger Pueyo Centelles
126 2 Roger Pueyo Centelles
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.
127 2 Roger Pueyo Centelles
128 2 Roger Pueyo Centelles
1) Follow steps 1 to 3 in the [[Compex_WPJ342#Standard-compilation|Standard Compilation]] section.
129 2 Roger Pueyo Centelles
130 2 Roger Pueyo Centelles
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*).
131 2 Roger Pueyo Centelles
132 2 Roger Pueyo Centelles
3) Edit the Makefile with your favourite text editor and replace this:
133 2 Roger Pueyo Centelles
134 2 Roger Pueyo Centelles
<pre>
135 1 Roger Pueyo Centelles
OWRT_DIST_SVN_REV = 36088
136 3 Roger Pueyo Centelles
137 3 Roger Pueyo Centelles
...
138 3 Roger Pueyo Centelles
139 2 Roger Pueyo Centelles
OWRT_PKGS_SVN_REV = 36089
140 2 Roger Pueyo Centelles
</pre>
141 2 Roger Pueyo Centelles
142 1 Roger Pueyo Centelles
with the latest revision:
143 1 Roger Pueyo Centelles
144 2 Roger Pueyo Centelles
<pre>
145 2 Roger Pueyo Centelles
OWRT_DIST_SVN_REV = 41811
146 3 Roger Pueyo Centelles
147 3 Roger Pueyo Centelles
...
148 3 Roger Pueyo Centelles
149 2 Roger Pueyo Centelles
OWRT_PKGS_SVN_REV = 41811
150 2 Roger Pueyo Centelles
</pre>
151 2 Roger Pueyo Centelles
152 2 Roger Pueyo Centelles
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*).
153 2 Roger Pueyo Centelles
154 2 Roger Pueyo Centelles
5) Edit the Makefile with your favourite text editor and replace this:
155 2 Roger Pueyo Centelles
156 2 Roger Pueyo Centelles
<pre>
157 2 Roger Pueyo Centelles
FEEDS_LUCI_SVN_REV = 9656
158 2 Roger Pueyo Centelles
</pre>
159 2 Roger Pueyo Centelles
160 2 Roger Pueyo Centelles
with the latest revision:
161 1 Roger Pueyo Centelles
162 1 Roger Pueyo Centelles
<pre>
163 1 Roger Pueyo Centelles
FEEDS_LUCI_SVN_REV = 10459
164 4 Roger Pueyo Centelles
</pre>
165 7 Roger Pueyo Centelles
166 7 Roger Pueyo Centelles
6) Edit the file @config/wpj342.config@ with your favourite editor. Replace this:
167 7 Roger Pueyo Centelles
168 7 Roger Pueyo Centelles
<pre>
169 7 Roger Pueyo Centelles
# CONFIG_PACKAGE_libip6tc is not set
170 7 Roger Pueyo Centelles
</pre>
171 7 Roger Pueyo Centelles
172 12 Roger Pueyo Centelles
with this:
173 12 Roger Pueyo Centelles
174 7 Roger Pueyo Centelles
<pre>
175 7 Roger Pueyo Centelles
CONFIG_PACKAGE_libip6tc=y
176 7 Roger Pueyo Centelles
</pre>
177 7 Roger Pueyo Centelles
178 12 Roger Pueyo Centelles
7) Run @make@ to start compilation:
179 7 Roger Pueyo Centelles
180 12 Roger Pueyo Centelles
<pre>
181 12 Roger Pueyo Centelles
make
182 12 Roger Pueyo Centelles
</pre>
183 12 Roger Pueyo Centelles
184 12 Roger Pueyo Centelles
or @make V=99@ for extra verbosity.
185 4 Roger Pueyo Centelles
186 4 Roger Pueyo Centelles
h2. Compiling from OpenWrt trunk
187 4 Roger Pueyo Centelles
188 4 Roger Pueyo Centelles
1) Get the OpenWrt trunk SDK for the WPJ342 from Compex: http://www.compex.com.sg/openwrtdownload.aspx
189 4 Roger Pueyo Centelles
190 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 sdk-r40719-b140527-ath10k.tar.bz2):
191 4 Roger Pueyo Centelles
192 4 Roger Pueyo Centelles
<pre>
193 4 Roger Pueyo Centelles
tar -xf sdk-r40719-b140527-ath10k.tar.bz2
194 4 Roger Pueyo Centelles
</pre>
195 4 Roger Pueyo Centelles
196 4 Roger Pueyo Centelles
3) Enter the newly created directory @sdk-r40719-b140527-ath10k@.
197 4 Roger Pueyo Centelles
198 4 Roger Pueyo Centelles
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:
199 4 Roger Pueyo Centelles
200 4 Roger Pueyo Centelles
<pre>
201 4 Roger Pueyo Centelles
OWRT_DIST_SVN_REV = 40719
202 4 Roger Pueyo Centelles
</pre>
203 4 Roger Pueyo Centelles
204 4 Roger Pueyo Centelles
with:
205 4 Roger Pueyo Centelles
206 4 Roger Pueyo Centelles
<pre>
207 4 Roger Pueyo Centelles
OWRT_DIST_SVN_REV = 41811
208 4 Roger Pueyo Centelles
</pre>
209 4 Roger Pueyo Centelles
210 4 Roger Pueyo Centelles
5) Run @make@, or @make V=99@ for extra compilation verbosity:
211 4 Roger Pueyo Centelles
212 4 Roger Pueyo Centelles
<pre>
213 4 Roger Pueyo Centelles
make
214 2 Roger Pueyo Centelles
</pre>