source: clfs-embedded/BOOK/materials/common/creatingbuilddir.xml

Last change on this file was 5d8ddbf, checked in by Andrew Bradford <andrew@…>, 7 years ago

materials/creatingbuilddir: Add 'sudo' usage as needed

In order to be consistent with later parts of the book which do use
'sudo' in the commands given, use 'sudo' here, too, as we need root
permissions usually to create a directory in /mnt/.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4  <!ENTITY % general-entities SYSTEM "../../general.ent">
5  %general-entities;
6]>
7
8<sect1 id="ch-materials-creatingbuilddir">
9  <?dbhtml filename="creatingbuilddir.html"?>
10
11  <title>Creating Build and Sources Directories</title>
12
13  <para> Create a directory for the CLFS build.  The exact location is up to you
14    but depending on the location you choose, you may need to do this as the
15    root user: </para>
16
17<screen><userinput>sudo mkdir -p /mnt/clfs</userinput></screen>
18
19  <para>Assign it to the <envar>CLFS</envar> environment variable:</para>
20
21<screen><userinput>export CLFS=/mnt/clfs</userinput></screen>
22
23  <para>Ensure that this new directory has permissions that are not too
24    restrictive such that you can write to it as a non-root user.  Depending on
25    the location of the <envar>CLFS</envar> directory, you may need to do this
26    as the root user:</para>
27
28<screen><userinput>sudo chmod 777 ${CLFS}</userinput></screen>
29
30  <para>Downloaded packages and patches will need to be stored somewhere
31  that is conveniently available throughout the entire build. A working
32  directory is also required to unpack the sources and build them.
33  <filename class="directory">${CLFS}/sources</filename> can be used both
34  as the place to store the tarballs and patches and as a working
35  directory.</para>
36
37  <para>Create a directory to store the sources:</para>
38
39<screen><userinput>mkdir -v ${CLFS}/sources</userinput></screen>
40
41</sect1>
Note: See TracBrowser for help on using the repository browser.