annotate www/README @ 1048:f969c1ec66f4

Move README into the www directory, where it can be linked from the the website.
author Rob Landley <rob@landley.net>
date Sun, 02 May 2010 16:16:11 -0500
parents README@d98aa02a7edf
children 3a4fccf92f58
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
1 Aboriginal Linux: We cross compile so you don't have to.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
3 ===============================================================================
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
4 --- What is it?
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
5
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
6 Aboriginal Linux provides virtual Linux images you can boot under QEMU,
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
7 within which you can compile and test any software you like.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
9 The build scripts automatically create cross compilers and bootable system
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
10 images for various targets, such as arm, mips, powerpc, and x86. You can
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
11 download the resulting binaries from the website if you don't want to bother
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
12 compiling them yourself.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
13
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
14 The system images provide minimal native development environments which you
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
15 can boot under an emulator (or on real hardware if you have it) to compile
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
16 code natively. This includes a full native compiler (for both C and C++),
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
17 and the (optional) ability to run the cross compiler on the host (via distcc)
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
18 to speed up the build without reqiring the packages you're building to
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
19 know anything about cross compiling.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
20
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
21 --- What's this "target/host" business?
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
22
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
23 The host is the system the emulator runs on. The target is the virtual
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
24 system running inside the emulator.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
25
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
26 --- Do I have to care about cross compiling?
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
27
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
28 No, you don't. Just boot a system image under QEMU and build packages in
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
29 there (or find some real hardware to boot your root filesystem on, and note
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
30 that the distcc acceleration trick still works in that context too).
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
31
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
32 ===============================================================================
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
33 --- What's the purpose of this project?
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
34
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
35 Aboriginal Linux serves two purposes: practical and educational.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
36
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
37 The practical purpose is to provide emulated native development environments
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
38 for every target QEMU supports. This avoids the need for cross compiling
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
39 by allowing you to download a bootable system image and build natively within
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
40 it.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
41
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
42 Aboriginal Linux is also designed to document how to bootstrap minimal
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
43 Linux development environments for a new target. The build is a series of
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
44 bash scripts, with lots of comments explaining what they do. These scripts
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
45 show how to make a cross compiler (and optionally how to use it to make
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
46 a better cross compiler), how to build a root filesystem and native
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
47 development tools, and how to package and boot the result under an emulator.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
48 If you don't know how something works, read the script. If something's
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
49 unclear, ask about it on the mailing list.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
50
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
51 --- How does it work?
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
52
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
53 For information on implementation details:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
54
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
55 http://aboriginal.impactlinux.com/implementation.html
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
56
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
57 ===============================================================================
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
58 --- How do I use Aboriginal Linux?
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
59
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
60 To download prebuilt binaries for each target:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
61
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
62 http://aboriginal.impactlinux.com/downloads/binaries
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
63
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
64 The "system-image" tarballs are what you need to boot a virtual target
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
65 under QEMU, they have a squashfs root filesystem. The "rw-system-image"
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
66 tarballs are the same thing with an ext2 root filesystem, which lets you
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
67 write to it. (So you can upgrade those, but they're easier to screw
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
68
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
69 The cross-compiler tarballs are useful for accelerating native builds via
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
70 distcc (explained later in this file).
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
71
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
72 If you want to install on real hardware (or set up a chroot), the
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
73 root-filesystem and native-compiler tarballs are probably what you want.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
74
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
75 Various statically linked binaries are also available for each target
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
76 (busybox, dropbear, strace...) which can be used on any appropriate target,
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
77 not just with Aboriginal Linux. Just download them (with wget), set the
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
78 executable bit (chmod +x), and run them normally.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
79
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
80 To use the build scripts to build your own binaries:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
81
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
82 Download the most recent set of build scripts from:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
83
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
84 http://aboriginal.impactlinux.com/downloads
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
85
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
86 To list available targets, do:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
87
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
88 ./build.sh
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
89
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
90 We'll use "mipsel" (mips little endian) in the following examples. Replace
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
91 that with the target you're interested in from this list.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
92
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
93 For more information about each target, see:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
94
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
95 http://aboriginal.impactlinux.com/snapshots
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
96
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
97 To build everything for a target from source:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
98
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
99 ./build.sh mipsel
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
100
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
101 This calls the other stages (from download.sh through system-image.sh)
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
102 in order, to produce a bootable system image. The downloaded source
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
103 tarballs are kept in the "packages" directory, all other output goes into
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
104 the "build" directory.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
105
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
106 For each target, the build tars up the various build stages
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
107 (cross compiler, native compiler, root filesystem, etc). The last stage
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
108 is a bootable system image configured for use with the emulator QEMU,
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
109 in this case build/system-image-mipsel (with a corresponding tarball
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
110 version for posterity).
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
111
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
112 The build.sh script is a wrapper around other scripts, which can be run
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
113 individually. The main three are:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
114
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
115 simple-cross-compiler.sh - create a cross compiler for the target.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
116
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
117 root-filesystem.sh - use the cross compiler to build a root filesystem.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
118
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
119 system-image.sh - build a kernel and ext2 image to run under emulator.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
120
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
121 An optional (but often useful) fourth script is:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
122
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
123 native-compiler.sh - create a more complicated compiler for the target,
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
124 statically linked against uClibc and with thread
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
125 support and uClibc++. (This can also be used
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
126 to create a better cross compiler, with support for
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
127 threading and C++, but that's not necessary to build
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
128 a root filesystem or system image.)
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
129
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
130 If you'd like to build every target simultaneously (in parallel, which needs
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
131 about 2 gigabytes of ram):
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
132
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
133 FORK=1 sources/more/buildall.sh
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
134
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
135 The file "configure" contains several environment variables you can set to
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
136 control the behavior of Aboriginal Linux, and has comments documenting what
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
137 the all doo. (You can persistently set them by altering this file, or
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
138 set them temporarily in your environment before running a build.)
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
139
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
140 The equivalent of "make clean" is "rm -rf build". The equivalent of
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
141 "make distclean" is "rm -rf build packages".
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
142
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
143 For more information on implementation details:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
144
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
145 http://aboriginal.impactlinux.com/implementation.html
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
146
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
147 To boot a system image under QEMU:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
148
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
149 cd build/system-image-mipsel
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
150 ./run-emulator.sh
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
151
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
152 Each system image contains a root filesystem image (for use as a virtual
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
153 hard drive), a kernel configured for use with QEMU, and a run-emulator.sh
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
154 shell script to boot those two files together under QEMU.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
155
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
156 After the kernel boot messages scroll by, you should have a shell prompt
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
157 inside qemu. Try "cat /proc/cpuinfo" to confirm it's not the same as your
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
158 host. Try "cc /usr/src/hello.c" to build some of the included example
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
159 code. Type "exit" to shut it down.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
160
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
161 The environment variable QEMU_EXTRA can supply extra command line arguments
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
162 to the emulator. The environment variable KERNEL_EXTRA can supply extra
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
163 command line arguments to the Linux kernel running under the emulator.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
164
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
165 To set up a more powerful virtual build environment:
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
166
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
167 cd build/system-image-mipsel
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
168 ./dev-environment.sh
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
169
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
170 The dev-environment.sh script is a wrapper around run-emulator.sh that does
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
171 two things to give you a better development environment:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
172
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
173 1) Make sure the emulator allocates at least 256 megs of physical memory.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
174
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
175 Set the environment variable QEMU_MEMORY to the desired number of
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
176 megabytes if you'd like more. (Note that some targets can't support more
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
177 than this, in which case the emulator will print out an error message
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
178 instead of launching the virtual system.)
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
179
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
180 2) Mount lots of writeable space on /home in the virtual system.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
181
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
182 The script creates a 2 gigabyte sparse file on the host named hdb.img,
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
183 formats it ext3, and tells the emulator to mount it on /home.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
184
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
185 This keeps the existing hdb.img if it already exists, so its contents
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
186 persist between dev-environment.sh invocations. If you need more space
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
187 than 2 gigabytes, you can supply your own hdb.img.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
188
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
189 2) Hook up distcc to call out to the cross compiler on the host, to speed
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
190 up your builds by moving the heavy lifting of compilation outside the
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
191 emulator.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
192
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
193 This only happens if you have both distccd and the appropriate cross
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
194 compiler is in your host system's $PATH. (Install distcc on the host,
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
195 and downloaded the appropriate cross compiler tarball and add its "bin"
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
196 subdirectory to your $PATH). If both are available, the script launches
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
197 a private instance of distccd and configures the virtual system to use
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
198 distcc to call out to the cross compiler.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
199
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
200 The reason this doesn't re-introduce the complexity of cross compiling is
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
201 because the build still only has a single context, and thus behaves like
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
202 a fully native build. Configure, make, preprocessing, and linking all
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
203 still run natively inside the emulator. Using distcc means the build
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
204 sends preprocessed source out through the network and gets compiled .o
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
205 files back, but it neither knows nor cares whether the servers it's
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
206 connecting to are cross compiling or native compiling, as long as they
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
207 produce the right output.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
208
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
209 To automatically build more software packages inside the emulator:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
210
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
211 ./native-build.sh mipsel hello-world.hdc output_dir
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
212
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
213 Aboriginal Linux supports automated builds via a two stage process.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
214 Get a control image, then launch a system image with it.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
215
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
216 1) Obtain a control image.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
217
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
218 The scripts in sources/native-build (such as hello-world.sh and
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
219 static-tools.sh) create build control filesystem images. For example,
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
220
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
221 sources/native-build/hello-world.sh hello-world.hdc
966
bd2ea96aac53 Update READMEs.
Rob Landley <rob@landley.net>
parents: 711
diff changeset
222
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
223 These are squashfs formatted filesystem images that contain extracted
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
224 source code, plus a shell script to build that code and upload it to
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
225 the host (via ftp).
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
226
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
227 You're encouraged to create your own control images using the existing
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
228 native-build scripts as a model. The images the existing scripts create
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
229 are available in the downloads/binaries directory.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
230
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
231 2) Use native-build.sh to launch that control image under the emulator.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
232
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
233 This is another wrapper script, this time around dev-environment.sh
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
234 (which is in turn a wrapper script around run-emulator.sh).
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
235
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
236 This wrapper does two things:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
237
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
238 1) Launch an ftp daemon, and inform the virtual system where to find it
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
239 via the FTP_HOST and FTP_PORT environment variables. This lets the
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
240 emulated target system upload files to the host via "ftpput".
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
241
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
242 Launching an FTP daemon requires busybox in the $PATH on the host, and
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
243 uses the busybox nc and ftpd applets to provide an ftp server. (We
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
244 can't use an arbitrary one on the host because different ftp daemons
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
245 understand different command line options.)
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
246
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
247 You can set the environment variables $FTP_HOST and $FTP_PORT to point
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
248 it at an existing FTP daemon. If either variable is set, the script
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
249 won't launch a new FTP daemon. (Note that the default value for
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
250 $FTP_HOST is 10.0.2.2, which is QEMU's tunnel through to the host
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
251 system's 127.0.0.1.)
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
252
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
253 2) Launch the emulated development environment with a control image, to
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
254 be mounted on /mnt by the init script.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
255
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
256 Basically this adds "-hdc filename" to the QEMU_EXTRA environment
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
257 variable to supply a third virtual disk to the emulator, then calls
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
258 ./dev-environment.sh as normal.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
259
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
260 The Aboriginal Linux init script (sbin/init.sh) checks for the
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
261 existence of /mnt/init, and runs that if it exists instead of
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
262 providing an interactive shell prompt. (It waits three seconds for
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
263 you to press a key if you do want a shell prompt, in which case you
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
264 can launch /mnt/init yourself when you're done.)
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
265
1047
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
266 When /mnt/init exits, the virtual system shuts down and exits the
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
267 emulator, just like typing "exit" at the interactive shell prompt.
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
268
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
269 To cross compile stuff on the host:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
270
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
271 If you already do cross compiling, and would like to use this project's cross
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
272 compiler to build something else, just add its "bin" subdirectory to the
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
273 $PATH, and use the build tools prefixed with the target name:
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
274
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
275 PATH=$(pwd)/build/cross-compiler-mipsel/bin:$PATH
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
276 mipsel-gcc -static hello.c -o hello
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
277 qemu-mipsel hello
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
278
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
279 If you don't do cross compiling already, this project isn't going to teach
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
280 you how, and in fact recommends you just don't go there. We cross compile
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
281 so you don't have to.