OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [toolchain_script/] [MOF_ORSOC_TCHN_v5b_or32-elf.sh] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1773 julius
#!/bin/bash
2
 
3
# Copyright (C) 2008,2009 www.meansoffreedom.org, www.orsoc.se
4
# This file is free software; you can redistribute it and/or modify it
5
# under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
# General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
 
18
##Date: 21/04/2009
19
##Title: MOF_ORSOC_TCN_v5b_or32-elf.sh
20
##Purpose: Complete Toolchain Builder from MOF & ORSoC.
21
##initial rgd, mse
22
##updated jb
23
 
24
#Changelog
25
# 090306 - jb
26
#        - added exit code checking after each make and patch
27
#        - changed download method to instead generate a script and run it in
28
#          kermit (requiring single ftp logon per host)
29
# 090309 - jb
30
#        - changed download of GNU tools so they occurr from the GNU.org ftp
31
#          (except binutils-2.18.50, it's not there)
32
#        - changed download of Linux kernel so it's now from ftp.kernel.org
33
#        - changed patch for binutils (fixes gcc-4.3.2 compilation problem
34
#          caused by non-string literals in printf)
35
#        - changed or1ksim version from 0.3.0rc2 to 0.3.0
36
#        - changed Linux kernel version from 2.6.19 to 2.6.24
37
#        - changed Linux kernel patch version for this new kernel version
38
#          generated new patch for Linux kernel, based on one from MOF
39
#          (www.meansoffreedom.net) which contains a more complete config file.
40
#          removing need for user input during "make oldconfig"
41
#        - changed organisation so that all the packages are not copied into
42
#          the build directory before they are extracted, instead it's done
43
#          from where they are.
44
#        - changed gdb-6.8 patch version due to stricter gcc-4.3.2 checking
45
#          return types.
46
#        - included better or1ksim config file in Linux sources patch, now
47
#          named "or1ksim_linux.cfg"
48
# 100309 - jb
49
#        - changed back to wget for file retrieval
50
#        - changed introduction readme
51
#        - changed install destination checking and setup
52
#        - added md5sum checking of any existing downloaded files, removing
53
#          need for redownloading things every time
54
#        - added debug build mode - run script with -d at command line
55
#          note: not everything in this mode has been tested, may not work
56
#          in certain combinations!
57
# 120309 - jb
58
#        - New OS X version - busybox doesn't work (removed from script),
59
#          nor does ors1ksim (compiles but segfaults somewhere during test).
60
# 140309 - Added ability to change target name. Included some sed commands to
61
#          change or32-uclinux to whatever $TARGET is set to in some scripts
62
#          (mainly for uClibc install, the are set at configure time)
63
# 160309 - (v5a) Replaced busybox sources in download list (removed for OS X
64
#          version and forgot to replace it when running on Linux again.)
65
# 270309 - Changed the declaration of the check_exit_code function to be without
66
#          the preceeding "function" as this isn't valid in sh, and the new way
67
#          appears to be valid in bash.
68
#        - Changed the link in the error output to the new OpenCores forum.
69
# 210409 - Changed linux kernel and uClibc patch versions to latest
70
#        - Changed output to all be piped to appropriate files, makes things neater
71
 
72
# TODO: OS X build things - need an "elf.h" from some Linux machine's
73
#       /usr/local/include dir and put in Mac's /usr/local/include dir -
74
#       this solves issue with Linux compilation
75
# TODO: OS X build things - add HOST_LOADLIBES="lintl" to make line of uClibc
76
# TODO: OS X build things - must remove the -Werror line in $GDB_VER/gdb/Makefile,
77
#       sed command:
78
#       sed 's/WERROR\_CFLAGS\ \=\ \-Werror/WERROR\_CFLAGS\ \=/' $GDB_VER/gdb/Makefile
79
#       Can also just change the gdb-6.8/gdb/Makefile.in and remove the Werror= thing
80
# TODO: OS X build things - or1ksim, in or1ksim-0.3.0/peripheral/atadevice.c, it
81
#       includes byteswap.h - actually it's abstract.h that defines #LE_16() bswap_16(),
82
#       so in abstract.h we put in defines for bswap_16 as
83
#       #define bswap_16(value) ((((value) & 0xff) << 8) | ((value) >> 8))
84
# TODO: OS X Build things - or1ksim strndup.c, in or1k-0.3.0/port/strndup.c strndup function,
85
#       types not exist etc. Need to include sys/types.h and string.h to this file to fix
86
#       a few problems.
87
# TODO: OS X build things - or1ksim - or1ksim-0.3.0/sim-cmd.c passes one of our functions
88
#       to a readline function, rl_event_hook, but this is not defined in the OS X (BSD)
89
#       readline package, so the GNU readline package must be used.
90
# TODO: OS X build things - or1ksim segfaults when run for some reason.
91
 
92
## A function we'll call throughout the setup process to check if the previous
93
## command finished without error
94
function check_exit_code {
95
    if [ $? -ne 0 ]
96
    then
97
        echo
98
        echo "############################ERROR#############################"
99
        echo
100
        echo "Error during toolchain installation."
101
        echo
102
        echo "Please report this to the script maintainers."
103
        echo
104
        echo "A useful report would contain information such as the module"
105
        echo "buing built/\"make\"ed when the error occurred (relevant lines"
106
        echo "of console output), the version of GCC on the host system used"
107
        echo "to compile (gcc --version), linux distro and version, etc."
108
        echo "A good place to post this information is on the OpenCores"
109
        echo "forum for the OpenRISC project: "
110
        echo "http://opencores.org/?do=forum"
111
        echo
112
        exit $?
113
    fi
114
}
115
 
116
## SCRIPT VERSION ##
117
SCRIPT_VERSION="v5b"
118
 
119
## Beginning globals ##
120
 
121
## ORSoC FTP download settings ##
122
ORSOC_FTP_HOST="195.67.9.12"
123
ORSOC_FTP_USER="ocuser"
124
ORSOC_FTP_PASSWD="oc"
125
ORSOC_FTP_DIR="toolchain"
126
 
