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