Mercurial > hg > freeDiameter
annotate contrib/OpenWRT/HOWTO @ 490:2577514b2546
Updated documentation (still incomplete)
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 12 Aug 2010 15:57:52 +0900 |
parents | 0f43f42669be |
children | 6edd14e5f132 |
rev | line source |
---|---|
490
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
1 This HOWTO describes how to generate a set of ipkg modules for |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
2 providing support of freeDiameter in an OpenWRT system. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
3 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
4 This HOWTO is written for OpenWRT 10.03 (BackFire) and no guarantee is provided |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
5 that it will work for you. Be prepared to eventually brick your routeur... |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
6 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
7 Table of contents: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
8 1) Prerequisites: get the OpenWRT development environment ready. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
9 2) Supplied packages: use the existing packages when possible (gnutls, ...) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
10 3) Other dependencies: provide for additional missing dependencies (sctp ...) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
11 4) freediameter package: now create the freeDiameter package |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
12 5) Configuration: how to set the configuration on the router. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
13 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
14 This HOWTO will NOT cover how to install OpenWRT on your access device, nor |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
15 its basic configuration. Please refer to OpenWRT website for this type of HOWTOs. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
16 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
17 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
18 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
19 ============================================== |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
20 1) Prerequisites: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
21 ============================================== |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
22 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
23 We will first need a working OpenWRT toolchain environment. You can retrieve |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
24 pre-compiled binaries of such toolchains ("Image builder") on the OpenWRT website. Anyway, |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
25 in case the architecture you are interested in is not listed, you can build |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
26 the full toolchain from source. This is the path we are following in this HOWTO. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
27 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
28 a) Retrieve the latest OpenWRT source, using subversion or git. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
29 Since I have to go through a proxy, I use the later here, svn being quite annoying with proxies. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
30 Note, the following commands must not be run as root. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
31 $ git clone git://nbd.name/openwrt.git |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
32 (Note: you might instead use "backfire.git" if you want to stick with an OpenWRT release.) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
33 $ cd openwrt |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
34 $ cp feeds.conf.default feeds.conf |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
35 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
36 b) If you are using git, you have to edit the feeds.conf file to use git as well for packages. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
37 Do the following modifications in this case: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
38 $ vi feeds.conf |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
39 Comment out this line: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
40 src-svn packages https://svn.openwrt.org/openwrt/packages |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
41 Add this line instead: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
42 src-git packages git://nbd.name/packages.git |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
43 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
44 You can leave uncommented the luci (for GNUTLS) and Xwrt (webif) repositories. Since these repositories |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
45 use svn over http, you can use subversion even if you are behind a proxy. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
46 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
47 c) Then issue the following command to update the package list: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
48 $ scripts/feeds update |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
49 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
50 d) Now, let's already create the toolchain and basic image. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
51 $ make menuconfig |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
52 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
53 This will open a menu for you. You must select the target you are building for. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
54 See http://wiki.openwrt.org/toh/start for the table of hardware and associated information. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
55 In my case, I am using a Buffalo WZR-HP-G300NH router. I therefore select these options: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
56 - Target System ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
57 Atheros AR71xx/AR7240/AR913x |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
58 - Target Profile ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
59 Buffalo WZR-HP-G300NH |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
60 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
61 For many routeurs, the recommended kernel is a 2.4x version. I have NOT tried with such kernel, |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
62 and the SCTP support is likely to be different in this generation of kernels. I strongly recommend |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
63 to go with a 2.6x kernel, whenever possible. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
64 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
65 e) Once configured, create the toolchain and default image (this takes a while): |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
66 $ make |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
67 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
68 After this command completes successfully, your build environment is ready. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
69 The resulting image and packages are stored in the "bin/" subdirectory. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
70 It is very convenient if you make this repository available in http to your routeur. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
71 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
72 You should probably try at this early stage to flash your device with the image you have generated. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
73 If the default basic image does not work, it is probably not worth adding new problems on top of it. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
74 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
75 For troubleshooting, please consult OpenWRT documentation directly. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
76 "make prereq" may help you building the initial image also. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
77 See http://downloads.openwrt.org/docs/buildroot-documentation.html for additional information |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
78 concerning this step. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
79 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
80 You should now be able to login on your routeur with telnet (first time) or ssh (after setting a password). |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
81 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
82 ============================================== |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
83 2) Supplied packages: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
84 ============================================== |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
85 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
86 There are some dependencies of freeDiameter already available in the OpenWRT packages repository. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
87 You can check for the available packages with the script: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
88 $ ./scripts/feeds search <package> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
89 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
90 We will now describe how to install these dependencies. At the time this HOWTO is written, |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
91 the OpenWRT repositories contain ipv6, gnutls, pthreads and hostapd. Follow these instruction to |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
92 build them: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
93 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
94 a) GNU TLS packages |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
95 $ scripts/feeds install libgnutls |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
96 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
97 b) Select the following components in the menu: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
98 $ make menuconfig |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
99 - Base system ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
100 libpthread (M) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
101 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
102 - Network ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
103 hostapd (M) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
104 wpad-mini ( ) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
105 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
106 - Libraries ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
107 SSL ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
108 libgnutls (M) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
109 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
110 - Kernel modules ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
111 Network Support ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
112 kmod-ipv6 (M) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
113 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
114 Quit and save the new config, then: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
115 $ make world |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
116 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
117 This will add a bunch of modules in your bin directory that will be required for freeDiameter. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
118 Since we are removing the wpad-mini daemon from the base image, this image (trx or bin file) is also recompiled. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
119 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
120 Note that if you are setting your device as WPA supplicant also (wireless client), you can select wpad instead of hostapd. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
121 (in any case, the -mini version is not suitable since we will use the RADIUS authentication). |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
122 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
123 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
124 You should now reflash your routeur with the new firmware image. The simplest way to achieve if your routeur has enough |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
125 flash memory is to: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
126 - copy the new trx image to your routeur's /tmp (using wget or scp) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
127 - run this command (on the device) -- replace <newfile.trx> with your actual filename: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
128 root@OpenWrt:~# mtd -r write <newfile.trx> linux |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
129 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
130 WARNING: this will erase your existing configuration on the routeur. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
131 In case you need to save it, you may try the sysupgrade command instead. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
132 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
133 This will reboot the device after writing the new image file. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
134 Afterwards, if you have set up the http server on your development machine properly |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
135 (let's assume it has IP address 192.168.1.25) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
136 you can run the following command on your router: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
137 root@OpenWrt:~# echo "src/gz mydev http://192.168.1.25/packages" >> /etc/opkg.conf |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
138 root@OpenWrt:~# opkg update |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
139 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
140 Install the newly compiled packages with: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
141 root@OpenWrt:~# opkg install kmod-ipv6 hostapd libpthread |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
142 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
143 ============================================== |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
144 3) Missing packages: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
145 ============================================== |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
146 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
147 There are other dependencies for freeDiameter that are not provided by OpenWRT packages. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
148 For convenience, we include these meta-packages in the freeDiameter distribution -- but they |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
149 might not be up-to-date. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
150 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
151 a) Adding the contributed directory to the feeds |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
152 Add the following line in your feeds.conf file: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
153 src-link freediameter /path/to/freediameter/contrib/OpenWRT/packages/ |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
154 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
155 Then run: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
156 $ scripts/feeds update |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
157 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
158 This should allow you to install the missing dependencies as follow: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
159 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
160 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
161 b) SCTP library (note: you might alternatively compile freeDiameter without SCTP support). |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
162 $ scripts/feeds install sctp |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
163 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
164 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
165 c) Select these components in the menu: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
166 $ make menuconfig |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
167 - Libraries ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
168 sctp (M) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
169 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
170 Quit and save the new config, then: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
171 $ make world |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
172 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
173 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
174 d) Install this on the router as well: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
175 root@OpenWrt:~# opkg update |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
176 root@OpenWrt:~# opkg install sctp |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
177 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
178 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
179 ============================================== |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
180 4) freediameter package: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
181 ============================================== |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
182 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
183 Now, your environment should be ready to compile the freeDiameter ipkg package. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
184 $ ./scripts/feeds install freediameter |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
185 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
186 Note that in order to build this package, you need to have cmake on your compilation machine. |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
187 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
188 $ make menuconfig |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
189 - Network ---> |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
190 freeDiameter (M) |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
191 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
192 Quit and save the new config, then: |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
193 $ make world |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
194 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
195 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
196 |
2577514b2546
Updated documentation (still incomplete)
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
327
diff
changeset
|
197 |