127
## GNU FTP download settings ##
128
GNU_FTP_HOST="ftp.gnu.org"
129
GNU_FTP_USER="anonymous"
130
#GNU_FTP_BINUTILS_DIR="gnu/binutils"
131
GNU_FTP_GCC_DIR="gnu/gcc/gcc-4.2.2"
132
GNU_FTP_GDB_DIR="gnu/gdb"
133
 
134
## Linux kernel download settings ##
135
KERNEL_FTP_HOST="ftp.kernel.org"
136
KERNEL_FTP_USER="anonymous"
137
KERNEL_FTP_PASSWD="anonymous"
138
KERNEL_FTP_DIR="pub/linux/kernel/v2.6"
139
 
140
## Local directory variables ##
141
START_DIR=`pwd`
142
DN="n"
143
DIR=`pwd`
144
 
145
## Versions of the toolchain components ##
146
BINUTILS_VER=binutils-2.18.50
147
GCC_VER=gcc-4.2.2
148
GDB_VER=gdb-6.8
149
UCLIB_VER=uClibc-0.9.29
150
LINUX_VER=linux-2.6.24
151
BUSY_VER=busybox-1.7.5
152
SIM_VER=or1ksim-0.3.0
153
 
154
## Patches ##
155
BINUTILS_PATCH="$BINUTILS_VER.or32_fixed_patch-v2.0.bz2"
156
GCC_PATCH=$GCC_VER.or32patch.bz2
157
LINUX_PATCH="linux_2.6.24_or32_unified_v2.2.bz2" ## New version, changed rgd_dot_config in root, changed or1ksim config file name and contents##
158
UCLIBC_PATCH="uClibc-0.9.29-or32-patch-1.0.bz2"
159
GDB_PATCH="or32-gdb-6.8-patch-2.4.bz2"
160
 
161
## MD5sum file ##
162
MD5SUM_FILE=md5sums
163
 
164
## Configs ##
165
#CONFIG1="rgd_uc_29dotconfig" ## Now changed to rgd_uc_29v5dotconfig as it uses paths to the 2.6.24 kernel ##
166
CONFIG1="rgd_uc_29v5dotconfig"
167
CONFIG2="rgd_bb_1.75dotconfig"
168
 
169
## Ramdisk name ##
170
RAMDISK_FILE=initrd-fb-03.ext2.last.work.1.7.5
171
LINUX_RAMDISK_FILE=arch/or32/support/initrd-fb-03.ext2 ## The location and name of the ramdisk that Linux wants when it compiles
172
 
173
## Toolchain prefix ##
174
TARGET=or32-elf
175
 
176
 
177
## Tarballs ##
178
ZBALL1=$BINUTILS_VER.tar.bz2
179
TBALL1=$BINUTILS_VER.tar
180
ZBALL2=$GCC_VER.tar.bz2
181
TBALL2=$GCC_VER.tar
182
ZBALL3=$UCLIB_VER.tar.bz2
183
TBALL3=$UCLIB_VER.tar
184
ZBALL4=$LINUX_VER.tar.bz2
185
TBALL4=$LINUX_VER.tar
186
ZBALL5=$BUSY_VER.tar.bz2
187
TBALL5=$BUSY_VER.tar
188
ZBALL6=$SIM_VER.tar.bz2
189
TBALL6=$SIM_VER.tar
190
ZBALL7=$RAMDISK_FILE.bz2
191
ZBALL8=$GDB_VER.tar.bz2
192
TBALL8=$GDB_VER.tar
193
 
194
ORSOC_FTP_FILE_LIST="$ZBALL1
195
        $ZBALL3
196
        $ZBALL5
197
        $ZBALL6
198
        $ZBALL7
199
        $BINUTILS_PATCH
200
        $GCC_PATCH
201
        $LINUX_PATCH
202
        $UCLIBC_PATCH
203
        $GDB_PATCH
204
        $CONFIG1
205
        $CONFIG2"
206
 
207
GNU_FTP_FILE_LIST="$ZBALL2
208
$ZBALL8"
209
 
210
KERNEL_FTP_FILE_LIST=$ZBALL4
211
 
212
 
213
 
214
##Welcome message
215
echo
216
echo "The OpenRISC toolchain install script - Provided by ORSoC & MeansOfFreedom.net"
217
echo "Version $SCRIPT_VERSION"
218
echo
219
echo "#####################################README#####################################"
220
echo
221
echo "This script will install tools required for development on the OpenRISC platform"
222
echo "This version ($SCRIPT_VERSION) includes: "
223
echo "        $GCC_VER, $BINUTILS_VER, $UCLIB_VER"
224
echo "        $LINUX_VER, $GDB_VER, $BUSY_VER and $SIM_VER"
225
echo
226
echo "Please follow the prompts to select the install location."
227
echo
228
echo "Note: Two new directories, or32-build and or32-download, will be created in the"
229
echo "current directory for storing downloaded files and building the tools."
230
echo "Also: This script attempts to mount a ramdisk image in a local directory to copy"
231
echo "in the freshly built busybox. This requires root user privileges - if they are"
232
echo "not deteceted the existing busybox binaries will remain in the ramdisk image."
233
echo
234
echo "#####################################README#####################################"
235
echo
236
 
237
echo "Install the toolchain under current directory?"
238
echo "Current directory: [$DIR]"
239
echo "Tools will be installed in [$DIR/$TARGET]"
240
echo [Y/n]:
241
read YN
242
 
243
## $YN will be zero length string if user just pressed enter ##
244
if [ -z $YN ]
245
    then
246
    VAL="y"
247
else
248
    VAL=$(echo $YN | tr [:upper:] [:lower:])
249
fi
250
 
251
if [ $VAL = "n" ]
252
    then
253
    # Optional install path
254
    echo "Enter the path the toolchain will be installed in:"
255
    read DIR
256
 
257
    # Check if the path exists and ask the user to verify it
258
    until [ $DN = "y" ]
259
      do
260
 
261
        #Check the path exists
262
        if [ -d $DIR ]
263
            then
264
            # The path entered is OK
265
            echo "Chosen directory is [$DIR]"
266
            echo "Tools will be installed in [$DIR/$TARGET]"
267
            echo "[y/n]:"
268
            read DN
269
 
270
            if [ -z $DN ]
271
                then
272
                # Presume yes here
273
                DN="y"
274
            fi
275
 
276
            VAL=$(echo $DN | tr [:upper:] [:lower:])
277
        else
