annotate www/FAQ.html @ 1719:78050a31d1ee draft

Sigh. Checked in the wrong version of the patch (typo fix).
author Rob Landley <rob@landley.net>
date Tue, 06 Jan 2015 13:15:33 -0600
parents da21ff27331e
children 2dd2e648c2ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 <html>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
2 <!--#include file="header.html" -->
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 <title>Frequently Asked Questions</title>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 <ul>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 <li><p><a href=#where_start>Q: Where do I start?</a></p></li>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
7
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
8 <li><p><a href=#building><h1>Building System Images</h1></a></p></li>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
9 <ul>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
10 <li><p><a href=#source_tour>Q: What's all this source code for?</a></p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
11
1030
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
12 <li><p><a href=#add_package>Q: How do I add $PACKAGE to my system image's root filesystem?</a></p></li>
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
13
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 <li><p><a href=#case_sensitive_patch>Q: I added my uClibc patch to sources/patches but it didn't do anything, what's wrong?</a></p></li>
896
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
15
1030
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
16 <li><p><a href=#package_breaks>Q: Why did package build $NAME die because it couldn't find $PREREQUISITE, even though it's installed?</a></p></li>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
17
1225
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
18 <li><p><a href=#environment_sanitizing>Q: Why isn't the build listening to the environment variables I set?</p></li>
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
19 </ul>
1225
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
20
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
21 <li><p><a href=#debugging><h1>Debugging questions</h1></a></p></li>
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
22
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
23 <ul>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
24 <li><p><a href=#debug_logging>Q: How do I get better log output?</p></li>
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
25 <li><p><a href=#debug_test>Q: How do I run my own build snippets without editing the build scripts?</a></p></li>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
26 <li><p><a href=#debug_source>Q: How do I play around with package source code?</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
27 <ul>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
28 <li><p><a href=#debug_package_cache>Q: What's the package cache for?</a></p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
29 <li><p><a href=#debug_working_copies>Q: What are working copies for?</a></p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
30 </ul>
1553
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
31 <li><p><a href=#debug_repos>Q: Can I use source code from repositories instead of tarballs?</p></li>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
32 </ul>
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
33
1370
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
34 <li><p><a href=#development><h1>Development questions</h1></a></p></li>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
35
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
36 <ul>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
37 <li><p><a href=#dev_miniconfig>Q: What's a miniconfig?</a></p></li>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
38 </ul>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
39
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
40 <li><p><a href=#other><h1>Other questions</h1></a></p></li>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
41
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
42 <ul>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
43 <li><p><a href=#name_change>Q: Didn't this used to be called Firmware Linux?</a></p></li>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
44
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
45 <li><p><a href=#ubuntu_mispackaged_qemu>Q: ./run-emulator.sh says qemu-system-mips isn't found, but I installed qemu. Why isn't this working?</a></p></li>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
46
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
47 <li><p><a href=#windows>Q: Do you care about windows?</a></p></li>
1321
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
48
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
49 <li><p><a href=#impactlinux>Q: What happened to impactlinux.com?</a></p></li>
1397
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
50 <li><p><a href=#android>Q: What if I want to play with android?</a></p></li>
1460
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
51 <li><p><a href=#new_syscalls>Q: Why don't your prebuilt binaries
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
52 work in my ancient system?</a></p></li>
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
53
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
54
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
55 </ul>
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
56 </ul>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
57
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
58 <hr /><a name=where_start /><h2>Q: Where do I start?</h2>
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
59
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
60 <p>The project provides development and test environments for lots of different
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
61 hardware platforms, based on busybox and uClibc and configured to run under
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
62 QEMU.</p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
63
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
64 <p>Most people want to do one of three things:</p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
65
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
66 <li><p>Download a prebuilt system image, boot it up under the emulator, and
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
67 compile stuff natively for a target.</p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
68
901
777af6561b2c Fix FAQ links pointed out by by wangji.
Rob Landley <rob@landley.net>
parents: 896
diff changeset
69 <p>Go <a href=screenshots>here</a> and download the appropriate
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
70 system-image-<b>$ARCH</b>.tar.bz2 for your $TARGET, extract it, cd into it,
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
71 and <b>./run-emulator.sh</b> to boot it under qemu.</p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
72
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
73 <p>Alternately, you can run the script <b>./development-environment.sh</b>,
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
74 which is a wrapper around run-emulator.sh that feeds QEMU extra options to add
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
75 memory (256 megs) and writeable disk space (a blank 2 gigabyte disk image
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
76 mounted on /home) to provide a more capable development environment.</p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
77
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
78 <p>The system images contain native compiler toolchains, but if you install
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
79 distccd on the host and add the appropriate cross compiler to your host's
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
80 $PATH, the ./run-emulator.sh script will detect this and set up the system
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
81 image to automatically use distcc to call out to the cross compiler through
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
82 the virtual network, speeding up native builds significantly.<p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
83 </li>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
84
1050
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
85 <li><p>Build your own cross compilers and system images from source, using
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
86 the build scripts.</p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
87
1050
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
88 <p>Go to the <a href=downloads>downloads directory</a>, grab the most recent
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
89 release tarball, extract it, and run <b>./build.sh</b> to list
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
90 the available targets. The run <b>./build.sh $TARGET</b> to compile
1030
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
91 the one you like. The results wind up in the "build" directory.</p>
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
92
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
93 <p>The build scripts are written in bash, and fairly extensively commented.
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
94 All the scripts at the top level are designed to be run directly, and
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
95 build.sh is just a wrapper script that calls them in order. The less commonly
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
96 used scripts in <b>sources/more</b> are also designed to be run directly.</p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
97
1030
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
98 <p>A large number of variables can be set to configure the build, either
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
99 by modifying the file "config" (which documents them all) or by exporting
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
100 them as environment variables.</p>
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
101
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
102 <p>To grab the latest development version of the build scripts out of the
1050
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
103 source control system, go to the
1321
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
104 <a href=/hg/aboriginal>mercurial archive</a>.
1030
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
105 If you don't want to install mercurial, you can grab a
1321
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
106 <a href=/hg/aboriginal/archive/tip.tar.bz2>tarball</a> of the current code at
1030
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
107 any time.</p>
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
108 </li>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
109
1050
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
110 <li><p>Download a prebuilt cross compiler and cross-compile stuff with it.</p>
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
111
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
112 <p>Go <a href=screenshots>here</a> and download the appropriate
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
113 cross-compiler-$TARGET.tar.bz2 for your $TARGET, extract it, add its
1050
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
114 "bin" directory to your $PATH, and use the appropriate $TARGET-cc and
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
115 $TARGET-ld and so on to compile your program. (The tool names have prefixes
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
116 so they can be in the same $PATH as your host's existing compiler.)</p>
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
117 </li>
333c8f799302 Update lots and lots of web pages for the project name change to Aboriginal Linux.
Rob Landley <rob@landley.net>
parents: 1030
diff changeset
118
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
119 <p>If all else fails, look at the pretty
901
777af6561b2c Fix FAQ links pointed out by by wangji.
Rob Landley <rob@landley.net>
parents: 896
diff changeset
120 <a href=screenshots>screenshots</a>.</p>
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
121
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
122 <hr /><a name=building />
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
123 <h1>Building System Images</h1>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
124
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
125 <p>The build scripts compile the system images from source code. Along
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
126 the way, they create the cross compilers and root filesystem tarballs too.
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
127 If you just want to use the prebuilt binary tarballs to mess around with
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
128 native environments for various targets, you don't need to care about the
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
129 build scripts.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
130
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
131 <p>But if you want to understand how it all works, and how to reproduce it,
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
132 then you do.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
133
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
134 <p>Start by running (or reading) "build.sh", it calls everything else.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
135
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
136 <hr /><a name=source_tour /><h2>Q: What's all this source code for?</h2>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
137
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
138 <p>A: The basic outline is:</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
139
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
140 <ul>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
141 <li><p><b>Top level</b> - The build stages. The file build.sh calls the rest of these scripts in order (but you can call 'em directly too), and the file config lists all the envirionment variables you can set to change the default behavior.</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
142
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
143 <li><p><b>sources</b> - Infrastructure files which you don't call directly.</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
144
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
145 <li><p><b>more</b> - Additional scripts you can call directly to do various things, but which aren't build stages. They have comments near the top describing what they do.</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
146
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
147 <li><p><b>build</b> - Directory generated output goes into. All the output of running a build winds up in here, and "rm -rf build" is essentially "make clean".</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
148
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
149 <li><p><b>packages</b> - Downloaded source packages. If you "rm -rf packages",
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
150 the script download.sh re-populates it by calling wget on various URLs.</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
151 </ul>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
152
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
153 <hr /><a name=add_package /><h2>Q: How do I add $PACKAGE to my system image's root filesystem?</h2>
1119
25b47a72fd70 Update the FAQ with some reasons for the name change.
Rob Landley <rob@landley.net>
parents: 1050
diff changeset
154
1351
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
155 <p>A: Either use setup-chroot to copy the root filesystem into a writeable
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
156 chroot, or run the build scripts with SYSIMAGE_TYPE=ext2 (and probably
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
157 HDA_MEGS=2048) to create a writeable ext2 system image instead of the default
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
158 read-only squashfs.</p>
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
159
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
160 <p>The setup-chroot command is a shell script in each system image's /sbin
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
161 directory which copies the squashfs contents into a writeable chroot
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
162 directory, and chroots into that directory. Since dev-environment.sh
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
163 creates a 2 gigabyte ext3 image and mounts it on /home, you should have
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
164 plenty of space under there to do:</p>
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
165
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
166 <blockquote><pre>
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
167 setup-chroot /home/work /bin/ash
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
168 </pre></blockquote>
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
169
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
170 <p>The first time you run this (I.E. when the directory you want to chroot into
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
171 doesn't exist), setup-chroot copies the root filesystem into it.</p>
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
172
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
173 <p>Afterwards, setup-chroot uses "mount --bind" to copy the host filesystem's
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
174 mounts (/proc, /sys, /tmp, and so on), then chroots into the new directory
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
175 to run your command. When the chroot exits, setup-chroot calls "zapchroot"
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
176 to unmount all those sub-mounts.</p>
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
177
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
178 <p>If you don't specify which command to run, chroot runs /bin/sh, which by
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
179 default points to bash 2.04b built without ncurses. This is good for running
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
180 scripts but is not the world's friendliest interactive shell.</p>
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
181
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
182 <p>The other thing you could do is go back to the build scripts and
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
183 build a writeable system image by specifying the environment variable
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
184 "SYSIMAGE_TYPE=ext2" instead of the default squashfs. You may also want
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
185 to set "SYSIMAGE_HDA_MEGS=2048".</p>
1119
25b47a72fd70 Update the FAQ with some reasons for the name change.
Rob Landley <rob@landley.net>
parents: 1050
diff changeset
186
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
187 <p>Aboriginal Linux builds squashfs images by default, and the prebuilt binary
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
188 tarballs in
1030
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
189 the downloads/binaries directory are built with the default values. Squashfs
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
190 is a read-only compressed filesystem, which means it's pretty durable (you
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
191 never need to fsck it), but also a bit limiting. The dev-environment.sh
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
192 script attaches a 2 gigabyte ext2 image to /dev/hdb (which is mounted on
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
193 /home) so you always have writeable space to build stuff in, but that doesn't
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
194 let you modify the root filesystem on /dev/hda: you can't install packages
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
195 you build into /bin and such on a read-only root filesystem.</p>
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
196
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
197 <p>The "SYSIMAGE_TYPE" and "SYSIMAGE_HDA_MEGS" config entries let you change
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
198 the default system image type generated by the system-image.sh script. You
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
199 can edit the file "config" or specify them as environment variables, ala:</p>
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
200
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
201 <blockquote><pre>
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
202 SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS=2048 ./build.sh $TARGET
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
203 </pre></blockquote>
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
204
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
205 <p>That creates a 2 gigabyte ext2 image, which you can boot into and install
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
206 packages natively under, using the "./run-from-build.sh $TARGET" script.
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
207 If you've already built a system image, you can repackage the existing root
1351
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
208 filesystem by re-running system-image.sh (instead of the whole build.sh).
1030
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
209 As always, your new system image is created in the "build" subdirectory.</p>
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
210
81003c9f31cb Add a new FAQ: how to get a writeable root filesystem.
Rob Landley <rob@landley.net>
parents: 901
diff changeset
211 <p>Note: since this is a writeable image, you'll have to fsck it. You can
1351
c41de203f9b8 Update FAQ now that setup-chroot is in the system images.
Rob Landley <rob@landley.net>
parents: 1321
diff changeset
212 use "tune2fs -j" to turn it into an ext3 image to reduce the need for this.</p>
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
213
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
214 <hr /><a name=case_sensitive_patch /><h2>Q: I added a uClibc patch to sources/patches but it didn't do anything, what's wrong?</h2>
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
215
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
216 <p>The Linux filesystem is case sensitive, so the patch has to start with
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
217 "uClibc-" with a capital C.</p>
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
218
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
219 <hr /><a name=package_breaks /><h2>Q: Why did the $NAME package build die
896
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
220 with a complaint that it couldn't find $PREREQUISITE, even though that's
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
221 installed on the host? (For example, distcc and python.)</h2>
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
222
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
223 <p>Because you skipped the host-tools.sh step, and because installing a package
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
224 on the host isn't the same as installing it on the target.</p>
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
225
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
226 <p>Even though host-tools.sh is technically an optional step, your host has to
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
227 be carefully set up to work without it.</p>
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
228
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
229 <p>Not only does host-tools.sh add prerequisite packages your build requires,
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
230 it _removes_ everything else from the $PATH that might change the behavior of
896
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
231 the build. Without this, the ./configure stages of various packages will
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
232 detect that libtool exists, or that the host has Python or Perl installed,
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
233 and configure the packages to make use of things that the cross compiler's
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
234 headers and libraries don't have, and that the target root filesystem
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
235 may not have installed.</p>
edc150001472 New FAQ entry, comment updates.
Rob Landley <rob@landley.net>
parents: 889
diff changeset
236
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
237 <hr /><a name=environment_sanitizing /><h2>Q: Why isn't the build listening to the environment variables I set?</h2>
1225
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
238
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
239 <p>Quick answer: export NO_SANITIZE_ENVIRONMENT=1.</p>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
240
1225
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
241 <p>Long answer: you probably deleted the commented out variables from "config"
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
242 and then tried to set them on the command line. The environment sanitizing
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
243 logic has a whitelist of variables, but also looks at config to see what
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
244 variables are exported in there (whether they're commented out or not) and
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
245 lets those through from the environment as well. If you remove them from
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
246 config, it won't let them through from the environment.</p>
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
247
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
248 <hr /><a name="debugging" /><h1>Debugging questions</h1>
1225
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
249
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
250 <hr /><a name="debug_logging" /><h2>Q: How do I get better log output from the build?</h2>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
251
1191
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
252 <h3><b>Get a verbose, single-processor log of the build output.</b></h3>
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
253
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
254 <p>When something goes wrong, re-run your build with a couple extra variables,
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
255 and log the output with "tee":</p>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
256
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
257 <blockquote><pre>BUILD_VERBOSE=1 CPUS=1 ./build.sh 2>&1 | tee out.txt</pre></blockquote>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
258
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
259 <p>The shell has a nice syntax for exporting variables just for a single
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
260 command, by putting the command to run after the assignment. Doing
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
261 that doesn't pollute your environment by leaving CPUS or BUILD_VERBOSE
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
262 exported, but it exports them just for the new "build.sh" process it
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
263 launches. And redirecting stderr to stdin and piping the result into "tee"
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
264 captures the output so you can examine it with less or vi.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
265
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
266 <p>BUILD_VERBOSE undoes the "pretty printing" of the linux kernel and uClibc,
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
267 and makes a few other build steps produce more explicit output.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
268
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
269 <p>CPUS controls the number of tasks make should run in parallel. The default
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
270 value is the number of processors on the system, times 1.5. (So a 4 processor
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
271 system runs 6 processes.) Making it single processor gives you much more
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
272 readable output, because a single-processor build stops more reliably at the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
273 point where it hit a problem, rather than at some random later point forcing
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
274 you to scroll back quite a ways to find the error. It also shouldn't
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
275 interleave the output of multiple parallel commands.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
276
1191
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
277 <h3><b>Use the command logging wrapper</b></h3>
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
278
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
279 <p>If you need more logging detail, run more/record-commands.sh, then re-run
1487
7ab15346cbf6 Document target /usr/sbin/record-commands wrapper.
Rob Landley <rob@landley.net>
parents: 1467
diff changeset
280 the build and look at the output in build/logs. (A similar "record-commands"
7ab15346cbf6 Document target /usr/sbin/record-commands wrapper.
Rob Landley <rob@landley.net>
parents: 1467
diff changeset
281 wrapper is available in each system image's /usr/sbin directory, to
7ab15346cbf6 Document target /usr/sbin/record-commands wrapper.
Rob Landley <rob@landley.net>
parents: 1467
diff changeset
282 log the commands of native builds.)</p>
1191
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
283
1487
7ab15346cbf6 Document target /usr/sbin/record-commands wrapper.
Rob Landley <rob@landley.net>
parents: 1467
diff changeset
284 <p>more/record-commands.sh sets up a wrapper which logs every command (and
1191
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
285 all its arguments) run out of $PATH. It populates build/wrapdir with
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
286 symlinks for every command name currently in $PATH, all pointing to the
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
287 "wrappy" binary (built from sources/toys/wrappy.c). If you run record-commands
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
288 before running host-tools.sh it wraps the host $PATH, if you run it after
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
289 host-tools.sh it wraps the sanitized $PATH in build/host.</p>
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
290
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
291 <p>The wrappy binary depends on two environment variables (set up by
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
292 sources/include.sh): $WRAPPY_LOGPATH is an absolute path to the current
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
293 log file (updated by the "setupfor" function) and $OLDPATH is the $PATH to
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
294 exec the real command out of after appending the current command line to
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
295 the log.</p>
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
296
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
297 <p>The script "more/report-recorded-commands.sh" prints out a list of all
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
298 commands used by each build stage. (Comparing the host-tools version
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
299 to a run without host-tools can be instructive; that's the extra stuff
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
300 ./configure is picking up out of the host environment.)</p>
f66d99bb00f9 Write-up on the command logging wrapper.
Rob Landley <rob@landley.net>
parents: 1185
diff changeset
301
1487
7ab15346cbf6 Document target /usr/sbin/record-commands wrapper.
Rob Landley <rob@landley.net>
parents: 1467
diff changeset
302 <p>The record-commands wrapper is also available in the target root
7ab15346cbf6 Document target /usr/sbin/record-commands wrapper.
Rob Landley <rob@landley.net>
parents: 1467
diff changeset
303 filesystem's /usr/sbin directory. Run "record-commands /path/to/script"
7ab15346cbf6 Document target /usr/sbin/record-commands wrapper.
Rob Landley <rob@landley.net>
parents: 1467
diff changeset
304 and when it exits /tmp/record-commands-log.txt should list all the
7ab15346cbf6 Document target /usr/sbin/record-commands wrapper.
Rob Landley <rob@landley.net>
parents: 1467
diff changeset
305 command lines run by the script, in order.</p>
1285
e5f98d48be15 Ever-fluffier FAQ.
Rob Landley <rob@landley.net>
parents: 1264
diff changeset
306
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
307 <hr /><a name=debug_test /><h2>Q: How do I run my own build snippets without editing the build scripts?</p></h2>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
308
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
309 <p>A: Use the more/test.sh script</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
310
1467
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
311 <p>This wrapper runs a command line in build context: the first argument
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
312 is the target to build for, and the rest of its arguments are a command line
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
313 to run as if building for that target.</p>
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
314
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
315 <p>Examples:</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
316 <blockquote><pre>
1467
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
317 more/test.sh armv5l build_section busybox
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
318 more/test.sh mips getconfig linux
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
319 </pre></blockquote>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
320
1467
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
321 <p>The wrapper imports sources/include.sh and calls load_target (with
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
322 NO_CLEANUP so it doesn't blank an existing output directory). This sets up
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
323 the same context for building for a given $ARCH that the build scripts use:
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
324 it adds the appropriate cross compiler to the $PATH (if it's already been
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
325 built), sets all the shell functions and environment variables,
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
326 creates the temporary directory, and so on. The wrapper then runs the rest of
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
327 the command line in the resulting context.</p>
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
328
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
329 <p>By default, more/test.sh acts as its own build stage called "test"
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
330 (because include.sh uses the name of the script file you're running to set a
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
331 default STAGE_NAME), so output winds up in build/test-armv5l and such. You
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
332 can override this by setting STAGE_NAME yourself, for example:</p>
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
333
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
334 <blockquote><pre>
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
335 # rebuild uClibc without redoing binutils/gcc/kernel headers stages:
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
336 STAGE_NAME=simple-cross-compiler more/test.sh sparc build_section uClibc
38e80b18fe8b Expand more/test.sh documentation with "rebuilding uClibc but not binutils/gcc" example.
Rob Landley <rob@landley.net>
parents: 1460
diff changeset
337 </pre></blockquote>
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
338
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
339 <hr /><a name=debug_source /><h2>Q: How do I play around with package source code?</p></h2>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
340
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
341 <p>The source code used by package builds lives in several directories, each
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
342 with a different purpose:</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
343
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
344 <ul>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
345 <li><p><b>packages</b> - vanilla upstream source tarballs (populated by download.sh).</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
346 <li><p><b>sources/patches</b> - local patches to apply to the vanilla packages.</li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
347 <li><p><b>build/packages</b> - the package cache, clean copies of the extracted and patched source.</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
348 <li><p><b>build/temp-$ARCH</b> - working copies of the source configured and built for the given architecture.</p></li>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
349 </ul>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
350
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
351 <h3><b>Downloading</b></h3>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
352
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
353 <p>The list of source URLs is in the script download.sh, along with a list
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
354 of mirrors to check if the original URL isn't available. Those URLs are
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
355 the only place that specifies version numbers for packages, so if you want
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
356 to switch versions just point to a new URL and re-run download.sh. (You can
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
357 set SHA1= blank for the first download, and it will output the sha1sum for
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
358 the file it downloads. Cut and paste that into the download script and
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
359 re-run to confirm.)</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
360
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
361 <h3><b>Extracting and patching</b></h3>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
362
1225
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
363 <p>Each script to build a package calls the shell function "setupfor"
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
364 before building the package, and "cleanup" afterwards. Conceptually,
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
365 "setupfor" extracts a tarball (from the "packages" directory),
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
366 patches it if necessary (applying all the files in "sources/patches" that
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
367 start with that package's name, which come from the aboriginal linux
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
368 repository), and cd's into the resulting directory. The function "cleanup"
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
369 does an "rm -rf" on that directory when you're done.</p>
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
370
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
371 <p>In practice, the infrastructure behind the scenes caches the extracted
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
372 tarballs. This optimization saves disk space, CPU time, and I/O bandwidth,
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
373 speeding up builds considerably (especially when you do a lot of them in
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
374 parallel). This optimization is designed to be easily ignored, but
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
375 understanding the infrastructure can be useful for debugging.</p>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
376
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
377 <p>There are two places to look for extracted source packages: the package
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
378 cache and the working copy. The <b>package cache</b> (in "build/packages")
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
379 contains clean copies of all the previously extracted source tarballs, with
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
380 patches already applied. Each <b>working copy</b> (in an architecture's
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
381 temporary directory, "build/temp-$ARCH") is a tree of hardlinks to the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
382 package cache that provides a directory in which to configure, build, and
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
383 install that package for a specific target.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
384
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
385 <p>The source in the package cache stays clean, can be re-used across multiple
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
386 builds, and is only used to create working copies. Working copies fill up
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
387 with temporary files from configure/make/install, and are normally deleted
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
388 after each successful build. If you want to look at clean source, you
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
389 want the package cache. If you want to look at the state of a failed
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
390 build to see how it was configured or re-run portions of it, you want the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
391 working copy.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
392
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
393 <hr /><a name=debug_package_cache /><h2>Q: What's the package cache for?</p></h2>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
394
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
395 <p>The package cache contains clean architecture-independent source code,
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
396 which you can edit, use to run modified builds and create patches, and easily
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
397 revert to its original condition. The package cache avoids re-extracting the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
398 same tarballs over and over, but also provides a place you can make temporary
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
399 modifications to that source behind the build system's back without having to
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
400 mess around with tarballs or patch files.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
401
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
402 <p>The setupfor function calls "extract_package" to populate the package
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
403 cache. First extract_package checks for an existing copy of the appropriate
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
404 source directory, and when it doesn't find one it extracts the source tarballs
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
405 from the "packages" directory, applies the appropriate patches from
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
406 "sources/patches/$PACKAGENAME-*.patch", and saves the results into its own
1552
c3b91b70cc42 Remove USE_ALT option, I have a better idea (upcoming patch).
Rob Landley <rob@landley.net>
parents: 1487
diff changeset
407 directory (named after the package) under "build/packages".</p>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
408
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
409 <p>When the package cache has an existing copy of the package, extract_package
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
410 checks the list of sha1sums in that copy's "sha1-for-source.txt" file against
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
411 the sha1sums for the tarball and for each of the patch files it needs to apply.
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
412 If the list matches, it uses the existing copy. If it doesn't match, it
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
413 deletes the existing copy out of the package cache, re-extracts the tarball,
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
414 and reapplies each patch to it.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
415
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
416 <p>This means if you can edit the copy under sources/patches all you like,
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
417 and as long as you don't modify sha1-for-source.txt, don't replace the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
418 tarball, or add/remove/edit any of the patches to apply to it, it
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
419 will re-use that source for subsequent builds. So go ahead and fill it
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
420 full of printf()s and test code, then when you want to go back to a clean
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
421 copy, delete the build/packages directory (either one package or the whole
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
422 thing) and let setupfor recreate it.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
423
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
424 <p>If you come up with changes you want to keep, you can create a patch from
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
425 the package cache this way:</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
426
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
427 <blockquote><pre>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
428 # Rename the modified package directory
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
429
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
430 cd $TOP
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
431 cd build/packages
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
432 mv $PACKAGE $PACKAGE.bak
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
433
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
434 # Extract a clean copy
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
435
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
436 cd $TOP
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
437 more/test.sh host extract_package $PACKAGE
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
438
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
439 # Diff the two and write out the patch to sources/patches
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
440
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
441 cd build/packages
1460
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
442 diff -ruN $PACKAGE $PACKAGE.bak > \
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
443 ../../sources/patches/$PACKAGE-$NAME.patch
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
444 rm -rf $PACKAGE
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
445
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
446 # Run a clean test build
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
447
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
448 cd $TOP
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
449 rm -rf build/packages/$PACKAGE
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
450 ./build.sh $ARCH
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
451 </pre></blockquote>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
452
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
453 <p>Where $TOP is your top level Aboriginal Linux directory, $PACKAGE is the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
454 name of the package you're modifying, and $NAME is some unique name for your
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
455 patch. Don't forget to delete the $PACKAGE.bak directory to reclaim its disk
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
456 space when you're satisfied with your patch (or "rm -rf build/packages" to
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
457 zap the entire package cache, or just "rm -rf build" to clean
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
458 up all the temporary files).</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
459
1225
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
460 <p>If the environment variable EXTRACT_ALL is set, download.sh will
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
461 call extract_package on each package as soon as it confirms the tarball's
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
462 sha1sum. (The environment variable FORK makes each package download happen
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
463 in parallel, including the call to extract_package if any.) Prepopulating
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
464 the package cache this way is useful before running different architecture
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
465 builds in parallel, or when testing that new patches (added to the
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
466 sources/patches directory) apply correctly to the relevant package(s).</p>
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
467
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
468 <p>This means you can do the following to get a freshly extracted and patched
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
469 clean copy of all packages:</p>
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
470
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
471 <blockquote><pre>
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
472 rm -rf build/packages
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
473 EXTRACT_ALL=1 ./download.sh
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
474 </pre></blockquote>
39fda120621c Fluff out the debugging section of the FAQ a bit more, explaining EXTRACT_ALL and NO_SANITIZE_ENVIRONMENT.
Rob Landley <rob@landley.net>
parents: 1191
diff changeset
475
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
476 <hr /><a name=debug_working_copies /><h2>Q: What are working copies for?</p></h2>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
477
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
478 <p>Working copies are target-specific copies of package source where builds
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
479 actually happen. The build scripts clone a fresh working copy for each build,
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
480 then run configure, make, and install commands in the new copy. They leave the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
481 aftermath of failed builds lying around for analysis; to keep the working
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
482 copies of successful builds around too, set the NO_CLEANUP environment
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
483 variable. If you want to cd into a source directory and re-run bits of a
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
484 previous build, use the working copy of a package's source. (You'll probably
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
485 have to add the appropriate cross compiler's bin directory to your $PATH, but
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
486 otherwise it'll usually just work.)</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
487
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
488 <p>Working copies of source packages are cloned from the package cache
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
489 by the the function "setupfor", which first calls extract_package to ensure the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
490 package cache is up to date, then creates a directory of hardlinks to the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
491 package cache via "cp -l" (or symlinks via "cp -s" if $SNAPSHOT_SYMLINK is
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
492 set).</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
493
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
494 <p>The working copies use hardlinks to avoid creating redundant copies of the
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
495 file contents, which would waste I/O bandwidth and eat lots of disk space
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
496 and disk cache memory. Using hardlinks instead of symlinks for the working
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
497 copies also saves inodes and dentry cache, since each symlink consumes an
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
498 inode, but that optimization requires that the package cache and working
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
499 copies be on the same filesystem.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
500
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
501 <p>Linking to the page cache instead of copying it doesn't cause problems
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
502 for most packages, because most methods of modifying files used by package
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
503 builds break hardlinks or symlinks by first creating a temporary copy with
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
504 the modifications, then deleting the original and moving the copy into its
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
505 place. Modifying files that are tracked by source control also creates
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
506 spurious noise for the package's developers. Occasionally a package will
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
507 make a mistake (such as zlib 1.2.5 shipping a Makefile which is
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
508 generated by configure, and modified in place), in which case the build
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
509 has to break the link itself. (Note that editing the working copies of
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
510 source files in build/temp-$ARCH can modify the cached copy if your editor
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
511 isn't configured to break hardlinks. Usually you edit the package cache
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
512 version and let setupfor create a new working copy.)</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
513
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
514 <p>If you want to search just the generated files and not the snapshot of
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
515 the source, use "find $PACKAGE -links 1". If you want to search just
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
516 the source files and not the generated files, that's what the package
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
517 cache is for.</p>
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
518
1553
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
519 <hr /><a name=debug_repos /><h2>Q: Can I use source code from repositories instead of tarballs?</h2>
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
520
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
521 <p>Sure. Check them out into the packages directory with the name of the
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
522 package you want. The more/repo.sh script provides an example for several
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
523 packages.</p>
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
524
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
525 <p>If a directory such as "packages/linux" exists, the build from that
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
526 (instead of the package cache) for the appropriate package. Note that it
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
527 will use this directory verbatim, if you want any of the patches from
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
528 sources/patches you'll have to apply them yourself.</p>
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
529
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
530 <p>When you'd like to build from vanilla tarballs again, either build with
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
531 IGNORE_REPOS=all or delete the directory out of packages.</p>
da21ff27331e Add ability to check out repositories in packages, IGNORE_REPOS to build from tarballs anyway, a FAQ entry on it, and more/repo.sh to set up/update some of the common ones.
Rob Landley <rob@landley.net>
parents: 1552
diff changeset
532
1370
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
533 <a name=development>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
534
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
535 <hr /><a name=dev_miniconfig /><h2>Q: What's a miniconfig?</h2>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
536
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
537 <p>Aboriginal Linux uses "miniconfig" format for Linux and uClibc config
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
538 files.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
539
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
540 <p>A miniconfig is a list of interesting symbols to switch on. To create a
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
541 miniconfig, start with "allnoconfig", go into "menuconfig" to switch on all the
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
542 symbols you want, and add a "SYMBOLNAME=y" line for each symbol you had to
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
543 manually set. (You don't need to record symbols set by dependency
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
544 resolution, just the ones you'd have to set yourself to get from
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
545 allnoconfig to the config you want.)</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
546
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
547 <p>Since the vast majority of these symbols are common between platforms, we
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
548 split our miniconfigs for linux and uClibc into a "baseconfig" file
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
549 (in the sources directory) and a list of target-specific symbols in each
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
550 target's settings file. We append these two together to get our miniconfig.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
551
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
552 <p>To use a miniconfig:</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
553
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
554 <blockquote><pre>make allnoconfig KCONFIG_ALLCONFIG=filename</pre></blockquote>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
555
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
556 <p>The sources/toys/miniconfig.sh script compresses a full .config into
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
557 a miniconfig. To use, "cp .config tempname; ARCH=x86 $PATHTO/miniconfig.sh
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
558 tempname" and the result winds up in mini.conf.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
559
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
560 <p>The kernel's new defconfig format is similarly filtered to remove
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
561 uninteresting symbols, but miniconfig has several advantages over
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
562 savedefconfig:</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
563
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
564 <ul>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
565 <li><p>Miniconfig is human readable.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
566
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
567 <p>Each miniconfig file is self-contained: it lists all the symbols we
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
568 explicitly care about enabling. The compressed defconfig files are offsets
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
569 against an external "default configuration" that changes from platform to
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
570 platform and from version to version.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
571
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
572 <p>Miniconfig may rely on dependency resolution to
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
573 switch on whatever other symbols are necessary to make this configuration
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
574 work, but we don't have to care what those are. We list all the symbols
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
575 we care about, in one place, where we can easily see all the features enabled
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
576 by this configuration.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
577 </li>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
578
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
579 <li><p>Miniconfig doesn't have to switch any symbols off.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
580
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
581 <p>Lots of symbols default to y, and the compressed defconfig files have
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
582 to switch off symbols that are enabled by default but which this configuration
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
583 doesn't want. To do so it uses "magic comments". (The
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
584 config file format doesn't say "SYMBOL=n", it says "# SYMBOL is not set".
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
585 Despite most things starting with a # being comments, that one isn't.)</p></li>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
586 </li>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
587
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
588 <li><p>Miniconfig doesn't silently bloat over time</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
589
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
590 <p>In each new release, new symbols show up defaulting to "y". For example,
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
591 between linux 2.6.38 and 2.6.39 the symbol "CONFIG_SUSPEND=y" showed up on all
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
592 platforms, and i686 grew CONFIG_PNP_DEBUG_MESSAGES=y and seven different
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
593 CONFIG_ACPI_* symbols all defaulting to y. A compressed defconfig switches
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
594 all these on by default, because the delta against defconfig it records
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
595 doesn't switch them off.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
596
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
597 <p>In miniconfig, you only get the features you requested.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
598 </li>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
599 </ul>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
600
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
601 <p>The disadvantages of miniconfig are that miniconfig.sh is really slow,
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
602 and that if new required symbols show up you have to add them to the
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
603 miniconfig yourself.</p>
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
604
3bd113bd3722 Add a FAQ about miniconfigs.
Rob Landley <rob@landley.net>
parents: 1351
diff changeset
605 <a name=other />
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
606 <hr /><a name=name_change /><h2>Q: Didn't this used to be called Firmware Linux?</h2>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
607
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
608 <p>A: Yup. The name changed shortly before the 1.0 release in 2010.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
609
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
610 <p>The name "Aboriginal Linux" is based on a synonym for "native", as in
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
611 native compiling. It implies it's the first Linux on a new system, and also
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
612 that it can be replaced. It turns a system into something you can do
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
613 native development in, terraforming your environment so you can use it
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
614 to natively build your deployment environment (which may be something else
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
615 entirely).</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
616
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
617 <p>Aboriginal Linux is cross compiled, but after it boots you shouldn't need
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
618 to do any more cross compiling. (Except optionally using the cross compiler
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
619 as a native building accelerator via distcc.) Hence our motto,
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
620 "We cross compile so you don't have to".</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
621
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
622 <p>The old name didn't describe the project very well. (It also had tens
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
623 of millions of Google hits, most of which weren't this project.) If you're
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
624 really bored, there's a page on <a href=history.html>the history of the
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
625 project</a>.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
626
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
627 <hr /><a name=ubuntu_mispackaged_qemu /><h2>Q: ./run-emulator.sh says qemu-system-$TARGET isn't found, but I installed the qemu package and the executable "qemu" is there. Why isn't this working?</h2>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
628
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
629 <p>A: You're using Ubuntu, aren't you? You need to install
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
630 "qemu-kvm-extras" to get the non-x86 targets.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
631
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
632 <p>The Ubuntu developers have packaged qemu in an <strike>actively
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
633 misleading</strike> "interesting" way. They've confused the emulator QEMU
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
634 with the virtualizer KVM.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
635
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
636 <p>QEMU is an emulator that supports multiple hardware
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
637 targets, translating the target code into host code a page at a time. KVM
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
638 stands for Kernel Virtualization Module, a kernel module which allows newer x86
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
639 chips with support for the "VT" extension to run x86 code in a virtual
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
640 container.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
641
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
642 <p>The KVM project started life as a fork of QEMU (replacing QEMU's CPU
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
643 emulation with a kernel module providing VT virtualization support, but
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
644 using QEMU's device emulation for I/O), but KVM only ever offered a
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
645 small subset of the functionality of QEMU, and current versions of QEMU have
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
646 merged KVM support into the base package. (QEMU 0.11.0 can automatically
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
647 detect and use the KVM module as an accelerator, where appropriate.)</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
648
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
649 <p>It's a bit like the X11 project providing a "drm" module (for 3D acceleration
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
650 and such), which was integrated upstream into the Linux kernel. The Linux
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
651 kernel was never part of the X11 project, and vice versa, and pretending the
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
652 two projects were the same thing would be wrong.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
653
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
654 <p>That said, on Ubuntu the "qemu" package is an alias for "qemu-kvm", a
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
655 package which only supports i386 and x86_64 (because that's all KVM supports
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
656 when running on an x86 PC). In order to install the rest of qemu (support
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
657 for emulating arm, mips, powerpc, sh4, and so on), you need to install
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
658 the "qemu-kvm-extras" package (which despite the name has nothing whatsoever
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
659 to do with KVM).</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
660
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
661 <p>Support for non-x86 targets is part of the base package when you build QEMU
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
662 from source. If you ignore Ubuntu's packaging insanity and build QEMU
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
663 from source, you shouldn't have to worry about this strangely named
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
664 artificial split.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
665
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
666 <hr /><a name=windows /><h2>Q: Do you care about windows?</h2>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
667
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
668 <p>A: Not really, but <a href=http://www.davereyn.co.uk/download.htm>this
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
669 guy does</a>. You can download his prebuilt binary QEMU versions for Windows,
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
670 and launch the various prebuilt binary Linux system images under them for
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
671 each target. Then if you want to rebuild the system images from source, or
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
672 build more software for a given target, you can do so natively within a
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
673 system image.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
674
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
675 <p>If you want to cross compile from Cygwin or mingw or something, you're on
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
676 your own. Emulating a Linux system (thereby bypassing Windows entirely) is
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
677 fairly straightforward, assuming somebody else has already done the work of
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
678 porting the emulator. Trying to make Windows run posix apps is an unnatural
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
679 act involving ceremonial headgear and animal sacrifice just to get it to
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
680 fail the same way twice.</p>
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
681
1321
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
682 <hr /><a name=impactlinux /><h2>Q: What happened to impactlinux.com?</h2>
1234
d6e6c9ddf7f9 Yet more FAQ massaging.
Rob Landley <rob@landley.net>
parents: 1228
diff changeset
683
1321
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
684 <p>In 2007 Mark Miller and I set up a small Linux consulting company,
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
685 but after a couple years (and the recession at the end of the second
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
686 Bush administration) we went on to other things.</p>
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
687
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
688 <p>I kept the project hosted on the impactlinux.com website (which was
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
689 higher bandwidth than landley.net), but Mark shut down the website in
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
690 2010 when the corporation expired. Due to a miscommunication, this caught
4c0a2018502c Clean up old references to impactlinux.com, add a FAQ explaining why that site went away, and start the long and winding process of redoing documentation.hmtl.
Rob Landley <rob@landley.net>
parents: 1285
diff changeset
691 me by surprise, and the mailing list archives and subscribers were lost.<p>
1185
d413e255c812 Add lots of debugging HOWTO information. More to come.
Rob Landley <rob@landley.net>
parents: 1119
diff changeset
692
1397
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
693 <hr /><a name=android /><h2>Q: What if I want to play with android?</h2>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
694
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
695 <p>The Aboriginal Linux root filesystem should work just fine under Android's
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
696 proprietary Linux kernel fork: you can extract the root-filesystem-armv5l
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
697 tarball and chroot on most android hardware and life is good.</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
698
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
699 <p>Integrating Android userspace with Linux userspace is a bit more
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
700 complicated: Google decided they didn't want any GPL code in userspace, so they
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
701 rewrote the whole root filesystem from scratch. (The end result is missing
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
702 many features, and in doing so they opened themselves to a Java
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
703 patent lawsuit from Oratroll, we never said it was a _good_ decision.)</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
704
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
705 <p>This means that Android userspace doesn't use glibc or uClibc, it uses
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
706 an incompatible BSD-derived library called "bionic". Think "klibc with
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
707 threading support" and you're not far off: it's missing a lot of stuff
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
708 needed to build most conventional Linux userspace packages against it.</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
709
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
710 <p>However, the Android _kernel_ is mostly Linux. It's a fragmented mix
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
711 of several different obsolete forks with lots of garbage added, but Google's
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
712 idea of "embedded development" focused on adding stuff to the kernel rather
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
713 than removing stuff, so you can mostly ignore the differences. This means
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
714 binaries built against uClibc should run on the android kernel just fine:
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
715 assuming they're statically linked, or that you install the uClibc shared
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
716 libraries (possibly alongside the bionic ones).</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
717
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
718 <p>The other major deficiency of Android is "toolbox", which is their
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
719 clone of busybox. (It has nothing to do with toybox, either: that's also
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
720 GPL. About half the code and ideas of toybox went upstream into busybox
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
721 anyway, the rest is mothballed.)</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
722
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
723 <p>Android's toolbox is crap, and the first thing any serious developer
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
724 does is install busybox. Here's the easy way to do that.</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
725
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
726 <p>Download the <a href=http://busybox.net/downloads/binaries/latest/busybox-armv5l>armv5l prebuilt busybox binary</a> from the busybox website onto your
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
727 android device. (These are the binaries Aboriginal Linux makes, but
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
728 the busybox website seemed like a better place for an ex-busybox maintainer
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
729 to save them than the Aboriginal downloads/binaries directory. You can
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
730 grab busybox out of root-filesystem-armv5l if you prefer.)</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
731
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
732 <p>This file is statically linked against uClibc, so it doesn't require
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
733 any external dependencies, meaning it should run on an Android system.
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
734 Now let's install it:</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
735
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
736 <p>Make a /busybox directory, move the busybox-armv5l binary to
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
737 /busybox/busybox (this will both move it and rename it), and "chmod 700
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
738 /busybox/busybox". (The toolbox chmod doesn't understand "u+x", you have
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
739 to give it numbers. This is one of the many, many things this procedure
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
740 fixes.)</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
741
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
742 <p>Now run "PATH=/busybox busybox sh" to get a real shell prompt with command
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
743 history. In that command prompt run this:</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
744
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
745 <blockquote>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
746 <pre>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
747 for i in $(busybox --list); do ln -s busybox /busybox/$i; done
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
748 </pre>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
749 </blockquote>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
750
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
751 <p>That gives you a /busybox directory full of symlinks to busybox. You're
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
752 running in a shell with a $PATH looking at those busybox commands, so any
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
753 command you type should run the busybox version.</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
754
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
755 <p>You should be able to take it from there.</p>
06f26d3b636e Add a FAQ about android.
Rob Landley <rob@landley.net>
parents: 1370
diff changeset
756
1460
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
757 <hr /><a name=new_syscalls><h2>Q: Why don't your prebuilt binaries
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
758 work in my ancient system?</h2>
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
759
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
760 <p>Linux periodically adds new features, and binaries built using those
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
761 new features may not run on old kernels. (Linux continues to support old
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
762 binaries, known as "backwards compatability", but does not promise that new
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
763 programs will always run on old systems.)</p>
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
764
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
765 <p>For example, powerpc Linux didn't used to have proper socket system calls
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
766 but had to make do with more elaborate/indirect mechanisms.
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
767 <a href=http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=86250b9d12caa1>This got fixed</a> during the 2.6.36 development cycle, and
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
768 binaries built against a C library using the newer kernel headers will use
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
769 the new system() syscall as appropriate, resulting in an -ENOSYS error
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
770 on older kernels that doesn't implement the new system call.</p>
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
771
1552
c3b91b70cc42 Remove USE_ALT option, I have a better idea (upcoming patch).
Rob Landley <rob@landley.net>
parents: 1487
diff changeset
772 <p>You can run the build against an older
1460
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
773 kernel (such as 2.6.35) and then run ./native-build.sh static-tools.hdc in
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
774 the resulting system-image-powerpc to get dropbearmulti and busybox binaries
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
775 that restrict themselves to the old system calls.</p>
876d4849afa1 New FAQ, "why don't your prebuilt binaries work in my ancient root filesystem". Which is more about ancient kernels not having new system calls, really...
Rob Landley <rob@landley.net>
parents: 1397
diff changeset
776
889
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
777 <!--#include file="footer.html" -->
0947cffea3bd Add a FAQ.
Rob Landley <rob@landley.net>
parents:
diff changeset
778 </html>