Services - tools - models - for embedded software development
Embecosm divider strip
Prev  Next

3.1.1.  Generating the binutils Source Code

Download clean versions of the distribution and the patch file for OpenRISC 1000 from the locations given in Section 2.3. The patch file from MOF is recommended rather than the patch file which can be found on the OpenCores website, since it fixes a major bug in binutils.

[Important]Important

Ensure the version number (2.16.1) of the distribution is exactly the same.

Unpack the downloaded source code and apply the patch file.

[Note]Note

A patch file is the output from a recursive use of diff between two file hierarchies—typically the original file hierarchy and the file hierarchy with changes. The patch utility provides the inverse functions, allowing the new file hierarchy to be generated from the original.

Since the names of the top directories in the hierarchy may not be identical, patch includes an option -p to specify the amount of the file hierarchy to be stripped off. A value of 1 is common, to remove just the top level directory name.

For example if the source code has been downloaded as binutils-2.16.1.tar.bz2 with the patch file in the same directory, the following commands would be appropriate

tar jxf binutils-2.16.1.tar.bz2
cd binutils-2.16.1
bzcat -dc ../binutils_2.16.1_unified.diff_rgd_fixed.bz2 | patch -p1
	  
Embecosm divider strip