278
            echo
279
            #echo "Path does not exist. Please create it and ensure user has correct permissions."
280
            echo "Path does not exist. Create $DIR now?"
281
            echo "[y/N]:"
282
            read MKPATH
283
            if [ -z $MKPATH ]
284
                then
285
                ## $MKPATH was zero, so user probably just pressed enter without entering anything, which we'll interpret as "n" ##
286
                MKPATHYN="n"
287
            else
288
                MKPATHYN=$(echo $MKPATH | tr [:upper:] [:lower:])
289
            fi
290
 
291
            if [ $MKPATHYN = "y" ]
292
                then
293
                `mkdir $DIR`
294
 
295
                # Check we made it successfully
296
                if [ $? -ne 0 ]
297
                    then
298
                    DN="n"
299
                else
300
                    DN="x" # Set this so we do go back through and ask the user to verify
301
                fi
302
 
303
            else
304
                DN="n"
305
            fi
306
        fi
307
 
308
        if [ $DN = "n" ]
309
            then
310
            echo "Enter the path the toolchain should be installed in:"
311
            read DIR
312
        fi
313
 
314
    done
315
    cd $DIR
316
#    echo "loop done"
317
    echo "Working in " `pwd`
318
fi
319
 
320
BUILD_TOP=$START_DIR/or32-build
321
export BUILD_TOP
322
 
323
## Set donload directory to be under the current directory ##
324
DOWNLOAD_DIR=$START_DIR/or32-download
325
 
326
## Setup the target tool installation directory ##
327
INSTALL_DIR=$DIR
328
 
329
mkdir $INSTALL_DIR
330
 
331
####################################################################################################
332
## Now check which sources have already been downloaded, if any ##
333
 
334
## Check if download directory exists, if not create it ##
335
if [ -d $DOWNLOAD_DIR ]
336
    then
337
    cd $DOWNLOAD_DIR
338
else
339
    mkdir $DOWNLOAD_DIR
340
    cd $DOWNLOAD_DIR
341
fi
342
 
343
## We'll need the md5sum file ##
344
## This is a file stored on the ORSoC FTP server, containing checksums of all the files we need ##
345
rm -f $MD5SUM_FILE
346
wget ftp://$ORSOC_FTP_USER:$ORSOC_FTP_PASSWD@$ORSOC_FTP_HOST/$ORSOC_FTP_DIR/$MD5SUM_FILE
347
## Make sure we got that OK ##
348
check_exit_code
349
 
350
## We have lists of what to get from each FTP let's create a loop for each ##
351
 
352
## ORSoC FTP server downloads ##
353
for CURRENT_FILE in $ORSOC_FTP_FILE_LIST
354
  do
355
  # Check if we've already got the file
356
  if [ -e $CURRENT_FILE ]
357
      then
358
      echo "File $CURRENT_FILE exists locally."
359
      echo "Verifying MD5 checksum:"
360
      ## Verify it's right by checking the MD5 checksum ##
361
      ## First we get the line for $CURRENT_FILE out of the $MD5SUM_FILE, then feed it to "md5sum -c"
362
      ## which checks it and sets the return code, $? to 0 if OK, 1 if problem ##
363
      cat $MD5SUM_FILE | grep $CURRENT_FILE | md5sum -c
364
      if [ $? -ne 0 ]
365
          then
366
          #MD5sum of $CURRENT_FILE differs from expected value - we'll download it again
367
          echo "MD5 checksum of $CURRENT_FILE differs from expected value. Re-downloading."
368
          rm -f $CURRENT_FILE
369
          wget ftp://$ORSOC_FTP_USER:$ORSOC_FTP_PASSWD@$ORSOC_FTP_HOST/$ORSOC_FTP_DIR/$CURRENT_FILE
370
          check_exit_code
371
      fi
372
  else
373
      # File doesn't exist locally - we'll download it
374
      echo "Downloading $CURRENT_FILE"
375
      wget ftp://$ORSOC_FTP_USER:$ORSOC_FTP_PASSWD@$ORSOC_FTP_HOST/$ORSOC_FTP_DIR/$CURRENT_FILE
376
      check_exit_code
377
  fi
378
  echo
379
done
380
 
381
## GNU FTP server downloads ##
382
for CURRENT_FILE in $GNU_FTP_FILE_LIST
383
  do
384
  ## Check if we've already got the file ##
385
  if [ -e $CURRENT_FILE ]
386
      then
387
      echo "File $CURRENT_FILE exists locally."
388
      echo "Verifying MD5 checksum:"
389
      ## Verify it's right by checking the MD5 checksum ##
390
      ## First we get the line for $CURRENT_FILE out of the $MD5SUM_FILE, then feed it to "md5sum -c"
391
      ## which checks it and sets the return code, $? to 0 if OK, 1 if problem ##
392
      cat $MD5SUM_FILE | grep $CURRENT_FILE | md5sum -c
393
      if [ $? -ne 0 ]
394
          then
395
          ## MD5sum of present one is incorrect - we'll download it again ##
396
          echo "MD5 checksum of $CURRENT_FILE differs from expected value. Re-downloading."
397
          rm -f $CURRENT_FILE
398
          ## Depending on the file, we need a specific path ##
399
          ## gcc's path on ftp ##
400
          if [ $CURRENT_FILE = $ZBALL2 ]; then
401
              GNU_FTP_DIR=$GNU_FTP_GCC_DIR
402
          fi
403
          ## gdb's path on ftp ##
404
          if [ $CURRENT_FILE = $ZBALL8 ]; then
405
              GNU_FTP_DIR=$GNU_FTP_GDB_DIR
406
          fi
407
          wget ftp://$GNU_FTP_USER:$GNU_FTP_USER@$GNU_FTP_HOST/$GNU_FTP_DIR/$CURRENT_FILE
408
          check_exit_code
409
      fi
410
  else
411
      # File doesn't exist - we'll download it
412
      echo "Downloading $CURRENT_FILE"
413
      ## Depending on the file, we need a specific path ##
414
      ## gcc's path on ftp ##
415
      if [ $CURRENT_FILE = $ZBALL2 ]; then
416
              GNU_FTP_DIR=$GNU_FTP_GCC_DIR
417
      fi
418
      ## gdb's path on ftp ##
