[e58c70fd] | 1 | $Id$
|
---|
| 2 |
|
---|
| 3 | 1. INTRODUCTION::
|
---|
| 4 |
|
---|
[2ee1d11] | 5 | This collection of scripts, known as jhalfs, strives to create
|
---|
[fcf5226] | 6 | accurate makefiles from the Linux From Scratch book series XML files.
|
---|
[2ee1d11] | 7 | This software is an evolution of the original "jhalfs-0.2" code developed
|
---|
| 8 | by Jeremy Huntwork.
|
---|
[e58c70fd] | 9 |
|
---|
| 10 | The usage of this script assumes you have read and are familiar with
|
---|
[2ee1d11] | 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
|
---|
[e58c70fd] | 16 |
|
---|
| 17 | NOTES::
|
---|
[854cde2] | 18 | *. The resulting Makefile takes considerable time to run to completion.
|
---|
| 19 | Lay in a supply of caffeine beverages.
|
---|
[e58c70fd] | 20 |
|
---|
[67e3bc3] | 21 | *. It is recommended that you temporarily unpack your linux kernel,
|
---|
[3a27393] | 22 | run <make menuconfig>, configure the kernel as per the book and save
|
---|
[854cde2] | 23 | the resulting .config file. This suggestion also applies to the
|
---|
[86e1d17] | 24 | configuration of the uClibc package when building a HLFS system using
|
---|
| 25 | uClibc rather than glibc.
|
---|
[e58c70fd] | 26 |
|
---|
[c0cf6c8] | 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 |
|
---|
[2ee1d11] | 37 | If you do not have the above skills, please don't use this tool.
|
---|
[c0cf6c8] | 38 |
|
---|
| 39 |
|
---|
| 40 | 3. INSTALLATION::
|
---|
[3b63c8c] | 41 |
|
---|
[2ee1d11] | 42 | No installation is required. System-wide installation is not allowed.
|
---|
[3b63c8c] | 43 |
|
---|
[2ee1d11] | 44 | 4. CONFIGURATION::
|
---|
[3b63c8c] | 45 |
|
---|
[2ee1d11] | 46 | ::NEWS::
|
---|
| 47 | There is a new configuration method for jhalfs.
|
---|
[fcf5226] | 48 |
|
---|
[2ee1d11] | 49 | We have installed the familiar menu based configuration tool driven by
|
---|
| 50 | GNU make. see the section RUNNING, for details
|
---|
[fcf5226] | 51 |
|
---|
[2ee1d11] | 52 | 5. RUNNING::
|
---|
[67e3bc3] | 53 |
|
---|
[2ee1d11] | 54 | ::NEWS::
|
---|
| 55 | jhalfs is now launched via GNU make instead of individual symlinks.
|
---|
[67e3bc3] | 56 |
|
---|
[2ee1d11] | 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.
|
---|
[e58c70fd] | 61 |
|
---|
[2ee1d11] | 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.
|
---|
[3b63c8c] | 64 |
|
---|
[2ee1d11] | 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.
|
---|
[3b63c8c] | 69 |
|
---|
[2ee1d11] | 70 | If you accepted the displayed settings jhalfs will proceed to create the
|
---|
| 71 | Makefile, optionally download packages.
|
---|
[3b63c8c] | 72 |
|
---|
[2ee1d11] | 73 | ::NEWS::
|
---|
| 74 | You must be logged as a normal user with sudo privileges to run
|
---|
| 75 | the Makefile.
|
---|
[3b63c8c] | 76 |
|
---|
[2ee1d11] | 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>
|
---|
[3b63c8c] | 80 |
|
---|
[2ee1d11] | 81 | 6. BLFS_TOOL SUPPORT::
|
---|
[3b63c8c] | 82 |
|
---|
[2ee1d11] | 83 | For books that support it, there is an option to install blfs-tool and its
|
---|
| 84 | dependendencies on the final system.
|
---|
[3b63c8c] | 85 |
|
---|
[2ee1d11] | 86 | After booting the new xLFS system some steps are needed to finish
|
---|
| 87 | blfs-tool installation:
|
---|
[3b63c8c] | 88 |
|
---|
[2ee1d11] | 89 | - A user account must be created. You must be logged on that user
|
---|
| 90 | account to use blfs-tool.
|
---|
[3b63c8c] | 91 |
|
---|
[2ee1d11] | 92 | - Move /blfs-root to that user's home and change ownership of the
|
---|
| 93 | directory and files to the user.
|
---|
[3b63c8c] | 94 |
|
---|
[2ee1d11] | 95 | - Give the user read and write privileges over the $TRACKING_DIR
|
---|
| 96 | directory and the files that it contains.
|
---|
[3b63c8c] | 97 |
|
---|
[2ee1d11] | 98 | - Configure sudo, adding the needed privileges for the user.
|
---|
[3b63c8c] | 99 |
|
---|
[2ee1d11] | 100 | We assume that blfs-tool will be used on a running fresh xLFS system.
|
---|
| 101 | To use it to build BLFS packages from the chroot jail is also possible,
|
---|
| 102 | but is for you to figure out how to do that.
|
---|
[e58c70fd] | 103 |
|
---|
[2ee1d11] | 104 | To know how to blfs-tool works, see README.BLFS.
|
---|
[9f46f8b] | 105 |
|
---|
[2ee1d11] | 106 | 7. LAYOUT::
|
---|
[3b63c8c] | 107 |
|
---|
[2ee1d11] | 108 | /BLFS (see README.BLFS)
|
---|
[d20c553] | 109 |
|
---|
[2ee1d11] | 110 | /CLFS/master.sh
|
---|
| 111 | /clfs.xsl
|
---|
[d20c553] | 112 |
|
---|
[2ee1d11] | 113 | /CLFS2/master.sh
|
---|
| 114 | /clfs2.xsl
|
---|
| 115 |
|
---|
| 116 | /HLFS/master.sh
|
---|
| 117 | /hlfs.xsl
|
---|
| 118 |
|
---|
| 119 | /LFS/master.sh
|
---|
| 120 | /lfs.xsl
|
---|
| 121 |
|
---|
| 122 | /common/common_functions
|
---|
[d20c553] | 123 | /makefile_functions
|
---|
| 124 | /func_check_versions.sh
|
---|
| 125 | /func_validate_configs.sh
|
---|
[2ee1d11] | 126 | /packages.xsl
|
---|
| 127 | /urls.xsl
|
---|
| 128 | /create-sbu_du-report.sh
|
---|
| 129 | /func_compare.sh
|
---|
| 130 | /progress_bar.sh
|
---|
| 131 | /blfs-tool-deps/9xx-*
|
---|
[d20c553] | 132 |
|
---|
| 133 | /contrib/jhalfs-paco.patch
|
---|
| 134 |
|
---|
[2ee1d11] | 135 | /extras/do_copy_files
|
---|
[d20c553] | 136 | /do_ica_prep
|
---|
| 137 | /do_ica_work
|
---|
| 138 | /farce
|
---|
| 139 | /filelist
|
---|
| 140 |
|
---|
[2ee1d11] | 141 | /optimize/opt_config
|
---|
| 142 | /opt_override
|
---|
| 143 | /optimize_functions
|
---|
| 144 | /opt_config.d/noOpt
|
---|
| 145 | /noSymbols
|
---|
| 146 | /O3pipe
|
---|
| 147 | /O3pipe_march
|
---|
| 148 | /defOpt_fPIC
|
---|
| 149 |
|
---|
| 150 | /menu/*
|
---|
| 151 |
|
---|
| 152 | README
|
---|
| 153 | README.BLFS
|
---|
| 154 | README.HLFS
|
---|
| 155 | README.PACO
|
---|
| 156 | TODO
|
---|
| 157 | LICENSE
|
---|
| 158 |
|
---|
| 159 | Config.in
|
---|
| 160 | Makefile
|
---|
| 161 | jhalfs
|
---|
| 162 | blfs-tool
|
---|
| 163 |
|
---|
| 164 | 8. FAQ::
|
---|
[3b63c8c] | 165 | Q. "This 'help' file is very sparse"
|
---|
| 166 | A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books
|
---|
| 167 | and wish to automate the build. 99% of any problems that arise can be
|
---|
| 168 | solved by reading the book(s).
|
---|
| 169 |
|
---|
[3a27393] | 170 | Q. "It doesn't work!"
|
---|
[2ee1d11] | 171 | A. Yes it does, try >> make
|
---|
| 172 | Remember you must have 'sudo' privileges.
|
---|
[9f46f8b] | 173 |
|
---|
[3b63c8c] | 174 | Q. "It still doesn't work"
|
---|
[2ee1d11] | 175 | A. jhalfs was designed to work against the development versions of the LFS
|
---|
[3b63c8c] | 176 | series of books. Consequently changes in a book(s) sometimes breaks older
|
---|
| 177 | versions of jhalfs. Before you start pulling out your hair download the
|
---|
| 178 | latest version of jhalfs to see if that solves your problem.
|
---|
| 179 |
|
---|
[3a27393] | 180 | Q. "How do I specify the build location?"
|
---|
[3b63c8c] | 181 | A. The original LFS document worked against the well known location /mnt/lfs.
|
---|
[65d83a6] | 182 | This script automates the build of all of the LFS series of books and uses
|
---|
[3b63c8c] | 183 | a generic location $BUILDDIR with a default value of /mnt/build_dir.
|
---|
[65d83a6] | 184 | You may change this value to suit your needs.
|
---|
[9f46f8b] | 185 |
|
---|
[65d83a6] | 186 | The layout below $BUILDDIR is as follows.
|
---|
| 187 | $BUILDDIR/
|
---|
[2ee1d11] | 188 | jhalfs (Makefile, cmd scripts, logs, etc..)
|
---|
| 189 | sources (where packages reside)
|
---|
| 190 | tools (temporary bootstrap system)
|
---|
| 191 | cross-tools (temporary CLFS only)
|
---|
| 192 | ...
|
---|
| 193 | FHS dir structure
|
---|
| 194 | ...
|
---|
| 195 | blfs_root (files to use blfs-tool if selected to install it)
|
---|
[9f46f8b] | 196 |
|
---|
[3a27393] | 197 | Q. "What is the function of the SRC_ARCHIVE variable?"
|
---|
[2ee1d11] | 198 | A. When jhalfs runs and packages download was selected, it creates a local
|
---|
| 199 | copy of the necessary packages in BUILDDIR/sources by downloading the
|
---|
| 200 | files. If the variable SRC_ARCHIVE is defined the software will first
|
---|
| 201 | look in this location for the file and, if found, will copy it to
|
---|
| 202 | BUILDDIR/sources.
|
---|
[3b63c8c] | 203 | If the files are not found in SRC_ARCHIVE _and_ you have write priv to
|
---|
[fed9756] | 204 | the directory any downloaded files will be mirrored there.
|
---|
[9f46f8b] | 205 |
|
---|
[3a27393] | 206 | Q. "How do I set the SRC_ARCHIVE location?"
|
---|
[65d83a6] | 207 | A. The best way to set the value of SRC_ARCHIVE is
|
---|
[2ee1d11] | 208 |
|
---|
[65d83a6] | 209 | export SRC_ARCHIVE=/wherever/you/store/downloaded/packages
|
---|
[2ee1d11] | 210 |
|
---|
| 211 | or you can set the full path in the proper menu entry.
|
---|
[9f46f8b] | 212 |
|
---|
[3a27393] | 213 | Q. "Why have 2 copies of the files?"
|
---|
[3b63c8c] | 214 | A. The package files must be visible during the chroot phase and this is a
|
---|
[466b5cc] | 215 | simple and reliable method of doing so. This method also handles the CLFS
|
---|
[2ee1d11] | 216 | boot build method where the final build may be done on a separate machine.
|
---|
| 217 |
|
---|
| 218 | Q. "What is the function of "User account" and "Group account" menu settings?"
|
---|
| 219 | A. If you are running jhalfs from a low or non-privileged account you may not
|
---|
| 220 | have the priv to create/delete the user needed to build temporally tools.
|
---|
| 221 | These settings allow you to use your own user and group name to do that
|
---|
| 222 | build steps.
|
---|
| 223 |
|
---|
| 224 | These variables are adjustable also when invoking make:
|
---|
| 225 |
|
---|
| 226 | $BUILDDIR make LUSER=myaccount LGROUP=mygroup
|
---|
| 227 |
|
---|
| 228 | The only changes to your account will be the creation of a NEW .bashrc
|
---|
| 229 | after saving your original to .bashrc.XXX
|
---|
| 230 |
|
---|
| 231 | Q. "When I try to build CLFS the Makefile fails at the mid-point"
|
---|
[3b63c8c] | 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
|
---|
[2ee1d11] | 240 | only the temptools phase. You must select the 'boot' method and not the
|
---|
| 241 | 'chroot.' You must transfer the toolchain to a sparc platform, reboot the
|
---|
| 242 | sparc box and continue the build.
|
---|
[3b63c8c] | 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] | 247 | Authors:
|
---|
[67e3bc3] | 248 | George Boudreau
|
---|
[fcf5226] | 249 | Manuel Canales Esparcia
|
---|