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 1775

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 1775 julius
check_exit_code()
95
{
96 1773 julius
    if [ $? -ne 0 ]
97
    then
98
        echo
99
        echo "############################ERROR#############################"
100
        echo
101
        echo "Error during toolchain installation."
102
        echo
103
        echo "Please report this to the script maintainers."
104
        echo
105
        echo "A useful report would contain information such as the module"
106
        echo "buing built/\"make\"ed when the error occurred (relevant lines"
107
        echo "of console output), the version of GCC on the host system used"
108
        echo "to compile (gcc --version), linux distro and version, etc."
109
        echo "A good place to post this information is on the OpenCores"
110
        echo "forum for the OpenRISC project: "
111
        echo "http://opencores.org/?do=forum"
112
        echo
113
        exit $?
114
    fi
115
}
116
 
117
## SCRIPT VERSION ##
118
SCRIPT_VERSION="v5b"
119
 
120
## Beginning globals ##
121
 
122
## ORSoC FTP download settings ##
123
ORSOC_FTP_HOST="195.67.9.12"
124
ORSOC_FTP_USER="ocuser"
125
ORSOC_FTP_PASSWD="oc"
126
ORSOC_FTP_DIR="toolchain"
127
 
128
## GNU FTP download settings ##
129
GNU_FTP_HOST="ftp.gnu.org"
130
GNU_FTP_USER="anonymous"
131
#GNU_FTP_BINUTILS_DIR="gnu/binutils"
132
GNU_FTP_GCC_DIR="gnu/gcc/gcc-4.2.2"
133
GNU_FTP_GDB_DIR="gnu/gdb"
134
 
135
## Linux kernel download settings ##
136
KERNEL_FTP_HOST="ftp.kernel.org"
137
KERNEL_FTP_USER="anonymous"
138
KERNEL_FTP_PASSWD="anonymous"
139
KERNEL_FTP_DIR="pub/linux/kernel/v2.6"
140
 
141
## Local directory variables ##
142
START_DIR=`pwd`
143
DN="n"
144
DIR=`pwd`
145
 
146
## Versions of the toolchain components ##
147
BINUTILS_VER=binutils-2.18.50
148
GCC_VER=gcc-4.2.2
149
GDB_VER=gdb-6.8
150
UCLIB_VER=uClibc-0.9.29
151
LINUX_VER=linux-2.6.24
152
BUSY_VER=busybox-1.7.5
153
SIM_VER=or1ksim-0.3.0
154
 
155
## Patches ##
156
BINUTILS_PATCH="$BINUTILS_VER.or32_fixed_patch-v2.0.bz2"
157
GCC_PATCH=$GCC_VER.or32patch.bz2
158
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##
159
UCLIBC_PATCH="uClibc-0.9.29-or32-patch-1.0.bz2"
160
GDB_PATCH="or32-gdb-6.8-patch-2.4.bz2"
161
 
162
## MD5sum file ##
163
MD5SUM_FILE=md5sums
164
 
165
## Configs ##
166
#CONFIG1="rgd_uc_29dotconfig" ## Now changed to rgd_uc_29v5dotconfig as it uses paths to the 2.6.24 kernel ##
167
CONFIG1="rgd_uc_29v5dotconfig"
168
CONFIG2="rgd_bb_1.75dotconfig"
169
 
170
## Ramdisk name ##
171
RAMDISK_FILE=initrd-fb-03.ext2.last.work.1.7.5
172
LINUX_RAMDISK_FILE=arch/or32/support/initrd-fb-03.ext2 ## The location and name of the ramdisk that Linux wants when it compiles
173
 
174
## Toolchain prefix ##
175
TARGET=or32-elf
176
 
177
 
178
## Tarballs ##
179
ZBALL1=$BINUTILS_VER.tar.bz2
180
TBALL1=$BINUTILS_VER.tar
181
ZBALL2=$GCC_VER.tar.bz2
182
TBALL2=$GCC_VER.tar
183
ZBALL3=$UCLIB_VER.tar.bz2
184
TBALL3=$UCLIB_VER.tar
185
ZBALL4=$LINUX_VER.tar.bz2
186
TBALL4=$LINUX_VER.tar
187
ZBALL5=$BUSY_VER.tar.bz2
188
TBALL5=$BUSY_VER.tar
189
ZBALL6=$SIM_VER.tar.bz2
190
TBALL6=$SIM_VER.tar
191
ZBALL7=$RAMDISK_FILE.bz2
192
ZBALL8=$GDB_VER.tar.bz2
193
TBALL8=$GDB_VER.tar
194
 
195
ORSOC_FTP_FILE_LIST="$ZBALL1
196
        $ZBALL3
197
        $ZBALL5
