This package is used for building a web server with Altera NIOS Development 
Kits(Cyclone Edition).  And the file can tell you how to build it step by step.

0. Preamble
        In this document, I assume you already well know about Quartus, NIOS2, 
    eCos, Redboot , GDB and Linux operations.  If not , please read relative 
    documents before this document. 
    
1. Architecture
    This system is constructed by below component:
    Hardware platform ==> Altera NIOS/NIOS2 Developemnt Kit, Cyclone Edition.
    CPU               ==> NIOS2
    OS                ==> eCos
    Web Server        ==> goAhead
    
2. Requirement
    1) Windows environment 
       Win2K + Quartus 4.1(SP2) + NIOS2 1.01
    2) Linux environment
       Fedora Core2

3. Install
        First, to build the hardware platform, you must work under windows 
    environment. The hardware files is compressed at 
    ./hardware/nios2_cyclone_kits_20050427.tar.gz. Extract it, there is a directory 
    that include Quartus project & nios2 SDK. It also have a compiled FPGA file.
    Just download the file to your hardware platform. It should be worked.
        Now, if the hardware worked, then build the NIOS2 GNU tool-chain.  Execute
    the file "install_nios2_tool_chain" under linux.  It will build full nios2 
    tool-chain automaticly to $HOME/ebtools/nios2.  It also generate the
    environment setting file "nios2_env.sh".  You may source this file in your 
    login profile.
        Then, install eCos to linux enviroment. Please refer 
    http://sources.redhat.com/ecos/ to install it.
        Last step is setup working directory.  Just execute "install", it will
    generate all necessary files include new eCos package(Note: this package is
    newer than you install from redhat web site) under "build" directory.  
    Then, you must run eCos "configtool" command to change repository directory
    to build/eCos/packages. Then add the package "eCos4Nios2-1.1.epk" into working
    packages.

4. Build Redboot
        First, execute "configtool", then open nios2_redboot_init.ecc, choose 
   Build->Generate Build Tree, then choose Build->Library.  It will generate 
   the redboot ELF file at nios2_redboot_init_install/bin/redboot.elf. 
   Convert it to SREC format typing:
      'nios2-elf-objcopy -O SREC redboot.elf redboot.srec'
   will gererate the srec file for redboot. Then download the file to your platform
   by follow step.
        Now switch to windows environment, follow Altera's document to open a SDK
   shell.  Press button SW0 and power on your hardware.  It will execute the 
   build-in ROM monitor "GERMS". Use 'nios2-run' command to download redboot.srec
   to your hardware.  After download, you should see the redboot is working.
   This version redboot only work on RAM, when you poweroff, you must download it
   again.  The best way is generate another redboot by nios2_redboot_ROMRAM.ecc.
   This version can stored into flash.  You must download INIT version redboot first,
   then use it to store ROMRAM version to flash. Remember, ROMRAM version must be
   stored at address 0x800000. When finish, reset your hardware again, you should
   see the redboot is running.
      
5. Build eCos library
        Use "nios2.ecc" to build the eCos library.
        
6. Prepare your web page
        Put your web data into a directory /www in CF disk. Main web filename
   must be "index.htm". Please make sure all of your web files must use filename 
   length = 8.3 , becuase this version don't support long filename, and only work 
   on FAT16 filesystem.

7. Build goAhead Web Server
        In build/ws031202/ECOS. type 'make' to compile the program. It will generate
   ELF file named "webs".  Use redboot or nios2-elf-gdb to download and execute
   it.
   
Now, enjoy it!!

2005/04/27  Hao (ebspace@gmail.com)
    
    
    


