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 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 | 2. PREREQUISITES::
|
---|
28 |
|
---|
29 | To use this tool you MUST:
|
---|
30 |
|
---|
31 | - have experience building {c,h,b}LFS packages
|
---|
32 | - know how to edit and write shell scripts
|
---|
33 | - know how a Makefile works
|
---|
34 | - be able to trace build failures and to find what is causing it
|
---|
35 | (user error, package bug, {c,h,b}LFS command bug, or jhalfs code bug)
|
---|
36 |
|
---|
37 | If you do not have the above skills, please don't use this tool.
|
---|
38 |
|
---|
39 |
|
---|
40 | 3. INSTALLATION::
|
---|
41 |
|
---|
42 | No installation is required. System-wide installation is not allowed.
|
---|
43 |
|
---|
44 | 4. CONFIGURATION::
|
---|
45 |
|
---|
46 | ::NEWS::
|
---|
47 | There is a new configuration method for jhalfs.
|
---|
48 |
|
---|
49 | We have installed the familiar menu based configuration tool driven by
|
---|
50 | GNU make. see the section RUNNING, for details
|
---|
51 |
|
---|
52 | 5. RUNNING::
|
---|
53 |
|
---|
54 | ::NEWS::
|
---|
55 | jhalfs is now launched via GNU make instead of individual symlinks.
|
---|
56 |
|
---|
57 | The command <make> will launch a menu based configuration program. You will
|
---|
58 | recognize the layout from building the kernel or uClibc/BusyBox. The
|
---|
59 | underlying menu code was borrowed from BusyBox and slightly modified for
|
---|
60 | our use.
|
---|
61 |
|
---|
62 | Help on parameter function is available from the online help. Please
|
---|
63 | make use of that feature for additional information not in this file.
|
---|
64 |
|
---|
65 | Once you have set the parameters you wish and have saved your work the
|
---|
66 | jhalfs script is launch. The script verify first that the host can run
|
---|
67 | it and build the xLFS system, then validate the configuration and present
|
---|
68 | you with your selections which you may accept or reject.
|
---|
69 |
|
---|
70 | If you accepted the displayed settings jhalfs will proceed to create the
|
---|
71 | Makefile, optionally download packages.
|
---|
72 |
|
---|
73 | ::NEWS::
|
---|
74 | You must be logged as a normal user with sudo privileges to run
|
---|
75 | the Makefile.
|
---|
76 |
|
---|
77 | NOTE::
|
---|
78 | If you run the jhalfs script directly the only function you can select
|
---|
79 | is to display the version number running <./jhalfs -v>
|
---|
80 |
|
---|
81 | 6. BLFS_TOOL SUPPORT::
|
---|
82 |
|
---|
83 | For books that support it, there is an option to install blfs-tool and its
|
---|
84 | dependendencies on the final system. The pre-made build dependencies
|
---|
85 | scripts has been written thinking on a LFS build. For CLFS and HLFS
|
---|
86 | builds you may need to adjust that scripts, that are found into the
|
---|
87 | common/blfs-tool-deps directory in the jhalfs sources tree.
|
---|
88 |
|
---|
89 | After booting the new xLFS system some steps are needed to finish
|
---|
90 | blfs-tool installation:
|
---|
91 |
|
---|
92 | - A user account must be created. You must be logged on that user
|
---|
93 | account to use blfs-tool.
|
---|
94 |
|
---|
95 | - Move /blfs-root to that user's home and change ownership of the
|
---|
96 | directory and files to the user.
|
---|
97 |
|
---|
98 | - Give the user read and write privileges over the $TRACKING_DIR
|
---|
99 | directory and the files that it contains.
|
---|
100 |
|
---|
101 | - Configure sudo, adding the needed privileges for the user.
|
---|
102 |
|
---|
103 | We assume that blfs-tool will be used on a running fresh xLFS system.
|
---|
104 | To use it to build BLFS packages from the chroot jail is also possible,
|
---|
105 | but is for you to figure out how to do that.
|
---|
106 |
|
---|
107 | To know how to blfs-tool works, see README.BLFS.
|
---|
108 |
|
---|
109 | 7. LAYOUT::
|
---|
110 |
|
---|
111 | /BLFS (see README.BLFS)
|
---|
112 |
|
---|
113 | /CLFS/master.sh
|
---|
114 | /clfs.xsl
|
---|
115 |
|
---|
116 | /CLFS2/master.sh
|
---|
117 | /clfs2.xsl
|
---|
118 |
|
---|
119 | /CLFS3/master.sh
|
---|
120 | /clfs3.xsl
|
---|
121 |
|
---|
122 | /HLFS/master.sh
|
---|
123 | /hlfs.xsl
|
---|
124 |
|
---|
125 | /LFS/master.sh
|
---|
126 | /lfs.xsl
|
---|
127 |
|
---|
128 | /common/common_functions
|
---|
129 | /makefile_functions
|
---|
130 | /packages.xsl
|
---|
131 | /urls.xsl
|
---|
132 | /create-sbu_du-report.sh
|
---|
133 | /progress_bar.sh
|
---|
134 | /blfs-tool-deps/9xx-*
|
---|
135 | /libs/func_*
|
---|
136 |
|
---|
137 | /contrib/jhalfs-paco.patch
|
---|
138 |
|
---|
139 | /extras/do_copy_files
|
---|
140 | /do_ica_prep
|
---|
141 | /do_ica_work
|
---|
142 | /farce
|
---|
143 | /filelist
|
---|
144 |
|
---|
145 | /optimize/opt_config
|
---|
146 | /opt_override
|
---|
147 | /optimize_functions
|
---|
148 | /opt_config.d/noOpt
|
---|
149 | /noSymbols
|
---|
150 | /O3pipe
|
---|
151 | /O3pipe_march
|
---|
152 | /defOpt_fPIC
|
---|
153 |
|
---|
154 | /menu/*
|
---|
155 |
|
---|
156 | README
|
---|
157 | README.BLFS
|
---|
158 | README.HLFS
|
---|
159 | README.PACO
|
---|
160 | TODO
|
---|
161 | LICENSE
|
---|
162 |
|
---|
163 | Config.in
|
---|
164 | Makefile
|
---|
165 | jhalfs
|
---|
166 | blfs-tool
|
---|
167 |
|
---|
168 | 8. FAQ::
|
---|
169 | Q. "This 'help' file is very sparse"
|
---|
170 | A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books
|
---|
171 | and wish to automate the build. 99% of any problems that arise can be
|
---|
172 | solved by reading the book(s).
|
---|
173 |
|
---|
174 | Q. "It doesn't work!"
|
---|
175 | A. Yes it does, try >> make
|
---|
176 | Remember you must have 'sudo' privileges.
|
---|
177 |
|
---|
178 | Q. "It still doesn't work"
|
---|
179 | A. jhalfs was designed to work against the development versions of the LFS
|
---|
180 | series of books. Consequently changes in a book(s) sometimes breaks older
|
---|
181 | versions of jhalfs. Before you start pulling out your hair download the
|
---|
182 | latest version of jhalfs to see if that solves your problem.
|
---|
183 |
|
---|
184 | Q. "How do I specify the build location?"
|
---|
185 | A. The original LFS document worked against the well known location /mnt/lfs.
|
---|
186 | This script automates the build of all of the LFS series of books and uses
|
---|
187 | a generic location $BUILDDIR with a default value of /mnt/build_dir.
|
---|
188 | You may change this value to suit your needs.
|
---|
189 |
|
---|
190 | The layout below $BUILDDIR is as follows.
|
---|
191 | $BUILDDIR/
|
---|
192 | jhalfs (Makefile, cmd scripts, logs, etc..)
|
---|
193 | sources (where packages reside)
|
---|
194 | tools (temporary bootstrap system)
|
---|
195 | cross-tools (temporary CLFS only)
|
---|
196 | ...
|
---|
197 | FHS dir structure
|
---|
198 | ...
|
---|
199 | blfs_root (files to use blfs-tool if selected to install it)
|
---|
200 |
|
---|
201 | Q. "What is the function of the SRC_ARCHIVE variable?"
|
---|
202 | A. When jhalfs runs and packages download was selected, it creates a local
|
---|
203 | copy of the necessary packages in BUILDDIR/sources by downloading the
|
---|
204 | files. If the variable SRC_ARCHIVE is defined the software will first
|
---|
205 | look in this location for the file and, if found, will copy it to
|
---|
206 | BUILDDIR/sources.
|
---|
207 | If the files are not found in SRC_ARCHIVE _and_ you have write priv to
|
---|
208 | the directory any downloaded files will be mirrored there.
|
---|
209 |
|
---|
210 | Q. "How do I set the SRC_ARCHIVE location?"
|
---|
211 | A. The best way to set the value of SRC_ARCHIVE is
|
---|
212 |
|
---|
213 | export SRC_ARCHIVE=/wherever/you/store/downloaded/packages
|
---|
214 |
|
---|
215 | or you can set the full path in the proper menu entry.
|
---|
216 |
|
---|
217 | Q. "Why have 2 copies of the files?"
|
---|
218 | A. The package files must be visible during the chroot phase and this is a
|
---|
219 | simple and reliable method of doing so. This method also handles the CLFS
|
---|
220 | boot build method where the final build may be done on a separate machine.
|
---|
221 |
|
---|
222 | Q. "What is the function of "User account" and "Group account" menu settings?"
|
---|
223 | A. If you are running jhalfs from a low or non-privileged account you may not
|
---|
224 | have the priv to create/delete the user needed to build temporally tools.
|
---|
225 | These settings allow you to use your own user and group name to do that
|
---|
226 | build steps.
|
---|
227 |
|
---|
228 | These variables are adjustable also when invoking make:
|
---|
229 |
|
---|
230 | $BUILDDIR make LUSER=myaccount LGROUP=mygroup
|
---|
231 |
|
---|
232 | The only changes to your account will be the creation of a NEW .bashrc
|
---|
233 | after saving your original to .bashrc.XXX
|
---|
234 |
|
---|
235 | Q. "When I try to build CLFS the Makefile fails at the mid-point"
|
---|
236 | A. There could be numerous reasons for the failure but the most likely reason
|
---|
237 | is you are doing a cross-build using the 'chroot' method and the target is
|
---|
238 | not compatible with the host. If you choose to build using the chroot
|
---|
239 | method a test is performed at the end of the temptools phase. If the test
|
---|
240 | succeeds the build continues inside a chroot jail. However if the test fails
|
---|
241 | it means the host and target are not compatible an you should use the
|
---|
242 | 'boot' method to create your target code.
|
---|
243 | As an extreme example: You can build a sparc target on a x86 platform but
|
---|
244 | only the temptools phase. You must select the 'boot' method and not the
|
---|
245 | 'chroot.' You must transfer the toolchain to a sparc platform, reboot the
|
---|
246 | sparc box and continue the build.
|
---|
247 | Of all the LFS series of books Cross-LFS requires the greatest
|
---|
248 | understanding of host/target hardware combination. Please read the book
|
---|
249 | carefully and don't skip the easy parts (there are none..)
|
---|
250 |
|
---|
251 | Authors:
|
---|
252 | George Boudreau
|
---|
253 | Manuel Canales Esparcia
|
---|