198
        $ZBALL6
199
        $ZBALL7
200
        $BINUTILS_PATCH
201
        $GCC_PATCH
202
        $LINUX_PATCH
203
        $UCLIBC_PATCH
204
        $GDB_PATCH
205
        $CONFIG1
206
        $CONFIG2"
207
 
208
GNU_FTP_FILE_LIST="$ZBALL2
209
$ZBALL8"
210
 
211
KERNEL_FTP_FILE_LIST=$ZBALL4
212
 
213
 
214
 
215
##Welcome message
216
echo
217
echo "The OpenRISC toolchain install script - Provided by ORSoC & MeansOfFreedom.net"
218
echo "Version $SCRIPT_VERSION"
219
echo
220
echo "#####################################README#####################################"
221
echo
222
echo "This script will install tools required for development on the OpenRISC platform"
223
echo "This version ($SCRIPT_VERSION) includes: "
224
echo "        $GCC_VER, $BINUTILS_VER, $UCLIB_VER"
225
echo "        $LINUX_VER, $GDB_VER, $BUSY_VER and $SIM_VER"
226
echo
227
echo "Please follow the prompts to select the install location."
228
echo
229
echo "Note: Two new directories, or32-build and or32-download, will be created in the"
230
echo "current directory for storing downloaded files and building the tools."
231
echo "Also: This script attempts to mount a ramdisk image in a local directory to copy"
232
echo "in the freshly built busybox. This requires root user privileges - if they are"
233
echo "not deteceted the existing busybox binaries will remain in the ramdisk image."
234
echo
235
echo "#####################################README#####################################"
236
echo
237
 
238
echo "Install the toolchain under current directory?"
239
echo "Current directory: [$DIR]"
240
echo "Tools will be installed in [$DIR/$TARGET]"
241
echo [Y/n]:
242
read YN
243
 
244
## $YN will be zero length string if user just pressed enter ##
245
if [ -z $YN ]
246
    then
247
    VAL="y"
248
else
249
    VAL=$(echo $YN | tr [:upper:] [:lower:])
250
fi
251
 
252
if [ $VAL = "n" ]
253
    then
254
    # Optional install path
255
    echo "Enter the path the toolchain will be installed in:"
256
    read DIR
257
 
258
    # Check if the path exists and ask the user to verify it
259
    until [ $DN = "y" ]
260
      do
261
 
262
        #Check the path exists
263
        if [ -d $DIR ]
264
            then
265
            # The path entered is OK
266
            echo "Chosen directory is [$DIR]"
267
            echo "Tools will be installed in [$DIR/$TARGET]"
268
            echo "[y/n]:"
269
            read DN
270
 
271
            if [ -z $DN ]
272
                then
273
                # Presume yes here
274
                DN="y"
275
            fi
276
 
277
            VAL=$(echo $DN | tr [:upper:] [:lower:])
278
        else
279
            echo
280
            #echo "Path does not exist. Please create it and ensure user has correct permissions."
281
            echo "Path does not exist. Create $DIR now?"
282
            echo "[y/N]:"
283
            read MKPATH
284
            if [ -z $MKPATH ]
285
                then
286
                ## $MKPATH was zero, so user probably just pressed enter without entering anything, which we'll interpret as "n" ##
287
                MKPATHYN="n"
288
            else
289
                MKPATHYN=$(echo $MKPATH | tr [:upper:] [:lower:])
290
            fi
291
 
292
            if [ $MKPATHYN = "y" ]
293
                then
294
                `mkdir $DIR`
295
 
296
                # Check we made it successfully
297
                if [ $? -ne 0 ]
298
                    then
299
                    DN="n"
300
                else
301
                    DN="x" # Set this so we do go back through and ask the user to verify
302
                fi
303
 
304
            else
305
                DN="n"
306
            fi
307
        fi
308
 
309
        if [ $DN = "n" ]
310
            then
311
            echo "Enter the path the toolchain should be installed in:"
312
            read DIR
313
        fi
314
 
315
    done
316
    cd $DIR
317
#    echo "loop done"
318
    echo "Working in " `pwd`
319
fi
320
 
321
BUILD_TOP=$START_DIR/or32-build
322
export BUILD_TOP
323
 
324
## Set donload directory to be under the current directory ##
325
DOWNLOAD_DIR=$START_DIR/or32-download
326
 
327
## Setup the target tool installation directory ##
328
INSTALL_DIR=$DIR
329
 
330
mkdir $INSTALL_DIR
331
 
332
####################################################################################################
333
## Now check which sources have already been downloaded, if any ##
334
 
335
## Check if download directory exists, if not create it ##
336
if [ -d $DOWNLOAD_DIR ]
337
    then
338
    cd $DOWNLOAD_DIR
