Mercurial > hg > aboriginal
annotate www/README @ 1265:918501f802d1
Update squashfs and kernel to current versions.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 21 Oct 2010 19:09:51 -0500 |
parents | 3a4fccf92f58 |
children | 0e1b0c8f33c8 |
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 | 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 | 4 --- What is it? |
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 | 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 | 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 | 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 |
3a4fccf92f58
More updates to README files.
Rob Landley <rob@landley.net>
parents:
1048
diff
changeset
|
35 "./aout" file) to confirm the native toolchain works. |
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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 68 |
69 --- How does it work? | |
70 | |
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
|
71 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
|
72 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
74 |
d98aa02a7edf
Significant rewrite of README, 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 --- 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
|
77 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
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 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
|
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 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
|
83 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
|
84 compiler toolchain), an appropriately configured Linux kernel, and shell |
3a4fccf92f58
More updates to README files.
Rob Landley <rob@landley.net>
parents:
1048
diff
changeset
|
85 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
|
86 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
88 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
|
89 |
1063
3a4fccf92f58
More updates to README files.
Rob Landley <rob@landley.net>
parents:
1048
diff
changeset
|
90 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
|
91 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
|
92 what you want. (You may need to provide your own kernel and bootloader.) |
663 | 93 |
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 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
|
95 (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
|
96 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
|
97 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
|
98 |
1063
3a4fccf92f58
More updates to README files.
Rob Landley <rob@landley.net>
parents:
1048
diff
changeset
|
99 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
|
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 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
|
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 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
|
104 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
106 |
d98aa02a7edf
Significant rewrite of README, 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 ./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
|
108 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
110 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
|
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 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
|
113 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
115 |
1063
3a4fccf92f58
More updates to README files.
Rob Landley <rob@landley.net>
parents:
1048
diff
changeset
|
116 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
|
117 |
d98aa02a7edf
Significant rewrite of README, 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 ./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
|
119 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
121 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
|
122 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
|
123 the "build" directory. |
663 | 124 |
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
|
125 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
|
126 (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
|
127 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
|
128 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
|
129 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
|
130 |
1063
3a4fccf92f58
More updates to README files.
Rob Landley <rob@landley.net>
parents:
1048
diff
changeset
|
131 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
|
132 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
|
133 |
d98aa02a7edf
Significant rewrite of README, 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 FORK=1 sources/more/buildall.sh |
663 | 135 |
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
|
136 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
|
137 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
|
138 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
|
139 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
|
140 |
1063
3a4fccf92f58
More updates to README files.
Rob Landley <rob@landley.net>
parents:
1048
diff
changeset
|
141 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
|
142 |
1063
3a4fccf92f58
More updates to README files.
Rob Landley <rob@landley.net>
parents:
1048
diff
changeset
|
143 http://aboriginal.impactlinux.com/downloads/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
|
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 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
|
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 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
|
148 ./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
|
149 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
151 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
|
152 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
|
153 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
155 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
|
156 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
|
157 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
|
158 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
160 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
|
161 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
|
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 To set up a more powerful virtual build environment: |
663 | 164 |
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
|
165 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
|
166 ./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
|
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 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
|
169 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
|
170 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
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 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
|
174 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
|
175 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
|
176 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
|
177 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
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 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
|
181 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
|
182 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
184 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
|
185 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
|
186 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
188 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
|
189 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
|
190 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
192 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
|
193 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
|
194 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
|
195 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
|
196 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
|
197 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
199 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
|
200 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
|
201 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
|
202 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
|
203 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
|
204 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
|
205 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
|
206 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
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 ./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
|
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 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
|
212 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
|
213 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
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 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
|
217 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
|
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 sources/native-build/hello-world.sh hello-world.hdc |
966 | 220 |
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
|
221 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
|
222 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
|
223 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
|
224 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
226 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
|
227 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
|
228 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
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 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
|
232 (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
|
233 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
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 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
|
237 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
|
238 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
|
239 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
241 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
|
242 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
|
243 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
|
244 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
246 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
|
247 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
|
248 $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
|
249 system's 127.0.0.1.) |
663 | 250 |
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
|
251 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
|
252 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
|
253 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
255 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
|
256 ./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
|
257 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
259 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
|
260 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
|
261 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
|
262 can launch /mnt/init yourself when you're done.) |
663 | 263 |
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
|
264 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
|
265 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
|
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 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
|
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 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
|
270 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
|
271 $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
|
272 |
d98aa02a7edf
Significant rewrite of README, 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=$(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
|
274 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
|
275 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
|
276 |
d98aa02a7edf
Significant rewrite of README, 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 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
|
278 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
|
279 so you don't have to. |