1 | $Id$
|
---|
2 |
|
---|
3 | 1. INTRODUCTION::
|
---|
4 |
|
---|
5 | This collection of scripts, known as jhalfs, strives to create
|
---|
6 | accurate makefiles from the Linux From Scratch book series XML files.
|
---|
7 | This software is an evolution of the original "jhalfs-0.2" code.
|
---|
8 |
|
---|
9 | The usage of this script assumes you have read and are familiar with
|
---|
10 | the book(s) and, therefore, the configuration variables found in config
|
---|
11 | files will have meaning to you. There are a number of command line switches
|
---|
12 | which, if used, will override the config file settings.
|
---|
13 |
|
---|
14 | NOTES::
|
---|
15 | *. The resulting Makefile takes considerable time to run to completion.
|
---|
16 | Lay in a supply of caffeine beverages.
|
---|
17 |
|
---|
18 | *. It is recommended that you temporarily unpack your linux kernel,
|
---|
19 | run <make menuconfig>, configure the kernel as per the book and save
|
---|
20 | the resulting .config file. This suggestion also applies to the
|
---|
21 | configuration of the uClibc package when building a HLFS system using
|
---|
22 | uClibc rather than glibc.
|
---|
23 |
|
---|
24 | 2. INSTALLATION::
|
---|
25 | No installation is required. System-wide installation is not allowed
|
---|
26 | for now.
|
---|
27 |
|
---|
28 | 3. CONFIGURATION FILES::
|
---|
29 | Each book in the LFS series has its own set of configurable parameters
|
---|
30 | as well as the common parameters file.
|
---|
31 |
|
---|
32 | 4. RUNNING::
|
---|
33 | The script master.sh cannot be invoked directly but only via the
|
---|
34 | supplied symlinks. After editing the config file for the project you wish
|
---|
35 | to build, run the script.
|
---|
36 |
|
---|
37 | The term <symlink> refers to the 1 of 3 package symlinks, lfs,hlfs,clfs.
|
---|
38 | Replace <symlink> with your choice of packages; i.e.: ./lfs
|
---|
39 |
|
---|
40 | ./<symlink> eg: ./lfs or ./hlfs
|
---|
41 | Create a makefile based on the settings found in the config files.
|
---|
42 | You must enter the build partition/jhalfs directory and manually run <make>
|
---|
43 |
|
---|
44 | ./<symlink> -G eg: ./lfs -G
|
---|
45 | Download the packages and patches necessary to build <symlink>
|
---|
46 |
|
---|
47 | ./<symlink> -G -M eg: ./lfs -G -M
|
---|
48 | Download the packages, create and automatically run the Makefile
|
---|
49 |
|
---|
50 | ./<symlink> --help eg: ./lfs --help
|
---|
51 | will give you a context sensitive list of command line switches.
|
---|
52 |
|
---|
53 | >>>> an expanded example
|
---|
54 |
|
---|
55 | export SRC_ARCHIVE=/mnt/SourceFiles
|
---|
56 |
|
---|
57 | ./lfs -D /mnt/partition4 \
|
---|
58 | -K ~/jhalfs_configs/linux-2.6.16.19-LFS.config \
|
---|
59 | -F ~/jhalfs-configs/fstab-sda3 \
|
---|
60 | -G -T 0 -M
|
---|
61 |
|
---|
62 | explanation:::
|
---|
63 |
|
---|
64 | export SRC_ARCHIVE=/mnt/SourceFiles
|
---|
65 | # This points to a local archive of existing packages. If the version in
|
---|
66 | the archive is incorrect jhalfs will access the net and download the
|
---|
67 | necessary version and store it here for later use. DO NOT set this to
|
---|
68 | $BUILDDIR/sources. If you do not set this variable to a valide directory
|
---|
69 | ALL package tarballs will be downloaded from the 'net.
|
---|
70 |
|
---|
71 | -D /mnt/partition4
|
---|
72 | # where everything takes place. ..NOTE it must already exist and be mounted
|
---|
73 |
|
---|
74 | -K ~/jhalfs_configs/linux-2.6.16.19-LFS.config
|
---|
75 | # If you want to automatically build a the kernel you MUST supply a valid
|
---|
76 | kernel configuration file. The file you supply will be copied and renamed.
|
---|
77 |
|
---|
78 | -F ~/jhalfs-configs/fstab-sda3
|
---|
79 | # If you have a fstab file you wish to use it will be copied and renamed
|
---|
80 |
|
---|
81 | -G # Retrieve the package files. You MUST enable this flag at least once if you
|
---|
82 | wish to do a build or whenever you update the book.
|
---|
83 |
|
---|
84 | -T 0 # don't run any testsuites
|
---|
85 |
|
---|
86 | -M # automatically run make against Makefile once jhalfs finishes its work.
|
---|
87 |
|
---|
88 |
|
---|
89 | 5. LAYOUT::
|
---|
90 |
|
---|
91 | /CLFS/config
|
---|
92 | /master.sh
|
---|
93 | /xxxx.xsl
|
---|
94 |
|
---|
95 | /HLFS/config
|
---|
96 | /master.sh
|
---|
97 | /xxxx.xsl
|
---|
98 |
|
---|
99 | /LFS/config
|
---|
100 | / master.sh
|
---|
101 | /xxxx.xsl
|
---|
102 |
|
---|
103 | /common/config
|
---|
104 | /common_functions
|
---|
105 | /makefile_functions
|
---|
106 | /func_check_versions.sh
|
---|
107 | /func_validate_configs.sh
|
---|
108 |
|
---|
109 | /contrib/jhalfs-paco.patch
|
---|
110 |
|
---|
111 | /extras/do_copy_files
|
---|
112 | /do_ica_prep
|
---|
113 | /do_ica_work
|
---|
114 | /farce
|
---|
115 | /filelist
|
---|
116 |
|
---|
117 | README
|
---|
118 | README.PACO
|
---|
119 | TODO
|
---|
120 |
|
---|
121 | ./clfs ---|
|
---|
122 | ./hlfs ---|+---> master.sh
|
---|
123 | ./lfs ---|
|
---|
124 |
|
---|
125 |
|
---|
126 | 6. FAQ::
|
---|
127 | Q. "It doesn't work!"
|
---|
128 | A. Yes it does, try ./lfs --help
|
---|
129 |
|
---|
130 | Q. "How do I specify the build location?"
|
---|
131 | A. The original LFS document worked against the well know location /mnt/lfs.
|
---|
132 | This script automates the build of all of the LFS series of books and uses
|
---|
133 | a generic location $BUILDDIR with a default value a /mnt/build_dir.
|
---|
134 | You may change this value to suit your needs.
|
---|
135 |
|
---|
136 | The layout below $BUILDDIR is as follows.
|
---|
137 | $BUILDDIR/
|
---|
138 | jhalfs (makefile,cmd scripts,logs..etc)
|
---|
139 | sources (where packages reside)
|
---|
140 | tools (temporary bootstrap system)
|
---|
141 | cross-tools (temporary CLFS only)
|
---|
142 | ...
|
---|
143 | FHS dir structure
|
---|
144 | ...
|
---|
145 |
|
---|
146 | Q. "What is the function of the SRC_ARCHIVE variable?"
|
---|
147 | A. When then symlinked master.sh runs it creates a local copy of the
|
---|
148 | necessary packages in BUILDDIR/sources by downloading the files. If
|
---|
149 | the variable SRC_ARCHIVE is defined the software will first look in
|
---|
150 | this location for the file and, if found, will copy it to BUILDDIR/sources.
|
---|
151 | If the files are not found in SRC_ARCHIVE _and_ you have write priv to
|
---|
152 | the directory any downloaded files will be mirrored there.
|
---|
153 |
|
---|
154 | Q. "How do I set the SRC_ARCHIVE location?"
|
---|
155 | A. The best way to set the value of SRC_ARCHIVE is
|
---|
156 | export SRC_ARCHIVE=/wherever/you/store/downloaded/packages
|
---|
157 | OR
|
---|
158 | you can change the setting in .common/config.
|
---|
159 |
|
---|
160 | Q. "Why have 2 copies of the files?"
|
---|
161 | A. The package files must be visible during the chroot phase and this is a
|
---|
162 | simple and reliable method of doing so. This method also handles the CLFS
|
---|
163 | build method where the final build may be done on a separate machine.
|
---|
164 |
|
---|
165 | Authors:
|
---|
166 | George Boudreau
|
---|
167 | Manuel Canales Esparcia
|
---|
168 | Jeremy Huntwork
|
---|