339
else
340
    mkdir $DOWNLOAD_DIR
341
    cd $DOWNLOAD_DIR
342
fi
343
 
344
## We'll need the md5sum file ##
345
## This is a file stored on the ORSoC FTP server, containing checksums of all the files we need ##
346
rm -f $MD5SUM_FILE
347
wget ftp://$ORSOC_FTP_USER:$ORSOC_FTP_PASSWD@$ORSOC_FTP_HOST/$ORSOC_FTP_DIR/$MD5SUM_FILE
348
## Make sure we got that OK ##
349
check_exit_code
350
 
351
## We have lists of what to get from each FTP let's create a loop for each ##
352
 
353
## ORSoC FTP server downloads ##
354
for CURRENT_FILE in $ORSOC_FTP_FILE_LIST
355
  do
356
  # Check if we've already got the file
357
  if [ -e $CURRENT_FILE ]
358
      then
359
      echo "File $CURRENT_FILE exists locally."
360
      echo "Verifying MD5 checksum:"
361
      ## Verify it's right by checking the MD5 checksum ##
362
      ## First we get the line for $CURRENT_FILE out of the $MD5SUM_FILE, then feed it to "md5sum -c"
363
      ## which checks it and sets the return code, $? to 0 if OK, 1 if problem ##
364
      cat $MD5SUM_FILE | grep $CURRENT_FILE | md5sum -c
365
      if [ $? -ne 0 ]
366
          then
367
          #MD5sum of $CURRENT_FILE differs from expected value - we'll download it again
368
          echo "MD5 checksum of $CURRENT_FILE differs from expected value. Re-downloading."
369
          rm -f $CURRENT_FILE
370
          wget ftp://$ORSOC_FTP_USER:$ORSOC_FTP_PASSWD@$ORSOC_FTP_HOST/$ORSOC_FTP_DIR/$CURRENT_FILE
371
          check_exit_code
372
      fi
373
  else
374
      # File doesn't exist locally - we'll download it
375
      echo "Downloading $CURRENT_FILE"
376
      wget ftp://$ORSOC_FTP_USER:$ORSOC_FTP_PASSWD@$ORSOC_FTP_HOST/$ORSOC_FTP_DIR/$CURRENT_FILE
377
      check_exit_code
378
  fi
379
  echo
380
done
381
 
382
## GNU FTP server downloads ##
383
for CURRENT_FILE in $GNU_FTP_FILE_LIST
384
  do
385
  ## Check if we've already got the file ##
386
  if [ -e $CURRENT_FILE ]
387
      then
388
      echo "File $CURRENT_FILE exists locally."
389
      echo "Verifying MD5 checksum:"
390
      ## Verify it's right by checking the MD5 checksum ##
391
      ## First we get the line for $CURRENT_FILE out of the $MD5SUM_FILE, then feed it to "md5sum -c"
392
      ## which checks it and sets the return code, $? to 0 if OK, 1 if problem ##
393
      cat $MD5SUM_FILE | grep $CURRENT_FILE | md5sum -c
394
      if [ $? -ne 0 ]
395
          then
396
          ## MD5sum of present one is incorrect - we'll download it again ##
397
          echo "MD5 checksum of $CURRENT_FILE differs from expected value. Re-downloading."
398
          rm -f $CURRENT_FILE
399
          ## Depending on the file, we need a specific path ##
400
          ## gcc's path on ftp ##
401
          if [ $CURRENT_FILE = $ZBALL2 ]; then
402
              GNU_FTP_DIR=$GNU_FTP_GCC_DIR
403
          fi
404
          ## gdb's path on ftp ##
405
          if [ $CURRENT_FILE = $ZBALL8 ]; then
406
              GNU_FTP_DIR=$GNU_FTP_GDB_DIR
407
          fi
408
          wget ftp://$GNU_FTP_USER:$GNU_FTP_USER@$GNU_FTP_HOST/$GNU_FTP_DIR/$CURRENT_FILE
409
          check_exit_code
410
      fi
411
  else
412
      # File doesn't exist - we'll download it
413
      echo "Downloading $CURRENT_FILE"
414
      ## Depending on the file, we need a specific path ##
415
      ## gcc's path on ftp ##
416
      if [ $CURRENT_FILE = $ZBALL2 ]; then
417
              GNU_FTP_DIR=$GNU_FTP_GCC_DIR
418
      fi
419
      ## gdb's path on ftp ##
420
      if [ $CURRENT_FILE = $ZBALL8 ]; then
421
          GNU_FTP_DIR=$GNU_FTP_GDB_DIR
422
      fi
423
      wget ftp://$GNU_FTP_USER:$GNU_FTP_USER@$GNU_FTP_HOST/$GNU_FTP_DIR/$CURRENT_FILE
