# HG changeset patch # User Rob Landley # Date 1192052985 18000 # Node ID 1f41643cfe8e6e62a695ce1e463c855837c50b61 # Parent 992a411c98b64b76809b889db4a13cfd1915ffbf Move and update the cross compile stuff, note differences between pipe/file/tty, add a few quick notes about OLS papers to link to. diff -r 992a411c98b6 -r 1f41643cfe8e master.idx --- a/master.idx Wed Oct 10 04:51:31 2007 -0500 +++ b/master.idx Wed Oct 10 16:49:45 2007 -0500 @@ -82,6 +82,51 @@ + +

By default, Linux builds for the same architecture the host system is +running. This is called "native compiling". An x86 system building an x86 +kernel, x86-64 building x86-64, or powerpc building powerpc are all examples +of native compiling.

+ +

Building different binaries than the host runs is called cross compiling. +Cross +compiling is hard. The build system for the Linux kernel supports cross +compiling via a two step process: 1) Specify a different architecture (ARCH) +during the configure, make, and install stages. 2) Supply a cross compiler +(CROSS_COMPILE) which can output the correct kind of binary code. An +example cross compile command line (building the "arm" architecture) looks +like:

+ +
+
make ARCH=arm menuconfig
+make ARCH=arm CROSS_COMPILE=armv5l-
+
+
+ +

To specify a different architecture than the host, either define the "ARCH" +environment variable or else add "ARCH=xxx" to the make command line for each +of the make config, make, and make install stages. The acceptable values for +ARCH are the names of the directories in the "arch" subdirectory of the Linux +kernel source code, see Architectures for +details. All stages of the build must use the same ARCH value, and building a +second architecture in the same source directory requires "make distclean". +(Just "make clean" isn't sufficient, things like the include/asm symlink need +to be removed and recreated.)

+ +

To specify a cross compiler prefix, define the CROSS_COMPILE environment +variable (or add CROSS_COMPILE= to each make command line). Native compiler +tools, which output code aimed at the environment they're running in, usually +have a simple name ("gcc", "ld", "strip"). Cross compilers usually add a +prefix to the name of each tool, indicating the target they produce code for. +To tell the Linux kernel build to use a cross compiler named "armv4l-gcc" (and +corresponding "armv4l-ld" and "armv4l-strip") specify "CROSS_COMPILE=armv4l-". +(Prefixes ending in a dash are common, and forgetting the trailing dash in +CROSS_COMPILE is a common mistake. Don't forget to add the cross compiler +tools to your $PATH.)

+
+ + +
@@ -332,9 +377,25 @@ + +

A pipe can be read from or written to, transmitting a sequence of bytes +in order.

+ +

A file can do what a pipe can, and adds the ability to seek to a location, +query the current location, and query the length of the file (all of which are +an integer number off bytes from the beginning of the file).

+ +

A tty can do what a pipe can, and adds a speed (in bits per second) +and cursor location (X and Y, with the upper left corner at 0,0). Oh, and +you can make it go beep.

+ +

Note that you can't call lseek() on a tty and you can't call termios +(man 3 termios) functions on a file. Each can be treated as a pipe.

+
+ols/2001/jffs2.pdf @@ -430,6 +491,15 @@ +
+physical
+  plip
+  serial/slip/ppp
+  ethernet
+routing
+  ipv4
+  ipv6 ols/2001/mipl.pdf
+
@@ -468,39 +538,6 @@ - -

By default, Linux builds for the same architecture the host system is -running. This is called "native compiling". An x86 system building an x86 -kernel, x86-64 building x86-64, or powerpc building powerpc are all examples -of native compiling.

- -

Building different binaries than the host runs is called cross compiling. -Cross -compiling is hard. The build system for the Linux kernel supports cross -compiling via a two step process: 1) Specify a different architecture (ARCH) -during the configure, make, and install stages. 2) Supply a cross compiler -(CROSS) which can output the correct kind of binary code.

- -

To specify a different architecture than the host, either define the "ARCH" -environment variable or else add "ARCH=xxx" to the make command line for each -of the make config, make, and make install stages. The acceptable values for -ARCH are the names of the directories in the "arch" subdirectory of the Linux -kernel source code. All stages of the build must use the same architecture. -(Building a second architecture in the same source directory requires "make -distclean"; just "make clean" isn't sufficient.)

- -

To specify a cross compiler prefix, define the CROSS environment variable -(or add CROSS= to each make command line). Native compiler tools, which output -code aimed at the environment they're running in, usually have a simple name -("gcc", "ld", "strip"). Cross compilers usually add a prefix to -the name of each tool, indicating the target they produce code for. To tell -the Linux kernel build to use a cross compiler named "armv4l-gcc" (and -corresponding "armv4l-ld" and "armv4l-strip") specify "CROSS=armv4l-". -(Prefixes ending in a dash are common, and forgetting the trailing dash in -CROSS is a common mistake. Don't forget to add the cross compiler tools to -your $PATH.)

-
-
 alpha
@@ -517,7 +554,7 @@
 m68knommu
 mips
 parisc
-powerpc
+powerpc ols/2001/iseries.pdf
 ppc
 s390
 sh