419
      if [ $CURRENT_FILE = $ZBALL8 ]; then
420
          GNU_FTP_DIR=$GNU_FTP_GDB_DIR
421
      fi
422
      wget ftp://$GNU_FTP_USER:$GNU_FTP_USER@$GNU_FTP_HOST/$GNU_FTP_DIR/$CURRENT_FILE
423
      check_exit_code
424
  fi
425
  echo
426
done
427
 
428
## Kernel.org FTP server downloads ##
429
CURRENT_FILE=$KERNEL_FTP_FILE_LIST
430
## Usually just a single file from the kernel.org ftp site ##
431
if [ -e $CURRENT_FILE ]
432
    then
433
    echo "File $CURRENT_FILE exists locally."
434
    echo "Verifying MD5 checksum:"
435
    ## Verify it's right by checking the MD5 checksum ##
436
    ## First we get the line for $CURRENT_FILE out of the $MD5SUM_FILE, then feed it to "md5sum -c"
437
    ## which checks it and sets the return code, $? to 0 if OK, 1 if problem ##
438
    cat $MD5SUM_FILE | grep $CURRENT_FILE | md5sum -c
439
    if [ $? -ne 0 ]
440
        then
441
        #MD5sum of present one is incorrect - we'll download it again
442
        echo "MD5 checksum of $CURRENT_FILE differs from expected value. Re-downloading."
443
        rm -f $CURRENT_FILE
444
        wget ftp://$KERNEL_FTP_USER:$KERNEL_FTP_USER@$KERNEL_FTP_HOST/$KERNEL_FTP_DIR/$CURRENT_FILE
445
        check_exit_code
446
    fi
447
else
448
    ## Download it ##
449
    echo "Downloading $CURRENT_FILE"
450
    wget ftp://$KERNEL_FTP_USER:$KERNEL_FTP_PASSWD@$KERNEL_FTP_HOST/$KERNEL_FTP_DIR/$CURRENT_FILE
451
    check_exit_code
452
fi
453
echo
454
 
455
####################################################################################################
456
 
457
cd $START_DIR
458
 
459
#if [ 0 eq 1 ] ## DEBUG skipping thing ##
460
#then
461
##Stuff you want to skip in here
462
#else ## DEBUG else
463
#cd $BUILD_TOP
464
#export PATH=$BUILD_TOP/tools/or32-uclinux/bin:$PATH
465
#fi ## DEBUG skipping end
466
 
467
## A couple of command line options to help if this thing breaks ##
468
## We won't clear away all the directories if run with the -d or -D options ##
469
DBG_BUILD=0
470
while getopts d OPT; do
471
    case "$OPT" in
472
        d)
473
        DBG_BUILD=1
474
        ;;
475
    esac
476
done
477
 
478
## if not debug building, let's remove all the old stuff ##
479
 
480
if [ $DBG_BUILD -eq 0 ]
481
    then
482
## Always start with a clean build dir ##
483
    rm -fr $BUILD_TOP
484
    mkdir $BUILD_TOP
485
    chmod 777 $BUILD_TOP
486
 
487
    mkdir $BUILD_TOP/b-gcc
488
    mkdir $BUILD_TOP/b-b
489
fi
490
 
491
## default build option is yes ##
492
BUILD_THIS="y"
493
 
494
if [ $DBG_BUILD -eq 1 ]
495
    then
496
    ## Ask if we should build binutils ##
497
    echo "Re-build $BINUTILS_VER ?"
498
    echo "[y/N]:"
499
    read YN
500
    ## $YN will be zero length string if user just pressed enter ##
501
    if [ -z $YN ]
502
        then
503
        BUILD_THIS="n"
504
    else
505
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
506
    fi
507
 
508
    if [ $BUILD_THIS = "y" ]
509
        then
510
        ## Delete and recreate the binutils directory ##
511
        rm -rf $BUILD_TOP/b-b
512
        rm -rf $BUILD_TOP/$BINUTILS_VER
513
        mkdir $BUILD_TOP/b-b
514
 
515
    fi
516
fi
517
 
518
##########################Building Binutils#######################
519
if [ $BUILD_THIS = "y" ]
520
    then
521
 
522
    echo
523
    echo "###################### Building binutils ###########################"
524
    echo
525
    echo "Decompressing source"
526
    cd $BUILD_TOP
527
 
528
## Extract sources ##
529
    tar xjf $DOWNLOAD_DIR/$ZBALL1
530
 
531
    echo
532
    echo "Patching binutils with $BINUTILS_PATCH"
533
 
534
    cd $BINUTILS_VER
535
 
536
    bzip2 -dc $DOWNLOAD_DIR/$BINUTILS_PATCH | patch -p1 > $BINUTILS_VER-patch.log 2>&1
537
 
538
## Make sure that patched ok ##
539
    check_exit_code
540
 
541
    cd ..
542
    cd $BUILD_TOP/b-b
543
 
544
    echo
545
    echo "Configuring $BINUTILS_VER: --target=$TARGET --prefix=$INSTALL_DIR/$TARGET --disable-checking"
546
    echo "Logging output to $BINUTILS_VER-configure.log"
547
    $BUILD_TOP/$BINUTILS_VER/configure --target=$TARGET --prefix=$INSTALL_DIR/$TARGET --disable-checking > $BINUTILS_VER-configure.log 2>&1
548
 
549
    echo
550
    echo "Making and installing $BINUTILS_VER"
551
    echo "Logging output to $BINUTILS_VER-make.log "
552
    make all install > $BINUTILS_VER-make.log 2>&1
553
 
554
## Make sure that built ok ##
555
    check_exit_code
556
 
557
    cd $BUILD_TOP
558
 
559
fi
560
#######################Finish Building Binutils#####################
561
 
562
## Export the path to the new or32 binaries directory, used by the rest of this script ##
563
echo
564
echo "Adding $INSTALL_DIR/$TARGET/bin to the PATH variable"
565
export PATH=$INSTALL_DIR/$TARGET/bin:$PATH
566
 
567
## default build option is yes ##
568
BUILD_THIS="y"
569
 
570
if [ $DBG_BUILD -eq 1 ]
571
    then
572
    ## Ask if we should do the initial builds of GCC and Linux ##
