annotate sources/toys/README.footer @ 1021:ae5861222322

Link to mirror sites from each other.
author Rob Landley <rob@landley.net>
date Mon, 29 Mar 2010 08:17:24 -0500
parents a32c75dcf508
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
494
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
1
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
2 Each cross-compiler tarball contains a uClibc cross compiler for a given
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
3 target; the target binaries they produce are linked against uClibc. For
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
4 maximum portability, they are compiled for an i686 host and statically linked
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
5 against i686 uClibc on the host.
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
6
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
7 To try out uClibc on your system, you might do something like:
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
8
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
9 tar -xvjf cross-compiler-i686.tar.bz2
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
10 export PATH=`pwd`/cross-compiler-i686/bin:$PATH
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
11 i686-gcc -static hello_world.c -o hello_world
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
12 ./hello_world
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
13
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
14 Each mini-native tarball contains a small native root filesystem (uClibc-based),
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
15 with busybox, uClibc, and a native compiler toolchain supporting C (uClibc)
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
16 and C++ (uClibc++). To try these out, you might go:
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
17
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
18 tar -xvjf mini-native-x86_64.tar.bz2
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
19 sudo chroot mini-native-x86_64 /bin/chroot-setup.sh
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
20 g++ /tools/src/hello.cpp
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
21 ./a.out
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
22
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
23 The system-image tarballs contain the same root filesystem as mini-native,
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
24 packaged as an ext2 image, along with a kernel configured for use with
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
25 qemu (0.9.1 or later) and shell scripts to run the images under qemu:
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
26
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
27 1) run-emulator.sh - simple script to boot qemu
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
28
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
29 2) run-with-home.sh - adds an empty 2 gigabyte ext3 image mounted on /home
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
30
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
31 3) run-with-distcc.sh - adds distcc support calling out to the cross compiler
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
32 on the host system (on top of run-with-home's hdb image).
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
33
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
34 The logs directory contains build logs. These are only of interest if you
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
35 plan to reproduce these from source and can't get it to work on the first try.
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
36
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
37 Note that chrooting into mini-native-i686 on an x86_64 host may not give you
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
38 a good build environment, because /proc will still show an x86_64 host kernel
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
39 in an i686 chroot, and this confuses many ./configure scripts.
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
40
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
41 Cross compiling is tricky. The easy way to build packages is to build fully
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
42 natively, either by booting a system image under qemu or by finding real
a32c75dcf508 Add README.footer to end of README. (Rename README.txt->README)
Rob Landley <rob@landley.net>
parents:
diff changeset
43 target hardware to build on.