|
Message
From: Oliviéri<jean-marc.olivieri@w...>
Date: Tue Apr 12 15:43:51 CEST 2005
Subject: [openrisc] help(the problem with building the environment)
Hi, The script you used was designed to gather files directly from a cvs server on the internet. I think that the paths have changed and thus you're blocked. Instead just follow the the install procedure described at: http://www.opencores.org/projects.cgi/web/or1k/gnu_toolchain_port
* To expand gz files: gunzip * To untar tar files: tar -xvf
Regards
-----Message d'origine----- De : openrisc-bounces@opencores.org [mailto:openrisc-bounces@opencores.org] De la part de hwzshare@zju.edu.cn Envoyé : mardi 12 avril 2005 15:48 À : openrisc@opencores.org Cc : jacyhe824@163.com Objet : [openrisc] help(the problem with building the environment)
Hi,all I studyed the ATS builds the toolchain in i686-pc-linux-gnu (Red Hat 7.3) environment for cross-compiling for or32-uclinux(http://www.opencores.org/projects.cgi/web/or1k/ats), and I almost follow it to build the environment on my own PC(Red Hat 9.0),but I have the errors. First I download the following source: or1k_binutils.tar.gz or1k_gcc-3_2_3.tar.gz or1k_gdb-5_0.tar.gz or1k_or1ksim.tar.gz or1k_uclinux.tar.gz uclibc(I have untared it ) and I put them under the /home/hesj
The ATS I used is as the follows:
#!/bin/bash
# # This script if used as part of ATS needs to be invoked with # argument 'ats'. All build directories will be removed. # # W/o any argument this script can be used to # install the openrisc uclinux toolchain. It should automatically # checkout all the sources, automatically build all the tools and # install them. If you modify the sources, you can't commit back # to CVS because sources are checked out as anonymous. Build # directories are not removed. #
# # Some common variables # if [ "$1" == "ats" ]; then OR1K_WEB=../../www/cores/or1k/ats/or32-uclinux OR1K_WEB_LAST=$OR1K_WEB/last_ok INSTALL_PREFIX=/opt/or1k/or32-uclinux export PATH=$PATH:/usr/local/bin else OR1K_WEB=. OR1K_WEB_LAST=$OR1K_WEB/last_ok INSTALL_PREFIX=/or32/or32-uclinux fi OK_STR="<font color=#00af00>Test Passed</font>" FAIL_STR="<font color=#bf0000>Test Failed</font>" ALL_STABLE=1
# # Allocate test pool directory # #mkdir or1k #cd or1k
# # Copy script for web visitors' reference # #cp ../or1k_ats_uclinux.sh $OR1K_WEB/or1k_ats_uclinux.txt
# # Start with binutils # date > checkout_binutils.txt 2>&1 #nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d binutils or1k/binutils >> checkout_binutils.txt 2>&1 nice tar xvfz or1k_binutils.tar.gz >> checkout_binutils.txt 2>&1 cd /home/hesj/or1k mkdir b-b cd b-b date > ../build_binutils.txt 2>&1 uname -a >> ../build_binutils.txt 2>&1 ../binutils/configure --target=or32-uclinux --prefix=$INSTALL_PREFIX >> ../build_binutils.txt 2>&1 nice /usr/bin/make all install >> ../build_binutils.txt 2>&1 BUILD_BINUTILS_STATUS=$? export PATH=$INSTALL_PREFIX/bin:$PATH cd .. if [ "$1" == "ats" ]; then rm -rf binutils fi
#
# Copy all log files into or1k web directory
#
cp checkout_binutils.txt $OR1K_WEB
cp build_binutils.txt $OR1K_WEB
#
# Check if binutils was built and installed correctly
#
if [ $BUILD_BINUTILS_STATUS = 0 ]; then
echo "$OK_STR (`date`)" > $OR1K_WEB/build_binutils.status
cp $OR1K_WEB/build_binutils.status $OR1K_WEB_LAST
cp $OR1K_WEB/checkout_binutils.txt $OR1K_WEB_LAST
cp $OR1K_WEB/build_binutils.txt $OR1K_WEB_LAST
else
../notice_developers.sh or1k/binutils
$OR1K_WEB_LAST/build_binutils.status
< build_binutils.txt
echo "$FAIL_STR (`date`)" > $OR1K_WEB/build_binutils.status
ALL_STABLE=0
fi
#
# Start with gcc
#
date > checkout_gcc.txt 2>&1
#nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d gcc
or1k/gcc-3.2.3 >> checkout_gcc.txt 2>&1
cd /home/hesj
tar xzvf or1k_gcc-3_2_3.tar.gz >> checkout_gcc.txt 2>&1
cd or1k
mkdir b-gcc
cd b-gcc
date > ../build_gcc.txt 2>&1
uname -a >> ../build_gcc.txt 2>&1
nice ../gcc-3.2.3/configure --target=or32-uclinux \
--with-gnu-as --with-gnu-ld --verbose \
--enable-threads --prefix=$INSTALL_PREFIX \
--local-prefix=$INSTALL_PREFIX/or32-uclinux --enable-languages="c"
>>
../build_gcc.txt 2>&1
nice /usr/bin/make all install >> ../build_gcc.txt 2>&1
BUILD_GCC_STATUS=$?
cd /home/hesj
#
# Copy all log files into or1k web directory
#
cp checkout_gcc.txt $OR1K_WEB
cp build_gcc.txt $OR1K_WEB
#
# Check if gcc was built and installed correctly
#
if [ $BUILD_GCC_STATUS = 0 ]; then
echo "$OK_STR (`date`)" > $OR1K_WEB/build_gcc.status
cp $OR1K_WEB/build_gcc.status $OR1K_WEB_LAST
cp $OR1K_WEB/checkout_gcc.txt $OR1K_WEB_LAST
cp $OR1K_WEB/build_gcc.txt $OR1K_WEB_LAST
else
../notice_developers.sh or1k/gcc-3.2.3
$OR1K_WEB_LAST/build_gcc.status <
build_gcc.txt
echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_gcc.status
ALL_STABLE=0
fi
#
# Start with gdb
#
date > checkout_gdb.txt 2>&1
#nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d gdb
or1k/gdb-5.0 >> checkout_gdb.txt 2>&1
cd /home/hesj
tar xzvf or1k_gdb-5_0.tar.gz >> checkout_gdb.txt 2>&1
cd or1k
mkdir b-gdb
cd b-gdb
date > ../build_gdb.txt 2>&1
uname -a >> ../build_gdb.txt 2>&1
../gdb-5.0/configure --target=or32-uclinux --prefix=$INSTALL_PREFIX >>
../build_gdb.txt 2>&1
nice /usr/bin/make all install >> ../build_gdb.txt 2>&1
BUILD_GDB_STATUS=$?
cd ..
if [ "$1" == "ats" ]; then
rm -rf gdb
fi
#
# Copy all log files into or1k web directory
#
cp checkout_gdb.txt $OR1K_WEB
cp build_gdb.txt $OR1K_WEB
#
# Check if gdb was built and installed correctly
#
echo $BUILD_GDB_STATUS
if [ $BUILD_GDB_STATUS = 0 ]; then
echo "$OK_STR (`date`)" > $OR1K_WEB/build_gdb.status
cp $OR1K_WEB/build_gdb.status $OR1K_WEB_LAST
cp $OR1K_WEB/checkout_gdb.txt $OR1K_WEB_LAST
cp $OR1K_WEB/build_gdb.txt $OR1K_WEB_LAST
else
../notice_developers.sh or1k/gdb-5.0 $OR1K_WEB_LAST/build_gdb.status
<
build_gdb.txt
echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_gdb.status
ALL_STABLE=0
fi
#
# Start with or1ksim
#
date > checkout_or1ksim.txt 2>&1
#nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d or1ksim
or1k/or1ksim >> checkout_or1ksim.txt 2>&1
cd /home/hesj
tar xzvf or1k_or1ksim.tar.gz >> checkout_or1ksim.txt 2>&1
cd or1k
cd or1ksim
date > ../build_or1ksim.txt 2>&1
uname -a >> ../build_or1ksim.txt 2>&1
../or1ksim/configure --target=or32-uclinux --prefix=$INSTALL_PREFIX >>
../build_or1ksim.txt 2>&1
nice /usr/bin/make all install >> ../build_or1ksim.txt 2>&1
BUILD_OR1KSIM_STATUS=$?
cd ..
#
# Copy all log files into or1k web directory
#
cp checkout_or1ksim.txt $OR1K_WEB
cp build_or1ksim.txt $OR1K_WEB
#
# Check if or1ksim was built and installed correctly
#
if [ $BUILD_OR1KSIM_STATUS = 0 ]; then
echo "$OK_STR (`date`)" > $OR1K_WEB/build_or1ksim.status
cp $OR1K_WEB/build_or1ksim.status $OR1K_WEB_LAST
cp $OR1K_WEB/checkout_or1ksim.txt $OR1K_WEB_LAST
cp $OR1K_WEB/build_or1ksim.txt $OR1K_WEB_LAST
else
../notice_developers.sh or1k/or1ksim
$OR1K_WEB_LAST/build_or1ksim.status <
build_or1ksim.txt
echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_or1ksim.status
ALL_STABLE=0
fi
#
# Start with uclinux
#
date > checkout_uclinux.txt 2>&1
#nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d
uClinux-2.0.x
\
#or1k/uclinux/uClinux-2.0.x >> checkout_uclinux.txt 2>&1
cd /home/hesj
nice tar zxvf or1k_uclinux.tar.gz >> checkout_uclinux.txt 2>&1
cd /or1k
#mkdir uclinux
#mv uClinux-2.0.x uclinux
cd uclinux/uClinux-2.0.x
sed -e 's/^LIBGCC/#LIBGCC/; /^#LIBGCC/ a \
LIBGCC = '$INSTALL_PREFIX'\/lib\/gcc-lib\/or32-uclinux\/3.2.3\/libgcc.a' \
< arch/or32/Rules.make > arch/or32/Rules.make.edited
mv arch/or32/Rules.make.edited arch/or32/Rules.make
sed -e 's/^CONFIG_NET/#CONFIG_NET/; /^#CONFIG_NET/ a \
CONFIG_NET=n' < arch/or32/defconfig > arch/or32/defconfig.edited
mv arch/or32/defconfig.edited arch/or32/defconfig
nice make oldconfig >> ../../build_uclinux.txt 2>&1
nice make dep >> ../../build_uclinux.txt 2>&1
nice /usr/bin/make all >> ../../build_uclinux.txt 2>&1
BUILD_UCLINUX_STATUS=$?
touch uart0.rx
echo -e "run 40000000 hush\nq" | or32-uclinux-sim -f sim.cfg linux -i >
/dev/null
cp uart0.tx ../../or1ksim_uclinux.txt
cd ../../
#
# Copy all log files into or1k web directory
#
cp checkout_uclinux.txt $OR1K_WEB
cp build_uclinux.txt $OR1K_WEB
cp or1ksim_uclinux.txt $OR1K_WEB
#
# Check if uclinux was built and installed correctly
#
if [ $BUILD_UCLINUX_STATUS = 0 ]; then
echo "$OK_STR (`date`)" > $OR1K_WEB/build_uclinux.status
cp $OR1K_WEB/build_uclinux.status $OR1K_WEB_LAST
cp $OR1K_WEB/checkout_uclinux.txt $OR1K_WEB_LAST
cp $OR1K_WEB/build_uclinux.txt $OR1K_WEB_LAST
else
../notice_developers.sh or1k/uclinux
$OR1K_WEB_LAST/build_uclinux.status <
build_uclinux.txt
echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_uclinux.status
ALL_STABLE=0
fi
if [ `grep Executing or1ksim_uclinux.txt | wc -l` -gt 0 ]; then
echo "$OK_STR (`date`)" > $OR1K_WEB/or1ksim_uclinux.status
cp $OR1K_WEB/or1ksim_uclinux.status $OR1K_WEB_LAST
cp $OR1K_WEB/or1ksim_uclinux.txt $OR1K_WEB_LAST
else
../notice_developers.sh or1k/uclinux
$OR1K_WEB_LAST/or1ksim_uclinux.status
< or1ksim_uclinux.txt
echo "$FAIL_STR (`date`)"> $OR1K_WEB/or1ksim_uclinux.status
ALL_STABLE=0
fi
#
# Start with uclibc
#
date > checkout_uclibc.txt 2>&1
#nice cvs -d :pserver:cvs@cvs.opencores.org:/home/oc/cvs -z9 co -d uclibc \
cd /home/hesj
cp -r uclibc ./or1k
#or1k/uclibc >> checkout_uclibc.txt 2>&1
cd or1k
cd uclibc
date > ../build_uclibc.txt 2>&1
uname -a >> ../build_uclibc.txt 2>&1
ln -s ./extra/Configs/Config.cross.or32.uclinux Config
sed -e 's/^KERNEL_SOURCE/#KERNEL_SOURCE/; /^#KERNEL_SOURCE/ a \
KERNEL_SOURCE='`pwd`'\/..\/uclinux\/uClinux-2.0.x' < Config > Config.edited
sed -e 's/^DEVEL_PREFIX/#DEVEL_PREFIX/; /^#DEVEL_PREFIX/ a \
DEVEL_PREFIX='$INSTALL_PREFIX < Config.edited > Config
rm Config.edited
nice /usr/bin/make all install >> ../build_uclibc.txt 2>&1
BUILD_UCLIBC_STATUS=$?
pushd .
cd $INSTALL_PREFIX/bin
rm -f ar as cc cpp gasp gcc ld nm objcopy objdump ranlib size strings strip
jar
grepjar
popd
cd /home/hesj/or1k/b-gcc
date > ../rebuild_gcc.txt 2>&1
uname -a >> ../rebuild_gcc.txt 2>&1
nice ../gcc-3.2.3/configure --target=or32-uclinux \
--with-gnu-as --with-gnu-ld --verbose \
--enable-threads --prefix=$INSTALL_PREFIX \
--local-prefix=$INSTALL_PREFIX/or32-uclinux --enable-languages="c"
>>
../rebuild_gcc.txt 2>&1
nice make all install >> ../rebuild_gcc.txt 2>&1
REBUILD_GCC_STATUS=$?
cd ..
#
# Check or1ksim testbench
#
#cd or1ksim/testbench
#date > ../../or1ksim_testbench.txt 2>&1
#CFLAGS="-nostdlib" ./configure --target=or32-uclinux --host=or32-uclinux >>
../../or1ksim_testbench.txt 2>&1
#export PATH=$PATH:..
#make check >> ../../or1ksim_testbench.txt 2>&1
#cd ../..
##
## Copy all log files into or1k web directory
##
#cp or1ksim_testbench.txt $OR1K_WEB
##
## Check if or1ksim testbench passed OK
##
#if [ `grep passed or1ksim_testbench.txt | wc -l` -gt 0 ]; then
# echo "$OK_STR (`date`)" > $OR1K_WEB/or1ksim_testbench.status
# cp $OR1K_WEB/or1ksim_testbench.status $OR1K_WEB_LAST
# cp $OR1K_WEB/or1ksim_testbench.txt $OR1K_WEB_LAST
#else
# ../notice_developers.sh or1k/or1ksim/testbench
$OR1K_WEB_LAST/or1ksim_testbench.status < or1ksim_testbench.txt
# echo "$FAIL_STR (`date`)"> $OR1K_WEB/or1ksim_testbench.status
# ALL_STABLE=0
#fi
#if [ "$1" == "ats" ]; then
# rm -rf uclibc uclinux gcc or1ksim
#fi
##
## Copy all log files into or1k web directory
##
#cp checkout_uclibc.txt $OR1K_WEB
#cp build_uclibc.txt $OR1K_WEB
#cp rebuild_gcc.txt $OR1K_WEB
##
## Check if uclibc was built and installed correctly
##
#if [ $BUILD_UCLIBC_STATUS = 0 ]; then
# echo "$OK_STR (`date`)" > $OR1K_WEB/build_uclibc.status
# cp $OR1K_WEB/build_uclibc.status $OR1K_WEB_LAST
# cp $OR1K_WEB/checkout_uclibc.txt $OR1K_WEB_LAST
# cp $OR1K_WEB/build_uclibc.txt $OR1K_WEB_LAST
#else
# ../notice_developers.sh or1k/uclibc
$OR1K_WEB_LAST/build_uclibc.status <
build_uclibc.txt
# echo "$FAIL_STR (`date`)"> $OR1K_WEB/build_uclibc.status
# ALL_STABLE=0
#fi
#if [ $REBUILD_GCC_STATUS = 0 ]; then
# echo "$OK_STR (`date`)" > $OR1K_WEB/rebuild_gcc.status
# cp $OR1K_WEB/rebuild_gcc.status $OR1K_WEB_LAST
# cp $OR1K_WEB/rebuild_gcc.txt $OR1K_WEB_LAST
#else
# ../notice_developers.sh or1k/gcc-3.2.3
$OR1K_WEB_LAST/rebuild_gcc.status <
rebuild_gcc.txt
# echo "$FAIL_STR (`date`)"> $OR1K_WEB/rebuild_gcc.status
# ALL_STABLE-0
#fi
#
##
## rtag sources as ats-stable if everything worked
##
#cd ..
#if [ "$1" == "ats" ]; then
# if [ $ALL_STABLE = 1 ]; then
# nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9
rtag
-FR ats-stable or1k/binutils > /dev/null 2>&1
# nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9
rtag
-FR ats-stable or1k/gcc-3.2.3 > /dev/null 2>&1
# nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9
rtag
-FR ats-stable or1k/gdb-5.0 > /dev/null 2>&1
# nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9
rtag
-FR ats-stable or1k/or1ksim > /dev/null 2>&1
# nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9
rtag
-FR ats-stable or1k/uclinux > /dev/null 2>&1
# nice cvs -d :pserver:ats@cvs.opencores.org:/home/oc/cvs -z9
rtag
-FR ats-stable or1k/uclibc > /dev/null 2>&1
# fi
#fi
#
##
## Clean testpool
##
#if [ "$1" == "ats" ]; then
# rm -rf or1k
#fi
When I build it ,the specific status is this:
cp: cannot stat `checkout_binutils.txt': No such file or directory
cp: `build_binutils.txt' and `./build_binutils.txt' are the same file
cp: cannot stat `./checkout_binutils.txt': No such file or directory
cp: `checkout_gcc.txt' and `./checkout_gcc.txt' are the same file
cp: cannot stat `build_gcc.txt': No such file or directory
cp: cannot stat `./build_gcc.txt': No such file or directory
cp: cannot stat `checkout_gdb.txt': No such file or directory
cp: `build_gdb.txt' and `./build_gdb.txt' are the same file
0
cp: cannot stat `./checkout_gdb.txt': No such file or directory
cp: `checkout_or1ksim.txt' and `./checkout_or1ksim.txt' are the same file
cp: `build_or1ksim.txt' and `./build_or1ksim.txt' are the same file
ats.scr: line 202: cd: /or1k: No such file or directory
ats.scr: line 205: cd: uclinux/uClinux-2.0.x: No such file or directory
ats.scr: line 206: arch/or32/Rules.make: No such file or directory
mv: can't stat source arch/or32/Rules.make.edited
ats.scr: line 210: arch/or32/defconfig: No such file or directory
mv: can't stat source arch/or32/defconfig.edited
WARNING: Cannot read script file from 'sim.cfg',
neither '/root/.or1k/sim.cfg'.
WARNING: Cannot read script file from 'sim.cfg',
neither '/root/.or1k/sim.cfg'.
WARNING: No config file read, assuming default configuration.
WARNING: Memory not defined, assuming standard configuration.
linux: No such file or directory
cp: cannot stat `uart0.tx': No such file or directory
cp: cannot stat `checkout_uclinux.txt': No such file or directory
cp: `build_uclinux.txt' and `./build_uclinux.txt' are the same file
cp: cannot stat `or1ksim_uclinux.txt': No such file or directory
ats.scr: line 236: ../notice_developers.sh: No such file or directory
grep: or1ksim_uclinux.txt: No such file or directory
ats.scr: line 245: or1ksim_uclinux.txt: No such file or directory
ln: `Config': File exists
/home/hesj/or1k/uclibc /home/hesj/or1k/uclibc
/home/hesj/or1k/uclibc
I am a beginner and don't know what to do with the problems.Who can help
me?-thanks
Regards
jacyhe
_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc
|
 |