source: README@ 9b3d015

experimental
Last change on this file since 9b3d015 was c0cf6c8, checked in by George Boudreau <georgeb@…>, 18 years ago

Borrowed text from readme.blfs

  • Property mode set to 100644
File size: 9.6 KB
RevLine 
[e58c70fd]1$Id$
2
31. INTRODUCTION::
4
[86e1d17]5 This collection of scripts, known as jhalfs-X, strives to create
[fcf5226]6 accurate makefiles from the Linux From Scratch book series XML files.
[3b63c8c]7 This software is an evolution of the original "jhalfs-0.2" code.
[e58c70fd]8
9 The usage of this script assumes you have read and are familiar with
[854cde2]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
[e58c70fd]12 which, if used, will override the config file settings.
13
14 NOTES::
[854cde2]15 *. The resulting Makefile takes considerable time to run to completion.
16 Lay in a supply of caffeine beverages.
[e58c70fd]17
[67e3bc3]18 *. It is recommended that you temporarily unpack your linux kernel,
[3a27393]19 run <make menuconfig>, configure the kernel as per the book and save
[854cde2]20 the resulting .config file. This suggestion also applies to the
[86e1d17]21 configuration of the uClibc package when building a HLFS system using
22 uClibc rather than glibc.
[e58c70fd]23
[c0cf6c8]242. PREREQUISITES::
25
26 To use this tool you MUST:
27
28 - have experience building {c,h,b}LFS packages
29 - know how to edit and write shell scripts
30 - know how a Makefile works
31 - be able to trace build failures and to find what is causing it
32 (user error, package bug, {c,h,b}LFS command bug, or jhalfs code bug)
33
34 If you don't have the above skill, please don't use this tool.
35
36
373. INSTALLATION::
[1a97861]38 No installation is required. System-wide installation is not allowed
[86e1d17]39 for now.
[e58c70fd]40
[c0cf6c8]414. CONFIGURATION FILES::
[854cde2]42 Each book in the LFS series has its own set of configurable parameters
[8ca21dc]43 as well as the common parameters file.
[7b7c34a]44
45 ::NEWS:: There is new configuration method for jhalfs.
46
47 We have installed the familiar menu based configuration tool driven by
[9485eba]48 make. If you type the command
49 make
50 you will be presented with a list of configurable parameters (starting
51 with the book you wish to use). All the parameters found in the individual
52 config files are available. Once you have finished setting the parameters
53 and exit the make file will launch the chosen book version of jhalfs.
54 JHALFS will import your created file and overider the values found in normal
55 "config" files.
[7b7c34a]56 ..note.. The generated file <configuration> is only used by jhalfs if you
57 run jhalfs via make otherwise it is ignored.
58
[9485eba]59 If you want to try out the new configuration system without running jhalfs
60 issue the following.
61 make menuconfig
62 This will create a new file named configuration but will not launch jhalfs.
[7b7c34a]63
[c0cf6c8]645. RUNNING::
[854cde2]65 The script master.sh cannot be invoked directly but only via the
[b051b90]66 supplied symlinks. After editing the config file for the project you wish
[854cde2]67 to build, run the script.
[3b63c8c]68
69 IMPORTANT:
70 If you use the switch -M (automatically run the generated makefile) you
71 must be 'root' or you can run the scripts using 'sudo'
72 i.e. sudo ./lfs -G -M
73
74 If you want to run make manually you can only do so if you are 'root' or
75 via 'sudo'
76 i.e (from within the jhalfs directory) sudo make
77
[9f46f8b]78 The term <symlink> refers to the 1 of 3 package symlinks, lfs,hlfs,clfs.
[854cde2]79 Replace <symlink> with your choice of packages; i.e.: ./lfs
[fcf5226]80
[d20c553]81 ./<symlink> eg: ./lfs or ./hlfs
[67e3bc3]82 Create a makefile based on the settings found in the config files.
[854cde2]83 You must enter the build partition/jhalfs directory and manually run <make>
[fcf5226]84
[d20c553]85 ./<symlink> -G eg: ./lfs -G
[fcf5226]86 Download the packages and patches necessary to build <symlink>
[67e3bc3]87
[d20c553]88 ./<symlink> -G -M eg: ./lfs -G -M
[fcf5226]89 Download the packages, create and automatically run the Makefile
[67e3bc3]90
[d20c553]91 ./<symlink> --help eg: ./lfs --help
92 will give you a context sensitive list of command line switches.
[e58c70fd]93
[3b63c8c]94 >>>> an expanded example
95
96 export SRC_ARCHIVE=/mnt/SourceFiles
97
98 ./lfs -D /mnt/partition4 \
99 -K ~/jhalfs_configs/linux-2.6.16.19-LFS.config \
100 -F ~/jhalfs-configs/fstab-sda3 \
101 -G -T 0 -M
102
103 explanation:::
104
105 export SRC_ARCHIVE=/mnt/SourceFiles
106 # This points to a local archive of existing packages. If the version in
107 the archive is incorrect jhalfs will access the net and download the
108 necessary version and store it here for later use. DO NOT set this to
109 $BUILDDIR/sources. If you do not set this variable to a valid directory
110 ALL package tarballs will be downloaded from the 'net.
111
112 -D /mnt/partition4
113 # where everything takes place. ..NOTE it must already exist and be mounted
114
115 -K ~/jhalfs_configs/linux-2.6.16.19-LFS.config
116 # If you want to automatically build a the kernel you MUST supply a valid
117 kernel configuration file. The file you supply will be copied and renamed.
118
119 -F ~/jhalfs-configs/fstab-sda3
120 # If you have a fstab file you wish to use it will be copied and renamed
121
122 -G # Retrieve the package files. You MUST enable this flag at least once if you
123 wish to do a build or whenever you update the book.
124
125 -T 0 # don't run any testsuites
126
127 -M # automatically run make against Makefile once jhalfs finishes its work.
128
129
[c0cf6c8]1306. LAYOUT::
[e58c70fd]131
[d20c553]132 /CLFS/config
133 /master.sh
134 /xxxx.xsl
[9f46f8b]135
[3b63c8c]136 /CLFS2/config
137 /master.sh
138 /xxxx.xsl
139
[d20c553]140 /HLFS/config
141 /master.sh
142 /xxxx.xsl
143
144 /LFS/config
145 / master.sh
146 /xxxx.xsl
147
148 /common/config
149 /common_functions
150 /makefile_functions
151 /func_check_versions.sh
152 /func_validate_configs.sh
153
154 /contrib/jhalfs-paco.patch
155
156 /extras/do_copy_files
157 /do_ica_prep
158 /do_ica_work
159 /farce
160 /filelist
161
162 README
163 README.PACO
164 TODO
[9f46f8b]165
[d20c553]166 ./clfs ---|
[3b63c8c]167 ./clfs2 ---|
[9f46f8b]168 ./hlfs ---|+---> master.sh
169 ./lfs ---|
170
171
[c0cf6c8]1727. FAQ::
[3b63c8c]173 Q. "This 'help' file is very sparse"
174 A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books
175 and wish to automate the build. 99% of any problems that arise can be
176 solved by reading the book(s).
177
[3a27393]178 Q. "It doesn't work!"
[d20c553]179 A. Yes it does, try ./lfs --help
[9485eba]180 Remember you must either be 'root' to run this script or have 'sudo' privileges.
[9f46f8b]181
[3b63c8c]182 Q. "It still doesn't work"
183 A. jhalfs was designed to work against the developement versions of the LFS
184 series of books. Consequently changes in a book(s) sometimes breaks older
185 versions of jhalfs. Before you start pulling out your hair download the
186 latest version of jhalfs to see if that solves your problem.
187
[3a27393]188 Q. "How do I specify the build location?"
[3b63c8c]189 A. The original LFS document worked against the well known location /mnt/lfs.
[65d83a6]190 This script automates the build of all of the LFS series of books and uses
[3b63c8c]191 a generic location $BUILDDIR with a default value of /mnt/build_dir.
[65d83a6]192 You may change this value to suit your needs.
[9f46f8b]193
[65d83a6]194 The layout below $BUILDDIR is as follows.
195 $BUILDDIR/
196 jhalfs (makefile,cmd scripts,logs..etc)
[d20c553]197 sources (where packages reside)
[9f46f8b]198 tools (temporary bootstrap system)
[d20c553]199 cross-tools (temporary CLFS only)
[65d83a6]200 ...
201 FHS dir structure
202 ...
[9f46f8b]203
[3a27393]204 Q. "What is the function of the SRC_ARCHIVE variable?"
[fed9756]205 A. When then symlinked master.sh runs it creates a local copy of the
[3b63c8c]206 necessary packages in BUILDDIR/sources by downloading the files. If
207 the variable SRC_ARCHIVE is defined the software will first look in
[fed9756]208 this location for the file and, if found, will copy it to BUILDDIR/sources.
[3b63c8c]209 If the files are not found in SRC_ARCHIVE _and_ you have write priv to
[fed9756]210 the directory any downloaded files will be mirrored there.
[9f46f8b]211
[3a27393]212 Q. "How do I set the SRC_ARCHIVE location?"
[65d83a6]213 A. The best way to set the value of SRC_ARCHIVE is
214 export SRC_ARCHIVE=/wherever/you/store/downloaded/packages
215 OR
[3b63c8c]216 you can change the setting in common/config.
[9f46f8b]217
[3a27393]218 Q. "Why have 2 copies of the files?"
[3b63c8c]219 A. The package files must be visible during the chroot phase and this is a
[466b5cc]220 simple and reliable method of doing so. This method also handles the CLFS
221 build method where the final build may be done on a separate machine.
[fcf5226]222
[9485eba]223 Q. "What is the function of LUSER and LGROUP? There is no cmd line switch"
224 A. If you are running jhalfs from a low or non-priveledged account you may not
225 have the priv to create/delete accounts. These variables are adjustable
226 when invoking make.
227 make LUSER=myaccount LGROUP=mygroup
228 Then only changes to your account will be the creation of a NEW .bashrc after
229 saving your original to .bashrc.XXX
230
[3b63c8c]231 Q. "When I try to build 'xxx' with clfs the makefile fails at the mid-point"
232 A. There could be numerous reasons for the failure but the most likely reason
233 is you are doing a cross-build using the 'chroot' method and the target is
234 not compatible with the host. If you choose to build using the chroot
235 method a test is performed at the end of the temptools phase. If the test
236 succeeds the build continues inside a chroot jail. However if the test fails
237 it means the host and target are not compatible an you should use the
238 'boot' method to create your target code.
239 As an extreme example: You can build a sparc target on a x86 platform but
240 only the temptools phase. You must run ./clfs using the 'boot' method and
241 not the 'chroot.' You must transfer the toolchain to a sparc platform, reboot
242 the sparc box and continue the build.
243 Of all the LFS series of books Cross-LFS requires the greatest
244 understanding of host/target hardware combination. Please read the book
245 carefully and don't skip the easy parts (there are none..)
246
[fcf5226]247Authors:
[67e3bc3]248 George Boudreau
[fcf5226]249 Manuel Canales Esparcia
[67e3bc3]250 Jeremy Huntwork
Note: See TracBrowser for help on using the repository browser.