macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 19:23:33 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: Applications and additional Kernel modules  (Read 5488 times)
0 Members and 1 Guest are viewing this topic.
oemki
Newbie
*
Offline Offline

Posts: 9


View Profile
« on: April 11, 2007, 18:02:08 PM »

Just a topic were user can post applications and new Kernl modules for the MGB100 device
Logged
oemki
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #1 on: April 11, 2007, 18:26:26 PM »

Finally I got it compiled.
You can use now the usb2serial converters which uses the cp210x chipset.
more information here:
http://www.chip45.com/index.pl?page=littleUSB_Downloads&lang=de
the cp210x.tar.gz includes the obects and scripts to load/unload the driver
the cp210x_src.tar.gz includes the src which can be compiled by copying the tarball to the usr_src/ directory of the firmeware source tree.

Have fun !

* cp210x.tar.gz (12.36 KB - downloaded 164 times.)
* cp210x_src.tar.gz (53.47 KB - downloaded 171 times.)
Logged
oemki
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #2 on: April 11, 2007, 18:33:43 PM »

Hello all,
the great scripting language tcl runs now on my conceptronic CHD2WLANU device.
Thanks to the guys who have made the modified firmware (I run V3) its simply possible by installing two RPM packages:
glibc-2.3.6-4.i386.rpm
and of course:
tcl-8.4.9-3.i386.rpm

Webserver, sockets, all available !!!

Have Fun !!!

Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #3 on: April 11, 2007, 18:43:41 PM »


Are you just using the USBFS from the downloads section of macsat.com - or which distro are you using?
Logged
oemki
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #4 on: April 12, 2007, 17:03:26 PM »


Are you just using the USBFS from the downloads section of macsat.com - or which distro are you using?

Yes I use the USBFS.tar.gz from macsat.com. But I use a 20 GB HD instead of an USB-Stick (the latter I use only for recovery purpose) .
To add tcl I just copied the RPMs somewere and installed them with rpm -i. That was all.

The only problem I currently have is the hotplug program which runs ammok with the usb2serial device. It gives 99% CPU load.
# ps
 PID  Uid     VmSize Stat %CPU  Command
    1 root        368 S     0.4  init                       
     .                .
     .                .
     .                .
  197 root        244 S     0.0  amit_tftpd
  253 root        480 S     0.5  -ash
  255 root        264 R    99.9  /sbin/hotplug add 22 2
  256 root        420 R     0.0  ps

/proc/usb gives me the right information that the "device" 22 is my new serial port:
# cat /proc/usb/port2         
00:0a.0 serial 22
Silicon Labs CP2102 USB to UART Bridge Controller (SET5)(Full speed)

The only way to get the CPU load down is currently to kill the hotplug process (which lead to an quite instable system Sad  ).
The other problem is, that I cant find any source for the hotplug program. Is there any, or do I have to modify the hotplug.sh script ??
Any answers appreciated !
« Last Edit: April 12, 2007, 17:07:52 PM by oemki » Logged
pagano
Jr. Member
**
Offline Offline

Posts: 61


View Profile
« Reply #5 on: April 12, 2007, 22:55:15 PM »

*** This version works alone BUT i don't know if it works with previous USB filesystems. ***
*** Only for test alternate distributions like openwrt ***

