Projecte

General

Perfil

OpenWRT playground » Historial » Revisió 4

Revisió 3 (Xavier León, 07-07-2011 15:18) → Revisió 4/16 (Pau Escrich, 08-07-2011 15:16)

h1. OpenWRT playground 

 h2. Preparing build scenario Configure/Build/Install 

 You need some packages like: gcc, make, zlib, flex, 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. El codi que he fet servir (el SDK de openwrt) el pots descargar des del meu server de desenvolupament:  
 http://owrt.dabax.net/backfirex86.tar.gz 

 First of all we are going to download the sources: Dins hi ha un directori anomenat backfire. Entres dins i pots fer `make menuconfig` `make kernel_menuconfig` per configurar  
 I `make V=99` per compilar l'imatge.  
 Un cop acabada estarà al directori:    bin/x86/openwrt-x86-generic-combined-ext2.img.gz 
 <pre> La descomprimeixes: gunzip openwrt-x86-generic-combined-ext2.img.gz 
 svn co svn://svn.openwrt.org/openwrt/branches/backfire 
 </pre> 

 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. 

 <pre> 
 cd backfire 
 mkdir ../dl 
 ln -s ../dl 
 </pre> 

 Let's go to install all feeds (extra packages). 
 <pre> 
 scripts/feeds update -a 
 scripts/feeds install -a 
 </pre> 

 And now we can start with configuration process: 
 <pre> 
 make menuconfig 
 make kernel_menuconfig 
 </pre> 

 menuconfig: you can select the packages you want to have inside your system installed (*) or only avaiable to install (M) 
 kernel_menuconfig: this is the standard menuconfig of the linux vanilla kernel 

 Then we can start compilation: 
 <pre> 
 make V=99 
 </pre> 
 First time it can have one or more hours. 

 If all goes fine. You will find the images ready to install inside: bin/ARCH/openwrt-* 

 For instance, if you want to use squashfs image using I la copies a USB pendrive, la SD or CF: 
 <pre> 
 o USB: dd if=openwrt-*-generic-combined-squashfs.img if=openwrt-x86-generic-combined-ext2.img of=/dev/sdX 
 </pre> 

 The first time el primer cop que inicies openWRT boots, you can access using s'obre una shell telnet to change the password. sense password, llavors el que has de fer és: 

 <pre> 
 telnet 192.168.1.1 
   passwd root 
   reboot 
 </pre> 

 After that, I un cop ja has posat password, el telnet session will disappear. Then you can use ssh to manage the device. desapareix i només queda l'SSH. 

 h2. PlanetLab & OpenWRT 
 - PlanetLab boot process mail http://lists.planet-lab.org/pipermail/devel/2006-November/001739.html