Projecte

General

Perfil

OpenWRT playground » Historial » Versió 7

Xavier León, 11-07-2011 19:10

1 1 Xavier León
h1. OpenWRT playground
2
3 4 Pau Escrich
h2. Preparing build scenario
4 1 Xavier León
5 6 Pau Escrich
You need some packages like: gcc, make, zlib, flex, quilt, subversion and some others. Also you need to install the devel packages of each of them. But don't worry about this, during the compilation process openwrt will tell you which one is missing.
6 1 Xavier León
7 4 Pau Escrich
First of all we are going to download the sources:
8
<pre>
9
svn co svn://svn.openwrt.org/openwrt/branches/backfire
10
</pre>
11 1 Xavier León
12 4 Pau Escrich
A good practice is to put download directory (where all packages will be stored) outside your source directoy. By this way you can use it for more source checkouts.
13 1 Xavier León
14 4 Pau Escrich
<pre>
15
cd backfire
16
mkdir ../dl
17
ln -s ../dl
18
</pre>
19
20
Let's go to install all feeds (extra packages).
21
<pre>
22
scripts/feeds update -a
23
scripts/feeds install -a
24
</pre>
25
26
And now we can start with configuration process:
27
<pre>
28
make menuconfig
29
make kernel_menuconfig
30
</pre>
31
32
menuconfig: you can select the packages you want to have inside your system installed (*) or only avaiable to install (M)
33
kernel_menuconfig: this is the standard menuconfig of the linux vanilla kernel
34
35
Then we can start compilation:
36
<pre>
37
make V=99
38
</pre>
39
First time it can have one or more hours.
40
41
If all goes fine. You will find the images ready to install inside: bin/ARCH/openwrt-*
42
43
For instance, if you want to use squashfs image using a USB pendrive, SD or CF:
44
<pre>
45
dd if=openwrt-*-generic-combined-squashfs.img of=/dev/sdX
46
</pre>
47
48
The first time openWRT boots, you can access using telnet to change the password.
49
50
<pre>
51 1 Xavier León
telnet 192.168.1.1
52
  passwd root
53
  reboot
54 4 Pau Escrich
</pre>
55 1 Xavier León
56 4 Pau Escrich
After that, telnet session will disappear. Then you can use ssh to manage the device.
57 1 Xavier León
58 4 Pau Escrich
h2. PlanetLab & OpenWRT
59 5 Pau Escrich
60 3 Xavier León
- PlanetLab boot process mail http://lists.planet-lab.org/pipermail/devel/2006-November/001739.html
61 7 Xavier León
62
Requirements:
63
Need packages:
64
* /bin/bash
65
* python
66
* perl
67
* lvm2
68
69
Filesystem:
70
* /etc/resolv.conf cannot  be a symbolic link
71
* /boot should be copied from build_dir/linux*/root.grub/boot (script in /home/xleon)
72
73
once copied in myplc, remember to do a sha1sum of the bootstrapfs-openwrt....