Monday, June 30, 2008

use shell variables in sed

while test $i != 10
echo "run case $i
tag=`expr output-foo-$i`
output=`echo $input | sed -e "s/^\(.*\)\.wav$/\1-$tag\.wav"`
./foo.bin -v -e -E $i -o $output $input

Here instead of

sed -e 's/^\(.*\)\.wav$/\1-$tag\.wav'


sed -e "s/^\(.*\)\.wav$/\1-$tag\.wav"

Friday, June 20, 2008

Set up for recording audio with Windows

Here is some set up for recording audio.

0. Use blue line-in jack and green line-out jack

1. Set playback control, especially Volume Control, Wave and Line In, it is ok to mute CDPlayer, PC Beep or SW Synth.

2. Set recording control, select "WaveOut Mix", then we are ready to go.

Tuesday, June 17, 2008

nfs client

I got an error when mount NFS disks with my OMAP linux box.

rpcbind: server localhost not responding, timed out
RPC: failed to contact local rpcbind server (errno 5).

Here is the result. (The reason is I don't have portmap running in the box)

mount -t nfs -o nolock /mnt/mmc

And then, I got another panic message, when I run a program.

nfs: server not responding, still trying

Here is the result.

mount -t nfs /mnt/mmc -o nolock,hard,rsize=1024,wsize=1024

Monday, June 16, 2008

setup dhcp, nfs on FC5

setup dhcp server
I need to setup dhcp server under my router.
Here is the configuration file (/etc/dhcpd.conf)

ddns-updates on;
subnet netmask {
option routers;
option subnet-mask;
option domain-name "";
option domain-name-servers;
host trgt {
hardware ethernet 08:00:28:01:15:F7;
option root-path "/opt/eldk/ppc_8xx";
option host-name "trgt";
filename "tftpboot/pImage";
ddns-update-style ad-hoc;

Here "trgt" is a linux device which has fixed ip address, and need boot image through NFS from linux host with ip "".

Start dhcp-server with: `/etc/rc.d/init.d/dhcpd start`

Setup nfs

Edit /etc/exports


Edit /etc/hosts.allow


And edit /etc/hosts.deny

portmap: ALL
lockd: ALL
mountd: ALL
statd: ALL

run: `exportfs -ra`

scripts on start nfs

/etc/init.d/portmap start
/etc/init.d/nfslock start
/etc/init.d/nfs start
/etc/init.d/netnfs start

Check nfs status with: `/sbin/service nfs status`

rpc.mountd (pid 4181) is running...
nfsd (pid 4183 4182 4181 4180) is running
rpc.rquotead (pid 4170) is running

You may need to "/sbin/service iptables stop" sometimes if you can the ip but can not mount while getting "no route and host" message.

Tuesday, June 10, 2008

use cu

1. install uucp "sudo apt-get install uucp"
2. edit /etc/uucp/sys

system S0@115200
port serial0_115200
time any

3. edit /etc/uucp/port to add serial0_115200

port serial0_115200
type direct
device /dev/ttyS0
speed 115200
hardflow false

4. Add serial port to VM, otherwise it will not show up.
5. run `cu S0@115200` and get a response "Connected."
To terminate, type `~.`