source: README@ d3ce173

2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since d3ce173 was a705708, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Merged menuconfig code from experimental.
Added clfs2 symlink (required by menuconfig)

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