Some modules for the kernel and a "test" v4 firmware image. Modules work with all kernel versions.
for modules: cd /lib;tar -xzf modules.tar.gz
It should work with any i386/486sx linux version in USB or HD (WITH telnetd and network configured).
Kernel has it's own recovery system MGB100_GPL/linux_src/arch/i386/boot/setup.S and we can't change it but...
Make a grep -ir lily MGB100_GPL/linux_src/* to see changes in kernel. A lot of them...

/sbin/init included. (post changes to do it better)

#!/bin/sh
# Search autoinit file in devices -script to execute before init-
# and search autobootfs -file with ext2 fs- to mount and boot inside.
#
PATH=/bin:/sbin
mount -t proc none /proc
for altboot in sda1 sda2 sdb1 sdb2 hda1 hda2 hda3; do {
        mount /dev/$altboot /mnt
        if [ -f /mnt/autoinit ];then
                echo Found AutoInit in device: $altboot
                umount /proc
                cd /mnt
                mkdir ramroot
                pivot_root . ramroot
                exec /autoinit
        fi ;
        if [ -f /mnt/autobootfs ];then
                echo Found AutoBootFs in device: $altboot
                insmod loop
                mkdir /bootfs
                losetup /dev/loop0 /mnt/autobootfs
                mount /dev/loop0 /bootfs
                umount /proc
                cd /bootfs
                mkdir ramroot
                pivot_root . ramroot
                exec /autoinit
                exec /sbin/init
        fi ;
        umount /mnt
        echo Testing $altboot for autoinit file: NO
}; done
#
# No alternate boot found. Restore init and boot ram
#
umount /proc
mv /sbin/init /sbin/init.altboot
ln -s ../bin/busybox /sbin/init
exec /sbin/init
=========================

The /sbin/init file search for autoinit in storage devices and run it as pid 1. autoinit can umount ram0 and exec /sbin/init
It also search for a autobootfs (ext2 image) and mount it as root device, its usefull for vfat devices or single file.
The /etc/rc.d/rc.bridge file calls autoexec script to fix changes in firmware. It can load modules or execute daemons...
I dont know if it works with v3 usb filesystem.

Openwrt x86 Kamikaze image is working but it lacks samba server and webif^2 must be adapted to configure it.

The autoinit is:

exec /sbin/init

My configure system file /etc/init.d/rcS

#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount -t proc none /proc
insmod rt2500
rt2500apd
#Wireless Network settings must be in /tmp/RT2500AP.dat and info about it in MGB100_GPL/linux_src/drivers/net/wireless/rt2500/README
ifconfig wl0  0.0.0.0 up ;
ifconfig eth1 0.0.0.0 hw ether 00:80:5A:49:70:69 up &
ifconfig lo   127.0.0.1 up
/etc/init.d/dropbear start &

# Remove comments to release memory.
#umount /ramroot
#freeramdisk /dev/ram0
#rmdir /ramroot

brctl addbr br0
brctl addif br0 eth1
brctl addif br0 wl0
ifconfig eth1 0.0.0.0
ifconfig wl0  0.0.0.0
ifconfig br0 192.168.2.10 up
route add default gw 192.168.2.1 &
echo nameserver 192.168.2.1 > /etc/resolv.conf
====================

My RT2500AP.dat

[Default]
SSIDNum=1
SSID=WHD.AP.NAME *******change it*****
HideSSID=0
CountryRegion=6
WirelessMode=0
TxRate=0
Channel=7
BeaconPeriod=100
DtimPeriod=3
TxPower=50
BGProtection=0
TxPreamble=0
RTSThreshold=2347
FragThreshold=2346
TxBurst=0
TurboRate=0
NoForwarding=0
ShortSlot=0
AutoChannelSelect=0
AuthMode=WPAPSK
EncrypType=TKIP
WPAPSK=wpa.password ******change it *****
IEEE8021X=0
ReKeyMethod=DISABLE
ReKeyInterval=
AccessPolicy=0
AccessControlList=
WdsEnable=0
WdsNum=0
WdsList=
====================

* modules.tar.gz (1327.85 KB - downloaded 172 times.)
* upgrade-v4.img.gz (3365.51 KB - downloaded 2043 times.)
« Last Edit: April 12, 2007, 23:11:27 PM by pagano » Logged
sanecyclist
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #6 on: April 13, 2007, 05:57:43 AM »

Thank you very very much pagano! Smiley

I've installed Debian Etch on my Safecom and am currently starting it by configuring the network and invoking services from autoexec, but it means that runlevels and shutdown don't work. With your new version I'll try booting it properly by invoking init.

ps: The firmware download doesn't work, it results in a 0-byte file Sad. The modules are fine.
« Last Edit: April 13, 2007, 06:05:13 AM by sanecyclist » Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #7 on: April 13, 2007, 07:14:33 AM »

I am aware of the 0 kbyte downloads.

You can now find both files in the downloads section of the site:

http://www.macsat.com/macsat/component/option,com_docman/task,cat_view/gid,22/Itemid,63/
« Last Edit: April 13, 2007, 07:31:58 AM by macsat » Logged
ender_x
Newbie
*
Offline Offline

Posts: 1


View Profile
« Reply #8 on: April 13, 2007, 07:21:03 AM »

Yeah same here. 0 byte file.. after getting so excited.. ;-) I guess good things come to those who wait.

I assume your loading your usb/scsi modules before your hitting the disks? and pausing for the usb to settle? or is it being done in the initrd? I'm really green when it comes to embedded. hope I'm more helpful then harmful.
Anyways a great improvement on v3's alternate os boot support.
Speaking of "update-v3".. may I suggest a more explicative naming scheme. MGB100-v4 perhaps? :-) While were on names.. perhaps linuxrc instead of autoinit..maybe that would be confusing.
Nice work Pagano
ender_x

ps how does one get these message your printing? serial? where do I solder my wires?
pss whats the format of the bin? I can't seem to figure it out.
psss maybe we should start an svn of binary parts of the image.. if we can script the building ..and make this incremental changes easier.
Logged
sanecyclist
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #9 on: April 13, 2007, 07:43:11 AM »

Hi ender_x, I'll try answering a couple of your questions. The USB and filesystem drivers are compiled into the kernel, and only the closed-source wireless driver comes as a module. I think the .bin is a flash image which contains both the kernel and a compressed root file system that the kernel unpacks into ram at start-up. I don't know how the kernel is actually booted, but I assume it's something like RedBoot.

I agree about the "update" name, but "MGB100" wouldn't be great either, because there a number of different brands, and this particular update is actually based on the Conceptronic version. Also, "linuxrc" wouldn't be suitable because that's intended for initrds and is expected to do any necessary setup and exit before the kernel invokes init, whereas "autoinit" is itself intended to hand over to the actual init.

« Last Edit: April 13, 2007, 07:52:48 AM by sanecyclist » Logged
sanecyclist
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #10 on: April 13, 2007, 09:49:22 AM »

Thanks for uploading it to the downloads section, macsat. Thought I'd have a look just in case and there it was. Smiley
Logged
pagano
Jr. Member
**
Offline Offline

Posts: 61


View Profile
« Reply #11 on: April 15, 2007, 05:27:04 AM »

http://gepage.googlepages.com/autobootfs..whd.v4.gz

gunzip (30mb)
rename to autobootfs
drop in your boot device

If you have an autoinit in the same device, autobootfs will be ignored.
Its original firmware, with some utilities in /usr/bin

Make your own changes/tools and share it  Wink

Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #12 on: April 15, 2007, 11:12:19 AM »


Hi Pagano

What exactly IS this file? :-)

Logged
sanecyclist
Newbie
*
Offline Offline

Posts: 45


View Profile
« Reply #13 on: April 15, 2007, 16:53:12 PM »

If I understand it correctly, it's the replacement for the "HDD/USB Filesystem for V3" to go with Pagano's firmware V4. But unlike that it's not a tgz that you need to untar into the root of an ext2 partition, instead it's a (gzipped) filesytem image that can directly be mounted. Firmware V4 tries to mount an image called 'autobootfs' if it can't find an 'autoinit' to execute. I think the advantage is that you can simply stick it on a FAT disk, i.e. you don't need to format with ext2.

ps: I've now got Debian booting properly using autoinit, so that runlevels and shutdown work correctly, and the only part of the firmware left running is the kernel. Also added "umount -l /ramroot" to autoinit to free up the ramdisk. Great work, Pagano, thank you very much again.
Logged
pagano
Jr. Member
**
Offline Offline

Posts: 61


View Profile
« Reply #14 on: April 16, 2007, 07:58:08 AM »

Thanks for the explanation sanecyclist. The filesystem is the same as original firmware.
The only changes in firmware is the boot script as explained in firmware file.
This is an example of the autofsboot, is not a "new" version.

The good news:
Here is the wireless ralink 2500 module for out firmware. (last version from today CVS)
Monitor mode for aircrack/kismet and can be managed from iwconfig.
Don't full tested but i think we need old module for SoftAP (access point mode)

* rt2500.o.gz (81.1 KB - downloaded 144 times.)
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.17 seconds with 24 queries.