public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/base/embedded/handbook: cross-compiler.xml cross-compiling-kernel.xml intro.xml
@ 2010-04-13 18:45 Joshua Saddler (nightmorph)
  0 siblings, 0 replies; only message in thread
From: Joshua Saddler (nightmorph) @ 2010-04-13 18:45 UTC (permalink / raw
  To: gentoo-commits

nightmorph    10/04/13 18:45:31

  Modified:             cross-compiler.xml cross-compiling-kernel.xml
                        intro.xml
  Log:
  lots of updates from bug 302129 on crosscompiling stuff

Revision  Changes    Path
1.10                 xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml

file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml?r1=1.9&r2=1.10

Index: cross-compiler.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- cross-compiler.xml	9 Dec 2009 21:16:22 -0000	1.9
+++ cross-compiler.xml	13 Apr 2010 18:45:31 -0000	1.10
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
 
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml,v 1.9 2009/12/09 21:16:22 vapier Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml,v 1.10 2010/04/13 18:45:31 nightmorph Exp $ -->
 
 <sections>
 
@@ -9,8 +9,8 @@
 Build a cross-compiler on your machine!
 </abstract>
 
-<version>0.2</version>
-<date>2009-01-10</date>
+<version>0.3</version>
+<date>2010-04-13</date>
 
 <section>
 <title>Overview</title>
@@ -28,10 +28,19 @@
 </p>
 
 <p>
-Also, do not worry about the cross-compiler interfering with your native build
-system.  All of the toolchain packages are designed such that they are isolated
-from each other based on the target.  This way you can install cross-compilers
-for whatever architecture you wish without breaking the rest of your system.
+You do not have to worry about the cross-compiler interfering with your
+native build system.  All of the toolchain packages are designed such
+that they are isolated from each other based on the target.  This way
+you can install cross-compilers for whatever architecture you wish
+without breaking the rest of your system.
+</p>
+
+<p>
+However, there are some scenarios, albeit fewer as time goes on, which
+causes portage to require or to inflict changes to real root. To keep
+your Gentoo installation clean, we highly recommend that crossdev
+installation and all cross-compiling activities occur inside a Gentoo 
+stage3 chroot. (This is the same chroot you used to install Gentoo.)
 </p>
 
 </body>
@@ -40,28 +49,57 @@
 <section>
 <title>crossdev</title>
 
-	<subsection>
-	<title>Intro</title>
-	<body>
-	<p>
-	Generating a cross-compiler by hand is a long and painful process.  This is
-	why it has been fully integrated into Gentoo!  A frontend called
-	<c>crossdev</c> (which you can install with <c>emerge crossdev</c>) will
-	run <c>emerge</c> with all of the proper environment variables and install
-	all the right packages to generate arbitrary cross-compilers based on your
-	needs.
-	</p>
-	</body>
-	</subsection>
+<subsection>
+<title>Intro</title>
+<body>
 
-	<subsection>
-	<title>Installing</title>
-	<body>
-	<p>
-	The first step is to select the proper tuple for your target.  Here we will
-	assume you want to build a cross-compiler for the SH4 (SuperH) process with
-	glibc running on Linux.  We will do this on a PowerPC machine.
-	</p>
+<p>
+Generating a cross-compiler by hand was a long and painful process.  This is why
+it has been fully integrated into Gentoo! A frontend called <c>crossdev</c> will
+run <c>emerge</c> with all of the proper environment variables and install all
+the right packages to generate arbitrary cross-compilers based on your needs.
+First you'll need to install <c>crossdev</c>:
+</p>
+
+<pre caption="Install crossdev">
+# <i>emerge crossdev</i>
+</pre>
+
+<p>
+You'll probably want to install the ~arch keyworded version of crossdev to get
+all the latest fixes.
+</p>
+
+<note>
+If you are upgrading from an older version of crossdev, and have
+<c>crossdev-wrappers</c> installed, be sure to uninstall crossdev-wrappers
+first. Your existing cross-toolchains will remain intact.
+</note>
+
+<p>
+We only cover the basic usage of crossdev here, but crossdev can customize the
+process fairly well for most needs. Run <c>crossdev --help</c> to get some ideas
+on how to use crossdev. Here are a few common uses:
+</p>
+
+<pre caption="Useful crossdev options">
+<comment>(Use specific package versions)</comment>
+# <i>crossdev --g [gcc version] --l [(g)libc version] --b [binutils version] --k [kernel headers version] -P -v -t [tuple]</i>
+<comment>(Use the stable version only)</comment>
+# <i>crossdev -S -P -v -t [tuple]</i>
+</pre>
+
+</body>
+</subsection>
+<subsection>
+<title>Installing</title>
+<body>
+
+<p>
+The first step is to select the proper tuple for your target.  Here we will
+assume you want to build a cross-compiler for the SH4 (SuperH) process with
+glibc running on Linux.  We will do this on a PowerPC machine.
+</p>
 
 <pre caption="Generating SH4 cross-compiler">
 # <i>crossdev --target sh4-unknown-linux-gnu</i>
@@ -94,22 +132,24 @@
  * Emerging cross-gcc-stage2 ...                                                               [ ok ]
 </pre>
 
-	<note>At the moment it's not possible to set <c>PORTAGE_CONFIGROOT</c> before calling <c>crossdev</c> to
-		a folder set to the arch you're targetting. You have to use your own config. 
-		If you want to use arch specific use flags, like <c>altivec</c> in a non powerpc 
-		architecture, you need to unmask the use flag in <c>/usr/portage/base/use.mask</c>, or
-		temporarily change your profile.
-	</note>
+<note>
+At the moment it's not possible to set <c>PORTAGE_CONFIGROOT</c> before calling
+<c>crossdev</c> to a folder set to the arch you're targetting. You have to use
+your own config.  If you want to use arch specific use flags, like
+<c>altivec</c> in a non powerpc architecture, you need to unmask the use flag in
+<c>/usr/portage/base/use.mask</c>, or temporarily change your profile.
+</note>
 	
-	</body>
-	</subsection>
-	<subsection>
-	<title>Quick Test</title>
-	<body>
-	<p>
-	If everything goes as planned, you should have a shiny new compiler on your
-	machine.  Give it a spin!
-	</p>
+</body>
+</subsection>
+<subsection>
+<title>Quick Test</title>
+<body>
+
+<p>
+If everything goes as planned, you should have a shiny new compiler on your
+machine.  Give it a spin!
+</p>
 
 <pre caption="Using SH4 cross-compiler">
 $ <i>sh4-unknown-linux-gnu-gcc --version</i>
@@ -123,45 +163,48 @@
 sh4-test: ELF 32-bit LSB executable, Renesas SH, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped
 </pre>
 
-	<p>
-	If the crossdev command failed, you have the log file which you can review
-	to see if the problem is local.  If you're unable to fix the issue, you're
-	welcome to file a bug in our bugzilla.  See the
-	<uri link="communication.xml">Communication page</uri> for more information.
-	</p>
-	</body>
-	</subsection>
+<p>
+If the crossdev command failed, you have the log file which you can review to
+see if the problem is local.  If you're unable to fix the issue, you're welcome
+to file a bug in our bugzilla.  See the <uri
+link="communication.xml">Communication page</uri> for more information.
+</p>
 
-	<subsection>
-	<title>Uninstalling</title>
-	<body>
-	<p>
-	To uninstall a toolchain, simply use the <c>--clean</c> option.  If you
-	modified the sysroot by hand, you'll be prompted to delete things inside
-	of it, so you may want to pipe <c>yes |</c> into the command.
-	</p>
+</body>
+</subsection>
+
+<subsection>
+<title>Uninstalling</title>
+<body>
+
+<p>
+To uninstall a toolchain, simply use the <c>--clean</c> option.  If you modified
+the sysroot by hand, you'll be prompted to delete things inside of it, so you
+may want to pipe <c>yes |</c> into the command.
+</p>
 
 <pre caption="Uninstalling cross-compiler">
 # <i>crossdev --clean sh4-unknown-linux-gnu</i>
 </pre>
 
-	<p>
-	In case you didn't already notice, deleting any and all files in the
-	<path>/usr/CTARGET/</path> directory is completely safe.
-	</p>
+<p>
+In case you didn't already notice, deleting any and all files in the
+<path>/usr/CTARGET/</path> directory is completely safe.
+</p>
 
-	</body>
-	</subsection>
+</body>
+</subsection>
+<subsection>
+<title>Options</title>
+<body>
 
-	<subsection>
-	<title>Options</title>
-	<body>
-	<p>
-	Obviously crossdev can do a lot more, so to find out more, simply run
-	<c>crossdev --help</c>.
-	</p>
-	</body>
-	</subsection>
+<p>
+Obviously crossdev can do a lot more, so to find out more, simply run
+<c>crossdev --help</c>.
+</p>
+
+</body>
+</subsection>
 </section>
 
 <section>



1.4                  xml/htdocs/proj/en/base/embedded/handbook/cross-compiling-kernel.xml

file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiling-kernel.xml?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiling-kernel.xml?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiling-kernel.xml?r1=1.3&r2=1.4

Index: cross-compiling-kernel.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiling-kernel.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cross-compiling-kernel.xml	23 Sep 2009 21:27:46 -0000	1.3
+++ cross-compiling-kernel.xml	13 Apr 2010 18:45:31 -0000	1.4
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
 
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiling-kernel.xml,v 1.3 2009/09/23 21:27:46 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-compiling-kernel.xml,v 1.4 2010/04/13 18:45:31 nightmorph Exp $ -->
 
 <sections>
 
@@ -9,8 +9,8 @@
 Cross-compile a kernel for your system with flair!
 </abstract>
 
-<version>0.2</version>
-<date>2009-09-23</date>
+<version>0.3</version>
+<date>2010-04-13</date>
 
 <section>
 <title>Sources</title>
@@ -25,10 +25,10 @@
 
 <p>
 You should install the kernel into the sysroot so that if you want to
-cross-compile packages which include kernel modules, the process should be
-transparent.  If you don't need such packages, then of course the actual place
-where you build the kernel does not matter.  Some people build all their
-kernels in <path>/usr/src/</path> for example.
+cross-compile packages which include kernel modules, the process will be
+transparent.  Otherwise, the actual place where you build the kernel does
+not matter.  Some people build all their kernels in <path>/usr/src/</path>
+for example.
 </p>
 
 </body>
@@ -64,6 +64,13 @@
 </p>
 
 <p>
+There is an additional variable, <c>INSTALL_MOD_PATH</c>, which defines where
+the <path>/lib</path> directory will be created, and all the modules stored.
+While you don't have to transfer the kernel sources to your target device,
+if you build any modules, you'll want this directory.
+</p>
+
+<p>
 There are really two ways you can setup the system.  You can modify the
 toplevel Makefile or you can override the relevant variables on the command
 line.  How you do it is largely a matter of taste, so we'll cover both.  Pick



1.6                  xml/htdocs/proj/en/base/embedded/handbook/intro.xml

file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/intro.xml?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/intro.xml?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/embedded/handbook/intro.xml?r1=1.5&r2=1.6

Index: intro.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/intro.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- intro.xml	20 Jan 2010 23:18:20 -0000	1.5
+++ intro.xml	13 Apr 2010 18:45:31 -0000	1.6
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
 
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/intro.xml,v 1.5 2010/01/20 23:18:20 solar Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/intro.xml,v 1.6 2010/04/13 18:45:31 nightmorph Exp $ -->
 
 <sections>
 
@@ -9,8 +9,8 @@
 An introduction into the world of embedded, cross-compilers, and dragons.
 </abstract>
 
-<version>0.2</version>
-<date>2009-09-13</date>
+<version>0.3</version>
+<date>2010-04-13</date>
 
 <section>
 <title>Overview</title>
@@ -82,7 +82,7 @@
 Certain environment variables used by the Gentoo toolchain and Portage can
 thoroughly confuse developers inexperienced with cross development. The
 following table explains some tricky variables and provides sample values based
-on the cross development examples presented in this guide. See the <uri
+on the cross development examples presented in this guide. See <uri
 link="#terminology">More Terminology and Variables</uri> for more
 unusual variables and related concepts.
 </p>
@@ -165,31 +165,32 @@
 <section id="terminology">
 <title>More Terminology and Variables</title>
 <body>
-<dl>
 
+<dl>
 <dt><c>canadian cross</c></dt>
 <dd>
-	The process of building a cross-compiler which will run on a different
-	machine from the one it was compiled on (CBUILD != CHOST &amp;&amp; CHOST != CTARGET)
+  The process of building a cross-compiler which will run on a different machine
+  from the one it was compiled on (CBUILD != CHOST &amp;&amp; CHOST !=
+  CTARGET)
 </dd>
 
-<dt><c>CBUILD: build system</c></dt>
-<dd>The system type you compile binaries on</dd>
-
-<dt><c>CHOST: host system</c></dt>
-<dd>The system type you execute binaries on</dd>
-
-<dt><c>CTARGET: target system</c></dt>
-<dd>The system type you compile binaries for</dd>
-
 <dt><c>sysroot: system root</c></dt>
-<dd>The root directory a compiler uses to find its standard headers and libraries</dd>
+<dd>
+  The root directory a compiler uses to find its standard headers and
+  libraries
+</dd>
 
 <dt><c>hardfloat</c></dt>
-<dd>The system has a hardware Floating Point Unit (FPU) to handle floating point math</dd>
+<dd>
+  The system has a hardware Floating Point Unit (FPU) to handle floating point
+  math
+</dd>
 
 <dt><c>softfloat</c></dt>
-<dd>The system lacks a hardware FPU so all floating point operations are approximated with fixed point math</dd>
+<dd>
+  The system lacks a hardware FPU so all floating point operations are
+  approximated with fixed point math
+</dd>
 
 <dt><c>PIE</c></dt>
 <dd>Position Independent Executable (-fPIE -pie)</dd>
@@ -200,8 +201,14 @@
 <dt><c>CRT</c></dt>
 <dd>C RunTime</dd>
 
+<dt><c>Tuple</c></dt>
+<dd>
+  For crossdev, this is defined as a string in the <c>ARCH-VENDOR-OS-LIBC</c>
+  format. See <c>crossdev -t help</c> for information on how exactly this string
+  can be completed.
+</dd>
 </dl>
+
 </body>
 </section>
-
 </sections>






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-13 18:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-13 18:45 [gentoo-commits] gentoo commit in xml/htdocs/proj/en/base/embedded/handbook: cross-compiler.xml cross-compiling-kernel.xml intro.xml Joshua Saddler (nightmorph)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox