
INTRODUCTION:
-------------

The software for the UNICORN II ADSL USB card consists of one loadable driver, the unicorn_usb_eth.ko.The unicorn_atm driver is a standard Linux ATM driver, that performs segmentation and reassembly (SAR) and flow control. The unicorn_usb driver contains the ADSL modem software and hardware related functions. 

The software has been tested with the Linux 2.6.3 and 2.6.15-7 kernel.

Compiling and activating the driver
-----------------------------------

The driver can be compiled from the root directory unicorn_linux. First all files from libm directory will be built. This will create a libm.a library needed by the unicorn ethernet and atm driver. Once this library has been built the Makefile in unicorn_usb will be called. This will compile the ethernet driver, the atm driver and the usb driver. Finally it will create the module unicorn_usb_eth.ko in /unicorn_usb/ . Note that for this purpose the modemsoftware library must be in arch/i386. 
The building procedure can be started as follows:

	1) Compiling

		# make modules 

	2) Install
	
		# make modules_install

This command will keep the driver in the kernel.
 
Once building is finished you can load the module in the kernel.

	3) Inserting Module

		# modprobe unicorn_usb_eth ActivationMode=3 VPI=8 VCI=40 PROTOCOL=RFC2684_BRIDGED ENCAPS=llc-encaps   

If you plug in the modem now it should start activating. 

	4) Removing Module

	# rmmod unicorn_usb_eth

This should remove the module from the kernel. As a result the module should no longer be listed after calling lsmod.

Once the module is loaded in the kernel you should be able to see the interface when running ifconfig. 

You can start a PPP connection or a bridged/routed connection by activating the interface.

Compiling the control & status application
------------------------------------------

For building the control & status application go to unicorn_linux/adsl_status directory and follow the following steps.

	1) Configure

		# ./autogen.sh

This will create lots of files needed for building the control & status application. This process needs different packages to be installed on your computer. It will produce an error if it misses something to create the Makefile.

Now run the Makefile.

	2) Compile

		# make

This will build the application.

You can start the control & status application by typing adsl_status/src/st_adsl_status  from root directory(ie. ./unicorn_linux/).

For changing the logo of the application you can use Glade. Glade is a free user interface builder released under GNU GPL Licence. See Glades homepage for more info. We made use of Glade-2 to design the GUI. 

If Glade-2 is installed, you can change the Logo as follow:
Glade-2 st_adsl_status.glade

Once the logo is changed, save the project and build it.
You can now compile the control & status application as explained before.

To make rpm package
	1) Follow the steps above, to build the driver and status application .
	2) To make package type "make rpm" from root directory(ie. ./unicorn_linux/).

To install RPM package
	rpm -ihv package_name.rpm (e.g. rpm -ihv USB-APL-7-2.0-0.2.0.19-FC2-Alpha.i386.rpm)

To uninstall RPM package
	rpm -e package_name (e.g. rpm -ihv USB-APL-7-2.0-0.2.0.19-FC2-Alpha.i386)

To build Unicorn II GUI for moddem configuration (This process need TclPro installed)
	1) cd srcipts
	2) ./build.src
	3) unicorn_config stand alone application will be generated
	This application hepls to update the Module parameters.
	When you click "Apply" button it will unload and loads the Driver with the updated parameters.
	
	adsl_config.tcl can be executed directly using wish.
	For this bwidgets supplied along with the package, should be present in the default library search path of wish.
	on most of the systems it is like this "/usr/share/tcl8.4 /usr/share /usr/lib /usr/share/tk8.4"

