Make unix format

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@59 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
bbahnsen
2006-04-26 23:12:11 +00:00
parent b8f302f88c
commit 8db4c50cf2
2 changed files with 278 additions and 278 deletions

View File

@@ -1,140 +1,140 @@
#!/bin/bash #!/bin/bash
# #
# Get, build and install the latest cross-development tools and libraries # Get, build and install the latest cross-development tools and libraries
# #
# #
# Specify the architectures for which the tools are to be built # Specify the architectures for which the tools are to be built
# To build for single target: ARCHS="m68k" # To build for single target: ARCHS="m68k"
# #
ARCHS="${ARCHS:-i386}" ARCHS="${ARCHS:-i386}"
# Let's be nice # Let's be nice
renice 10 -p $$ renice 10 -p $$
# If any thing goes wrong, we'll bail out. # If any thing goes wrong, we'll bail out.
set -ex set -ex
# #
# Specify the versions # Specify the versions
# #
GCC=gcc-4.0.2 GCC=gcc-4.0.2
BINUTILS=binutils-2.16.1 BINUTILS=binutils-2.16.1
CYGWIN_SNAP=20060120 # You may need to find a more recent one. CYGWIN_SNAP=20060120 # You may need to find a more recent one.
# #
# Where to install # Where to install
# #
PREFIX="${PREFIX:-/opt/tiano/}" PREFIX="${PREFIX:-/opt/tiano/}"
# #
# Where to get the GNU tools # Where to get the GNU tools
# #
BINUTILS_URL=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/binutils/${BINUTILS}.tar.bz2 BINUTILS_URL=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/binutils/${BINUTILS}.tar.bz2
GCC_URL=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-4.0.2/${GCC}.tar.bz2 GCC_URL=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-4.0.2/${GCC}.tar.bz2
CYG_LOC=http://cygwin.com/snapshots/cygwin-src-${CYGWIN_SNAP}.tar.bz2 CYG_LOC=http://cygwin.com/snapshots/cygwin-src-${CYGWIN_SNAP}.tar.bz2
export http_proxy=http://proxy.dp.intel.com:911 export http_proxy=http://proxy.dp.intel.com:911
export ftp_proxy=http://proxy.dp.intel.com:911 export ftp_proxy=http://proxy.dp.intel.com:911
# #
# Uncomment one of the following depending upon which your system provides # Uncomment one of the following depending upon which your system provides
# #
GET_COMMAND="curl --remote-name" GET_COMMAND="curl --remote-name"
#GET_COMMAND="wget -nc --no-directories --retr-symlinks " #GET_COMMAND="wget -nc --no-directories --retr-symlinks "
# #
# Allow environment to override some programs # Allow environment to override some programs
# #
MAKE="${MAKE:-make}" MAKE="${MAKE:-make}"
export MAKE export MAKE
SHELL="${SHELL:-/bin/sh}" SHELL="${SHELL:-/bin/sh}"
export SHELL export SHELL
# #
# Get the source # Get the source
# If you don't have curl on your machine, try using # If you don't have curl on your machine, try using
# wget --passive-ftp --no-directories --retr-symlinks <<url>> # wget --passive-ftp --no-directories --retr-symlinks <<url>>
# If that doesn't work, try without the --passive-ftp option. # If that doesn't work, try without the --passive-ftp option.
# #
getSource() { getSource() {
${GET_COMMAND} "${BINUTILS_URL}" & ${GET_COMMAND} "${BINUTILS_URL}" &
${GET_COMMAND} "${GCC_URL}" & ${GET_COMMAND} "${GCC_URL}" &
${GET_COMMAND} "${CYG_LOC}" & ${GET_COMMAND} "${CYG_LOC}" &
wait wait
} }
# #
# Unpack the source # Unpack the source
# #
unpackSource() { unpackSource() {
(rm -rf "${BINUTILS}" (rm -rf "${BINUTILS}"
tar jxf "${BINUTILS}.tar.bz2" tar jxf "${BINUTILS}.tar.bz2"
) & ) &
(rm -rf "${GCC}" (rm -rf "${GCC}"
tar jxf "${GCC}.tar.bz2" tar jxf "${GCC}.tar.bz2"
) & ) &
(rm -rf cygwin-snapshot-${CYGWIN_SNAP}-1/ (rm -rf cygwin-snapshot-${CYGWIN_SNAP}-1/
tar jxf cygwin-src-${CYGWIN_SNAP}.tar.bz2 tar jxf cygwin-src-${CYGWIN_SNAP}.tar.bz2
) & ) &
wait wait
# (cd "${GCC}" ; ln -sf "../cygwin-snapshot-20060120-1/newlib" newlib) # (cd "${GCC}" ; ln -sf "../cygwin-snapshot-20060120-1/newlib" newlib)
} }
CONF_SHELL="${CONF_SHELL:-/bin/bash}" CONF_SHELL="${CONF_SHELL:-/bin/bash}"
# CONF_SHELL="${CONF_SHELL:-echo}" # CONF_SHELL="${CONF_SHELL:-echo}"
# #
# Build # Build
# #
build() { build() {
for arch in $ARCHS for arch in $ARCHS
do ( do (
export targ=${arch}-tiano-pe export targ=${arch}-tiano-pe
export pref=${PREFIX}${targ} export pref=${PREFIX}${targ}
export PATH="${pref}/bin:$PATH" export PATH="${pref}/bin:$PATH"
( mkdir -p build-binutils-$targ ( mkdir -p build-binutils-$targ
cd build-binutils-$targ cd build-binutils-$targ
"${CONF_SHELL}" "../${BINUTILS}/configure" \ "${CONF_SHELL}" "../${BINUTILS}/configure" \
--disable-nls "--target=${targ}" "--prefix=${pref}" --disable-nls "--target=${targ}" "--prefix=${pref}"
${MAKE} -j1 -w all ${MAKE} -j1 -w all
${MAKE} -w install ${MAKE} -w install
) >> ${targ}.log 2>&1 ) >> ${targ}.log 2>&1
( (
mkdir -p $pref/$targ/sys-include; mkdir -p $pref/$targ/sys-include;
cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/newlib/libc/include/* $pref/$targ/sys-include cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/newlib/libc/include/* $pref/$targ/sys-include
cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/winsup/cygwin/include/* $pref/$targ/sys-include cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/winsup/cygwin/include/* $pref/$targ/sys-include
) )
( mkdir -p build-gcc-$targ ( mkdir -p build-gcc-$targ
cd build-gcc-$targ cd build-gcc-$targ
"${CONF_SHELL}" "../${GCC}/configure" "--target=${targ}" "--prefix=${pref}" \ "${CONF_SHELL}" "../${GCC}/configure" "--target=${targ}" "--prefix=${pref}" \
--with-gnu-as --with-gnu-ld --with-newlib --verbose \ --with-gnu-as --with-gnu-ld --with-newlib --verbose \
--disable-nls --enable-languages=c --disable-nls --enable-languages=c
${MAKE} -j1 -w all ${MAKE} -j1 -w all
${MAKE} -w install ${MAKE} -w install
) >> ${targ}.log 2>&1 ) >> ${targ}.log 2>&1
) & ) &
done done
wait wait
} }
# #
# Do everything # Do everything
# #
# Comment out any activities you wish to omit # Comment out any activities you wish to omit
# #
getSource getSource
unpackSource unpackSource
build build

View File

@@ -1,138 +1,138 @@
#!/bin/bash #!/bin/bash
# #
# Get, build and install the latest cross-development tools and libraries # Get, build and install the latest cross-development tools and libraries
# #
# #
# Specify the architectures for which the tools are to be built # Specify the architectures for which the tools are to be built
# To build for single target: ARCHS="m68k" # To build for single target: ARCHS="m68k"
# #
ARCHS="${ARCHS:-i386}" ARCHS="${ARCHS:-i386}"
# Let's be nice # Let's be nice
renice 10 -p $$ renice 10 -p $$
# If any thing goes wrong, we'll bail out. # If any thing goes wrong, we'll bail out.
set -e set -e
# #
# Specify the versions # Specify the versions
# #
GCC=gcc-4.1.0 GCC=gcc-4.1.0
# BINUTILS=binutils-2.16.1 # BINUTILS=binutils-2.16.1
BINUTILS=binutils-2.16.91-20060119-1 BINUTILS=binutils-2.16.91-20060119-1
CYGWIN_SNAP=20060403 # You may need to find a more recent one. CYGWIN_SNAP=20060403 # You may need to find a more recent one.
# #
# Where to install # Where to install
# #
PREFIX="${PREFIX:-/opt/tiano/}" PREFIX="${PREFIX:-/opt/tiano/}"
# #
# Where to get the GNU tools # Where to get the GNU tools
# #
BINUTILS_URL=http://superb.dl.sourceforge.net/sourceforge/mingw/${BINUTILS}-src.tar.gz BINUTILS_URL=http://superb.dl.sourceforge.net/sourceforge/mingw/${BINUTILS}-src.tar.gz
GCC_URL=http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-${GCC}/${GCC}.tar.bz2 GCC_URL=http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-${GCC}/${GCC}.tar.bz2
CYG_LOC=http://cygwin.com/snapshots/cygwin-src-${CYGWIN_SNAP}.tar.bz2 CYG_LOC=http://cygwin.com/snapshots/cygwin-src-${CYGWIN_SNAP}.tar.bz2
# export http_proxy=http://proxy.dp.intel.com:911 # export http_proxy=http://proxy.dp.intel.com:911
# export ftp_proxy=http://proxy.dp.intel.com:911 # export ftp_proxy=http://proxy.dp.intel.com:911
# #
# Uncomment one of the following depending upon which your system provides # Uncomment one of the following depending upon which your system provides
# #
GET_COMMAND="curl --remote-name" GET_COMMAND="curl --remote-name"
#GET_COMMAND="wget -nc --no-directories --retr-symlinks " #GET_COMMAND="wget -nc --no-directories --retr-symlinks "
# #
# Allow environment to override some programs # Allow environment to override some programs
# #
MAKE="${MAKE:-make}" MAKE="${MAKE:-make}"
export MAKE export MAKE
SHELL="${SHELL:-/bin/sh}" SHELL="${SHELL:-/bin/sh}"
export SHELL export SHELL
# #
# Get the source # Get the source
# If you don't have curl on your machine, try using # If you don't have curl on your machine, try using
# wget --passive-ftp --no-directories --retr-symlinks <<url>> # wget --passive-ftp --no-directories --retr-symlinks <<url>>
# If that doesn't work, try without the --passive-ftp option. # If that doesn't work, try without the --passive-ftp option.
# #
getSource() { getSource() {
${GET_COMMAND} "${BINUTILS_URL}" & ${GET_COMMAND} "${BINUTILS_URL}" &
${GET_COMMAND} "${GCC_URL}" & ${GET_COMMAND} "${GCC_URL}" &
${GET_COMMAND} "${CYG_LOC}" & ${GET_COMMAND} "${CYG_LOC}" &
wait wait
} }
# #
# Unpack the source # Unpack the source
# #
unpackSource() { unpackSource() {
(rm -rf "${BINUTILS}" (rm -rf "${BINUTILS}"
tar zxf "${BINUTILS}-src.tar.gz" tar zxf "${BINUTILS}-src.tar.gz"
) & ) &
(rm -rf "${GCC}" (rm -rf "${GCC}"
tar jxf "${GCC}.tar.bz2" tar jxf "${GCC}.tar.bz2"
) & ) &
(rm -rf cygwin-snapshot-${CYGWIN_SNAP}-1/ (rm -rf cygwin-snapshot-${CYGWIN_SNAP}-1/
tar jxf cygwin-src-${CYGWIN_SNAP}.tar.bz2 tar jxf cygwin-src-${CYGWIN_SNAP}.tar.bz2
) & ) &
wait wait
} }
CONF_SHELL="${CONF_SHELL:-/bin/bash}" CONF_SHELL="${CONF_SHELL:-/bin/bash}"
# CONF_SHELL="${CONF_SHELL:-echo}" # CONF_SHELL="${CONF_SHELL:-echo}"
# #
# Build # Build
# #
build() { build() {
for arch in $ARCHS for arch in $ARCHS
do ( do (
export targ=${arch}-tiano-pe export targ=${arch}-tiano-pe
export pref=${PREFIX}${targ} export pref=${PREFIX}${targ}
export PATH="${pref}/bin:$PATH" export PATH="${pref}/bin:$PATH"
( mkdir -p build-binutils-$targ ( mkdir -p build-binutils-$targ
cd build-binutils-$targ cd build-binutils-$targ
"${CONF_SHELL}" "../${BINUTILS}/configure" \ "${CONF_SHELL}" "../${BINUTILS}/configure" \
--disable-nls "--target=${targ}" "--prefix=${pref}" --disable-nls "--target=${targ}" "--prefix=${pref}"
${MAKE} -j5 -w all ${MAKE} -j5 -w all
${MAKE} -w install ${MAKE} -w install
) >> ${targ}.log 2>&1 ) >> ${targ}.log 2>&1
( (
mkdir -p $pref/$targ/sys-include; mkdir -p $pref/$targ/sys-include;
cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/newlib/libc/include/* $pref/$targ/sys-include cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/newlib/libc/include/* $pref/$targ/sys-include
cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/winsup/cygwin/include/* $pref/$targ/sys-include cp -fr cygwin-snapshot-${CYGWIN_SNAP}-1/winsup/cygwin/include/* $pref/$targ/sys-include
) )
( mkdir -p build-gcc-$targ ( mkdir -p build-gcc-$targ
cd build-gcc-$targ cd build-gcc-$targ
"${CONF_SHELL}" "../${GCC}/configure" "--target=${targ}" "--prefix=${pref}" \ "${CONF_SHELL}" "../${GCC}/configure" "--target=${targ}" "--prefix=${pref}" \
--with-gnu-as --with-gnu-ld --with-newlib --verbose \ --with-gnu-as --with-gnu-ld --with-newlib --verbose \
--disable-libssp \ --disable-libssp \
--disable-nls --enable-languages=c --disable-nls --enable-languages=c
${MAKE} -j5 -w all ${MAKE} -j5 -w all
${MAKE} -w install ${MAKE} -w install
) >> ${targ}.log 2>&1 ) >> ${targ}.log 2>&1
) & ) &
done done
wait wait
} }
# #
# Do everything # Do everything
# #
# Comment out any activities you wish to omit # Comment out any activities you wish to omit
# #
getSource getSource
unpackSource unpackSource
build build