I just wanted to have my WRT54GS v2 configured with
OpenWrt and WPA acting like a bridge on my current network, so I started grabbing the latest OpenWrt’s image I found (RC4 at writing moment) and flashed the little box.
Once it rebooted I telnet’ed in (without password by default) to set up root’s password and that action enabled SSH access using
Dropbear server, then I configured a little the environment, first the time zone, then names resolution and enabled/disabled some initial scripts:
# echo "CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00" > /etc/TZ
# rm /etc/resolv.conf (and create yours)
# cd /etc/init.d/
# chmod -x S50dnsmasq
# chmod -x S50telnet
Then I have created
this script to keep the wrt’s clock synchronized, put it under /etc/init.d and enabled it the opposite way I did with S50dnsmasq and S50telnet. It’s important to check SSH connection before rebooting the machine or closing the first telnet session. Once here it is time for network configuring, keep in mind this wrt has its ports mapped like this:
- eth1: Wireless interface.
- vlan0: Switch interfaces.
- vlan1: WAN interface.
So setting up the network was like:
# nvram set lan_ifnames="vlan0 eth1"
# nvram set lan_proto=static
# nvram set lan_ipaddr=xxx.xxx.xxx.xxx
# nvram set lan_netmask=xxx.xxx.xxx.xxx
# nvram set lan_gateway=xxx.xxx.xxx.xxx
# nvram set wl0_akm="psk psk2"
# nvram set wl0_crypto="tkip+aes"
# nvram set wl0_wpa_psk=YourVeryLongPassPhrase
# nvram set wl0_channel=xx
# nvram set wl0_ssid=YourSSID
# nvram unset wl0_auth_mode
# nvram unset wifi_ifname
# nvram commit
As final steps nas must be installed, it is a propietary piece of software, provided by
Broadcom and serves as WPA authenticator/supplicant so it needs to be installed, luckily for us this can be done using ipkg.
Ok….I guess that’s everything, all we need is to reboot the wrt and check the configuration with a client.
Most of this information has been taken from:
Well it’s been enough time I guess, I don’t like the idea about having all my posting duplicated around so from now on
my old blog won’t be no longer open.
I get 30 days to change my mind but….going back with
wordpress at home?
.
There’s not too much to say here, I used
Google to find some samples on how to use this card. The most important point to keep in mind is these cards are not usual TV capturers, I mean they produce live-TV like a MPEG stream so applications like
tvtime don’t work.
I have installed two packages from Gentoo’s portage system:
# emerge ivtv ivtv-ptune
The first one provides the very needed kernel modules and basic tools, after installed /etc/modules.d/ivtv is created but after reading /usr/share/doc/ivtv-0.4.0-r3/modules.txt.gz I have made some modifications and now it looks like this:
alias char-major-81 videodev
alias char-major-81-0 ivtv
alias char-major-81-1 ivtv
alias char-major-61 lirc_i2c
options tuner=43 autoload=1 cardtype=2 ivtv_debug=3 ivtv_std=2
add below ivtv saa7115 saa7127
add above ivtv lirc_dev lirc_i2c ivtv-fb
Once everything is loaded, I wanted to watch life-TV so I started
MPlayer pointing it to the video device produced by the ivtv driver.
$ mplayer /dev/video1
Right now MPlayer should be playing the default frequency at which the card is set by default so we need to use ivtv-tune to change frequencies.
$ ivtv-tune -c47 -d/dev/video1 -teurope-west
/dev/video1: 679.250 (Signal Detected)
So! that’s it!
So why NetBSD? I could say a lot about that but the main reason is because I find easy enough to keep it up to date having another NetBSD around installed in a powerful machine, thanks to NetBSD’s build process.
What do we have?
- A Soekris net4801.
- A null modem serial port cable.
- Internet access.
- A drive where NetBSD will be installed (hard disk, CompactFlash…).
Then what do we need? First of all we have to create a boot environment using a DHCP server, a TFTP one and finally configure
PXELinux.
I already had a DHCP server configured so I just added the needed entry, it looks like this:
host clientname {
filename "pxelinux.0";
server-name "192.168.1.10"; # change this
next-server 192.168.1.10; # change this
hardware ethernet 00:00:24:XX:XX:XX; # change this
fixed-address 192.168.1.177; # change this
}
Thanks to filename parameter the little
soekris is able to find the boot file. To set it up I have used the
netboot.tar.gz file from
Debian, it is a little environment set up for installing Debian systems through networks, even via serial consoles. So I figured out how to boot NetBSD from same environment:
# tar zxvfp netboot.tar.gz -C /path/to/tftpdir
# cd /path/to/tftpdir
# unlink pxelinux.cfg
# ln -s debian-installer/i386/pxelinux.cfg.serial-9600 pxelinux.cfg
# vim pxelinux.cfg/default
...
label netbsd
kernel netbsd.bin
...
# cp /path/to/somefiles/pxeboot_ia32_com0.bin ./netbsd.bin
# cp /path/to/somefiles/NetBSDInstallkernel.gz ./netbsd.gz
The file pxeboot_ia32_com0.bin can be found on any NetBSD installation or in the base.tgz set and NetBSDInstallkernel.gz is the kernel you want to use during the installation, there are some to fetch from NetBSD FTP mirrors, I just used netbsd-INSTALL.gz and renamed it to netbsd.gz.
Ok, now we’re going to boot the soekris so plug in a null modem serial cable, launch minicom (or whatever you like more) at 19200 8N1 (default mode on net4801) and switch on the soekris. Once everything is starting next steps are as follow:
- Hit Ctrl – P to enter on BIOS configuration tool.
- Write set ConSpeed=9600 to get better interoperability with Debian’s netboot.tar.gz.
- Reset the net4801.
- Enter to BIOS config tool again after setting your terminal program to 9600 8N1.
- Write boot f0 to make the soekris booting on PXE.
- If everything was well configured a boot prompt must show up, enternetbsd and without any pause hit space twice or three times because NetBSD’s PXE image has no delay and will try to get another file from the TFTP server.
- If space was hit fast enough we’re on NetBSD’s boot manager now write boot tftp:netbsd.gz.
- Install NetBSD as always, just remember to set bootblocks to com0 at 19200.
- Once the system is booted from the CF edit /etc/ttys and change the console from Pc to std.19200.
- Set soekris BIOS back to 19200.
- Well done!
So that’s it, on further posts I’ll try to set up a compiling environment with
pkgsrc to build packages ready to be installed.