annotate www/README @ 1802:315c9e9af893 draft

Deleting sh from build/host each time caused record-commands.sh to rerun, which screwed up parallel builds. Only delete after building busybox.
author Rob Landley <rob@landley.net>
date Mon, 02 Nov 2015 01:14:08 -0600
parents 092302c33462
children
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
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
21 --- How do I try it out? (Quick start.)
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
22
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
23 - Download a system-image tarball for a target that interests you.
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
24
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
25 - Extract it and cd into the directory.
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
26
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
27 - Run the "./run-emulator.sh" script.
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
28
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
29 After the kernel boot messages and the output of the init script, you
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
30 should get a shell prompt from inside the emulator.
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
31
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
32 - Run "cat /proc/cpuinfo" to confirm the emulator is running.
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
33
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
34 - Run "gcc -lpthread /usr/src/thread-hello2.c" (and run the resulting
1384
0e1b0c8f33c8 Fix a little typo
Alessio Igor Bogani <alessiogirobogani@gmail.com>
parents: 1063
diff changeset
35 "./a.out" file) to confirm the native toolchain works.
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
36
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
37 - Type "exit" when done.
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
38
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
39 --- What's this "target/host" business?
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
40
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
41 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
42 system running inside the emulator.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
43
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
44 --- Do I have to care about cross compiling?
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
45
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
46 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
47 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
48 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
49
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
50 ===============================================================================
d98aa02a7edf Significant rewrite of README, more complete, up to date, and using the new name "Aboriginal Linux" for the project.
Rob Landley <rob@landley.net>
parents: 966
diff changeset
51 --- What's the purpose of this project?
663
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 Aboriginal Linux serves two purposes: practical and educational.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
54
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
55 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
56 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
57 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
58 it.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
59
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
60 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
61 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
62 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
63 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
64 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
65 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
66 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
67 unclear, ask about it on the mailing list.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
68
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
69 ===============================================================================
d98aa02a7edf Significant rewrite of README, 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 --- 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
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 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
73
1386
092302c33462 Update links
Alessio Igor Bogani <alessiogirobogani@gmail.com>
parents: 1385
diff changeset
74 http://landley.net/aboriginal/downloads/binaries
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
d98aa02a7edf Significant rewrite of README, 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 The "system-image" tarballs are what you need to boot a virtual target
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
77 under QEMU. They contain a squashfs root filesystem (including a native
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
78 compiler toolchain), an appropriately configured Linux kernel, and shell
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
79 scripts to invoke the the emulator with appropriate arguments.
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
80
d98aa02a7edf Significant rewrite of README, 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 The cross-compiler tarballs are useful for accelerating native builds via
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
82 distcc (using the dev-environment.sh script, explained later in this file).
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
83
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
84 If you want to install Aboriginal Linux on real hardware (or set up a
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
85 chroot), the root-filesystem and native-compiler tarballs are probably
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
86 what you want. (You may need to provide your own kernel and bootloader.)
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
87
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
88 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
89 (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
90 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
91 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
92
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
93 To use the build scripts to build your own binaries from 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
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 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
96
1386
092302c33462 Update links
Alessio Igor Bogani <alessiogirobogani@gmail.com>
parents: 1385
diff changeset
97 http://landley.net/hg/aboriginal/archive/tip.tar.bz2
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
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 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
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 ./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
102
d98aa02a7edf Significant rewrite of README, 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 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
104 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
105
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
106 To compile a system image (and all prerequisite stages) for a target:
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
107
d98aa02a7edf Significant rewrite of README, 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 ./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
109
d98aa02a7edf Significant rewrite of README, 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 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
111 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
112 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
113 the "build" directory.
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
114
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
115 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
116 (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
117 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
118 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
119 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
120
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
121 To build every supported target simultaneously (in parallel, using around
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
122 2 gigabytes of ram and maybe 20 gigabytes of disk space):
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
123
d98aa02a7edf Significant rewrite of README, 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 FORK=1 sources/more/buildall.sh
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
125
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
126 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
127 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
128 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
129 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
130
1063
3a4fccf92f58 More updates to README files.
Rob Landley <rob@landley.net>
parents: 1048
diff changeset
131 For more information, see the README file in the download directory.
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
132
1386
092302c33462 Update links
Alessio Igor Bogani <alessiogirobogani@gmail.com>
parents: 1385
diff changeset
133 http://landley.net/aboriginal/README
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
134
d98aa02a7edf Significant rewrite of README, 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 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
136
d98aa02a7edf Significant rewrite of README, 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 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
138 ./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
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 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
141 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
142 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
143
d98aa02a7edf Significant rewrite of README, 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 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
145 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
146 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
147 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
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 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
150 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
151 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
152
d98aa02a7edf Significant rewrite of README, 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 To set up a more powerful virtual build environment:
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
154
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
155 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
156 ./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
157
d98aa02a7edf Significant rewrite of README, 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 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
159 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
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 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
162
d98aa02a7edf Significant rewrite of README, 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 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
164 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
165 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
166 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
167
d98aa02a7edf Significant rewrite of README, 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 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
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 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
171 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
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 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
174 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
175 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
176
d98aa02a7edf Significant rewrite of README, 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 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
178 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
179 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
180
d98aa02a7edf Significant rewrite of README, 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 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
182 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
183 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
184 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
185 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
186 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
187
d98aa02a7edf Significant rewrite of README, 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 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
189 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
190 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
191 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
192 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
193 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
194 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
195 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
196
d98aa02a7edf Significant rewrite of README, 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 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
198
d98aa02a7edf Significant rewrite of README, 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 ./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
200
d98aa02a7edf Significant rewrite of README, 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 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
202 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
203
d98aa02a7edf Significant rewrite of README, 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 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
205
d98aa02a7edf Significant rewrite of README, 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 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
207 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
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 sources/native-build/hello-world.sh hello-world.hdc
966
bd2ea96aac53 Update READMEs.
Rob Landley <rob@landley.net>
parents: 711
diff changeset
210
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
211 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
212 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
213 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
214
d98aa02a7edf Significant rewrite of README, 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 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
216 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
217 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
218
d98aa02a7edf Significant rewrite of README, 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 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
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 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
222 (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
223
d98aa02a7edf Significant rewrite of README, 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 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
225
d98aa02a7edf Significant rewrite of README, 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 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
227 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
228 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
229
d98aa02a7edf Significant rewrite of README, 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 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
231 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
232 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
233 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
234
d98aa02a7edf Significant rewrite of README, 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 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
236 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
237 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
238 $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
239 system's 127.0.0.1.)
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
240
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
241 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
242 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
243
d98aa02a7edf Significant rewrite of README, 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 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
245 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
246 ./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
247
d98aa02a7edf Significant rewrite of README, 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 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
249 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
250 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
251 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
252 can launch /mnt/init yourself when you're done.)
663
e1f187868dc4 Add a README file.
Rob Landley <rob@landley.net>
parents:
diff changeset
253
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
254 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
255 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
256
d98aa02a7edf Significant rewrite of README, 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 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
258
d98aa02a7edf Significant rewrite of README, 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 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
260 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
261 $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
262
d98aa02a7edf Significant rewrite of README, 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 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
264 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
265 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
266
d98aa02a7edf Significant rewrite of README, 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 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
268 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
269 so you don't have to.