source: README@ 982ae7c

experimental
Last change on this file since 982ae7c was 7b7c34a, checked in by George Boudreau <georgeb@…>, 18 years ago

Added reference to new configuration tool

  • Property mode set to 100644
File size: 8.5 KB
Line 
1$Id$
2
31. INTRODUCTION::
4
5 This collection of scripts, known as jhalfs-X, 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
242. INSTALLATION::
25 No installation is required. System-wide installation is not allowed
26 for now.
27
283. 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 ::NEWS:: There is new configuration method for jhalfs.
33
34 We have installed the familiar menu based configuration tool driven by
35 make. If you type the command <make> you will be presented with a list of
36 configurable parameters (starting with the book you wish to use). All the
37 parameters found in the individual config files are available. Once you
38 have finished setting the parameters and exit the make file will launch
39 the chosen book version of jhalfs. JHALFS will import your created file
40 and overider the values found in normal "config" files.
41 ..note.. The generated file <configuration> is only used by jhalfs if you
42 run jhalfs via make otherwise it is ignored.
43
44
454. RUNNING::
46 The script master.sh cannot be invoked directly but only via the
47 supplied symlinks. After editing the config file for the project you wish
48 to build, run the script.
49
50 IMPORTANT:
51 If you use the switch -M (automatically run the generated makefile) you
52 must be 'root' or you can run the scripts using 'sudo'
53 i.e. sudo ./lfs -G -M
54
55 If you want to run make manually you can only do so if you are 'root' or
56 via 'sudo'
57 i.e (from within the jhalfs directory) sudo make
58
59 The term <symlink> refers to the 1 of 3 package symlinks, lfs,hlfs,clfs.
60 Replace <symlink> with your choice of packages; i.e.: ./lfs
61
62 ./<symlink> eg: ./lfs or ./hlfs
63 Create a makefile based on the settings found in the config files.
64 You must enter the build partition/jhalfs directory and manually run <make>
65
66 ./<symlink> -G eg: ./lfs -G
67 Download the packages and patches necessary to build <symlink>
68
69 ./<symlink> -G -M eg: ./lfs -G -M
70 Download the packages, create and automatically run the Makefile
71
72 ./<symlink> --help eg: ./lfs --help
73 will give you a context sensitive list of command line switches.
74
75 >>>> an expanded example
76
77 export SRC_ARCHIVE=/mnt/SourceFiles
78
79 ./lfs -D /mnt/partition4 \
80 -K ~/jhalfs_configs/linux-2.6.16.19-LFS.config \
81 -F ~/jhalfs-configs/fstab-sda3 \
82 -G -T 0 -M
83
84 explanation:::
85
86 export SRC_ARCHIVE=/mnt/SourceFiles
87 # This points to a local archive of existing packages. If the version in
88 the archive is incorrect jhalfs will access the net and download the
89 necessary version and store it here for later use. DO NOT set this to
90 $BUILDDIR/sources. If you do not set this variable to a valid directory
91 ALL package tarballs will be downloaded from the 'net.
92
93 -D /mnt/partition4
94 # where everything takes place. ..NOTE it must already exist and be mounted
95
96 -K ~/jhalfs_configs/linux-2.6.16.19-LFS.config
97 # If you want to automatically build a the kernel you MUST supply a valid
98 kernel configuration file. The file you supply will be copied and renamed.
99
100 -F ~/jhalfs-configs/fstab-sda3
101 # If you have a fstab file you wish to use it will be copied and renamed
102
103 -G # Retrieve the package files. You MUST enable this flag at least once if you
104 wish to do a build or whenever you update the book.
105
106 -T 0 # don't run any testsuites
107
108 -M # automatically run make against Makefile once jhalfs finishes its work.
109
110
1115. LAYOUT::
112
113 /CLFS/config
114 /master.sh
115 /xxxx.xsl
116
117 /CLFS2/config
118 /master.sh
119 /xxxx.xsl
120
121 /HLFS/config
122 /master.sh
123 /xxxx.xsl
124
125 /LFS/config
126 / master.sh
127 /xxxx.xsl
128
129 /common/config
130 /common_functions
131 /makefile_functions
132 /func_check_versions.sh
133 /func_validate_configs.sh
134
135 /contrib/jhalfs-paco.patch
136
137 /extras/do_copy_files
138 /do_ica_prep
139 /do_ica_work
140 /farce
141 /filelist
142
143 README
144 README.PACO
145 TODO
146
147 ./clfs ---|
148 ./clfs2 ---|
149 ./hlfs ---|+---> master.sh
150 ./lfs ---|
151
152
1536. FAQ::
154 Q. "This 'help' file is very sparse"
155 A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books
156 and wish to automate the build. 99% of any problems that arise can be
157 solved by reading the book(s).
158
159 Q. "It doesn't work!"
160 A. Yes it does, try ./lfs --help
161
162 Q. "It still doesn't work"
163 A. jhalfs was designed to work against the developement versions of the LFS
164 series of books. Consequently changes in a book(s) sometimes breaks older
165 versions of jhalfs. Before you start pulling out your hair download the
166 latest version of jhalfs to see if that solves your problem.
167
168 Q. "How do I specify the build location?"
169 A. The original LFS document worked against the well known location /mnt/lfs.
170 This script automates the build of all of the LFS series of books and uses
171 a generic location $BUILDDIR with a default value of /mnt/build_dir.
172 You may change this value to suit your needs.
173
174 The layout below $BUILDDIR is as follows.
175 $BUILDDIR/
176 jhalfs (makefile,cmd scripts,logs..etc)
177 sources (where packages reside)
178 tools (temporary bootstrap system)
179 cross-tools (temporary CLFS only)
180 ...
181 FHS dir structure
182 ...
183
184 Q. "What is the function of the SRC_ARCHIVE variable?"
185 A. When then symlinked master.sh runs it creates a local copy of the
186 necessary packages in BUILDDIR/sources by downloading the files. If
187 the variable SRC_ARCHIVE is defined the software will first look in
188 this location for the file and, if found, will copy it to BUILDDIR/sources.
189 If the files are not found in SRC_ARCHIVE _and_ you have write priv to
190 the directory any downloaded files will be mirrored there.
191
192 Q. "How do I set the SRC_ARCHIVE location?"
193 A. The best way to set the value of SRC_ARCHIVE is
194 export SRC_ARCHIVE=/wherever/you/store/downloaded/packages
195 OR
196 you can change the setting in common/config.
197
198 Q. "Why have 2 copies of the files?"
199 A. The package files must be visible during the chroot phase and this is a
200 simple and reliable method of doing so. This method also handles the CLFS
201 build method where the final build may be done on a separate machine.
202
203 Q. "When I try to build 'xxx' with clfs the makefile fails at the mid-point"
204 A. There could be numerous reasons for the failure but the most likely reason
205 is you are doing a cross-build using the 'chroot' method and the target is
206 not compatible with the host. If you choose to build using the chroot
207 method a test is performed at the end of the temptools phase. If the test
208 succeeds the build continues inside a chroot jail. However if the test fails
209 it means the host and target are not compatible an you should use the
210 'boot' method to create your target code.
211 As an extreme example: You can build a sparc target on a x86 platform but
212 only the temptools phase. You must run ./clfs using the 'boot' method and
213 not the 'chroot.' You must transfer the toolchain to a sparc platform, reboot
214 the sparc box and continue the build.
215 Of all the LFS series of books Cross-LFS requires the greatest
216 understanding of host/target hardware combination. Please read the book
217 carefully and don't skip the easy parts (there are none..)
218
219Authors:
220 George Boudreau
221 Manuel Canales Esparcia
222 Jeremy Huntwork
Note: See TracBrowser for help on using the repository browser.