ip04 baps trunk dropbear ipkg makefile 

I spend a little time to write a working dropbear ipkg mk file dropbear.mk. it is copied from asterisk.mk and adopted to dropbear.mk, here is the link:

http://bl0g.blogdns.com/ip04/dropbear.mk
[ add comment ] ( 4 views ) permalink ( 3 / 43 )
IP PBX IP04 experiment 


I have been playing around the leading-edge IP PBX IP04 box a while, when it is shipped to me, it is fully working IP PBX, two FXO, two FXS. It did not satisfy my curiosity though, so I take a step further, destroyed the firmware, cross rebuild the firmware, flashed the nand, compiled the zaptel,asterisk and its ipkg package. Here is what I did:

1, svn the kernel and oslec( open source echo caneller)
svn co http://svn.rowetel.com/software/baps/trunk baps
svn co http://svn.rowetel.com/software/oslec/trunk oslec


2, enter baps directory and fetch/untar the compile toolchain
wget http://blackfin.uclinux.org/gf/download ... 386.tar.gz
.
tar xzf blackfin-toolchain-07r1.1-3.i386.tar.gz

3, edit uClinux.mk to correct "UCLINUX_SITE" link to:
http://blackfin.uclinux.org/gf/download ... e/350/3340
and make the kernel image and copy it to /tftpboot:

make -f uClinux.mk uClinux (generate uImage)
cp uClinux-dist/images/uImage /tftpboot

4, cp oslec to baps directory, edit zaptel.mk to set "ZAPTEL_EXTRA_CFLAGS" to DCONFIG_4FX_SPI_INTERFACE, then make zaptel and zaptel package

cp -r /usr/src/oslec /usr/src/baps/
make -f zaptel.mk zaptel
make -f zaptel.mk zaptel-package

5, make asterisk and asterisk package

make -f asterisk.mk asterisk
make -f asterisk.mk asterisk-package

make -f asterisk-gui.mk asterisk-gui
make -f asterisk-gui.mk asterisk-gui-package

make -f native-sounds.mk native-sounds
make -f native-sounds.mk native-sounds-package

6, create ikg snapshot and copy packages to webserver
cd ipkg
../scripts/ipkg-make-index.sh . > Packages
scp *.ipkg Packages /your/web/server


7, flash ip04 firmware

reboot ip04 and type enter while in u-boot

U-Boot 1.1.5 (May 5 2007 - 05:46:05)

CPU: ADSP BF532 Rev.: 0.5
Board: IP04 IP-PBX
http://www.rowetel.com/ucasterisk/ip04.html
Clock: VCO: 400 MHz, Core: 400 MHz, System: 133 MHz
SDRAM: 64 MB
In: serial
Out: serial
Err: serial
256 MiB
DM9000#0
starting from spi flash
Hit any key to stop autoboot: 0

ip04>
ip04>set bootargs console=ttyBF0,115200 root=/dev/mtdblock0 rw ethadd=$(ethaddr)
ip04>set autostart no
ip04>save
Saving Environment to EEPROM...
0x0003FFFF
ip04>reset

ip04>tftp 0x1000000 uImage
dm9000 i/o: 0x20100000, id: 0x90000a46
MAC: 00:09:45:54:20:8c
operating at 100M full duplex mode
Using DM9000#0 device
TFTP from server 192.168.1.3; our IP address is 192.168.1.2

Filename 'uImage'.
Load address: 0x1000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
########################################################
done
Bytes transferred = 2281042 (22ce52 hex)

ip04>nand dump 0x0
ip04>nand erase clean

NAND erase: device 0 whole chip
Erasing at 0xffe0000 -- 100% complete. Cleanmarker written at 0xffe0000.
OK
ip04>nand dump 0x0

Note: rounded up the 0x22ce52 kernel image to 0x230000
ip04>nand write 0x1000000 0x0 0x230000

NAND write: device 0 offset 0, size 2293760 ... 2293760 bytes written: OK

ip04>bootm 0x1000000

root> copy_rootfs.sh
root>reboot
ip04>set autostart yes
ip04>set bootargs console=ttyBF0,115200 root=/dev/mtdblock2 rw ethaddr=$(ethaddr)
ip04>save
ip04>reset

8, install zaptel, asterisk ipkg

change the first line in /etc/ipkg.conf on your IP04:

src snapshots http://you.web.server