424
      check_exit_code
425
  fi
426
  echo
427
done
428
 
429
## Kernel.org FTP server downloads ##
430
CURRENT_FILE=$KERNEL_FTP_FILE_LIST
431
## Usually just a single file from the kernel.org ftp site ##
432
if [ -e $CURRENT_FILE ]
433
    then
434
    echo "File $CURRENT_FILE exists locally."
435
    echo "Verifying MD5 checksum:"
436
    ## Verify it's right by checking the MD5 checksum ##
437
    ## First we get the line for $CURRENT_FILE out of the $MD5SUM_FILE, then feed it to "md5sum -c"
438
    ## which checks it and sets the return code, $? to 0 if OK, 1 if problem ##
439
    cat $MD5SUM_FILE | grep $CURRENT_FILE | md5sum -c
440
    if [ $? -ne 0 ]
441
        then
442
        #MD5sum of present one is incorrect - we'll download it again
443
        echo "MD5 checksum of $CURRENT_FILE differs from expected value. Re-downloading."
444
        rm -f $CURRENT_FILE
445
        wget ftp://$KERNEL_FTP_USER:$KERNEL_FTP_USER@$KERNEL_FTP_HOST/$KERNEL_FTP_DIR/$CURRENT_FILE
446
        check_exit_code
447
    fi
448
else
449
    ## Download it ##
450
    echo "Downloading $CURRENT_FILE"
451
    wget ftp://$KERNEL_FTP_USER:$KERNEL_FTP_PASSWD@$KERNEL_FTP_HOST/$KERNEL_FTP_DIR/$CURRENT_FILE
452
    check_exit_code
453
fi
454
echo
455
 
456
####################################################################################################
457
 
458
cd $START_DIR
459
 
460
#if [ 0 eq 1 ] ## DEBUG skipping thing ##
461
#then
462
##Stuff you want to skip in here
463
#else ## DEBUG else
464
#cd $BUILD_TOP
465
#export PATH=$BUILD_TOP/tools/or32-uclinux/bin:$PATH
466
#fi ## DEBUG skipping end
467
 
468
## A couple of command line options to help if this thing breaks ##
469
## We won't clear away all the directories if run with the -d or -D options ##
470
DBG_BUILD=0
471
while getopts d OPT; do
472
    case "$OPT" in
473
        d)
474
        DBG_BUILD=1
475
        ;;
476
    esac
477
done
478
 
479
## if not debug building, let's remove all the old stuff ##
480
 
481
if [ $DBG_BUILD -eq 0 ]
482
    then
483
## Always start with a clean build dir ##
484
    rm -fr $BUILD_TOP
485
    mkdir $BUILD_TOP
486
    chmod 777 $BUILD_TOP
487
 
488
    mkdir $BUILD_TOP/b-gcc
489
    mkdir $BUILD_TOP/b-b
490
fi
491
 
492
## default build option is yes ##
493
BUILD_THIS="y"
494
 
495
if [ $DBG_BUILD -eq 1 ]
496
    then
497
    ## Ask if we should build binutils ##
498
    echo "Re-build $BINUTILS_VER ?"
499
    echo "[y/N]:"
500
    read YN
501
    ## $YN will be zero length string if user just pressed enter ##
502
    if [ -z $YN ]
503
        then
504
        BUILD_THIS="n"
505
    else
506
        BUILD_THIS=$(echo $YN | tr [:upper:] [:lower:])
507
    fi
508
 
509
    if [ $BUILD_THIS = "y" ]
510
        then
511
        ## Delete and recreate the binutils directory ##
512
        rm -rf $BUILD_TOP/b-b
513
        rm -rf $BUILD_TOP/$BINUTILS_VER
514
        mkdir $BUILD_TOP/b-b
515
 
516
    fi
517
fi
518
 
519
##########################Building Binutils#######################
520
if [ $BUILD_THIS = "y" ]
521
    then
522
 
523 1774 julius
    echo "############################## Building binutils ###############################"
524 1773 julius
    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 1774 julius
    echo "####################### Building or32 gcc and Linux ############################"
606 1773 julius
    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 1774 julius
    echo "############################## Building uClibc #################################"
723 1773 julius
    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 1774 julius
    echo "############################## Re-building or-32 gcc ###########################"
818 1773 julius
    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 1774 julius
    echo "############################## Building GDB ####################################"
883 1773 julius
    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 1774 julius
    echo "############################## Building BusyBox ################################"
949 1773 julius
    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 1774 julius
    echo "########################### Linux image generation #############################"
1047 1773 julius
    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 1774 julius
    echo "############################## Building or1ksim ################################"
1095 1773 julius
    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.