573
    echo "Re-do initial $GCC_VER and $LINUX_VER builds (note if you choose to do this then it's EXTREMELY likely that you will have to do the rest of the script, particularly the re-build of gcc that occurs later)?"
574
    echo "[y/N]:"
575
    read YN
576
    ## $YN will be zero length string if user just pressed enter ##
577
    if [ -z $YN ]
578
        then
579
        BUILD_THIS="n" # default is no
580
    else
581
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
582
    fi
583
 
584
    if [ $BUILD_THIS = "y" ]
585
        then
586
        ## Delete and recreate the gcc directory ##
587
        rm -rf $BUILD_TOP/b-gcc
588
        rm -rf $BUILD_TOP/$GCC_VER
589
        rm -rf $BUILD_TOP/$LINUX_VER
590
 
591
        mkdir $BUILD_TOP/b-gcc
592
 
593
        ## Undo everything done in the next part
594
        rm -rf $INSTALL_DIR/$TARGET/include
595
        unlink $INSTALL_DIR/$TARGET/sys-include
596
 
597
    fi
598
fi
599
 
600
##########################Building GCC and Linux############################
601
if [ $BUILD_THIS = "y" ]
602
    then
603
 
604
    echo
605
    echo "###################### Building or32 gcc and Linux ###########################"
606
    echo
607
    echo "Decompressing source"
608
 
609
    cd $BUILD_TOP
610
 
611
## Extract sources ##
612
    tar xjf $DOWNLOAD_DIR/$ZBALL2 ## gcc sources ##
613
 
614
    tar xjf $DOWNLOAD_DIR/$ZBALL4 ## Linux kernel sources ##
615
 
616
    echo
617
    echo "Patching $LINUX_VER with patch file $LINUX_PATCH"
618
 
619
    cd $LINUX_VER
620
 
621
## Apply patch to linux kernel sources ##
622
    bzip2 -dc $DOWNLOAD_DIR/$LINUX_PATCH | patch -p1 > $LINUX_VER-patch.log 2>&1
623
 
624
## Make sure that patched ok ##
625
    check_exit_code
626
 
627
    cp rgd_dot_config .config
628
 
629
    echo
630
    echo "Making Linux oldconfig"
631
 
632
    make oldconfig > $LINUX_VER-make-oldconfig.log 2>&1
633
 
634
## Make sure that built ok ##
635
    check_exit_code
636
 
637
    cd $BUILD_TOP
638
 
639
    mkdir $INSTALL_DIR/$TARGET/include
640
    mkdir $INSTALL_DIR/$TARGET/include/asm
641
    mkdir $INSTALL_DIR/$TARGET/include/linux
642
 
