/branches/dd/contrib/toolchain/toolchain.ppc32.sh |
---|
15,9 → 15,13 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.2" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
29,7 → 33,7 |
PLATFORM="ppc" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-linux-gnu" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
/branches/dd/contrib/toolchain/toolchain.amd64.sh |
---|
15,9 → 15,13 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.2" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
29,7 → 33,7 |
PLATFORM="amd64" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-linux-gnu" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
/branches/dd/contrib/toolchain/toolchain.ppc64.sh |
---|
15,9 → 15,13 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.2" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
29,7 → 33,7 |
PLATFORM="ppc64" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-linux-gnu" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
/branches/dd/contrib/toolchain/toolchain.ia32.sh |
---|
15,9 → 15,13 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.2" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
29,7 → 33,7 |
PLATFORM="i686" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-pc-linux-gnu" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
/branches/dd/contrib/toolchain/toolchain.mipsel32.sh |
---|
15,9 → 15,13 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.2" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
29,7 → 33,7 |
PLATFORM="mipsel" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-linux-gnu" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
/branches/dd/contrib/toolchain/toolchain.sparc64.sh |
---|
15,9 → 15,13 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.3" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
29,7 → 33,7 |
PLATFORM="sparc64" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-linux-gnu" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
/branches/dd/contrib/toolchain/toolchain.ia64.sh |
---|
15,16 → 15,18 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.2" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
INCLUDES="ia64-pc-gnu-linux_includes.tar.bz2" |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
GCC_CPP="gcc-g++-${GCC_VERSION}.tar.bz2" |
INCLUDES_SOURCE="http://download.decky.cz/" |
BINUTILS_SOURCE="ftp://ftp.gnu.org/gnu/binutils/" |
GCC_SOURCE="ftp://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/" |
31,7 → 33,7 |
PLATFORM="ia64" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-pc-linux-gnu" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
INCLUDESDIR="${WORKDIR}/include" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
39,10 → 41,6 |
echo ">>> Downloading tarballs" |
if [ ! -f "${INCLUDES}" ]; then |
wget -c "${INCLUDES_SOURCE}${INCLUDES}" |
check_error $? "Error downloading includes." |
fi |
if [ ! -f "${BINUTILS}" ]; then |
wget -c "${BINUTILS_SOURCE}${BINUTILS}" |
check_error $? "Error downloading binutils." |
75,8 → 73,6 |
fi |
echo ">>> Unpacking tarballs" |
tar -xvjf "${INCLUDES}" |
check_error $? "Error unpacking includes." |
tar -xvzf "${BINUTILS}" |
check_error $? "Error unpacking binutils." |
tar -xvjf "${GCC_CORE}" |
97,7 → 93,7 |
echo ">>> Compiling and installing GCC" |
cd "${OBJDIR}" |
check_error $? "Change directory failed." |
"${GCCDIR}/configure" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj "--with-headers=${INCLUDESDIR}" --disable-shared |
"${GCCDIR}/configure" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj --disable-shared |
check_error $? "Error configuring GCC." |
PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc |
check_error $? "Error compiling/installing GCC." |
/branches/dd/contrib/toolchain/toolchain.arm32.sh |
---|
15,9 → 15,13 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.2" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
29,7 → 33,7 |
PLATFORM="arm" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-linux-gnu" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
/branches/dd/contrib/toolchain/toolchain.mipseb32.sh |
---|
15,9 → 15,13 |
fi |
} |
BINUTILS_VERSION="2.18" |
GCC_VERSION="4.2.2" |
if [ -z "${CROSS_PREFIX}" ] ; then |
CROSS_PREFIX="/usr/local" |
fi |
BINUTILS_VERSION="2.19" |
GCC_VERSION="4.3.2" |
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
29,7 → 33,7 |
PLATFORM="mips" |
WORKDIR=`pwd` |
TARGET="${PLATFORM}-sgi-irix5" |
PREFIX="/usr/local/${PLATFORM}" |
PREFIX="${CROSS_PREFIX}/${PLATFORM}" |
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
OBJDIR="${WORKDIR}/gcc-obj" |
80,6 → 84,21 |
echo ">>> Compiling and installing binutils" |
cd "${BINUTILSDIR}" |
check_error $? "Change directory failed." |
patch -p1 <<EOF |
diff -Naur binutils-2.19.orig/bfd/elfxx-mips.c binutils-2.19/bfd/elfxx-mips.c |
--- binutils-2.19.orig/bfd/elfxx-mips.c 2008-08-18 20:14:04.000000000 +0200 |
+++ binutils-2.19/bfd/elfxx-mips.c 2009-01-18 18:14:47.292011299 +0100 |
@@ -1409,7 +1409,7 @@ |
function, or 0 if we can't decide which function that is. */ |
static unsigned long |
-mips16_stub_symndx (asection *sec, const Elf_Internal_Rela *relocs, |
+mips16_stub_symndx (asection *sec __attribute__((unused)), const Elf_Internal_Rela *relocs, |
const Elf_Internal_Rela *relend) |
{ |
const Elf_Internal_Rela *rel; |
EOF |
check_error $? "Error patching binutils" |
./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls" |
check_error $? "Error configuring binutils." |
make all install |
/branches/dd/contrib/default/sparc64/Makefile.config |
---|
0,0 → 1,62 |
# Platform |
PLATFORM = sparc64 |
# CPU type |
MACHINE = us |
# Ramdisk format |
RDFMT = tmpfs |
# Compiler |
COMPILER = gcc_cross |
# Debug build |
CONFIG_DEBUG = y |
# Support for SMP |
CONFIG_SMP = y |
# Lazy FPU context switching |
CONFIG_FPU_LAZY = y |
# Use TSB |
CONFIG_TSB = y |
# Support for Z8530 serial port |
CONFIG_Z8530 = y |
# Support for NS16550 serial port |
CONFIG_NS16550 = y |
# Support for Serengeti console |
CONFIG_SGCN = y |
# Interrupt-driven driver for NS16550? |
CONFIG_NS16550_INTERRUPT_DRIVEN = y |
# Virtually indexed D-cache support |
CONFIG_VIRT_IDX_DCACHE = y |
# Support for userspace debuggers |
CONFIG_UDEBUG = n |
# Kernel console support |
CONFIG_KCONSOLE = y |
# Detailed kernel logging |
CONFIG_LOG = n |
# Deadlock detection support for spinlocks |
CONFIG_DEBUG_SPINLOCK = y |
# Compile kernel tests |
CONFIG_TEST = y |
# Start AP processors by the loader |
CONFIG_AP = y |
# Preserve A.OUT header in isofs.b |
CONFIG_AOUT_ISOFS_B = y |
# External ramdisk |
CONFIG_RD_EXTERNAL = n |
/branches/dd/contrib/default/sparc64/output |
---|
0,0 → 1,0 |
image.iso |
/branches/dd/contrib/default/ia64/output |
---|
0,0 → 1,0 |
image.boot |
/branches/dd/contrib/default/ia64/Makefile.config |
---|
0,0 → 1,47 |
# Platform |
PLATFORM = ia64 |
# Machine type |
MACHINE = i460GX |
# Ramdisk format |
RDFMT = tmpfs |
# Compiler |
COMPILER = gcc_cross |
# Debug build |
CONFIG_DEBUG = y |
# Support for SMP |
CONFIG_SMP = y |
# Lazy FPU context switching |
CONFIG_FPU_LAZY = y |
# Use VHPT |
CONFIG_VHPT = n |
# Support for NS16550 serial port |
CONFIG_NS16550 = y |
# IOSapic on default address support |
CONFIG_IOSAPIC = y |
# Interrupt-driven driver for NS16550? |
CONFIG_NS16550_INTERRUPT_DRIVEN = y |
# Support for userspace debuggers |
CONFIG_UDEBUG = n |
# Kernel console support |
CONFIG_KCONSOLE = y |
# Detailed kernel logging |
CONFIG_LOG = n |
# Deadlock detection support for spinlocks |
CONFIG_DEBUG_SPINLOCK = y |
# Compile kernel tests |
CONFIG_TEST = y |
/branches/dd/contrib/default/arm32/output |
---|
0,0 → 1,0 |
image.boot |
/branches/dd/contrib/default/arm32/Makefile.config |
---|
0,0 → 1,26 |
# Platform |
PLATFORM = arm32 |
# Ramdisk format |
RDFMT = tmpfs |
# Compiler |
COMPILER = gcc_cross |
# Debug build |
CONFIG_DEBUG = y |
# Support for userspace debuggers |
CONFIG_UDEBUG = n |
# Kernel console support |
CONFIG_KCONSOLE = y |
# Detailed kernel logging |
CONFIG_LOG = n |
# Compile kernel tests |
CONFIG_TEST = y |
# Framebuffer support |
CONFIG_FB = y |
/branches/dd/contrib/default/ppc32/output |
---|
0,0 → 1,0 |
image.boot |
/branches/dd/contrib/default/ppc32/Makefile.config |
---|
0,0 → 1,26 |
# Platform |
PLATFORM = ppc32 |
# Ramdisk format |
RDFMT = tmpfs |
# Compiler |
COMPILER = gcc_cross |
# Debug build |
CONFIG_DEBUG = y |
# Support for userspace debuggers |
CONFIG_UDEBUG = n |
# Kernel console support |
CONFIG_KCONSOLE = y |
# Detailed kernel logging |
CONFIG_LOG = n |
# Compile kernel tests |
CONFIG_TEST = y |
# Use Block Address Translation by the loader |
CONFIG_BAT = y |
/branches/dd/contrib/default/mips32/output |
---|
0,0 → 1,0 |
image.boot |
/branches/dd/contrib/default/mips32/Makefile.config |
---|
0,0 → 1,35 |
# Platform |
PLATFORM = mips32 |
# Machine type |
MACHINE = lgxemul |
# Ramdisk format |
RDFMT = tmpfs |
# Compiler |
COMPILER = gcc_cross |
# Debug build |
CONFIG_DEBUG = y |
# Lazy FPU context switching |
CONFIG_FPU_LAZY = y |
# Support for userspace debuggers |
CONFIG_UDEBUG = n |
# Kernel console support |
CONFIG_KCONSOLE = y |
# Detailed kernel logging |
CONFIG_LOG = n |
# Save all interrupt registers |
CONFIG_DEBUG_ALLREGS = y |
# Compile kernel tests |
CONFIG_TEST = y |
# Framebuffer support |
CONFIG_FB = y |
/branches/dd/contrib/default/ia32/output |
---|
0,0 → 1,0 |
image.iso |
/branches/dd/contrib/default/ia32/Makefile.config |
---|
0,0 → 1,59 |
# Platform |
PLATFORM = ia32 |
# CPU type |
MACHINE = pentium4 |
# Ramdisk format |
RDFMT = tmpfs |
# Compiler |
COMPILER = gcc_cross |
# Debug build |
CONFIG_DEBUG = y |
# Support for SMP |
CONFIG_SMP = y |
# Improved support for hyperthreading |
CONFIG_HT = y |
# Simics BIOS AP boot fix |
CONFIG_SIMICS_FIX = y |
# Lazy FPU context switching |
CONFIG_FPU_LAZY = y |
# Support for userspace debuggers |
CONFIG_UDEBUG = n |
# Kernel console support |
CONFIG_KCONSOLE = y |
# Detailed kernel logging |
CONFIG_LOG = n |
# Deadlock detection support for spinlocks |
CONFIG_DEBUG_SPINLOCK = y |
# Watchpoint on rewriting AS with zero |
CONFIG_DEBUG_AS_WATCHPOINT = y |
# Save all interrupt registers |
CONFIG_DEBUG_ALLREGS = y |
# Compile kernel tests |
CONFIG_TEST = y |
# Framebuffer support |
CONFIG_FB = y |
# Framebuffer width |
CONFIG_VESA_WIDTH = 1024 |
# Framebuffer height |
CONFIG_VESA_HEIGHT = 768 |
# Framebuffer depth |
CONFIG_VESA_BPP = 24 |
/branches/dd/contrib/default/amd64/output |
---|
0,0 → 1,0 |
image.iso |
/branches/dd/contrib/default/amd64/Makefile.config |
---|
0,0 → 1,59 |
# Platform |
PLATFORM = amd64 |
# CPU type |
MACHINE = opteron |
# Ramdisk format |
RDFMT = tmpfs |
# Compiler |
COMPILER = gcc_cross |
# Debug build |
CONFIG_DEBUG = y |
# Support for SMP |
CONFIG_SMP = y |
# Improved support for hyperthreading |
CONFIG_HT = y |
# Simics BIOS AP boot fix |
CONFIG_SIMICS_FIX = y |
# Lazy FPU context switching |
CONFIG_FPU_LAZY = y |
# Support for userspace debuggers |
CONFIG_UDEBUG = n |
# Kernel console support |
CONFIG_KCONSOLE = y |
# Detailed kernel logging |
CONFIG_LOG = n |
# Deadlock detection support for spinlocks |
CONFIG_DEBUG_SPINLOCK = y |
# Watchpoint on rewriting AS with zero |
CONFIG_DEBUG_AS_WATCHPOINT = y |
# Save all interrupt registers |
CONFIG_DEBUG_ALLREGS = y |
# Compile kernel tests |
CONFIG_TEST = y |
# Framebuffer support |
CONFIG_FB = y |
# Framebuffer width |
CONFIG_VESA_WIDTH = 1024 |
# Framebuffer height |
CONFIG_VESA_HEIGHT = 768 |
# Framebuffer depth |
CONFIG_VESA_BPP = 24 |
/branches/dd/contrib/conf/SPMIPS.simics |
---|
File deleted |
/branches/dd/contrib/conf/HelenOS.amd64.simics |
---|
File deleted |
/branches/dd/contrib/conf/spmips.conf |
---|
File deleted |
/branches/dd/contrib/conf/HelenOS.sparc64.simics |
---|
File deleted |
/branches/dd/contrib/conf/bootindy |
---|
File deleted |
/branches/dd/contrib/conf/simics.conf |
---|
File deleted |
/branches/dd/contrib/conf/dot.bochsrc |
---|
File deleted |
/branches/dd/contrib/conf/gxemul.sh |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/branches/dd/contrib/conf/vmware.conf |
---|
File deleted |
/branches/dd/contrib/conf/HelenOS.ppc32.simics |
---|
File deleted |
/branches/dd/contrib/conf/mips32-gx.sh |
---|
0,0 → 1,3 |
#!/bin/sh |
gxemul $@ -E testmips -C R4000 -X image.boot |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
Added: svn:mergeinfo |
/branches/dd/contrib/conf/msim.conf |
---|
2,13 → 2,16 |
# MSIM configuration script |
# |
add dcpu mips1 |
add dcpu cpu0 |
add dcpu cpu1 |
add rwm mainmem 0x00000000 8M |
add rwm mainmem 0x00000000 |
mainmem generic 16M |
mainmem load "/dev/zero" |
add rom bootmem 0x1fc00000 2048k |
bootmem load "image.boot" |
add rom bootmem 0x1fc00000 |
bootmem generic 4096k |
bootmem load "image.boot" |
add dprinter printer 0x10000000 |
add dkeyboard keyboard 0x10000000 2 |
/branches/dd/contrib/conf/arm32-gx.sh |
---|
0,0 → 1,3 |
#!/bin/sh |
gxemul $@ -E testarm -X image.boot |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/branches/dd/contrib/util/DownloadAndPatchSILO.sh |
---|
0,0 → 1,74 |
#!/bin/bash |
# Download SILO and patch it so that it can be used to create a bootable CD |
# for the Serengeti machine |
# by Pavel Rimsky <rimskyp@seznam.cz> |
# portions by Martin Decky <martin@decky.cz> |
# |
# GPL'ed, copyleft |
# |
# stuff to be downloaded |
SILO_DOWNLOAD_FILE='silo-loaders-1.4.11.tar.gz' |
SILO_DOWNLOAD_URL='http://silo.auxio.org/pub/silo/old/'$SILO_DOWNLOAD_FILE |
# check whether the last command failed, if so, write an error message and exit |
check_error() { |
if [ "$1" -ne "0" ]; then |
echo |
echo "Script failed: $2" |
exit |
fi |
} |
# temporary files are to be stored in /tmp |
# the resulting file in the current directory |
WD=`pwd` |
cd /tmp |
# download SILO from its official website |
echo ">>> Downloading SILO" |
wget $SILO_DOWNLOAD_URL |
check_error $? "Error downloading SILO." |
# unpack the downloaded file |
echo ">>> Unpacking tarball" |
tar xvzf $SILO_DOWNLOAD_FILE |
check_error $? "Error unpacking tarball." |
# CD to the unpacked directory |
echo ">>> Changing to the unpacked SILO directory" |
cd boot |
check_error $? "Changing directory failed." |
# patch it - remove bytes 512 to 512 + 32 (counted from 0), which belong to |
# the ELF header which is not recognized by the Serengeti firmware |
echo ">>> Patching SILO" |
(((xxd -p -l 512 isofs.b) && (xxd -p -s 544 isofs.b)) | xxd -r -p) \ |
> isofs.b.patched |
check_error $? "Patching SILO failed" |
mv isofs.b.patched isofs.b |
# get rid of files which are not needed for creating the bootable CD |
echo ">>> Purging SILO directory" |
for file in `ls`; do |
if [ \( -f $file \) -a \( $file != "isofs.b" \) -a \( $file != "second.b" \) ]; |
then |
rm -fr $file; |
fi |
done |
check_error $? "Purging SILO directory failed" |
# create the gzipped tarball with patched SILO |
echo ">>> Creating tarball with patched SILO" |
tar cvzf silo.patched.tar.gz *.b |
check_error $? "Creating tarball with patched SILO failed" |
# and move it to the directory where the user expects it to be |
echo ">>> Moving the tarball with patched SILO to the current directory" |
mv silo.patched.tar.gz $WD |
check_error $? "Moving the tarball with patched SILO failed" |
# move back to the working directory from /tmp |
cd $WD |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |