Now builds and runs on linux (but won't compile or upload programs); see notes in make.sh for setting up environment.

This commit is contained in:
David A. Mellis 2005-09-21 20:34:06 +00:00
parent b966e73e02
commit ae6b490b5e
10 changed files with 108 additions and 128 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
CLASSPATH=java/lib/rt.jar:lib:lib/build:lib/pde.jar:lib/core.jar:lib/antlr.jar:lib/oro.jar:lib/registry.jar:lib/mrj.jar
CLASSPATH=java/lib/rt.jar:lib:lib/build:lib/pde.jar:lib/core.jar:lib/antlr.jar:lib/oro.jar:lib/registry.jar:lib/mrj.jar:lib/RXTXcomm.jar
export CLASSPATH
# put the directory where this file lives in the front of the path, because
@ -9,6 +9,10 @@ export CLASSPATH
PATH=`pwd`/`dirname $0`:`pwd`/java/bin:${PATH}
export PATH
# put the directory with the native RXTX libs in the library path
LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
# test to see if jikes is operable. i'm a crappy bash scripter
# so if someone knows a more elegant way to do this, let me know.
#

30
build/linux/dist/bootloader/burn vendored Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
# 25.06.2005 mbanzi
#
# Arduino project http://arduino.berlios.de
#
# quick and dirty script to set the proper fuses and lock bits
# while loading the bootloader onto a brand new arduino board
#
# very useful also when for some reasons the bootloader disappears
#
# TODO: cleanup and make it more user friendly
# TODO: move this (and related) scripts to platform dist/ dirs
#
# expects an STK500 compatible programmer on the specified serial port
# if you use the parallel port programmer you need to change the dprog
# parametre
#
#BINDIR=/usr/local/avr/bin
#BINDIR=../build/macosx/work/tools/avr/bin
PORT=/dev/ttyS0
#PORT=/dev/tty.usbserial0
#PORT=/dev/tty.USA19QW3b1P1.1
#PORT=/dev/tty.USA19QW1b1P1.1
uisp -dpart=ATmega8 -dprog=stk500 -dserial=$PORT -dspeed=115200 --wr_lock=0xFF
uisp -dpart=ATmega8 -dprog=stk500 -dserial=$PORT -dspeed=115200 --wr_fuse_l=0xdf --wr_fuse_h=0xc8
uisp -dpart=ATmega8 -dprog=stk500 -dserial=$PORT -dspeed=115200 --erase --upload if=ATMegaBOOT.hex -v
uisp -dpart=ATmega8 -dprog=stk500 -dserial=$PORT -dspeed=115200 --wr_lock=0xCF

BIN
build/linux/dist/jikes vendored

Binary file not shown.

BIN
build/linux/dist/lib/librxtxI2C.so vendored Executable file

Binary file not shown.

BIN
build/linux/dist/lib/librxtxParallel.so vendored Executable file

Binary file not shown.

BIN
build/linux/dist/lib/librxtxRS485.so vendored Executable file

Binary file not shown.

BIN
build/linux/dist/lib/librxtxRaw.so vendored Executable file

Binary file not shown.

BIN
build/linux/dist/lib/librxtxSerial.so vendored Executable file

Binary file not shown.

View File

@ -1,159 +1,105 @@
#!/bin/sh
# Part of the Arduino project
# http://arduino.berlios.de
#
# this is derived from the processing project
# http://www.processing.org
#
# This file is subjected to the GPL License
# NOTE: before running this script, you must set CLASSPATH to
# your standard Java classpath, and DIRAVR to the root of your
# avr-gcc installation.
### -- SETUP WORK DIR -------------------------------------------
if test -d work
if test -d work
then
BUILD_PREPROC=false
else
echo Setting up directories to build for linux...
BUILD_PREPROC=true
cp -r ../shared work
# needs to make the dir because of packaging goofiness
echo Setting up directories to build under Linux
mkdir -p work/classes/processing/app/preproc
mkdir -p work/classes/processing/app/syntax
mkdir -p work/classes/processing/app/tools
mkdir -p work/lib/build
mkdir -p work/examples
#cp -r ../../lib work/libraries
cp -r ../../net work/libraries/
cp -r ../../opengl work/libraries/
cp -r ../../serial work/libraries/
cp -r ../../video work/libraries/
#need to replace this with the linux native library for RXTX
#cp ../../lib/librxtxSerial.jnilib work/
cd work
unzip -q examples.zip
rm examples.zip
cd ..
cp dist/arduino work/
# copy the avr-gcc distribution
#echo Copying tools \(this may take a minute\)...
cd work
unzip -q reference.zip
rm reference.zip
cd ..
tar --extract --file=jre.tgz --ungzip --directory=work
#mkdir work/lib/export
mkdir work/lib/build
#mkdir work/classes
# get the serial stuff
#echo Copying serial support from bagel dir
#cp ../../bagel/serial/RXTXcomm.jar work/lib/
#mkdir work/lib/i386
#cp ../../bagel/serial/librxtxSerial.so work/lib/i386/libSerial.so
#chmod +x work/librxtxSerial.so
# get jikes and depedencies
cp dist/jikes work/
chmod +x work/jikes
install -m 755 dist/processing work/processing
# for now, require all linux users to install avr-gcc themselves
#cp -pR dist/tools.zip work/
#cd work
#unzip -oq tools.zip
#rm tools.zip
#cd ..
fi
echo Copying shared and core files...
cp -r ../shared/* work
cp -r ../../core work
echo Extracting examples...
unzip -d work/examples ../shared/dist/examples.zip
echo Copying dist files...
cp -r dist/lib work/
cp -r dist/core work/
cp -r dist/bootloader work/
### -- START BUILDING -------------------------------------------
# move to root 'arduino' directory
cd ../..
### -- BUILD GCC ------------------------------------------------
# in the future we will build avr-gcc and tools (if they don't exist)
### -- BUILD CORE ----------------------------------------------
echo Building processing.core
# move to bagel inside base 'processing' directory
cd core
# new regular version
CLASSPATH="../build/linux/work/java/lib/rt.jar"
export CLASSPATH
perl preproc.pl
../build/linux/work/jikes -d . +D -target 1.1 *.java
zip -rq ../build/linux/work/lib/core.jar processing
rm -rf processing
# back to base processing dir
### -- BUILD BOOTLOADER ----------------------------------------
cd bootloader
make
cp ATmegaBOOT.hex ../build/linux/work/bootloader
cd ..
### -- BUILD PREPROC ------------------------------------------------
echo Building PDE for JDK 1.3
cd app/preproc
# first build the default java goop
# long path is to avoid requiring java to be in your PATH
../../build/linux/work/java/bin/java \
-cp ../../build/linux/work/lib/antlr.jar antlr.Tool java.g
# now build the pde stuff that extends the java classes
../../build/linux/work/java/bin/java \
-cp ../../build/linux/work/lib/antlr.jar antlr.Tool -glib java.g pde.g
cd ../..
### -- BUILD PDE ------------------------------------------------
### -- BUILD PARSER ---------------------------------------------
cd app
CLASSPATH="../build/linux/work/lib/core.jar:../build/linux/work/lib/mrj.jar:../build/linux/work/lib/antlr.jar:../build/linux/work/lib/oro.jar:../build/linux/work/lib/registry.jar:../build/linux/work/java/lib/rt.jar"
if $BUILD_PREPROC
then
cd preproc
# build classes/grammar for preprocessor
echo Building antlr grammar code...
# first build the default java goop
java -cp ../../build/linux/work/lib/antlr.jar antlr.Tool java.g
# now build the pde stuff that extends the java classes
java -cp ../../build/linux/work/lib/antlr.jar antlr.Tool -glib java.g pde.g
cd ..
fi
../build/linux/work/jikes -target 1.3 +D -classpath $CLASSPATH:../build/linux/work/classes -d ../build/linux/work/classes *.java preproc/*.java syntax/*.java tools/*.java
### -- BUILD PDE ------------------------------------------------
echo Building the PDE...
# compile the code as java 1.3, so that the application will run and
# show the user an error, rather than crapping out with some strange
# "class not found" crap
jikes -target 1.3 +D -classpath ../build/linux/work/classes:../build/linux/work/lib/antlr.jar:../build/linux/work/lib/oro.jar:../build/linux/work/lib/registry.jar:../build/linux/work/lib/RXTXcomm.jar:../build/linux/work/lib/mrj.jar:$CLASSPATH -d ../build/linux/work/classes tools/*.java preproc/*.java syntax/*.java *.java
cd ../build/linux/work/classes
rm -f ../lib/pde.jar
zip -0rq ../lib/pde.jar .
cd ../../../..
cd ../..
### -- BUILD LIBRARIES ------------------------------------------------
cd build/linux
PLATFORM=linux
#CLASSPATH="../../build/linux/work/lib/core.jar:../../build/linux/work/java/lib/rt.jar"
CLASSPATH=../build/$PLATFORM/work/lib/core.jar:$CLASSPATH
JIKES=../build/$PLATFORM/work/jikes
CORE=../build/$PLATFORM/work/lib/core.jar
LIBRARIES=../build/$PLATFORM/work/libraries
# move to processing/build
cd ..
# SERIAL LIBRARY
echo Building serial library...
cd ../serial
$JIKES -target 1.1 +D -classpath "code/RXTXcomm.jar:$CORE:$CLASSPATH" -d . *.java
rm -f library/serial.jar
zip -r0q library/serial.jar processing
rm -rf processing
mkdir -p $LIBRARIES/serial/library/
cp library/serial.jar $LIBRARIES/serial/library/
# NET LIBRARY
echo Building net library...
cd ../net
$JIKES -target 1.1 +D -d . *.java
rm -f library/net.jar
zip -r0q library/net.jar processing
rm -rf processing
mkdir -p $LIBRARIES/net/library/
cp library/net.jar $LIBRARIES/net/library/
# OPENGL LIBRARY
echo Building OpenGL library...
cd ../opengl
$JIKES -target 1.1 +D -classpath "library/jogl.jar:$CLASSPATH" -d . *.java
rm -f library/opengl.jar
zip -r0q library/opengl.jar processing
rm -rf processing
mkdir -p $LIBRARIES/opengl/library/
cp library/opengl.jar $LIBRARIES/opengl/library/
echo
echo Done.

View File

@ -1,3 +1,3 @@
#!/bin/sh
cd work && ./processing && cd ..
cd work && ./arduino && cd ..