[a9e389d] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
[bd48e48] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
---|
[9eae0a0] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent"> |
---|
[a9e389d] | 5 | %general-entities; |
---|
| 6 | ]> |
---|
| 7 | |
---|
[9eae0a0] | 8 | <sect1 id="ch-materials-creatingbuilddir"> |
---|
[2116d25] | 9 | <?dbhtml filename="creatingbuilddir.html"?> |
---|
[a9e389d] | 10 | |
---|
[f2ad938] | 11 | <title>Creating Build and Sources Directories</title> |
---|
[a9e389d] | 12 | |
---|
[60efb6b] | 13 | <para> Create a directory for the CLFS build (the exact location is up to |
---|
| 14 | you): </para> |
---|
[a9e389d] | 15 | |
---|
[60efb6b] | 16 | <screen><userinput>mkdir -p /mnt/clfs</userinput></screen> |
---|
[a9e389d] | 17 | |
---|
[60efb6b] | 18 | <para>Assign it to the <envar>CLFS</envar> environment variable:</para> |
---|
[a9e389d] | 19 | |
---|
[60efb6b] | 20 | <screen><userinput>export CLFS=/mnt/clfs</userinput></screen> |
---|
[a9e389d] | 21 | |
---|
[60efb6b] | 22 | <para>Ensure that this new directory has permissions that are too restrictive |
---|
| 23 | such that you can write to it as a non-root user.</para> |
---|
[a9e389d] | 24 | |
---|
[7d96901] | 25 | <screen><userinput>chmod 777 ${CLFS}</userinput></screen> |
---|
[a9e389d] | 26 | |
---|
[fd75ead] | 27 | <para>Create a sysroot directory which will be used when building the cross |
---|
| 28 | compiler and link its <filename class="directory">usr</filename> directory |
---|
| 29 | to itself such that everything installs to the sysroot:</para> |
---|
| 30 | |
---|
[94e2400] | 31 | <screen><userinput>mkdir -p ${CLFS}/cross-tools/${CLFS_TARGET} |
---|
| 32 | ln -sfv . ${CLFS}/cross-tools/${CLFS_TARGET}/usr</userinput></screen> |
---|
[fd75ead] | 33 | |
---|
[f2ad938] | 34 | <para>Downloaded packages and patches will need to be stored somewhere |
---|
| 35 | that is conveniently available throughout the entire build. A working |
---|
| 36 | directory is also required to unpack the sources and build them. |
---|
| 37 | <filename class="directory">${CLFS}/sources</filename> can be used both |
---|
| 38 | as the place to store the tarballs and patches and as a working |
---|
| 39 | directory.</para> |
---|
| 40 | |
---|
| 41 | <para>Create a directory to store the sources:</para> |
---|
| 42 | |
---|
| 43 | <screen><userinput>mkdir -v ${CLFS}/sources</userinput></screen> |
---|
[a9e389d] | 44 | |
---|
| 45 | </sect1> |
---|