you have to run:
"make kernel_menuconfig" not "make menuconfig". The latter configures openwrt. The first configures specifics about the kernel that is built for use with openwrt. If you issue the first command and then navigate to device drivers->sound->alsa (andvanced linux sound arch)-> and then check the oss pcm and mixer emulation settings, you'll get the files you're missing.
As for your build time of 1.5 hours. must be nice. It takes me 7 hours to build mine. Gotta love the ol p2 233mhz dev machine/doorstop i have.
You're really close. Based on your lsmod output you're missing two files, after that you'll have sound. If you want, i can send you the module files but i'll need a place to put them. I'm pretty sure it will work if you just load them straight in. As for detailed step by step, i'm not done with my doc yet, it's rough. but if you really want to see it in its unfinished form, here it is:
A rough guide to get your wgt634u working in wpa station mode with mpd/mpc and cifs.
------------------------------
Getting started
------------------------------
You need:
* a serial cable with the correct voltage so you don't fry your board
* a tftp server
* a web server
* some wit/common sense
* willingness to make something that works fine before you start with it
and turn it into something that simply takes up space on your desk.
EG, you may break your router doing this. Be warned.
* common sense to replace local addresses with ones that apply to your setup.
* assumes you already built your kamikaze firmware with the settings and software that you want.
1. open hyperterminal and plug your serial cable to the serial port on router. (make sure it's the correct voltage! you need a special serial cable)
You must take the cover off, look for four pins.
2. plug your serial cable and connect to it via your com port in hyperterminal/some terminal program.
3. hold down ctrl-c until you see the CFE> prompt.
Type/paste:
ifconfig eth0 -addr=192.168.0.101 -mask=255.255.255.0
Replace 192.168.0.101 with desired IP address. This will be the IP of the wgt634u.
Then:
flash -noheader 192.168.0.103:openwrt-wgt634u-2.6-squashfs.bin flash0.os
192.168.0.103 is the IP address of your TFTP server. I've found that it's easiest to just place the bin file
in the TFTP root directory, where it looks to serve/accept files.
You should see this....or something like it:
CFE> flash -noheader 192.168.0.103:openwrt-wgt634u-2.6-squashfs.bin flash0.os
Reading 192.168.0.103:openwrt-wgt634u-2.6-squashfs.bin: Done. 2084864 bytes read
Programming...done. 2084864 bytes written
*** command status = 0
CFE>
Now, type reboot and watch it powerup, watching the console.
------------------------------
Configure ipkg
------------------------------
edit /etc/ipkg.conf. Point it to your bin/package directory in your build path.
For me, this is /home/joe/trunk/bin/package. I then symlink this to my apache root so that ipkg
can see it and download them. Oh yeah, you'll need apache too.
My ipkg.conf looks like:
#begin ipkg.conf ----------------------
src joe http://192.168.0.103/apache2-default/openwrt/packages/ #<---openwrt/packages is a symlink
# to my build path mentioned above
dest root /
dest ram /tmp
#end ipkg.conf ----------------------
After you set your ipkg to the right machine
type:
ipkg update
ipkg install kmod-madwifi
ipkg install wpa-supplicant
ipkg install wpa-cli
ipkg install wireless-tools
ipkg install kmod-fs-cifs
ipkg install cifsmount
You may need to install some other kmod-fs-* filesystems. You can see other packages by doing something like this:
ipkg list |grep -i kmod
type:
lsmod
You should see something like:
Module Size Used by Not tainted
fuse 37232 0
ip_conntrack_tftp 1680 0
ip_nat_irc 960 0
ip_conntrack_irc 2832 1 ip_nat_irc
ip_nat_ftp 1696 0
ip_conntrack_ftp 4016 1 ip_nat_ftp
ppp_async 9504 0
ppp_generic 20480 1 ppp_async
slhc 5472 1 ppp_generic
crc_ccitt 1024 1 ppp_async
cifs 230816 0
switch_robo 4016 0
switch_core 5056 1 switch_robo
nls_base 4576 1 cifs
diag 7696 0
That should be enough to get you started. We'll come back to ipkg later. Be sure to set a password
for root on your box. SSH will be disabled until you do so (I think, or it will just not have a password).
type:
passwd
*supply some password*
------------------------------
logging in via ssh
------------------------------
If you don't already have putty, download it, or use some linux alternative.
log in, i use root. :D You just set this password in the last step.
If you can't connect, you've got problems. Be sure you have your cat5 plugged into the wan port. If that
doesn't work, try the others. If that still doesn't work, try manually setting the ipaddress. See the
ifconfig manpage for syntax.
You'll also want to do this if you're using the wan port:
vi /etc/firewall.user - uncomment these lines and reboot:
iptables -t nat -A prerouting_wan -p tcp --dport 22 -j ACCEPT
iptables -A input_wan -p tcp --dport 22 -j ACCEPT
Be sure to comment those lines out later if you're not using it.
------------------------------
Configure wpa
------------------------------
Generate your wpa/psk key:
wpa_passphrase your_essid_here your_wpa_key_here
It will print out what you see below, the network { ... }. All you need is the PSK portion.
Copy and paste that into /etc/wpa.conf. If you don't have wpa_passphrase, you'll need to install it.
I'm not sure what package it comes in, but you can use any linux distro that has it. It's just
a key generator.
Edit /etc/wpa.conf:
network={
ssid="joe"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk=-----this should be your wpa key-----
}
Now try to connect...type these commands, replacing as necessary:
wlanconfig ath0 create wlandev wifi0 wlanmode sta
iwconfig ath0 essid "joe"
ifconfig ath0 192.168.0.101 up
/usr/sbin/wpa_supplicant -dd -Dmadwifi -iath0 -c/etc/wpa.conf
That last one should print a bunch of information. If you don't see the word, DISCONNECTED or some other
errors, you are probably up and running in station mode, using wpa. If you don't see any errors, especially
things about a missing driver, skip to the next section, otherwise continue.
If you get an error complaining about a driver not being found, you need to modify a file. For the wgt634u it's
the config.mipsel file:
vi trunk/package/wpa_supplicant/files/config.mipsel
# Driver interface for madwifi driver
CONFIG_DRIVER_MADWIFI=y
# Change include directories to match with the local setup
#CFLAGS += -I../madwifi/wpa
CFLAGS += -I/home/joe/madwifi-0.9.2.1
I guessed here and got it right. I had to download the source code for madwifi-ng. the cflags path
is the path to where i extracted that code. There may be a better way to do this, but it works at least.
After you modify that file, you'll need to recompile wpa-supplicant:
make package/wpa-supplicant-clean V=99 && make package/wpa-supplicant-compile V=99
Then you'll need to remove wpa-supplicant from your device and reinstall:
ipkg remove wpa-supplicant
ipkg update
ipkg install wpa-supplicant
You'll probably have to force the install (see ipkg doc) because the md5sum will be different (i think).
------------------------------
Autostart in wpa station mode
------------------------------
Edit /etc/init.d/madwifi:
#!/bin/sh /etc/rc.common
START=20
boot() {
# iwpriv ath0 mode 3
wlanconfig ath0 create wlandev wifi0 wlanmode sta
iwconfig ath0 essid "joe"
ifconfig ath0 192.168.0.101 up
/usr/sbin/wpa_supplicant -dd -Dmadwifi -iath0 -c/etc/wpa.conf &
}
This will put your ap into station mode, making it act much like a laptop would connecting to an ap. It will
not serve as an ap if you use sta mode. If you want it to bridge and serve, look into using
wds mode. Again, be sure to replace "joe" with your essid.
Type:
cd /etc/rc.d
ln -s /etc/init.d/madwifi S20madwifi
When finished...type:
reboot
Watch it reboot and then try to log into 192.168.0.101 via ssh (remove the cat5 connection first).
If you connect, then you've successfully connected your openwrt box to your ap using station mode with wpa.
------------------------------
Configuring sound
------------------------------
If everything above is working, this last part should be easy. All you have left to do now is install
mpd/mpc and your soundcore drivers, as well as install usb support. There are a lot of posts about usb2 drivers
not working right, but I don't think those issues exist anymore. Either way, it would be good to read about the
differences between ehci, ohci and uhci usb kernel modules. EHCI is only used for USB 2.0 high-speed devices and OHCI or UHCI
is used for other devices. Google can provide more detail. If you didn't compile usb support as a module, then i'd
go back and do that. Sometimes, especially if you plan on hooking a hard drive up, it's nice to be able to switch what
usb module you use. Some work better with certain devices. If it's compiled into the kernel you're stuck. I use ohci
but i don't have a need for usb2 support. If you're unsure, use lsusb to probe your usb device to see what version it
needs.
Back to ipkg...
ipkg install kmod-soundcore
ipkg install kmod-usb-core
ipkg install kmod-usb-ohci
reboot
On your dev machine,this part is a mystery to me. I don't know why these don't get copied when you install kmod-soundcore.
It may not be in the package, but you'd think it would get copied. I have not been able to get sound working with less
than this. Perhaps i'm doing it wrong, but there isn't a whole lot to go off here in terms of formal documentation, so
I had to guess a lot. Trial and error, etc. First, find the module files. Mine are in the path below. Change to that directory
and then copy it to your packages directory. If you symlinked this to your web root, you're done. YOu need only wget them
to your device. However you do it, you need to get these files into /lib/modules/2.6.19.x/
joe@linuxbox:/home/joe/trunk/build_mipsel/linux-2.6-brcm47xx/linux-2.6.19.2/sound#
cp ./core/snd-hwdep.ko /home/joe/trunk/bin/packages/
cp ./core/snd-page-alloc.ko /home/joe/trunk/bin/packages/
cp ./core/snd-pcm.ko /home/joe/trunk/bin/packages/
cp ./core/snd-rawmidi.ko /home/joe/trunk/bin/packages/
cp ./core/snd-timer.ko /home/joe/trunk/bin/packages/
cp ./core/snd.ko /home/joe/trunk/bin/packages/
cp ./usb/snd-usb-audio.ko /home/joe/trunk/bin/packages/
cp ./usb/snd-usb-lib.ko /home/joe/trunk/bin/packages/
cp ./core/oss/snd-mixer-oss.ko /home/joe/trunk/bin/packages/
cp ./core/oss/snd-pcm-oss.ko /home/joe/trunk/bin/packages/
***If you're missing the *oss.ko files, you need to enable it in your kernel build.
make kernel_menuconfig
Look under devices->sound->alsa and ensure you enabled snd_pcm_oss and snd_mixer_oss emulation drivers.
Rebuild your openwrt (sorry) and you'll see the *oss.ko files in your build_mipsel path.
on your device:
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-hwdep.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-page-alloc.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-pcm.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-rawmidi.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-timer.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-usb-audio.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-usb-lib.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-mixer-oss.ko
wget http://192.168.0.103/apache2-default/openwrt/packages/snd-pcm-oss.ko
Again, substitute your webroot in place of mine. After copying, reboot to make sure we get all of our modules
that came from any ipkg installations automatically loaded. When done, add the following to your startup files
so that the modules will get loaded everytime.
insmod snd.ko
insmod snd-hwdep.ko
insmod snd-page-alloc.ko
insmod snd-timer.ko
insmod snd-rawmidi.ko
insmod snd-pcm.ko
insmod snd-usb-lib.ko
insmod snd-usb-audio.ko
insmod snd-mixer-oss.ko
insmod snd-pcm-oss.ko
um, this is where my doc ends, it isn't done. you'll have to figure the rest out on your own for now. perhaps you can complete this after you figure it out...