URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [gdb-5.0/] [sim/] [ppc/] [RUN] - Rev 1765
Compare with Previous | Blame | View Log
PSIM - model the PowerPC environmentCopyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>.----------------------------------------------------------------------Running PSIMThis file describes how to run the program PSIM.o Walk through a number of examples from thepre-built tar archive psim-test.o Looks at the device tree used by PSIM.o Notes on building a programmer environment touse with PSIM (BSD/UEA and BUG/OEA)----------------------------------------------------------------------RUNNING PSIM:The compressed tar archive psim-test available from:ftp://ftp.ci.com.au/pub/psim/psim-test-1.0.1.tar.gzor ftp://cambridge.cygnus.com/pub/psim/psim-test-1.0.1.tar.gzcontains a number of pre-built programs for running under PSIM. Eachpre-built binary is built both big and little endian. The suffixes.be/.le (executables) .bo/.lo (object files) and .ba/.la (libraries)are used.To run one of these programs, use:powerpc-unknown-eabi-run <image>for instance:powerpc-unknown-eabi-run psim-test/uea/envpThe program envp prints out your shells environment - very useful!More generally psim is run as (this is part of the output from the -hoption):psim [ <psim-option> ... ] <image> [ <image-arg> ... ]Where<image> Name of the PowerPC program to run.This can either be a PowerPC binary ora text file containing a device treespecification.PSIM will attempt to determine from thespecified <image> the intended emulationenvironment.If PSIM gets it wrong, the emulationenvironment can be specified using the`-e' option (described below).<image-arg> Argument to be passed to <image>These arguments will be passed to<image> (as standard C argv, argc)when <image> is started.<psim-option> See belowThe following are valid <psim-option>s:-m <model> Specify the processor to model (604)Selects the processor to use whenmodeling execution units. Includes:604, 603 and 603e-e <os-emul> specify an OS or platform to modelCan be any of the following:bug - OEA + MOTO BUG ROM callsnetbsd - UEA + NetBSD system callschirp - OEA + a few OpenBoot calls-i Print instruction counting statistics-I Print execution unit statistics-r <size> Set RAM size in bytes (OEA environments)-t [!]<trace> Enable (disable) <trace> option-o <spec> add device <spec> to the device tree-h -? -H give more detailed usageThe `-H' option gives a long usage output. This includes a completelist of all the pre-configured devices.----------------------------------------------------------------------RUNNING GDB:If you built PSIM with gdb then the following is a quick starttutorial.At present GDB, if configured big-endian (say) unlike PSIM, does notsupport the debugging of little endian binaries. If you find thatyour program won't run at all, make certain that GDB and yourprogram's endianness match.The most important thing is that before you can run the simulator youmust enable it. For the simulator, gdb is started like any program:$ powerpc-unknown-eabi-gdb psim-test/uea/envp.beNext the simulator is enabled. The command `target sim' accepts thesame options as can be specified on the PSIM command line.(gdb) target simTo trace the communication between psim and gdb specify `target sim -tgdb'. Once enabled, the binary needs to be loaded, any breakpoints ofinterest set, and the program run:(gdb) load(gdb) break main(gdb) run...In addition, if you are wanting to run a program described by a devicetree you can `attach' to the simulation using (I assume that you haveapplied the attach patch):$ cd psim-test/tree$ powerpc-unknown-eabi-gdb(gdb) target sim(gdb) attach device-tree(gdb) runHere GDB takes the programs initial state from the attacheddevice-tree instead of forcing initialisation.----------------------------------------------------------------------PROFILING:PSIM includes a number of performance monitoring (profiling)facilities:o instruction frequency countingo execution unit modeling (recordseffective usage of units).o instruction cache performanceAs discussed in the file INSTALL, each can be configured to individualrequirements.-i Enable instruction counting.The frequency of all instructions is tabulated. Inaddition (f configured) the hit/miss rate of theinstruction cache is output.-I Enable execution unit analysis.In addition to counting basic instructions also modelthe performance of the processors execution units-m <processor>Select the processor to be modelled.For execution unit analysis specify the processor thatis to be analysed. By default the 604 is modelledhowever, support for other processors such as the603 and 603e is included.The output from a performance run (on a P90) for the programpsim-test/profile/bench is below. In this run psim was fairlyagressively configured (see the file INSTALL for compile timeconfiguration).CPU #1 executed 41,994 AND instructions.CPU #1 executed 519,785 AND Immediate instructions.CPU #1 executed 680,058 Add instructions.CPU #1 executed 41,994 Add Extended instructions.CPU #1 executed 921,916 Add Immediate instructions.CPU #1 executed 221,199 Add Immediate Carrying instructions.CPU #1 executed 943,823 Add Immediate Shifted instructions.CPU #1 executed 471,909 Add to Zero Extended instructions.CPU #1 executed 571,915 Branch instructions.CPU #1 executed 1,992,403 Branch Conditional instructions.CPU #1 executed 571,910 Branch Conditional to Link Register instructions.CPU #1 executed 320,431 Compare instructions.CPU #1 executed 471,911 Compare Immediate instructions.CPU #1 executed 145,867 Compare Logical instructions.CPU #1 executed 442,414 Compare Logical Immediate instructions.CPU #1 executed 1 Condition Register XOR instruction.CPU #1 executed 103,873 Divide Word instructions.CPU #1 executed 104,275 Divide Word Unsigned instructions.CPU #1 executed 132,510 Extend Sign Byte instructions.CPU #1 executed 178,895 Extend Sign Half Word instructions.CPU #1 executed 871,920 Load Word and Zero instructions.CPU #1 executed 41,994 Move From Condition Register instructions.CPU #1 executed 100,005 Move from Special Purpose Register instructions.CPU #1 executed 100,002 Move to Special Purpose Register instructions.CPU #1 executed 804,619 Multiply Low Word instructions.CPU #1 executed 421,201 OR instructions.CPU #1 executed 471,910 OR Immediate instructions.CPU #1 executed 1,292,020 Rotate Left Word Immediate then AND with Mask instructions.CPU #1 executed 663,613 Shift Left Word instructions.CPU #1 executed 1,151,564 Shift Right Algebraic Word Immediate instructions.CPU #1 executed 871,922 Store Word instructions.CPU #1 executed 100,004 Store Word with Update instructions.CPU #1 executed 887,804 Subtract From instructions.CPU #1 executed 83,988 Subtract From Immediate Carrying instructions.CPU #1 executed 1 System Call instruction.CPU #1 executed 207,746 XOR instructions.CPU #1 executed 23,740,856 cycles.CPU #1 executed 10,242,780 stalls waiting for data.CPU #1 executed 1 stall waiting for a function unit.CPU #1 executed 1 stall waiting for serialization.CPU #1 executed 1,757,900 times a write-back slot was unavailable.CPU #1 executed 1,088,135 branches.CPU #1 executed 2,048,093 conditional branches fell through.CPU #1 executed 1,088,135 successful branch predictions.CPU #1 executed 904,268 unsuccessful branch predictions.CPU #1 executed 742,557 branch if the condition is FALSE conditional branches.CPU #1 executed 1,249,846 branch if the condition is TRUE conditional branches.CPU #1 executed 571,910 branch always conditional branches.CPU #1 executed 9,493,653 1st single cycle integer functional unit instructions.CPU #1 executed 1,220,900 2nd single cycle integer functional unit instructions.CPU #1 executed 1,254,768 multiple cycle integer functional unit instructions.CPU #1 executed 1,843,846 load/store functional unit instructions.CPU #1 executed 3,136,229 branch functional unit instructions.CPU #1 executed 16,949,396 instructions that were accounted for in timing info.CPU #1 executed 871,920 data reads.CPU #1 executed 971,926 data writes.CPU #1 executed 221 icache misses.CPU #1 executed 16,949,396 instructions in total.Simulator speed was 250,731 instructions/second----------------------------------------------------------------------PSIM CONFIGURATION - THE DEVICE TREEInternally PSIM's configuration is controlled by a tree datastructure. This structure, created at run-time, intentionallyresembles the device tree used by OpenBoot firmware to describe amachines hardware configuration.PSIM can either create its device tree using a builtin emulation orfrom one read in from a file.During startup, the device tree is created using the following steps:o Initial empty tree is createdo Any tree entry options specified on thecommand line are merged in (the -o <entry>option is used).It should be pointed out that most of thecommand line options (eg -r, -e, -m, -tare all just short hand for corresponding-o options).o If the specified program is a device tree spec, thatis loaded.If the specified program is a text file it is assumedthat that file contains a further specification of thesimulators device tree. That tree is loaded andmerged with the current tree options.o The selected emulation fills out any remaining details.By this stage the emulation environment that the programneeds will either be specified in the device tree(through the -e option) or determined from thecharacteristics of the binary.The selected emulation will then fill out any missingnodes in the device tree.Most importantly earlier additions to the tree are not overridden bylater additions. Thus, command line options override informationfound in the program file and both override any builtin emulationentries.The following is a summary of the most useful runtime configurationoptions:-e <os-emul>-o '/openprom/options/os-emul <os-emul>'Run program using the <emulation> run-timeenvironment.-r <ram-size>-o '/openprom/options/oea-memory-size <ram-size>'Set the size of the first bank of memory(RAM from address 0 up).-t print-device-tree-o '/openprom/trace/print-device-tree 1'-t dump-device-tree-o '/openprom/trace/dump-device-tree 1'Print out the device tree once it has been fullypopulated. For dump-device-tree, exit simulator afterdumping the tree.PSIM is able to reload the dumped device tree.The format of the dumped tree is under development.-o '/openprom/options/smp <N>'Enable <N> processors for the simulation run.See the directory psim-test/oea for an example.-o '/openprom/options/alignment <N>'Where <N> is 1 - nonstrict or 2 - strict.Specify if the missaligned access are allowed(non-strict) or result in an alignment exception(strict).Devices (if included in the file device_table.c) can also be specifiedin a similar way. For instance, to add a second serial port, acommand like:-o '/iobus@0x400000/console@0x000010'would create a `console' device at offset 0x10 within the `iobus' atmemory address 0x400000.For more detailed information on device specifiers see the notes onthe function dump_device_tree in the file device.c (found in thesource code).----------------------------------------------------------------------BUILDING A BUG/OEA DEVELOPMENT ENVIRONMENTBackground:Included in many PowerPC systems is Motorola's BUG monitor. Thismonitor includes, for client programs, a set of services that allowthat program to interact with hardware devices such as the console usinga simple system call interface.PSIM is able to emulate a number of the services (including theconsole IO calls). If additional services are needed they can easilybe added.Cygnus support's newlib library includes includes an interface to theMOTO BUG services. The notes below discuss how I both built and runprograms compiled using this library on PSIM.The only confusing part about building a development environment basedaround newlib/binutils/gcc is a chicken/egg problem with includefiles:For GCC to build, a fairly complete set of includefiles must be installed but newlib won't install itsinclude files until it has been built with gcc ...I get around this by installing the problematic include files by hand.Preparation:The following files are needed:From your favorite FTP site, the sources to gas/ld and gcc - minehappens to be archie.au :ftp://archie.au/gnu/binutils-2.6.tar.gzftp://archie.au/gnu/gcc-2.7.2.tar.gzFrom ftp://ftp.cygnus.com/pub/newlib the source code to a library:ftp://ftp.cygnus.com/pub/newlib/newlib-1.7.0.tar.gzFrom ftp://ftp.ci.com.au/pub/psim some minor patches and updates tothe above library:ftp://ftp.ci.com.au/pub/psim/newlib-1.7.0+float+ppc-asm.tar.gzftp://ftp.ci.com.au/pub/psim/newlib-1.7.0+ppc-fix.diff.gzftp://ftp.ci.com.au/pub/psim/binutils-2.6+note.diff.gzIn addition you'll need to decide where you will be installing thedevelopment environment. You will notice that in the below I installthings well away /usr/local instead installing everything under itsown directory in /applications.Method:These notes are based on an installation performed on a Sun-OS-4/SPARChost. For other hosts and other configurations, the below should beconsidered as a guideline only.o Sanity check$ cd .../scratch # your scratch directory$ ls -1binutils-2.6.tar.gzbinutils-2.6+note.diff.gzgcc-2.7.2,tar.gznewlib-1.7.0+float+ppc-asm.tar.gznewlib-1.7.0+ppc-fix.diff.gznewlib-1.7.0.tar.gzo Unpack/build/install binutilsThis is done first so that there is a gas/ld readyfor the building of GCC and NEWLIB.$ cd .../scratch$ gunzip < binutils-2.6.tar.gz | tar xf -$ cd binutils-2.6Optionally apply the note patch$ gunzip ../binutils-2.6+note.diff.gz | patchThen continue with the build$ ./configure --target=powerpc-unknown-eabi \--prefix=/applications/psim$ make$ make install$ cd ..$ rm -rf binutils-2.6This also creates much of the installation directorytree.o Unpack newlib, install the include files so that theyare ready for GCC's build.$ cd .../scratch$ gunzip < newlib-1.7.0.tar.gz | tar xf -New lib-1.7.0 had a few minor bugs (fixed in current):the header files float.h and ppc-asm.h were missing;the configure and Makefile's for the rs6000 (ppc) directorycontained typos:$ cd .../scratch$ cd newlib-1.7.0$ gunzip < ../newlib-1.7.0+float+ppc-asm.tar.gz | tar xvf -$ gunzip < ../newlib-1.7.0+ppc-fix.diff.gz | patch -p1Finally copy the include files to where GCC will see them:$ cd .../scratch$ cd newlib-1.7.0/newlib/libc$ tar cf - include | \( cd /applications/psim/powerpc-unknown-eabi && tar xf - )o Unpack/build gcc$ cd .../scratch$ gunzip < gcc-2.7.2,tar.gz | tar xf -$ cd gcc-2.7.2$ ./configure --target=powerpc-unknown-eabi \--prefix=/applications/psim$ make$ make install$ cd ..$ rm -rf gcc-2.7.2Gcc likes to install its own dummy version of float thatjust returns an error.$ more /applications/psim/lib/gcc-lib/powerpc-unknown-eabi/2.7.2/include/float.h$ rm /applications/psim/lib/gcc-lib/powerpc-unknown-eabi/2.7.2/include/float.ho Finish building/installing newlib$ cd .../scratch$ cd newlib-1.7.0$ ./configure --target=powerpc-unknown-eabi \--prefix=/applications/psimYour path will need to include the recently installedgas/gcc when building. Either add it to your path oruse:$ PATH=/applications/psim/bin:$PATH make$ PATH=/applications/psim/bin:$PATH make installo Finally, test out the build$ cat hello.cmain(){printf("hello world\n");}The binary is linked with an entry point less than 0x100000(1mb) so that psim will recognize the binary as needingthe BUG/OEA instead of the BSD/UEA runtime environment.$ powerpc-unknown-eabi-gcc -v -o hello \-Wl,-Ttext,0x4000,-Tdata,0x10000 \/applications/psim/powerpc-unknown-eabi/lib/mvme-crt0.o \hello.c \-lc -lmvme$ powerpc-unknown-eabi-objdump -h hello$ powerpc-unknown-eabi-run helloIt is also possible to force psim to use a specificrun-time environment using the -e option vis:$ powerpc-unknown-eabi-run -e bug hello----------------------------------------------------------------------BUILDING A BSD/UEA DEVELOPMENT ENVIRONMENTBackground:For a UEA to be useful it needs a supporting run-time environment.PSIM implements a runtime environment based on the NetBSD system callinterface.More than any thing, this user level emulation was the firstimplemented because I happened to have the NetBSD source code lyingaround.Preparation:This requires the NetBSD-1.1 source tree online. It can either beobtained vi ftp:try http://www.netbsd.org or ftp://ftp.netbsd.orgAlternatively obtain one of the NetBSD cdrom's. Patches to this sourcetree that fill out much of the PowerPC code are available in:ftp://ftp.ci.com.au/pub/claytonFetch everything in that directory - diffs, tar archives and scripts.In addition patches to the bintuils and gcc are in:ftp://ftp.ci.com.au/pub/psim/binutils-2.6+note.diff.gzftp://ftp.ci.com.au/pub/psim/gcc-2.7.2+sys-types.diff.gzwhile the compiler (gcc) and assember (binutils) can be found at yourfavorite gnu ftp site. I used versions:gcc-2.7.2.tar.gzbinutils-2.6.tar.gzMethod:These notes are based on an installation performed on a Solaris2/x86host. For other hosts and other configurations, the below should beconsidered as a guideline only.o Sanity checkI assume that you have already obtained the NetBSD-1.1 sourcecode and unpacked it into the directory bsd-src. While thefull NetBSD source tree may not be needed, things are easierif it is all online.$ cd .../scratch$ ls -1binutils-2.6.tar.gzbinutils-2.6+note.diff.gzclayton-include-960203.diff.gzclayton-lib-960203.diff.gzclayton-lib-960203.tar.gzclayton-sys-960203.diff.gzclayton-sys-960203.tar.gzclayton.chown.shclayton.install.shclayton.lorder.shclayton.make.shgcc-2.7.2.tar.gzgcc-2.7.2+sys-types.diff.gzmake.tar.gzmake.diff.gzo Prepare the destination directory ready for installation.Firstly create many of the needed directories (some arecreated automatically later):$ for d in \/applications/psim \/applications/psim/bsd-root \/applications/psim/bsd-root/usr \/applications/psim/bsd-root/usr/share \/applications/psim/bsd-root/usr/share/doc \/applications/psim/bsd-root/usr/share/doc/psd \/applications/psim/bsd-root/usr/share/doc/psd/19.curses \/applications/psim/bsd-root/usr/include \/applications/psim/bsd-root/usr/lib \/applications/psim/powerpc-unknown-eabi \/applications/psim/powerpc-unknown-eabi/bin \; \do test -d $d || mkdir $d ; doneNext, link the BSD and GNU include directories together.GCC expects include files to be in one location while thebsd install expects them in a second. The link is inthe direction below because bsd's install also insists ona directory (not a link) for its install destination.$ rm -rf /applications/psim/powerpc-unknown-eabi/include$ ln -s /applications/psim/bsd-root/usr/include \/applications/psim/powerpc-unknown-eabi/include$ ls -l /applications/psim/powerpc-unknown-eabi/includelrwxr-xr-x 1 cagney wheel 39 Mar 21 18:09/applications/psim/powerpc-unknown-eabi/include-> /applications/psim/bsd-root/usr/includeo Build/install Berkeley makeThe tar archive make.tar.gz contains a recent snapshotof bmake from the NetBSD source tree. The notes belowdescribe how to build/install it. If you have accessto an even more recent version of bmake, use that.Unpack the source code:$ cd .../scratch$ gunzip < make.tar.gz | tar xf -$ cd makeApply the patch in make.diff.gz that fixes a minorproblem with a build under Solaris (by now it shouldbe fixed in the NetBSD-current source tree).$ gunzip < ../make.diff.gz | more$ gunzip < ../make.diff.gz | patchBuild it$ make -f Makefile.boot 'CC=gcc -g -DPOSIX'With bmake built, install it into the target specific bindirectory:$ cp bmake /applications/psim/powerpc-unknown-eabi/bin/make$ cd ..$ rm -rf makeo Set up a number of wrapper scripts for bmake so that it works.In addition to needing BSD make the build process assumesa number of BSD specific commands. To get around thisseveral wrapper scripts are available.powerpc-unknown-eabi-make (clayton.make.sh)Front end to Berkeley make setting it up for across compilation$ cp clayton.make.sh \/applications/psim/bin/powerpc-unknown-eabi-make$ chmod a+x \/applications/psim/bin/powerpc-unknown-eabi-makechown (clayton.chown.sh)Wrapper that does not do any thing.Avoids the need to be root when installing.$ cp clayton.chown.sh \/applications/psim/powerpc-unknown-eabi/bin/chown$ chmod a+x \/applications/psim/powerpc-unknown-eabi/bin/chowninstall (clayton.install.sh)Wrapper to strip away a number of bsd specific installarguments.$ cp clayton.install.sh \/applications/psim/powerpc-unknown-eabi/bin/install$ chmod a+x \/applications/psim/powerpc-unknown-eabi/bin/installlorder (clayton.lorder.sh)Tweaked lorder script that will use nm etc frombinutils.$ cp clayton.lorder.sh \/applications/psim/powerpc-unknown-eabi/bin/lorder$ chmod a+x \/applications/psim/powerpc-unknown-eabi/bin/lorderprintf (?)Some operating systems don't include the programprintf. If you host doesn't have one, then agood source is the gnu sh-utils version.Again, if that program is missing, then I suggestinstalling it onto the powerpc specific programdirectory:/applications/psim/powerpc-unknown-eabi/bino Unpack the bsd source code (if you haven't already)If you're short on disk space (like me) just unpack:sys, lib, share/mk, include, usr.sbin/config,usr.sbin/dbsym, gnu/lib/libg++/g++-include,usr.bin/lexOtherwize, assuming you have a CD-DRIVE:$ cd .../scratch$ mkdir bsd-src$ cd bsd-src$ for d in /cdrom/bsdisc_12_95_disc2/NetBSD-1.1/source/*11doecho $dcat $d/*.?? | gunzip | tar xf -doneFlatten the directory structure a little.$ mv usr/src/* .$ rmdir usr/src usr$ cd ..o Apply the clayton (PowerPC) patches to your constructedtree.$ cd .../scratch$ cd bsd-srcDiffs are applied using something like:$ gunzip < ../clayton-include-960312.diff.gz | patch -p1$ gunzip < ../clayton-lib-960203.diff.gz | patch -p1$ gunzip < ../clayton-sys-960203.diff.gz | patch -p1The patch to sys/dev/pci/ncr.c.rej might fail.The tar archives have a different problem, you needto remove the `src' prefix. I used$ ln -s . src$ gunzip < ../clayton-lib-960203.tar.gz | tar xvf -$ gunzip < ../clayton-sys-960203.tar.gz | tar xvf -So that src/xxx unpacked into ./xxx$ cd ..o install Berkeley make's include (mk) files.$ cd .../scrath$ cd bsd-src/share$ tar cf - mk | ( cd /applications/psim/bsd-root/usr/share \&& tar xvf - )$ cd ../..o Install the include files$ cd .../scratch$ cd bsd-src/include$ powerpc-unknown-eabi-make install$ cd ../..o Install a few other include files.As discussed above in the section on building libnew,the build process can have chicken/egg problems. In thecase of BSD's libc, it wants to use several include files(from the installed include directory) before they areinstalled. Just copy them in as seen below:$ cd .../scratch$ cd bsd-src$ cp gnu/lib/libg++/g++-include/values.h \/applications/psim/powerpc-unknown-eabi/include$ cp lib/libcurses/curses.h \/applications/psim/powerpc-unknown-eabi/include$ cd ..o Unpack/patch/build/install BINUTILS$ cd .../scratch$ gunzip < binutils-2.6.tar.gz | tar xf -gas (bfd) 2.6 didn't support the reading and writing ofnote sections. The patch binutils-2.6+note.diff.gzadds support for this. PowerPC/ELF boot files being loadedby OpenBoot ROM's should contain a PowerPC note section.$ cd .../scratch$ cd binutils-2.6/bfd$ gunzip < ../../binutils-2.6+note.diff.gz | more$ gunzip < ../../binutils-2.6+note.diff.gz | patch$ cd ../..Then continue with the build$ cd .../scratch$ cd binutils-2.6$ ./configure --target=powerpc-unknown-eabi \--prefix=/applications/psim$ make$ make install$ cd ..$ rm -rf binutils-2.6This has the intended side effect of partially populatingthe psim directory tree which makes follow on steps easier.o Unpack/patch/build/install GCC$ cd .../scratch$ gunzip < gcc-2.7.2.tar.gz | tar xf -$ cd gcc-2.7.2GCC-2.7.2 and the BSD include files have a conflicting typedeclaration. The patch below gets around this problem(it may still be applicable to more recent versions ofGCC):$ gunzip < ../gcc-2.7.2+sys-types.diff.gz | more$ gunzip < ../gcc-2.7.2+sys-types.diff.gz | patchIf your version of GCC includes the file ginclude/ppc-asm.hthen you should install that header file into the directory:/applications/psim/powerpc-unknown-eabi/include. Morerecent versions of GCC expect this file to be installed:$ test -r ginclude/ppc-asm.h \&& cp ginclude/ppc-asm.h \/applications/psim/powerpc-unknown-eabi/includeOther than that, assuming the include files installedokay, the rest should be fine ....$ ./configure --target=powerpc-unknown-eabi \--prefix=/applications/psim$ make CC=gcc$ make CC=gcc install$ cd ..$ rm -rf gcc-2.7.2o Build/install the Berkeley library:$ cd .../scratch$ cd bsd-src/lib$ powerpc-unknown-eabi-make$ powerpc-unknown-eabi-make install$ cd ../..If you encounter problems check the following (eachdiscussed above):o GCC and BSD have a common includedirectoryo all the missing include files installedo all the wrapper programs installedo Build/run a simple BSD program$ cd .../scratch$ cd bsd-src/usr.bin/printenv$ powerpc-unknown-eabi-make$ powerpc-unknown-eabi-run printenv...----------------------------------------------------------------------
