#!/bin/bash
#
# .goqtopieembrc
# 11.10.03 - sc V0.1.6
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (emb)
# -------------------------------------------------
TEMPFILE="$HOME/_embprep.tmp"
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=$TCDPATH/bin
# QTDIR is the directory, where the QT-EMB-Directory is located.
QTDIR=$TCDPATH/qt2opie-emb
# QPEDIR is the directory, where the QPE-EMB-Directory is located.
QPEDIR=$TCDPATH/opie-emb
OPIEDIR=$TCDPATH/opie-emb
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
# embedded mit LD_LIBRARY_PATH to find embedded stuff.
LD_LIBRARY_PATH=/usr/local/lib-emb:$QTDIR/lib:$OPIEDIR/lib:$LD_LIBRARY_PATH:$LD_LIBRARY_PATH_SAVE
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH LD_LIBRARY_PATH QVFB_PATH
export QPEDIR OPIEDIR
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
# -------------------------------------------------
# QTLINKLOCATION .....
export QTLINKBASE=$TCDPATH
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I/usr/local/include-emb"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Libnrary PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L/usr/local/lib-emb"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-emb
INC_INST_PATH=/usr/local/include-emb
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=gcc
CXX=g++
CCX=gcc
CXXX=g++
COMPILER=gcc
LINKER=g++
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqte -lqpe -lopie"
KDEVXT_LIB="-lopie"
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS="-DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe"
export OPTIONS
# set the prompt ...
PS1="[QT-CDOPIEEMB]:\w\$ "
#!/bin/bash
#
# .goqtopiearm2953rc
# 11.10.03 - sc V0.1.6
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
TEMPFILE="$HOME/_ipaqprep.tmp"
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=$TCDPATH/arm/2.95.3
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=$TCDPATH/armdev/linux-arm-kernel
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=$TCDPATH/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=$TCDPATH/qt2opie-ipaq
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=$TCDPATH/opie-ipaq
OPIEDIR=$TCDPATH/opie-ipaq
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH
export QPEDIR OPIEDIR
# -------------------------------------------------
# QTLINKLOCATION .....
export QTLINKBASE=$TCDPATH
#-------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I$KERNEL_PATH/include \
-I$COMPILER_PATH/include \
-I$TCDPATH/include/ipaq \
-I/usr/local/include-arm"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Library PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L$KERNEL_PATH/lib \
-L$COMPILER_PATH/lib \
-L$TCDPATH/lib/ipaq \
-L/usr/local/lib-arm"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-arm
INC_INST_PATH=/usr/local/include-arm
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-gcc
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/arm-linux-strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqte -lqpe -lopie"
KDEVXT_LIB="-lopie"
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS="-DQT_QWS_IPAQ -DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe"
export OPTIONS
# set the prompt ...
PS1='[QT-CDOPIE2953]:\w\$ '
The XScale usable script makes a 3.2.3 crosscompiler usable. The script checks first, which version of glic (2.3 or 2.2) you are using. Dependent on that, the link uses either 3.2.3 or 3.2.3-glibc crosscompiler.
The last one was build with the help of Jamey Hicks and is included on the CD.
#!/bin/bash
#
# .goqtopiearm323rc
# 11.10.03 - sc V0.1.6
# 01.11.03 - sc V0.1.7
# tries to find out, which glibc (2.3 or 2.2) is used
# and uses the fitting compiler
# default is 2.2
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
GLIBCAPP="-glibc-2.2"
GLIBCTYPE=`grep -c GLIBC_2.3 /lib/libc.so.6`
if [ "$GLIBCTYPE" != "0" ];then
GLIBCAPP="-glibc-2.3"
fi
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
TEMPFILE="$HOME/_ipaqprep.tmp"
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=$TCDPATH/arm/3.2.3$GLIBCAPP
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=$TCDPATH/linux-xscale-kernel
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=$TCDPATH/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=$TCDPATH/qt2opie-ipaq
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=$TCDPATH/opie-ipaq
OPIEDIR=$TCDPATH/opie-ipaq
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH
export QPEDIR OPIEDIR
# -------------------------------------------------
# QTLINKLOCATION .....
export QTLINKBASE=$TCDPATH
#-------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I$KERNEL_PATH/include \
-I$COMPILER_PATH/include \
-I$TCDPATH/include/ipaq \
-I/usr/local/include-arm"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Library PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L$KERNEL_PATH/lib \
-L$COMPILER_PATH/lib \
-L$TCDPATH/lib/ipaq \
-L/usr/local/lib-arm"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-arm
INC_INST_PATH=/usr/local/include-arm
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-gcc
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/arm-linux-strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqte -lqpe -lopie"
KDEVXT_LIB="-lopie"
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS="-DQT_QWS_IPAQ -DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe"
export OPTIONS
# set the prompt ...
PS1='[QT-CDOPIE323]:\w\$ '
#!/bin/bash
#
# .goqtopiearmsharprc
# 11.10.03 - sc V0.1.6
# -------------------------------------------------
# sets some Environment variables for QT OPIE
# Crosscompiling (arm)
# -------------------------------------------------
TEMPFILE="$HOME/_sharpprep.tmp"
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
# PATHs .....
# Compiler-Path is the directory, where your Cross-compiler
# is located. It is used to find the compiler includes.
COMPILER_PATH=$TCDPATH/Embedix/tools
# Kernel-Path is the directory, where your ARM-Kernel
# is located. It is used to find the kernel includes and libraries.
# Note !!! If you are using different kernelversions (like me)
# set a link to the destination kernel. By changing the link
# you can easily change the kernel-version.
KERNEL_PATH=$TCDPATH/armdev/linux-arm-kernel
# QVFB_PATH is the directory, where the QT-Framebuffer is located.
QVFB_PATH=$TCDPATH/bin
# QTDIR is the directory, where the QT-ARM-Directory is located.
QTDIR=$TCDPATH/qt2opie-sharp
# QPEDIR is the directory, where the QPE-ARM-Directory is located.
QPEDIR=$TCDPATH/opie-sharp
OPIEDIR=$TCDPATH/opie-sharp
# PATH has to be added by QTDIR QVFB and COMPILER-PATH bins.
PATH=$QTDIR/bin:$QVFB_PATH:$COMPILER_PATH/bin:$PATH
# MANPATH has to be added by QTDIR mans.
MANPATH=$QTDIR/man:$MANPATH
export COMPILER_PATH KERNEL_PATH
export QTDIR PATH MANPATH QVFB_PATH
export QPEDIR OPIEDIR
UICPATH=$QTDIR/bin
UIC=$QTDIR/bin/uic
export UICPATH UIC
# -------------------------------------------------
# QTLINKLOCATION .....
export QTLINKBASE=$TCDPATH
# -------------------------------------------------
# Extensions .....
# Extensions maybe used, if you run self-created Makefiles to
# compile for ARM and EMB / QT.
_EXT=arm.o
SO_EXT=arm.so
LIB_EXT=arm.so
HEADER_EXT=arm.h
CPP_EXT=arm.cpp
export _EXT SO_EXT LIB_EXT HEADER_EXT CPP_EXT
# -------------------------------------------------
# Include PATHs .....
# INCLUDE-PATHs are used to add extra include paths
EXTRA_INC_PATH="-I$QTDIR/include \
-I$OPIEDIR/include \
-I$KERNEL_PATH/include \
-I$COMPILER_PATH/include \
-I$TCDPATH/include/sharp \
-I/usr/local/include-arm"
# CXXFLAGS_EXTRA and CFLAGS_EXTRA are used during
# OPIE compilation itself
CXXFLAGS_EXTRA=$EXTRA_INC_PATH
CFLAGS_EXTRA=$EXTRA_INC_PATH
# Libnrary PATHs .....
# LIBRARY-PATHs are used to add extra library paths
EXTRA_LIB_PATH="-L$QTDIR/lib \
-L$OPIEDIR/lib \
-L$KERNEL_PATH/lib \
-L$COMPILER_PATH/lib \
-L$TCDPATH/lib/sharp \
-L/usr/local/lib-arm"
# LDFLAGS_EXTRA and LFLAGS_EXTRA are used during
# OPIE linking itself
LDFLAGS_EXTRA=$EXTRA_LIB_PATH
LFLAGS_EXTRA=$EXTRA_LIB_PATH
export EXTRA_INC_PATH EXTRA_LIB_PATH
export CXXFLAGS_EXTRA CFLAGS_EXTRA LDFLAGS_EXTRA LFLAGS_EXTRA
# -------------------------------------------------
# Installation PATHs .....
# Install-PATHs are used to define the installation PATH
# for self created libs (used for qt/emb/arm)
LIB_INST_PATH=/usr/local/lib-arm
INC_INST_PATH=/usr/local/include-arm
export LIB_INST_PATH INC_INST_PATH
# -------------------------------------------------
# Programs .....
# some Makefiles use the follwing Environment variables
# to find the right compiler / linker
CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-ld
# the strip-program (strips down the size of the binary
# deleting all debug-information)
STRIP_PROG=$COMPILER_PATH/bin/strip
# some Makefiles use the follwing Environment variable
# to define a preprocessor
PREPROCESSCMD="$COMPILER -E"
export STRIP_PROG COMPILER LINKER PREPROCESSCMD CC CXX CCX CXXX
# -------------------------------------------------
# Libraries .....
# define extra libraries
XT_LIB="-lqte -lqpe -lopie"
KDEVXT_LIB="-lopie"
export XT_LIB KDEVXT_LIB
# -------------------------------------------------
# Extra Options .....
# used extra options for your compiler
# QWS_OPIE von sc wegen colorDialog, fileDialog, etc
OPTIONS="-DQT_QWS_IPAQ -DQWS -DQWS_OPIE -fno-exceptions -fno-rtti -pipe"
export OPTIONS
# set the prompt ...
PS1="[QT-CDOPIESHARP]:\w\$ "
#!/bin/bash
# loescht die notwendigen Links auf dem host und legt neue an.
# wechselt in die 2935-umgebung, setzt den Pfad
# und startet eine neue bash
# V0.1.1 - 111003 - sc
# V0.1.2 - 301003 - sc
# - BASEENVI integrated
HERE=$PWD
QMAKE=qmake
TEMPFILE="$HOME/_embprep.tmp"
TCDPATH=/cdrom
TPRECOMP=
TCOMP=
# ---------------------------------------------
# set the last environment variables
# ---------------------------------------------
set_old_values()
{
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
CDPATH=$TCDPATH
PRECOMP=$TPRECOMP
COMP=$TCOMP
}
# ---------------------------------------------
# request CDPATH variables
# ---------------------------------------------
read_cd_path()
{
echo -n "where is your CD mounted ? $TCDPATH : "
read ANS
if [ "$ANS" == "" ];then
CDPATH=$TCDPATH
else
CDPATH=$ANS
fi
}
# ---------------------------------------------
# inform user and configure new links
# ---------------------------------------------
reconfig_links()
{
cd $CDPATH > /dev/null 2>&1
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "$CDPATH not found, exiting unsuccessfully ..."
exit 1
fi
ii=0
while [ "$ii" -lt 3 ];do
if [ "$HOME" != "/root" ];then
echo -n "Enter superuser "
fi;
su root -c "./.setlinks.rc $CDPATH $PRECOMP $COMP"
ECODE=$?
if [ "$ECODE" != 0 ] && [ "$ECODE" != 127 ];then
ii=$(($ii+1))
else
# Eingabe war OK
ii=3
fi
done
if [ "$ECODE" != 0 ];then
echo ".setlinks.rc returned NOK, exiting unsuccessfully ..."
exit 1
fi
}
restore_links()
{
cd $CDPATH
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "$CDPATH not found, exiting unsuccessfully ..."
exit 1
fi
ii=0
while [ "$ii" -lt 3 ];do
if [ "$HOME" != "/root" ];then
echo -n "Enter superuser "
fi;
su root -c "./.resetlinks.rc $PRECOMP $COMP"
ECODE=$?
if [ "$ECODE" != 0 ] && [ "$ECODE" != 127 ];then
ii=$(($ii+1))
else
# Eingabe war OK
ii=3
fi
done
if [ "$ECODE" != 0 ];then
echo ".resetlinks.rc returned NOK, exiting unsuccessfully ..."
exit 1
fi
}
# ---------------------------------------------
# write the input into the environment file
# ---------------------------------------------
write_result ()
{
echo "#!/bin/sh" > $TEMPFILE
echo "# automatically stored during last embprep run" >> $TEMPFILE
echo "export TCDPATH=$CDPATH" >> $TEMPFILE
echo "export TCPRECOMP=$PRECOMP" >> $TEMPFILE
echo "export TCOMP=$COMP" >> $TEMPFILE
}
show_result ()
{
echo ------------------------------------
echo "export CDPATH = $CDPATH"
echo "export PRECOMP = $PRECOMP"
echo "export COMP = $COMP"
echo ------------------------------------
echo
echo -n "Do you want to use that config ? [Y]es, [n]o : "
read YN
case "$YN" in
y | Y ) return 0;;
* ) return 1;;
esac
exit 1
}
doit()
{
cd $HERE
export BASEENVI="$CDPATH/environ"
/bin/bash --rcfile $CDPATH/environ/.goqtopieembrc
}
set_old_values
read_cd_path
if ! show_result
then
exit 2
fi
write_result
# reconfig_links
doit
# restore_links
exit $EXITCODE
#!/bin/bash
# loescht die notwendigen Links auf dem host und legt neue an.
# wechselt in die 2935-umgebung, setzt den Pfad
# und startet eine neue bash
# V0.1.1 - 111003 - sc
CALLNAME=`echo $0 | sed -n '/ipaq2prep.rc$/p'`
HERE=$PWD
QMAKE=qmake
TEMPFILE="$HOME/_ipaqprep.tmp"
TCDPATH=/cdrom
TPRECOMP=/usr/local/
TCOMP=arm
# ---------------------------------------------
# set the last environment variables
# ---------------------------------------------
set_old_values()
{
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
CDPATH=$TCDPATH
PRECOMP=$TPRECOMP
COMP=$TCOMP
}
# ---------------------------------------------
# request CDPATH variables
# ---------------------------------------------
read_cd_path()
{
echo -n "where is your CDImage mounted ? $TCDPATH : "
read ANS
if [ "$ANS" == "" ];then
CDPATH=$TCDPATH
else
CDPATH=$ANS
fi
}
# ---------------------------------------------
# inform user and configure new links
# ---------------------------------------------
reconfig_links()
{
cd $CDPATH > /dev/null 2>&1
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "$CDPATH not found, exiting unsuccessfully ..."
exit 1
fi
ii=0
while [ "$ii" -lt 3 ];do
if [ "$HOME" != "/root" ];then
echo -n "Enter superuser "
fi;
su root -c "./.setlinks.rc $CDPATH $PRECOMP $COMP"
ECODE=$?
if [ "$ECODE" != 0 ] && [ "$ECODE" != 127 ];then
ii=$(($ii+1))
else
# Eingabe war OK
ii=3
fi
done
if [ "$ECODE" != 0 ];then
echo ".setlinks.rc returned NOK, exiting unsuccessfully ..."
exit 1
fi
}
restore_links()
{
cd $CDPATH
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "$CDPATH not found, exiting unsuccessfully ..."
exit 1
fi
ii=0
while [ "$ii" -lt 3 ];do
if [ "$HOME" != "/root" ];then
echo -n "Enter superuser "
fi;
su root -c "./.resetlinks.rc $PRECOMP $COMP"
ECODE=$?
if [ "$ECODE" != 0 ] && [ "$ECODE" != 127 ];then
ii=$(($ii+1))
else
# Eingabe war OK
ii=3
fi
done
if [ "$ECODE" != 0 ];then
echo ".resetlinks.rc returned NOK, exiting unsuccessfully ..."
exit 1
fi
}
# ---------------------------------------------
# write the input into the environment file
# ---------------------------------------------
write_result ()
{
echo "#!/bin/sh" > $TEMPFILE
echo "# automatically stored during last ipaqprep run" >> $TEMPFILE
echo "export TCDPATH=$CDPATH" >> $TEMPFILE
echo "export TCPRECOMP=$PRECOMP" >> $TEMPFILE
echo "export TCOMP=$COMP" >> $TEMPFILE
}
show_result ()
{
echo ------------------------------------
echo "export CDPATH = $CDPATH"
echo "export PRECOMP = $PRECOMP"
echo "export COMP = $COMP"
echo ------------------------------------
echo
echo -n "Do you want to use that config ? [Y]es, [n]o : "
read YN
case "$YN" in
y | Y ) return 0;;
* ) return 1;;
esac
exit 1
}
doit()
{
cd $HERE
export BASEENVI="$CDPATH/environ"
/bin/bash --rcfile $CDPATH/environ/.goqtopiearm2953rc
}
set_old_values
read_cd_path
if [ "$CALLNAME" == "" ];then
if ! show_result
then
exit 2
fi
write_result
reconfig_links
fi
# if called as ipaq2prep.rc use existing links
doit
if [ "$CALLNAME" == "" ];then
restore_links
fi
exit $EXITCODE
#!/bin/bash
# loescht die notwendigen Links auf dem host und legt neue an.
# wechselt in die 323-umgebung, setzt den Pfad
# und startet eine neue bash
# V0.1.1 - 111003 - sc
CALLNAME=`echo $0 | sed -n '/xscale2prep.rc$/p'`
HERE=$PWD
QMAKE=qmake
TEMPFILE="$HOME/_xscaleprep.tmp"
TCDPATH=/cdrom
TPRECOMP=/usr/local/
TCOMP=arm
# ---------------------------------------------
# set the last environment variables
# ---------------------------------------------
set_old_values()
{
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
CDPATH=$TCDPATH
PRECOMP=$TPRECOMP
COMP=$TCOMP
}
# ---------------------------------------------
# request CDPATH variables
# ---------------------------------------------
read_cd_path()
{
echo -n "where is your CDImage mounted ? $TCDPATH : "
read ANS
if [ "$ANS" == "" ];then
CDPATH=$TCDPATH
else
CDPATH=$ANS
fi
}
# ---------------------------------------------
# inform user and configure new links
# ---------------------------------------------
reconfig_links()
{
cd $CDPATH > /dev/null 2>&1
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "$CDPATH not found, exiting unsuccessfully ..."
exit 1
fi
ii=0
while [ "$ii" -lt 3 ];do
if [ "$HOME" != "/root" ];then
echo -n "Enter superuser "
fi;
su root -c "./.setlinks.rc $CDPATH $PRECOMP $COMP"
ECODE=$?
if [ "$ECODE" != 0 ] && [ "$ECODE" != 127 ];then
ii=$(($ii+1))
else
# Eingabe war OK
ii=3
fi
done
if [ "$ECODE" != 0 ];then
echo ".setlinks.rc returned NOK, exiting unsuccessfully ..."
exit 1
fi
}
restore_links()
{
cd $CDPATH
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "$CDPATH not found, exiting unsuccessfully ..."
exit 1
fi
ii=0
while [ "$ii" -lt 3 ];do
if [ "$HOME" != "/root" ];then
echo -n "Enter superuser "
fi;
su root -c "./.resetlinks.rc $PRECOMP $COMP"
ECODE=$?
if [ "$ECODE" != 0 ] && [ "$ECODE" != 127 ];then
ii=$(($ii+1))
else
# Eingabe war OK
ii=3
fi
done
if [ "$ECODE" != 0 ];then
echo ".resetlinks.rc returned NOK, exiting unsuccessfully ..."
exit 1
fi
}
# ---------------------------------------------
# write the input into the environment file
# ---------------------------------------------
write_result ()
{
echo "#!/bin/sh" > $TEMPFILE
echo "# automatically stored during last ipaqprep run" >> $TEMPFILE
echo "export TCDPATH=$CDPATH" >> $TEMPFILE
echo "export TCPRECOMP=$PRECOMP" >> $TEMPFILE
echo "export TCOMP=$COMP" >> $TEMPFILE
}
show_result ()
{
echo ------------------------------------
echo "export CDPATH = $CDPATH"
echo "export PRECOMP = $PRECOMP"
echo "export COMP = $COMP"
echo ------------------------------------
echo
echo -n "Do you want to use that config ? [Y]es, [n]o : "
read YN
case "$YN" in
y | Y ) return 0;;
* ) return 1;;
esac
exit 1
}
doit()
{
cd $HERE
export BASEENVI="$CDPATH/environ"
/bin/bash --rcfile $CDPATH/environ/.goqtopiearm323rc
}
set_old_values
read_cd_path
if [ "$CALLNAME" == "" ];then
if ! show_result
then
exit 2
fi
write_result
reconfig_links
fi
# if called as ipaq2prep.rc use existing links
doit
if [ "$CALLNAME" == "" ];then
restore_links
fi
exit $EXITCODE
#!/bin/bash
# loescht die notwendigen Links auf dem host und legt neue an.
# wechselt in die 2935-umgebung, setzt den Pfad
# und startet eine neue bash
# V0.1.1 - 111003 - sc
CALLNAME=`echo $0 | sed -n '/sharp2prep.rc$/p'`
HERE=$PWD
QMAKE=qmake
TEMPFILE="$HOME/_sharpprep.tmp"
TCDPATH=/cdrom
TPRECOMP=/opt/
TCOMP=Embedix
# ---------------------------------------------
# set the last environment variables
# ---------------------------------------------
set_old_values()
{
if [ -e $TEMPFILE ];then
. $TEMPFILE
fi
CDPATH=$TCDPATH
PRECOMP=$TPRECOMP
COMP=$TCOMP
}
# ---------------------------------------------
# request CDPATH variables
# ---------------------------------------------
read_cd_path()
{
echo -n "where is your CDImage mounted ? $TCDPATH : "
read ANS
if [ "$ANS" == "" ];then
CDPATH=$TCDPATH
else
CDPATH=$ANS
fi
}
# ---------------------------------------------
# inform user and configure new links
# ---------------------------------------------
reconfig_links()
{
cd $CDPATH > /dev/null 2>&1
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "$CDPATH not found, exiting unsuccessfully ..."
exit 1
fi
ii=0
while [ "$ii" -lt 3 ];do
if [ "$HOME" != "/root" ];then
echo -n "Enter superuser "
fi;
su root -c "./.setlinks.rc $CDPATH $PRECOMP $COMP"
ECODE=$?
if [ "$ECODE" != 0 ] && [ "$ECODE" != 127 ];then
ii=$(($ii+1))
else
# Eingabe war OK
ii=3
fi
done
if [ "$ECODE" != 0 ];then
echo ".setlinks.rc returned NOK, exiting unsuccessfully ..."
exit 1
fi
}
restore_links()
{
cd $CDPATH
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "$CDPATH not found, exiting unsuccessfully ..."
exit 1
fi
ii=0
while [ "$ii" -lt 3 ];do
if [ "$HOME" != "/root" ];then
echo -n "Enter superuser "
fi;
su root -c "./.resetlinks.rc $PRECOMP $COMP"
ECODE=$?
if [ "$ECODE" != 0 ] && [ "$ECODE" != 127 ];then
ii=$(($ii+1))
else
# Eingabe war OK
ii=3
fi
done
if [ "$ECODE" != 0 ];then
echo ".resetlinks.rc returned NOK, exiting unsuccessfully ..."
exit 1
fi
}
# ---------------------------------------------
# write the input into the environment file
# ---------------------------------------------
write_result ()
{
echo "#!/bin/sh" > $TEMPFILE
echo "# automatically stored during last sharpprep run" >> $TEMPFILE
echo "export TCDPATH=$CDPATH" >> $TEMPFILE
echo "export TCPRECOMP=$PRECOMP" >> $TEMPFILE
echo "export TCOMP=$COMP" >> $TEMPFILE
}
show_result ()
{
echo ------------------------------------
echo "export CDPATH = $CDPATH"
echo "export PRECOMP = $PRECOMP"
echo "export COMP = $COMP"
echo ------------------------------------
echo
echo -n "Do you want to use that config ? [Y]es, [n]o : "
read YN
case "$YN" in
y | Y ) return 0;;
* ) return 1;;
esac
exit 1
}
doit()
{
cd $HERE
export BASEENVI="$CDPATH/environ"
/bin/bash --rcfile $CDPATH/environ/.goqtopiearmsharprc
}
set_old_values
read_cd_path
if [ "$CALLNAME" == "" ];then
if ! show_result
then
exit 2
fi
write_result
reconfig_links
fi
# if called as ipaq2prep.rc use existing links
doit
if [ "$CALLNAME" == "" ];then
restore_links
fi
exit $EXITCODE
#!/bin/sh
# setzt einige symlinks auf dem rechner um
TEMPFILE=$HOME/_setlink.tmp
CDPATH=$1
PRECOMP=$2
COMP=$3
echo "#!/bin/sh" > $TEMPFILE
echo "# automatically stored during last .setlinks run" >> $TEMPFILE
# ---------------------------------------------
# inform user and configure new links
# ---------------------------------------------
reconfig_links()
{
if [ -L $PRECOMP$COMP ];then
XXX=`ls -ls $PRECOMP$COMP | awk '{ print $NF }'`
if [ "$XXX" == "$CDPATH/$COMP" ];then
echo "link is already OK, exiting unsuccessfully"
echo "try it with xxx2prep.rc or repair manually."
exit 1
fi
echo -n "removing link $PRECOMP$COMP and relinking to CDImage : confirm with [Y]es : "
read ANS
if [ "$ANS" == "Y" ];then
echo removing $PRECOMP$COMP
echo "export TPRECOMP=`ls -ls $PRECOMP$COMP | awk '{ print $NF }'`" >> $TEMPFILE
rm -f $PRECOMP$COMP
else
exit 1
fi
elif [ -d $PRECOMP$COMP ];then
echo "Link destination $PRECOMP$COMP is a directory."
echo "Move the directory to a different place and set a link"
echo "before calling this script."
echo "exiting unsuccessfully ..."
exit 1
elif [ -e $PRECOMP$COMP ];then
echo "Link destination $PRECOMP$COMP is a file."
echo "Move the file to a different place and set a link"
echo "before calling this script."
echo "exiting unsuccessfully ..."
exit 1
fi
cd $PRECOMP > /dev/null 2>&1
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "could not cd to $PRECOMP, exiting unsuccessfully ..."
exit 1
fi
ln -sf $CDPATH/$COMP $COMP
echo new link is $CDPATH/$COMP
}
reconfig_links
echo "You are in $COMP environment now !"
exit 0
#!/bin/sh
# setzt einige symlinks auf dem rechner um
TEMPFILE=$HOME/_setlink.tmp
PRECOMP=$1
COMP=$2
set_old_values()
{
if [ -e $TEMPFILE ];then
. $TEMPFILE
else
echo "file $TEMPFILE not found, exiting unsuccessfully ..."
exit 1
fi
}
# ---------------------------------------------
# inform user and configure new links
# ---------------------------------------------
reconfig_links()
{
if [ -L $PRECOMP$COMP ];then
echo -n "removing link $PRECOMP$COMP and relinking to $TPRECOMP : confirm with [Y]es : "
read ANS
if [ "$ANS" == "Y" ];then
echo removing $PRECOMP$COMP
rm -f $PRECOMP$COMP
else
exit 1
fi
elif [ -d $PRECOMP$COMP ];then
echo "Link destination $PRECOMP$COMP is a directory."
echo "Move the directory to a different place and set a link"
echo "before calling this script."
echo "exiting unsuccessfully ..."
exit 1
elif [ -e $PRECOMP$COMP ];then
echo "Link destination $PRECOMP$COMP is a file."
echo "Move the file to a different place and set a link"
echo "before calling this script."
echo "exiting unsuccessfully ..."
exit 1
fi
cd $PRECOMP > /dev/null 2>&1
ECODE=$?
if [ "$ECODE" != 0 ];then
echo "could not cd to $PRECOMP, exiting unsuccessfully ..."
exit 1
fi
ln -sf $TPRECOMP $COMP
echo new link is $TPRECOMP
}
set_old_values
reconfig_links
echo "You are back in local environment now !"
exit 0
!#/bin/sh
SOURCE=$1
DEST=$2
# COMPPROG=/usr/local/bin/create_compressed_fs
COMPPROG=/develop/ipaq-cd/utils/cloop-1.02/create_compressed_fs
usage()
{
echo "usage : _createcloop.rc SOURCE DEST"
}
if [ "$SOURCE" == "" ];then
usage;
exit 1;
fi
if [ "$DEST" == "" ];then
usage;
exit 1;
fi
if [ ! -d $SOURCE ];then
echo "$SOURCE : directory not found"
exit 1;
fi
mkisofs -pad -L -R -U $SOURCE | \
$COMPPROG - 65536 > $DEST
exit 0
#!/bin/sh
# V0.1.1 - 29.10.03 - multiple cloop devices added
CLOOPVERS=cloop-1.02
CLOOPPOS=./utils/$CLOOPVERS
INSTDIR=/lib/modules/misc
CLOOPO=$INSTDIR/cloop.o
KERNEL_PATH=/usr/src/linux
# ---------------------------------------------
# kernelpath
# ---------------------------------------------
request_kernel()
{
echo -n "your kernel source location ? /usr/src/linux "
read KERNEL_PATH
if [ "$KERNEL_PATH" == "" ];then
KERNEL_PATH=/usr/src/linux
fi
}
# ---------------------------------------------
# checkcloop
# ---------------------------------------------
check_cloop()
{
if [ -e $CLOOPO ];then
echo "cloop exists ($INSTDIR/cloop.o)."
echo "remove it to create a new version."
exit 0
fi
}
# ---------------------------------------------
# prep_cloopdir
# ---------------------------------------------
prep_cloopdir()
{
if [ ! -d $CLOOPPOS ];then
echo "$CLOOPPOS not found. Start the script from your cdrom dir"
exit 1
fi
cp -rf $CLOOPPOS /tmp
ERR=$?
if [ "$ERR" != 0 ];then
echo "could not copy the directory to disk. Are you root ?"
exit 1
fi
}
# ---------------------------------------------
# makeit
# ---------------------------------------------
makeit()
{
cd /tmp/$CLOOPVERS
make clean
make KERNEL_DIR=$KERNEL_PATH
ERR=$?
if [ "$ERR" != 0 ];then
return 1
fi
return 0
}
# ---------------------------------------------
# installit
# ---------------------------------------------
installit()
{
if [ ! -d $INSTDIR ];then
mkdir -p $INSTDIR
else
echo "dir $INSTDIR already existing"
fi
cp cloop.o $INSTDIR
depmod -a
if [ -b /dev/cloop ];then
echo "block special file /dev/cloop already existing"
echo "clear it to get multiple support running."
echo "no success, exiting ..."
exit 1
fi
if [ ! -b /dev/cloop0 ];then
mknod /dev/cloop0 b 240 0
else
echo "block special file /dev/cloop0 already existing"
fi
if [ ! -b /dev/cloop1 ];then
mknod /dev/cloop1 b 240 1
else
echo "block special file /dev/cloop1 already existing"
fi
if [ ! -b /dev/cloop2 ];then
mknod /dev/cloop2 b 240 2
else
echo "block special file /dev/cloop2 already existing"
fi
if [ ! -b /dev/cloop3 ];then
mknod /dev/cloop3 b 240 3
else
echo "block special file /dev/cloop3 already existing"
fi
if [ ! -b /dev/cloop4 ];then
mknod /dev/cloop4 b 240 4
else
echo "block special file /dev/cloop4 already existing"
fi
}
# ----------------------------------
# main
# ----------------------------------
check_cloop
prep_cloopdir
request_kernel
makeit
installit
#!/bin/sh
# V0.1.1 - 301003 - sc
# using losetup and cloop 1.02
# su root removed ...
CDMPOINT=$1
MPOINT=$2
MISCPATH=/lib/modules/misc
BASEFILE="BASE"
OPIEFILE="OPIE"
QTEFILE="QTE"
COMPFILE="TOOLCHAIN"
KERNELFILE="KERNEL"
usage()
{
echo "usage : _mountlivecd.rc CDMOUNTPOINT MOUNTPOINT"
}
if [ "$CDMPOINT" == "" ];then
usage;
exit 1;
fi
if [ "$MPOINT" == "" ];then
usage;
exit 1;
fi
# First is to load the cloop module
insmod -f $MISCPATH/cloop.o
ERR=$?
if [ "$ERR" != 0 ];then
echo "insmod cloop.o not successfull"
echo "is cloop.o available or already loaded ?"
exit 1;
fi
if [ ! -e $CDMPOINT/$BASEFILE ];then
echo "$CDMPOINT/$BASEFILE : file not found"
echo "exiting ..."
exit 1;
else
CLDEV="/dev/cloop0"
losetup $CLDEV $CDMPOINT/$BASEFILE
mount -o ro -t iso9660 $CLDEV $MPOINT
ERR=$?
if [ "$ERR" != 0 ];then
echo "mount $CDMPOINT/$BASEFILE failed"
echo "is $CLDEV available ?"
exit 1;
fi
echo "mounted $CDMPOINT/$BASEFILE to $MPOINT successfully"
fi
if [ -e $CDMPOINT/$OPIEFILE ];then
echo "opie detected, using cloop1 to mount"
CLDEV="/dev/cloop1"
losetup $CLDEV $CDMPOINT/$OPIEFILE
mount -o ro -t iso9660 $CLDEV $MPOINT/opie-vers
ERR=$?
if [ "$ERR" != 0 ];then
echo "mount $CDMPOINT/$OPIEFILE failed"
echo "is $CLDEV available ?"
exit 1;
fi
echo "mounted $CDMPOINT/$OPIEFILE to $MPOINT/opie-vers successfully"
fi
if [ -e $CDMPOINT/$QTEFILE ];then
echo "opie detected, using cloop2 to mount"
CLDEV="/dev/cloop2"
losetup $CLDEV $CDMPOINT/$QTEFILE
mount -o ro -t iso9660 $CLDEV $MPOINT/qt-vers
ERR=$?
if [ "$ERR" != 0 ];then
echo "mount $CDMPOINT/$QTEFILE failed"
echo "is $CLDEV available ?"
exit 1;
fi
echo "mounted $CDMPOINT/$QTEFILE to $MPOINT/qte-vers successfully"
fi
if [ -e $CDMPOINT/$KERNELFILE ];then
echo "opie detected, using cloop3 to mount"
CLDEV="/dev/cloop3"
losetup $CLDEV $CDMPOINT/$KERNELFILE
mount -o ro -t iso9660 $CLDEV $MPOINT/kernel
ERR=$?
if [ "$ERR" != 0 ];then
echo "mount $CDMPOINT/$KERNELFILE failed"
echo "is $CLDEV available ?"
exit 1;
fi
echo "mounted $CDMPOINT/$KERNELFILE to $MPOINT/kernel successfully"
fi
if [ -e $CDMPOINT/$COMPFILE ];then
echo "opie detected, using cloop4 to mount"
CLDEV="/dev/cloop4"
losetup $CLDEV $CDMPOINT/$COMPFILE
mount -o ro -t iso9660 $CLDEV $MPOINT/toolchain
ERR=$?
if [ "$ERR" != 0 ];then
echo "mount $CDMPOINT/$COMPFILE failed"
echo "is $CLDEV available ?"
exit 1;
fi
echo "mounted $CDMPOINT/$COMPRFILE to $MPOINT/toolchain successfully"
fi
exit 0
#!/bin/sh
# V0.1.0 - 301003 - sc
# - initial
MPOINT=$1
OPIEPOINT="opie-vers"
QTEPOINT="qt-vers"
COMPPOINT="toolchain"
KERNELPOINT="kernel"
usage()
{
echo "usage : _umountcloop.rc MOUNTPOINT"
}
if [ "$MPOINT" == "" ];then
usage;
exit 1;
fi
umount $MPOINT/$KERNELPOINT
umount $MPOINT/$COMPPOINT
umount $MPOINT/$OPIEPOINT
umount $MPOINT/$QTEPOINT
umount $MPOINT
losetup -d /dev/cloop4
losetup -d /dev/cloop3
losetup -d /dev/cloop2
losetup -d /dev/cloop1
losetup -d /dev/cloop0
rmmod cloop