643
    cp -f -dR $LINUX_VER/include/linux/* $INSTALL_DIR/$TARGET/include/linux
644
    cp -f -dR $LINUX_VER/include/asm-or32/* $INSTALL_DIR/$TARGET/include/asm
645
 
646
    cd $INSTALL_DIR/$TARGET
647
    ln -s include sys-include
648
    cd $BUILD_TOP
649
 
650
    cd $GCC_VER
651
 
652
## Patch gcc ##
653
    echo
654
    echo "Patching $GCC_VER with $GCC_PATCH"
655
 
656
    bzip2 -dc $DOWNLOAD_DIR/$GCC_PATCH | patch -p1 > $GCC_VER-patch.log 2>&1
657
 
658
## Make sure that patched ok ##
659
    check_exit_code
660
 
661
    cd $BUILD_TOP
662
    cd b-gcc
663
 
664
    # configure GCC
665
    echo
666
    echo "Configuring $GCC_VER: --target=$TARGET --prefix=$INSTALL_DIR/$TARGET --with-local-prefix=$INSTALL_DIR/$TARGET/or32-uclinux --with-gnu-as --with-gnu-ld --disable-libssp --enable-languages=c"
667
    echo "Logging output to $GCC_VER-configure.log"
668
    $BUILD_TOP/$GCC_VER/configure --target=$TARGET --prefix=$INSTALL_DIR/$TARGET --with-local-prefix=$INSTALL_DIR/$TARGET/or32-uclinux --with-gnu-as --with-gnu-ld --disable-libssp --enable-languages=c > $GCC_VER-configure.log 2>&1
669
 
670
    echo
671
    echo "Making and installing $GCC_VER"
672
    echo "Logging output to $GCC_VER-make.log"
673
    make all install > $GCC_VER-make.log 2>&1
674
 
675
## Make sure that built ok ##
676
    check_exit_code
677
 
678
    cd $BUILD_TOP
679
 
680
    echo
681
    echo "Making vmlinux image"
682
    echo "Logging output to vmlinux-make.log"
683
 
684
    cd $LINUX_VER
685
    make vmlinux ARCH=or32 CROSS_COMPILE=$INSTALL_DIR/$TARGET/bin/$TARGET- > vmlinux-make.log 2>&1
686
 
687
## Make sure that built ok ##
688
    check_exit_code
689
fi
690
##########################Finish Building GCC and Linux############################
691
 
692
 
693
## default build option is yes ##
694
BUILD_THIS="y"
695
 
696
if [ $DBG_BUILD -eq 1 ]
697
    then
698
    ## Ask if we should rebuild uClibc ##
699
    echo "Re-build $UCLIB_VER ?"
700
    echo "[y/N]:"
701
    read YN
702
    ## $YN will be zero length string if user just pressed enter ##
703
    if [ -z $YN ]
704
        then
705
        BUILD_THIS="n" # default is no
706
    else
707
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
708
    fi
709
 
710
    if [ $BUILD_THIS = "y" ]
711
        then
712
        ## Delete the uClibc directory ##
713
        rm -rf $BUILD_TOP/$UCLIB_VER
714
    fi
715
fi
716
 
717
##########################Building uClibc#########################
718
if [ $BUILD_THIS = "y" ]
719
    then
720
 
721
    echo
722
    echo "###################### Building uClibc ###########################"
723
    echo
724
    echo "Decompressing source"
725
 
726
    cd $BUILD_TOP
727
    tar xjf $DOWNLOAD_DIR/$ZBALL3 ## uClibc sources ##
728
 
729
    echo
730
    echo "Patching $UCLIB_VER with $UCLIBC_PATCH"
731
 
732
    cd $UCLIB_VER
733
 
734
## Patch uClibc sources ##
735
    bzip2 -dc $DOWNLOAD_DIR/$UCLIBC_PATCH  | patch -p1 > $UCLIB_VER-patch.log 2>&1
736
 
737
## Make sure that patched ok ##
738
    check_exit_code
739
 
740
    export CC=$TARGET-gcc
741
    export BUILD_TOP
742
    #cp $DOWNLOAD_DIR/$CONFIG1  $BUILD_TOP/$UCLIB_VER/.config
743
    #cp $DOWNLOAD_DIR/$CONFIG1  $BUILD_TOP/$UCLIB_VER/.config.old
744
 
745
    ## $TARGET name implementation into config script ##
746
    ## First get the second part of the target name, after the "-", the "elf" in "or32-elf", for example ##
747
    TARGET_SECOND_PART=`echo $TARGET | cut -f 2 -d "-"`
748
    ## First change any references to the uclinux target ##
749
    ## And delete the line saying DEVEL_PREFIX so we can put our $INSTALL_DIR path in ##
750
    sed "s/or32\-uclinux/\or32\-$TARGET_SECOND_PART/" $DOWNLOAD_DIR/$CONFIG1 | sed "/DEVEL\_PREFIX\=/d"  > $BUILD_TOP/$UCLIB_VER/.config  ## Output to the .config ##
751
    ## Now output the new DEVEL_PATH= value ##
752
    echo "DEVEL_PREFIX=\"$INSTALL_DIR/$TARGET\"" >> $BUILD_TOP/$UCLIB_VER/.config
753
    ## copy it to .config.old ##
754
    cp $BUILD_TOP/$UCLIB_VER/.config $BUILD_TOP/$UCLIB_VER/.config.old
755
    ## Do the configuration ##
756
 
757
## Change the cross compiler name in the Config.or32 file
758
## First get the second part of the target name, after the "-" ##
759
    TARGET_SECOND_PART=`echo $TARGET | cut -f 2 -d "-"`
760
## Removes the uclinux line and changes to whatever our current target is ##
761
    sed "s/or32\-uclinux/\or32\-$TARGET_SECOND_PART/" $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32  > $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32.newtarget
762
    mv $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32.newtarget $BUILD_TOP/$UCLIB_VER/extra/Configs/Config.or32
763
 
764
    echo
765
    echo "Making uClibc oldconfig"
766
    make oldconfig > $UCLIB_VER-make-oldconfig.log 2>&1
767
 
768
## Make sure that built ok ##
769
    check_exit_code
770
 
771
    ln -s extra/Configs/Config.or32 Config
772
 
773
    echo
774
    echo "Making and install $UCLIB_VER"
775
    echo "Logging output to $UCLIB_VER-make.log"
776
    make all install > $UCLIB_VER-make.log 2>&1
777
 
778
## Make sure that built ok ##
779
    check_exit_code
780
 
781
    unset CC
782
fi
783
##########################Finish Building uClibc#########################
784
 
785
 
786
## default build option is yes ##
787
BUILD_THIS="y"
788
 
789
if [ $DBG_BUILD -eq 1 ]
790
    then
791
    ## Ask if we should rebuild gcc ##
792
    echo "Perform $GCC_VER re-build? - YES (y) if you rebuilt GCC and Linux previously, otherwise definitely NO (n)."
793
    echo "[y/N]:"
794
    read YN
795
    ## $YN will be zero length string if user just pressed enter ##
796
    if [ -z $YN ]
797
        then
798
        BUILD_THIS="n" # default is no
799
    else
800
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
801
    fi
802
 
803
    if [ $BUILD_THIS = "y" ]
804
        then
805
        ## Undo some things we did before after doing this compile ##
806
        unlink $INSTALL_DIR/$TARGET/$TARGET/sys-include
807
        rm -rf $INSTALL_DIR/$TARGET/$TARGET/lib/*
808
    fi
809
fi
810
 
811
 
812
##########################re-Building GCC########################
813
if [ $BUILD_THIS = "y" ]
814
    then
815
 
816
    echo
817
    echo "###################### Re-building or-32 gcc ###########################"
818
    echo
819
    echo "Re-building $GCC_VER"
820
 
821
    cd $BUILD_TOP
822
 
823
    cd b-gcc
824
 
825
    echo
826
    echo "Re-configuring $GCC_VER: --target=$TARGET --prefix=$INSTALL_DIR/$TARGET --with-local-prefix=$INSTALL_DIR/$TARGET/$TARGET --with-gnu-as --with-gnu-ld --disable-libssp --enable-languages=c"
827
    echo "Logging output to $GCC_VER-rebuild-configure.log"
828
 
829
    $BUILD_TOP/$GCC_VER/configure --target=$TARGET --prefix=$INSTALL_DIR/$TARGET --with-local-prefix=$INSTALL_DIR/$TARGET/$TARGET --with-gnu-as --with-gnu-ld --disable-libssp --enable-languages=c > $GCC_VER-rebuild-configure.log 2>&1
830
 
831
 
832
 
833
    echo
834
    echo "Re-building and re-installing $GCC_VER"
835
    echo "Logging output to $GCC_VER-rebuild-make.log"
836
    make all install > $GCC_VER-rebuild-make.log 2>&1
837
 
838
## Make sure that built ok ##
839
    check_exit_code
840
 
841
    cd $INSTALL_DIR/$TARGET/$TARGET
842
    ln -s ../include sys-include
843
    cd lib
844
    cp -f -dR ../../lib/* .
845
    cd $BUILD_TOP
846
 
847
fi
848
 
849
##########################finish re-Building GCC########################
850
 
851
 
852
## default build option is yes ##
853
BUILD_THIS="y"
854
 
855
if [ $DBG_BUILD -eq 1 ]
856
    then
857
    ## Ask if we should rebuild gdb ##
858
    echo "Rebuild $GDB_VER?"
859
    echo "[y/N]:"
860
    read YN
861
    ## $YN will be zero length string if user just pressed enter ##
862
    if [ -z $YN ]
863
        then
864
        BUILD_THIS="n" # default is no
865
    else
866
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
867
    fi
868
 
869
    if [ $BUILD_THIS = "y" ]
870
        then
871
        ## Delete existing gdb dir ##
872
        rm -rf $BUILD_TOP/$GDB_VER
873
    fi
874
fi
875
 
876
 
877
########################## GDB build ################
878
if [ $BUILD_THIS = "y" ]
879
    then
880
 
881
    echo
882
    echo "###################### Building gdb ###########################"
883
    echo
884
    echo "Decompressing source"
885
 
886
 
887
    cd $BUILD_TOP
888
 
889
    tar xjf $DOWNLOAD_DIR/$ZBALL8
890
 
891
    echo
892
    echo "Patching $GDB_VER with $GDB_PATCH"
893
 
894
    cd $GDB_VER
895
 
896
    bzcat -dc $DOWNLOAD_DIR/$GDB_PATCH | patch -p1 > $GDB_VER-patch.log 2>&1
897
 
898
## Make sure that patched ok ##
899
    check_exit_code
900
 
901
    echo
902
    echo "Configuring $GDB_VER: --target=$TARGET --prefix=$INSTALL_DIR/$TARGET"
903
 
904
    ./configure --target=$TARGET --prefix=$INSTALL_DIR/$TARGET > $GDB_VER-configure.log 2>&1
905
 
906
    echo
907
    echo "Making and installing $GDB_VER"
908
 
909
    make all install > $GDB_VER-make.log 2>&1
910
 
911
## Make sure that built ok ##
912
    check_exit_code
913
 
914
    cd $BUILD_TOP
915
 
916
fi
917
########################## finish GDB build ################
918
 
919
## default build option is yes ##
920
BUILD_THIS="y"
921
 
922
if [ $DBG_BUILD -eq 1 ]
923
    then
924
    ## Ask if we should rebuild busybox ##
925
    echo "Rebuild $BUSY_VER?"
926
    echo "[y/N]:"
927
    read YN
928
    ## $YN will be zero length string if user just pressed enter ##
929
    if [ -z $YN ]
930
        then
931
        BUILD_THIS="n" # default is no
932
    else
933
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
934
    fi
935
 
936
    if [ $BUILD_THIS = "y" ]
937
        then
938
        ## Delete existing busybox stuff ##
939
        rm -rf $BUILD_TOP/$BUSY_VER
940
    fi
941
fi
942
 
943
##########################Building Busybox########################
944
if [ $BUILD_THIS = "y" ]
945
    then
946
 
947
    echo
948
    echo "###################### Building $BUSY_VER ###########################"
949
    echo
950
    echo "Decompressing source"
951
 
952
 
953
    cd $BUILD_TOP
954
 
955
    tar xjf $DOWNLOAD_DIR/$ZBALL5
956
 
957
 
958
    cd $BUSY_VER
959
    cp $DOWNLOAD_DIR/$CONFIG2  $BUILD_TOP/$BUSY_VER/.config
960
    cp $DOWNLOAD_DIR/$CONFIG2  $BUILD_TOP/$BUSY_VER/.config.old
961
 
962
    echo
963
    echo "Making $BUSY_VER oldconfig"
964
    make oldconfig > $BUSY_VER-make-oldconfig.log 2>&1
965
 
966
## Make Sure that built ok ##
967
    check_exit_code
968
 
969
## Put the Linux headers in BusyBox's include dir ##
970
 
971
    ln -s $BUILD_TOP/$LINUX_VER/include/linux $BUILD_TOP/$BUSY_VER/include/.
972
    ln -s $BUILD_TOP/$LINUX_VER/include/asm $BUILD_TOP/$BUSY_VER/include/.
973
 
974
    echo
975
    echo "Making $BUSY_VER"
976
    echo "Logging output to $BUSY_VER-make.log"
977
    make ARCH=or32 CROSS_COMPILE=$INSTALL_DIR/$TARGET/bin/$TARGET- > $BUSY_VER-make.log 2>&1
978
 
979
## Make sure that built ok ##
980
    check_exit_code
981
 
982
    echo
983
    echo "Installing $BUSY_VER"
984
    echo "Logging output to $BUSY_VER-install.log"
985
    make install ARCH=or32 CROSS_COMPILE=$INSTALL_DIR/$TARGET/bin/$TARGET- > $BUSY_VER-install.log 2>&1
986
 
987
## Make sure that built ok ##
988
    check_exit_code
989
 
990
    cd $BUILD_TOP
991
 
992
## Copy and extract the ramdisk image file
993
 
994
    cp $DOWNLOAD_DIR/$ZBALL7 . ## Ramdisk file ##
995
 
996
    bunzip2 $RAMDISK_FILE.bz2
997
 
998
    RT=`whoami`
999
    if [ $RT = "root" ];then
1000
        mkdir rd_mount
1001
        chmod 777 rd_mount
1002
        mount -t ext2 -o loop $RAMDISK_FILE rd_mount
1003
        cp -f -dR $BUILD_TOP/busy_out.1.7.5/* $BUILD_TOP/rd_mount
1004
        umount rd_mount
1005
        cp -f $RAMDISK_FILE $LINUX_VER/$LINUX_RAMDISK_FILE
1006
    else
1007
        echo
1008
        echo "User is not root. Unable to mount Linux ramdisk."
1009
        echo "Note that this program built BusyBox but did not"
1010
        echo "install it on the ramdisk. Defaults are used."
1011
        cp -f $RAMDISK_FILE $LINUX_VER/$LINUX_RAMDISK_FILE
1012
    fi
1013
 
1014
    cd $BUILD_TOP
1015
fi
1016
##########################finish Building Busybox########################
1017
 
1018
########################## Finish BusyBox build ################
1019
 
1020
## default build option is yes ##
1021
BUILD_THIS="y"
1022
 
1023
if [ $DBG_BUILD -eq 1 ]
1024
    then
1025
    ## Ask if we should rebuild linux again##
1026
    echo "Rebuild the $LINUX_VER rebuild (only ever yes (y) if performed previous linux rebuild)?"
1027
    echo "[y/N]:"
1028
    read YN
1029
    ## $YN will be zero length string if user just pressed enter ##
1030
    if [ -z $YN ]
1031
        then
1032
        BUILD_THIS="n" # default is no
1033
    else
1034
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
1035
    fi
1036
 
1037
fi
1038
 
1039
#echo "Start Building Linux kernel?"
1040
#read Q
1041
##########################Final Linux kernel build################
1042
if [ $BUILD_THIS = "y" ]
1043
    then
1044
 
1045
    echo
1046
    echo "Final Linux Kernel build"
1047
    cd $BUILD_TOP
1048
    cd $LINUX_VER
1049
 
1050
    echo
1051
    echo "Making vmlinux"
1052
    echo "Logging output to vmlinux-remake.log"
1053
    make vmlinux ARCH=or32 CROSS_COMPILE=$INSTALL_DIR/$TARGET/bin/$TARGET- > vmlinux-remake.log 2>&1
1054
 
1055
## Make sure that built ok ##
1056
    check_exit_code
1057
 
1058
    cd $BUILD_TOP
1059
fi
1060
##########################Finished Final Linux kernel build################
1061
 
1062
## default build option is yes ##
1063
BUILD_THIS="y"
1064
 
1065
if [ $DBG_BUILD -eq 1 ]
1066
    then
1067
    ## Ask if we should rebuild or1ksim##
1068
    echo "Rebuild $SIM_VER ?"
1069
    echo "[y/N]:"
1070
    read YN
1071
    ## $YN will be zero length string if user just pressed enter ##
1072
    if [ -z $YN ]
1073
        then
1074
        BUILD_THIS="n" # default is no
1075
    else
1076
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
1077
    fi
1078
 
1079
    if [ $BUILD_THIS = "y" ]
1080
        then
1081
        ## Clean previous or1ksim directories ##
1082
        rm -rf $BUILD_TOP/$SIM_VER
1083
    fi
1084
fi
1085
 
1086
 
1087
#echo "Start Building Simulator?"
1088
#read Q
1089
##########################Simulator build#########################
1090
if [ $BUILD_THIS = "y" ]
1091
    then
1092
 
1093
    echo
1094
    echo "###################### Building or1ksim ###########################"
1095
    echo
1096
    echo "Decompressing source"
1097
 
1098
    cd $BUILD_TOP
1099
 
1100
    tar xjf $DOWNLOAD_DIR/$ZBALL6
1101
 
1102
    cd $SIM_VER
1103
 
1104
    echo
1105
    echo "Configuring $SIM_VER: --target=$TARGET --prefix=$INSTALL_DIR/$TARGET"
1106
 
1107
    ./configure --target=$TARGET --prefix=$INSTALL_DIR/$TARGET > $SIM_VER-configure.log 2>&1
1108
 
1109
    echo
1110
    echo "Making and installing $SIM_VER"
1111
    echo "Logging output to $SIM_VER-make.log"
1112
    make all install > $SIM_VER-make.log 2>&1
1113
 
1114
## Make sure that built ok ##
1115
    check_exit_code
1116
 
1117
    cd $BUILD_TOP
1118
fi
1119
##########################Finish Simulator build#########################
1120
 
1121
 
1122
##########################Code Test###############################
1123
cd $BUILD_TOP
1124
echo "Launch the simulator with the newly compiled Linux image and BusyBox apps?"
1125
echo "[y/N]:"
1126
read SI
1127
 
1128
if [ -z $SI ]
1129
    then
1130
    SVAL="n" ## Default is no ##
1131
else
1132
    SVAL=$(echo $SI | tr [:upper:] [:lower:])
1133
fi
1134
 
1135
if [ $SVAL = "y" ];then
1136
 
1137
    ## Check for X's xterm, if we find it, and a valid $DISPLAY variable, we'll open the simulator with an xterm tty ##
1138
    which xterm
1139
 
1140
 
1141
    if [ $? -eq 0 ]
1142
        then
1143
        # Xterm exists, check if the $DISPLAY variable is set
1144
        # Get the display variable
1145
        DISPLAY=`printenv DISPLAY`
1146
        echo "DISPLAY variable is set to $DISPLAY"
1147
        if [ -n $DISPLAY ]
1148
            then
1149
            ## It appears display is set, let's set the or1ksim_linux.cfg file to use an xterm instead of telnet ##
1150
            cd $LINUX_VER
1151
            ## Rename the original script, adding .orig to the end ##
1152
            mv or1ksim_linux.cfg or1ksim_linux.cfg.orig
1153
            ## Now use sed to comment the line specifiying a telnet tty and uncomment the xterm line, restoring the original script ##
1154
            sed 's/channel\ \=\ \"tcp\:10084\"/\/\*\ channel\ \=\ \"tcp\:10084\"\ \*\//' or1ksim_linux.cfg.orig | sed 's/\/\*\ channel\ \=\ \"xterm\:\"\ \*\//\ channel\ \=\ \"xterm\:\"\ /' > or1ksim_linux.cfg
1155
            echo "########################## or1ksim ###############################"
1156
            echo
1157
            echo "or1ksim will open an xterm for console output as Linux is booting."
1158
            echo
1159
            echo "########################## or1ksim ###############################"
1160
            cd $BUILD_TOP
1161
        fi
1162
 
1163
    else
1164
        echo "########################## or1ksim ###############################"
1165
        echo
1166
        echo "     To connect to the simulator run: telnet 127.0.0.1 10084"
1167
        echo
1168
        echo "########################## or1ksim ###############################"
1169
 
1170
    fi
1171
 
1172
 
1173
    cd $BUILD_TOP/$LINUX_VER
1174
    $INSTALL_DIR/$TARGET/bin/$TARGET-sim -f or1ksim_linux.cfg vmlinux
1175
 
1176
else
1177
    ## User didn't run the sim, but tell them how to anyway ##
1178
    echo "The compiled linux image is found in $BUILD_TOP/$LINUX_VER/vmlinux"
1179
    echo "To run it in the simulator, cd to $BUILD_TOP/$LINUX_VER"
1180
    echo "and run:"
1181
    echo "$TARGET-sim -f or1ksim_linux.cfg vmlinux"
1182
    echo
1183
 
1184
fi
1185
 
1186
echo
1187
echo "OpenRISC toolchain and architectural simulator build is complete!"
1188
echo
1189
echo "Your tools are installed in: $INSTALL_DIR/$TARGET"
1190
echo
1191
echo "Please add $INSTALL_DIR/$TARGET/bin to your PATH variable"
1192
echo
1193
exit 0
1194
 
1195
##########################End Script##############################

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.