#!/bin/bash #Shows how to compile the ethernut 4.6.5 software for Arthernet. #Howto version 1.0 #tested on Kubuntu 8.04 #for a detailed instruction (and somewhat different way) http://www.ethernut.de/en/documents/debian.html may be interesting #this script expects all needed libs to be installed mkdir ethernut cd ethernut wget http://www.ethernut.de/arc/ethernut-4.6.5.tar.bz2 chmod a-w ethernut-4.6.5.tar.bz2 tar x --bzip2 -f ethernut-4.6.5.tar.bz2 chmod u+w ethernut-4.6.5.tar.bz2 ln -s ethernut-4.6.5 nut cd nut ./configure --prefix=/opt/nutos make sudo make install PATH="$PATH:/opt/nutos/bin" export PATH cd .. nutconfigure -c nut/conf/arthernet1.conf -a nutapp_arthernet -b nutbld_arthernet create-buildtree nutconfigure -c nut/conf/arthernet1.conf -a nutapp_arthernet -b nutbld_arthernet create-apptree #fix 1. bug in ethernut mkdir nut/bin/atmega128 #mkdir nut/bin/atmega103 #avoid 2. bug in ethernut echo "Avoid missing defines (ARTHERCPLDSTART and ARTHERCPLDSPI) in lines 580 and 581 by commenting them out" kate nut/arch/avr/os/nutinit.c #fix 3. bug in ethernut, this one took me days to figure out! echo "devEth0 needs to be defined, otherwise no examples with network usage would work" echo "add '|| defined(ARTHERNET1)' to the line 140 in the file board.h to include nicrtl.h" kate nut/include/dev/board.h #avoid 4. bug (not that much important): nutpiper wont compile, because of conflicting interrupts with the ethernet device on arthernet echo "the nutpiper demo wont compile because of different used interrupts." echo "add an empty target 'install' and comment out 'include ../Makerules' " kate nutapp_arthernet/nutpiper/Makefile #TODO: fix 5. bug (unimportant): isp2 does nothing if compiling cd nutbld_arthernet make clean install cd ../nutapp_arthernet make clean install