source: README@ d236bbd

ablfs
Last change on this file since d236bbd was 0cc9d4e, checked in by Pierre Labastie <pierre@…>, 11 years ago

Merge trunk r3603, 3648, 3673, 3677

  • Property mode set to 100644
File size: 10.8 KB
Line 
1$Id$
2
31. 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 developed
8 by Jeremy Huntwork.
9
10 The usage of this script assumes you have read and are familiar with
11 the book(s) and, therefore, the configuration variables found in menuconfig
12 interface will have meaning to you.
13
14 The list of supported books can be found at
15 http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
16
17 NOTES::
18 *. The resulting Makefile takes considerable time to run to completion.
19 Lay in a supply of caffeine beverages.
20
21 *. It is recommended that you temporarily unpack your linux kernel,
22 run <make menuconfig>, configure the kernel as per the book and save
23 the resulting .config file. This suggestion also applies to the
24 configuration of the uClibc package when building a HLFS system using
25 uClibc rather than glibc.
26
27 *. Read carefully this file and the other README.* files before start
28 using the tool.
29
302. PREREQUISITES::
31
32 To use this tool you MUST:
33
34 - have experience building {c,h,b}LFS packages
35 - know how to edit and write shell scripts
36 - know how a Makefile works
37 - be able to trace build failures and to find what is causing it
38 (user error, package bug, {c,h,b}LFS command bug, or jhalfs code bug)
39
40 If you do not have the above skills, please don't use this tool.
41
42
433. INSTALLATION::
44
45 No installation is required. System-wide installation is not allowed.
46
474. CONFIGURATION::
48
49 We have installed the familiar menu based configuration tool driven by
50 GNU make. see the section RUNNING, for details
51
525. RUNNING::
53
54 The command <make> will launch a menu based configuration program. You will
55 recognize the layout from building the kernel or uClibc/BusyBox. The
56 underlying menu code was borrowed from BusyBox and slightly modified for
57 our use.
58
59 Help on parameter function is available from the on-line help. Please
60 make use of that feature for additional information not in this file.
61
62 Once you have set the parameters you wish and have saved your work the
63 jhalfs script is launch. The script verify first that the host can run
64 it and build the xLFS system, then validate the configuration and present
65 you with your selections which you may accept or reject.
66
67 If you accepted the displayed settings jhalfs will proceed to create the
68 Makefile, optionally download packages.
69
70 ::NEWS::
71 You must be logged as a normal user with sudo privileges to run
72 the Makefile.
73
74 NOTE::
75 If you run the jhalfs script directly the only function you can select
76 is to display the version number running <./jhalfs -v>
77
786. BLFS_TOOL SUPPORT::
79
80 For books that support it (TODO: which ones?), there is an option
81 to install an automated framework for building BLFS packages. Let
82 us call it blfs-tool for now. When you tick `BOOK Settings/Add
83 blfs-tool support' in jhalfs configuration menu, the tools are
84 installed in $BLFS_ROOT (default /blfs_root) on the xLFS system,
85 and a few dependencies (which you may select) are built at the
86 end of the jhalfs run, before the custom tools. As of March 8, 2012,
87 works only with LFS. The instructions for building the dependencies
88 are taken from the BLFS book.
89
90 (TODO: is this relevant to present CLFS?)
91 WARNING:: If you add blfs-tool support on a CLFS Sysroot build
92 you MUST edit the scripts to fix the installation paths.
93
94 After booting the new xLFS system some steps are needed to finish
95 the installation of the automated tools:
96
97 - A user account must be created. You must be logged on that user
98 account to use blfs-tool. This is not strictly necessary,
99 since the packages can be built as root, too, but it is
100 never a good idea to build packages as root.
101
102 - Move /blfs-root to that user's home and change ownership of the
103 directory and files to the user.
104
105 - Give the user read and write privileges over the $TRACKING_DIR
106 directory and the files that it contains.
107
108 - Configure sudo, adding the needed privileges for the user. For
109 newer sudo version, do not forget to add a line Defaults secure_path=
110 containing /sbin and /usr/sbin (in /etc/sudoers), otherwise some
111 executables are not found.
112
113 - Although it is not strictly necessary, it is recommended to install
114 the bash shell startup files (as per `3.After LFS Configuration
115 Issues' of the BLFS book), as some instructions in BLFS rely on
116 their being present.
117
118 We assume that blfs-tool will be used on a running fresh xLFS system.
119 To use it to build BLFS packages from the chroot jail is also possible,
120 but not supported.
121
122 To know how to use blfs-tool, see README.BLFS.
123
1247. LAYOUT::
125
126 /BLFS (see README.BLFS)
127
128 /CLFS/master.sh
129 /clfs.xsl
130
131 /CLFS2/master.sh
132 /clfs2.xsl
133
134 /CLFS3/master.sh
135 /clfs3.xsl
136
137 /HLFS/master.sh
138 /hlfs.xsl
139
140 /LFS/master.sh
141 /lfs.xsl
142
143 /common/common_functions
144 /makefile_functions
145 /packages.xsl
146 /urls.xsl
147 /create-sbu_du-report.sh
148 /progress_bar.sh
149 /blfs-tool-deps/9xx-*
150 /libs/func_*
151
152 /custom/template
153 /config/
154 /examples/*
155 /examples_CLFS-E/*
156
157 /extras/do_copy_files
158 /do_ica_prep
159 /do_ica_work
160 /farce
161 /filelist
162
163 /optimize/opt_config
164 /opt_override
165 /optimize_functions
166 /opt_config.d/noOpt
167 /noSymbols
168 /O3pipe
169 /O3pipe_march
170 /defOpt_fPIC
171
172 /menu/*
173
174 README
175 README.BLFS
176 README.CLFS
177 README.HLFS
178 README.CUSTOM
179 TODO
180 LICENSE
181
182 Config.in
183 Makefile
184 jhalfs
185 blfs-tool
186
1878. FAQ::
188 Q. "This 'help' file is very sparse"
189 A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books
190 and wish to automate the build. 99% of any problems that arise can be
191 solved by reading the book(s).
192
193 Q. "It doesn't work!"
194 A. Yes it does, try >> make
195 Remember you must have 'sudo' privileges.
196
197 Q. "It still doesn't work"
198 A. jhalfs was designed to work against the development versions of the LFS
199 series of books. Consequently changes in a book(s) sometimes breaks older
200 versions of jhalfs. Before you start pulling out your hair download the
201 latest version of jhalfs to see if that solves your problem.
202
203 Q. "How do I specify the build location?"
204 A. The original LFS document worked against the well known location /mnt/lfs.
205 This script automates the build of all of the LFS series of books and uses
206 a generic location $BUILDDIR with a default value of /mnt/build_dir.
207 You may change this value to suit your needs.
208
209 The layout below $BUILDDIR is as follows.
210 $BUILDDIR/
211 jhalfs (Makefile, cmd scripts, logs, etc..)
212 sources (where packages reside)
213 tools (temporary bootstrap system)
214 cross-tools (temporary CLFS only)
215 ...
216 FHS dir structure
217 ...
218 blfs_root (files to use blfs-tool if selected to install it)
219
220 Q. "What is the function of the SRC_ARCHIVE variable?"
221 A. When jhalfs runs and packages download was selected, it creates a local
222 copy of the necessary packages in BUILDDIR/sources by downloading the
223 files. If the variable SRC_ARCHIVE is defined the software will first
224 look in this location for the file and, if found, will copy it to
225 BUILDDIR/sources.
226 If the files are not found in SRC_ARCHIVE _and_ you have write priv to
227 the directory any downloaded files will be mirrored there.
228
229 Q. "How do I set the SRC_ARCHIVE location?"
230 A. The best way to set the value of SRC_ARCHIVE is
231
232 export SRC_ARCHIVE=/wherever/you/store/downloaded/packages
233
234 or you can set the full path in the proper menu entry.
235
236 Q. "Why have 2 copies of the files?"
237 A. The package files must be visible during the chroot phase and this is a
238 simple and reliable method of doing so. This method also handles the CLFS
239 boot build method where the final build may be done on a separate machine.
240
241 Q. "What is the function of "User account" and "Group account" menu settings?"
242 A. If you are running jhalfs from a low or non-privileged account you may not
243 have the priv to create/delete the user needed to build temporary tools.
244 These settings allow you to use your own user and group name to do that
245 build steps.
246
247 These variables are adjustable also when invoking make:
248
249 $BUILDDIR make LUSER=myaccount LGROUP=mygroup
250
251 The only changes to your account will be the creation of a NEW .bashrc
252 after saving your original to .bashrc.XXX
253
254 Q. "When I try to build CLFS the Makefile fails at the mid-point"
255 A. There could be numerous reasons for the failure but the most likely reason
256 is you are doing a cross-build using the 'chroot' method and the target is
257 not compatible with the host. If you choose to build using the chroot
258 method a test is performed at the end of the temptools phase. If the test
259 succeeds the build continues inside a chroot jail. However if the test fails
260 it means the host and target are not compatible an you should use the
261 'boot' method to create your target code.
262 As an extreme example: You can build a sparc target on a x86 platform but
263 only the temptools phase. You must select the 'boot' method and not the
264 'chroot.' You must transfer the toolchain to a sparc platform, reboot the
265 sparc box and continue the build.
266 Of all the LFS series of books Cross-LFS requires the greatest
267 understanding of host/target hardware combination. Please read the book
268 carefully and don't skip the easy parts (there are none..)
269
270 Q. "How could I stop the build at a predefined chosen point?"
271 A. Launch the Makefile manually passing the last numbered target to be build
272 as the break point. For example:
273
274 make BREAKPOINT=84-bash
275
276 The build can be stopped also at the end of a top-level build phase by
277 calling directly the appropriate mk_* target. For example:
278
279 make mk_LUSER
280
281 See the Makefile to know the proper target names for that book build.
282
283Authors:
284 George Boudreau
285 Manuel Canales Esparcia
Note: See TracBrowser for help on using the repository browser.