root>ipkg update
root>ipkg list
asterisk - 1.4.4-1 - Asterisk PBX
asterisk-gui - 1.0-1 - asterisk-gui
native-sounds - 1.0-1 - Asterisk native sounds
oslec - 1.0-1 -
zaptel-spi - 1.4.3-1 - Zaptel
Done.
root>ipkg install zaptel-spi
root>ipkg install asterisk

9, change some part of zapata.conf and users.conf as

zapata.conf:
.....
;group=1
callgroup=1
pickupgroup=2
immediate=no

group=1
signalling = fxs_ks
channel => 1,2

group=2
signalling = fxo_ks
channel => 3,4
......

copy zapata.conf zapata.conf.post, then change /etc/init.d/zaptel to:

zapscan;
ztcfg;
cp /etc/asterisk/zapata.conf.post /etc/asterisk/zapata.conf;;

users.conf
....
[trunk_1]
....
zapchan = 1,2
....
trunkname = Ports 1,2
....
group = 1

[6001]
fullname = Analog User 1
....
zapchan = 1
context = numberplan-local
....
group = 1

[6002]
fullname = Analog User 2
....
zapchan = 2
context = numberplan-local
....
group = 1

[6003]
fullname = Analog User 3
....
zapchan = 3
context = numberplan-local
...
group = 2

[6004]
fullname = Analog User 4
....
zapchan = 4
context = numberplan-local
...
group = 2






[ add comment ] permalink ( 3 / 49 )
pxe boot install openbsd on soekris 

A detail link regarding pxe boot install os on soekris:

http://www.ultradesic.com/?section=22
[ add comment ] permalink ( 3 / 61 )
OpenBSD spamd + Soekris = greylist appliance 


My OpenBSD transparent bridge works perfect to protect my email server (MTA) from spam-bot attack. It runs on a lower end pc, so the question is, can I implement this solution as an anti-spam appliance which I can bring it anywhere, plug it in and it just work? After couple of days of googling,asking questions in mailinglist,and experimenting, I finally full it off. run OpenBSD spamd on a embedded pc box - Soekris net4801, the details to installation anf configurations continues...
[ add comment ] permalink ( 3.1 / 62 )
something about atime 

http://kerneltrap.org/node/14148

Here is a useful info I quote from slashdot:

quote begin:
Stopping and Starting a disk causes the most wear on the disk. When in an idle state the spinning disk has fully lubricated bearings and is using just a tiny amount of energy. Strap in a stop and start and you have bearings on start that don't have their lubrication optimally spread (gravity and lack of motion cause the metal to get closer together and depending on the manufacturer may have some of the bearings without lubrication), and the spinup of the disks themselves is on average a 6W draw (idle is like .3W). Plus, when the disks are fully spinning wobble is going to be constrained a bit by the speed, whereas on startup and stopping the minor imperfections in the disk can let the minor wobbles show which strains the bearings and causes wear and tear. See if the bearings start to fail and are say 20% shot, the motor on the drive can just use a little more energy to drive them, but the startup cost might exceed what the motor is capable of outputing. Using the example above, the .3W draw on idle might climb to .6W, but on startup that could translate in moving from 6W to 12W (and exceeding what the motor can physically provide).

And if you don't believe any of that you shouldn't have any trouble using google to find Admins who tell horror stories about having to reboot a drive and losing the entire drive because the bearings were shot to the point that once the disks stopped the motor couldn't generate enough force to restart them. But the disk could have lasted years more as long as it wasn't stopped. In fact in companies where a lot of data is stored the disks are put on their own power source at least partially because the disks don't have to be stopped if a server needs to be rebooted because of failure or updates. This is also one of the reasons to be wary of purchasing used storage arrays. Might have worked great when they shut it off, but you might be able to restart the array.

quote end

quote start:
I can't believe that I haven't seen more people coming down on the side of atime. I use it to troubleshoot very frequently. For example, if I try to start something up and it fails, I can easily see if it got as far as reading its config file by checking the atime on it. When I'm looking through a machine to find out what files are relevant to its current config, I can do an ls -lUrt and see what files were read recently and which haven't been touched for years. Yes, there are machines out there that have been cranking away doing production work for years. To do something, and then see what that something touched, is very handy.

Also, you can kind of see what an intruder did on a machine by looking at the atimes on the shared libraries, header files, etc. on a machine that you think may have been compromised, especially if that machine normally just grinds away doing a couple different things most of the time.

Seriously, that's what the noatime flag is for if you want it. But I would never use it unless I had a damn good reason.

quote end
[ add comment ] permalink ( 3 / 71 )

Back Next