Line 177... |
Line 177... |
binutils_dir="binutils-2.20.1"
|
binutils_dir="binutils-2.20.1"
|
gcc_dir="gcc-4.5.1"
|
gcc_dir="gcc-4.5.1"
|
newlib_dir="newlib-1.18.0"
|
newlib_dir="newlib-1.18.0"
|
uclibc_dir="uclibc-0.9.31"
|
uclibc_dir="uclibc-0.9.31"
|
gdb_dir="gdb-7.2"
|
gdb_dir="gdb-7.2"
|
linux_dir="linux-2.6.36"
|
linux_dir="linux-2.6.37"
|
or32_elf_flag="true"
|
or32_elf_flag="true"
|
or32_linux_flag="true"
|
or32_linux_flag="true"
|
link_flag="true"
|
link_flag="true"
|
config_flag="true"
|
config_flag="true"
|
build_flag="true"
|
build_flag="true"
|
Line 355... |
Line 355... |
--force
|
--force
|
Ensure the unified source directory and build directories are
|
Ensure the unified source directory and build directories are
|
recreated. Only build directories of targets being built are removed.
|
recreated. Only build directories of targets being built are removed.
|
|
|
--languages <str>
|
--languages <str>
|
Specify the languages to be built (default ${languages})
|
Specify the languages to be built (default c,c++).
|
|
|
--prefix <dir>
|
--prefix <dir>
|
Specify the install directory (default ${prefix})
|
Specify the install directory (default /opt/or32-new)
|
|
|
--prefix-tmp <dir>
|
--prefix-tmp <dir>
|
Specify the temporary install directory (default ${prefix_tmp})
|
Specify the temporary install directory (default /tmp/or32-tmp-${USER}).
|
Incorporating the user name avoid name clashes with other users
|
Incorporating the user name avoid name clashes with other users
|
|
|
--unisrc-dir <dir>
|
--unisrc-dir <dir>
|
Specify the unified source directory (default ${unisrc_dir})
|
Specify the unified source directory (default unisrc)
|
|
|
--build-dir-elf <dir>
|
--build-dir-elf <dir>
|
Specify the build directory for the newlib (or32-elf) tool chain
|
Specify the build directory for the newlib (or32-elf) tool chain
|
(default ${bd_elf}).
|
(default bd-elf).
|
|
|
--build-dir-elf-gdb <dir>
|
--build-dir-elf-gdb <dir>
|
Specify the build directory for the newlib (or32-elf) GDB (default
|
Specify the build directory for the newlib (or32-elf) GDB (default
|
${bd_elf_gdb}).
|
bd-elf-gdb).
|
|
|
--build-dir-linux <dir>
|
--build-dir-linux <dir>
|
Specify the build directory for the uClibc (or32-linux) tool chain
|
Specify the build directory for the uClibc (or32-linux) tool chain
|
(default ${bd_linux})
|
(default bd-linux)
|
|
|
--build-dir-linux-gdb <dir>
|
--build-dir-linux-gdb <dir>
|
Specify the build directory for the uClibc (or32-linux) GDB (default
|
Specify the build directory for the uClibc (or32-linux) GDB (default
|
${bd_linux_gdb})
|
bd-linux-gdb)
|
|
|
--or1ksim-dir <dir>
|
--or1ksim-dir <dir>
|
Specify the Or1ksim installation directory. Used by GDB, which links in
|
Specify the Or1ksim installation directory. Used by GDB, which links in
|
the Or1ksim simulator (default ${or1ksim_dir})
|
the Or1ksim simulator (default /opt/or1ksim-new)
|
|
|
--binutils-dir
|
--binutils-dir
|
Source directory for binutils (default ${binutils_dir})
|
Source directory for binutils (default binutils-2.20.1)
|
|
|
--gcc-dir
|
--gcc-dir
|
Source directory for gcc (default ${gcc_dir})
|
Source directory for gcc (default gcc-4.5.1')
|
|
|
--newlib-dir
|
--newlib-dir
|
Source directory for newlib (default ${newlib_dir})
|
Source directory for newlib (default newlib-1.18.0)
|
|
|
--uclibc-dir
|
--uclibc-dir
|
Source directory for uClibc (default ${uclibc_dir})
|
Source directory for uClibc (default uclibc-0.9.31)
|
|
|
--gdb-dir
|
--gdb-dir
|
Source directory for gdb (default ${gdb_dir})
|
Source directory for gdb (default gdb-7.2)
|
|
|
--linux-dir
|
--linux-dir
|
Source directory for Linux (default $linux_dir))
|
Source directory for Linux (default linux-2.6.35)
|
|
|
--no-or32-elf
|
--no-or32-elf
|
Don't configure, build and install the newlib (or32-elf) tool chain.
|
Don't configure, build and install the newlib (or32-elf) tool chain.
|
|
|
--no-or32-linux
|
--no-or32-linux
|
Line 532... |
Line 532... |
ignore_list=". .. CVS .svn"
|
ignore_list=". .. CVS .svn"
|
component_dirs="${binutils_dir} ${gcc_dir} ${newlib_dir}"
|
component_dirs="${binutils_dir} ${gcc_dir} ${newlib_dir}"
|
|
|
for srcdir in ${component_dirs}
|
for srcdir in ${component_dirs}
|
do
|
do
|
|
case `dirname $0` in
|
|
'.') ;;
|
|
*)
|
|
case srcdir in
|
|
/* | [A-Za-z]:[\\/]*) ;;
|
|
*) srcdir="`dirname $0`/${srcdir}" ;;
|
|
esac ;;
|
|
esac
|
echo "Component: $srcdir"
|
echo "Component: $srcdir"
|
case srcdir
|
case srcdir
|
in
|
in
|
/* | [A-Za-z]:[\\/]*)
|
/* | [A-Za-z]:[\\/]*)
|
;;
|
;;
|
Line 673... |
Line 681... |
|
|
} # gnu_make
|
} # gnu_make
|
|
|
|
|
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
|
# Change directory to $1 as seen from $0.
|
|
|
|
function cd_0rel {
|
|
case "$1" in
|
|
/*) cd "$1" ;;
|
|
*) cd "`dirname $0`/$1" ;;
|
|
esac
|
|
}
|
|
|
|
# ------------------------------------------------------------------------------
|
# Conditionally configure and install the Linux headers
|
# Conditionally configure and install the Linux headers
|
|
|
# @param[in] $1 The prefix to use for installation.
|
# @param[in] $1 The prefix to use for installation.
|
function install_linux_headers {
|
function install_linux_headers {
|
this_prefix=$1
|
this_prefix=$1
|
|
|
cd $linux_dir
|
cd_0rel $linux_dir
|
|
|
if [ "true" == "${config_flag}" ]
|
if [ "true" == "${config_flag}" ]
|
then
|
then
|
echo "bld-all.sh: Configuring Linux headers"
|
echo "bld-all.sh: Configuring Linux headers"
|
|
|
Line 727... |
Line 745... |
if [ "true" == "${config_flag}" ]
|
if [ "true" == "${config_flag}" ]
|
then
|
then
|
this_prefix=$1
|
this_prefix=$1
|
echo "bld-all.sh: Configuring uClibc"
|
echo "bld-all.sh: Configuring uClibc"
|
|
|
cd ${uclibc_dir}
|
cd_0rel ${uclibc_dir}
|
|
|
kheaders="KERNEL_HEADERS=\\\"${this_prefix}\\/or32-linux\\/include\\\""
|
kheaders="KERNEL_HEADERS=\\\"${this_prefix}\\/or32-linux\\/include\\\""
|
devprefix="DEVEL_PREFIX=\\\"${this_prefix}\\/or32-linux\\\""
|
devprefix="DEVEL_PREFIX=\\\"${this_prefix}\\/or32-linux\\\""
|
ccprefix="CROSS_COMPILER_PREFIX=\\\"or32-linux-\\\""
|
ccprefix="CROSS_COMPILER_PREFIX=\\\"or32-linux-\\\""
|
|
|
Line 773... |
Line 791... |
|
|
|
|
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
# Conditionally build and install uClibc
|
# Conditionally build and install uClibc
|
function uclibc_build_install {
|
function uclibc_build_install {
|
cd ${uclibc_dir}
|
cd_0rel ${uclibc_dir}
|
|
|
if [ "true" == "${build_flag}" ]
|
if [ "true" == "${build_flag}" ]
|
then
|
then
|
echo "bld-all.sh: Building uClibc"
|
echo "bld-all.sh: Building uClibc"
|
|
|
Line 838... |
Line 856... |
fi
|
fi
|
|
|
# Configure all
|
# Configure all
|
gnu_config ${config_flag} ${prefix} ${bd_elf} ../${unisrc_dir} \
|
gnu_config ${config_flag} ${prefix} ${bd_elf} ../${unisrc_dir} \
|
"${languages}" "${newlib_config}"
|
"${languages}" "${newlib_config}"
|
gnu_config ${config_flag} ${prefix} ${bd_elf_gdb} ../${gdb_dir} \
|
# ??? should handle absolute pathnames.
|
"${languages}"
|
gnu_config ${config_flag} ${prefix} ${bd_elf_gdb} \
|
|
../`dirname $0`/${gdb_dir} "${languages}"
|
|
|
# Build all
|
# Build all
|
gnu_make ${build_flag} ${bd_elf} all-build all-binutils all-gas all-ld
|
gnu_make ${build_flag} ${bd_elf} all-build all-binutils all-gas all-ld
|
gnu_make ${build_flag} ${bd_elf} all-gcc
|
gnu_make ${build_flag} ${bd_elf} all-gcc
|
gnu_make ${build_flag} ${bd_elf} all-target-libgcc all-target-libstdc++-v3 \
|
gnu_make ${build_flag} ${bd_elf} all-target-libgcc all-target-libstdc++-v3 \
|
Line 949... |
Line 968... |
gnu_make ${install_flag} ${bd_linux} install-target-libstdc++-v3
|
gnu_make ${install_flag} ${bd_linux} install-target-libstdc++-v3
|
fi
|
fi
|
|
|
# Configure, build and install GDB (note we need to reconfigure in case
|
# Configure, build and install GDB (note we need to reconfigure in case
|
# only stage1 has been run previously).
|
# only stage1 has been run previously).
|
gnu_config ${config_flag} ${prefix} ${bd_linux_gdb} ../${gdb_dir} \
|
# ??? should handle absolute pathnames.
|
"${languages}"
|
gnu_config ${config_flag} ${prefix} ${bd_linux_gdb} \
|
|
../`dirname $0`/${gdb_dir} "${languages}"
|
gnu_make ${build_flag} ${bd_linux_gdb} all-build all-sim all-gdb
|
gnu_make ${build_flag} ${bd_linux_gdb} all-build all-sim all-gdb
|
gnu_make ${install_flag} ${bd_linux_gdb} install-sim install-gdb
|
gnu_make ${install_flag} ${bd_linux_gdb} install-sim install-gdb
|
fi
|
fi
|
|
|
No newline at end of file
|
No newline at end of file
|