Changeset 1874
- Timestamp:
- 05/06/07 20:15:12 (20 months ago)
- Location:
- trunk
- Files:
-
- 7 modified
-
Makefile (modified) (5 diffs)
-
README (modified) (6 diffs)
-
doc/README (modified) (12 diffs)
-
etc/bashrc (modified) (1 diff)
-
etc/issue (modified) (2 diffs)
-
packages/glibc/Makefile (modified) (1 diff)
-
scripts/ll (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r1872 r1874 22 22 -include Makefile.personal 23 23 24 # MP: mount point 25 # timezone: default timezone 26 # pagesize: default paper size for groff. 27 # ROOT: name of this directory, as seen from chroot 24 #============================================================================== 25 26 # Here are the various variables you might want/need to change. You can change 27 # them here or in Makefile.personal. Variables mentioned in the README will not 28 # be commented on here. 29 30 export MPBASE ?= /mnt/lfs 31 32 # Free disk space needed for the build. 33 ROOTFS_MEGS := 1536 34 35 export VERSION ?= x86-6.3-pre2 36 export CFLAGS ?= -O2 -pipe -s -fno-strict-aliasing -mtune=i686 37 export CXXFLAGS ?= $(CFLAGS) 38 export LFS_TARGET ?= i486-pc-linux-gnu 39 40 41 # Default timezone 42 export timezone ?= GMT 43 # Default paper size for groff. 44 export pagesize ?= letter 45 28 46 # HTTP: Default http server for the lfs-base packages 29 47 # HTTPBLFS: Default http server for the BLFS packages 30 31 export MPBASE ?= /mnt/lfs32 export MP ?= $(MPBASE)/image33 export timezone ?= GMT34 export pagesize ?= letter35 export ROOT ?= /lfs-livecd36 48 export HTTP ?= http://ftp.lfs-matrix.net/pub/lfs/conglomeration 37 49 export HTTPBLFS ?= http://ftp.lfs-matrix.net/pub/blfs/conglomeration 38 50 39 # Directory variables40 # ==============================================================================41 export HOSTNAME := lfslivecd 51 #============================================================================== 52 # The following variables are not expected to be changed 53 42 54 export WD := /tools 55 export MP := $(MPBASE)/image 56 export ROOT := /lfs-livecd 43 57 export SRC := /sources 44 58 export LFSSRC := /lfs-sources 45 59 export PKG := packages 60 46 61 export MKTREE := $(MP)$(ROOT) 47 62 export CONFIG_SITE := $(ROOT)/scripts/config.site 48 49 ROOTFS_MEGS := 153650 51 export VERSION := x86-6.3-pre252 export CFLAGS := -O2 -pipe -s -fno-strict-aliasing -mtune=i68653 export LINKER := ld-linux.so.254 export LFS_TARGET := i486-pc-linux-gnu55 63 56 64 # Environment Variables … … 69 77 # More Environment Variables 70 78 #============================================================================== 71 export CXXFLAGS := $(CFLAGS)72 73 79 export chbash-pre-bash := SHELL=$(WD)/bin/bash 74 80 export chbash-post-bash := SHELL=/bin/bash … … 91 97 92 98 all: test-host lfs-base extend-lfs iso 93 @echo "The LiveCD, $(MPBASE)$(ROOT)/lfslivecd-$(VERSION).iso, is ready!"94 95 minimal: test-host lfs-base extend-minimal iso96 99 @echo "The LiveCD, $(MPBASE)$(ROOT)/lfslivecd-$(VERSION).iso, is ready!" 97 100 … … 186 189 @install -m644 etc/issue $(MP)/etc/issue 187 190 188 extend-minimal: $(MKTREE)189 @cp $(WD)/bin/which $(MP)/usr/bin190 @cp $(ROOT)/scripts/unpack $(MP)/bin191 @chroot "$(MP)" $(chenv-blfs) 'set +h && cd $(ROOT) && \192 make blfs-minimal $(chbash-post-bash)'193 @rm -rf $(LFSSRC) $(MP)$(LFSSRC)194 @sed '/sources/d' etc/issue >$(MP)/etc/issue195 @chmod 644 $(MP)/etc/issue196 197 191 lfsuser: 198 192 @-groupadd lfs … … 391 385 @sed -i "s/\[version\]/$(VERSION)/" $(MP)/root/README 392 386 @install -m600 root/.bashrc $(MP)/root/.bashrc 393 @install -m755 scripts/{net-setup,greeting,livecd-login,ll} $(MP)/usr/bin/ 394 @sed 's|_LINKER_|$(LINKER)|' scripts/shutdown-helper > $(MP)/usr/bin/shutdown-helper 395 @chmod 755 $(MP)/usr/bin/shutdown-helper 396 @cp -ra root $(MP)/etc/skel 387 @install -m755 scripts/{net-setup,greeting,ll} $(MP)/usr/bin/ 388 @install -m755 scripts/{livecd-login,shutdown-helper} $(MP)/usr/bin/ 389 @svn export --force root $(MP)/etc/skel 397 390 398 391 iso: prepiso -
trunk/README
r1816 r1874 3 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 4 5 I. Introduction 6 II. Using the Makefiles 7 A. How These Makefiles Work 8 B. Configuring the Environment 9 C. Obtaining the Sources 10 D. Running the Scripts 11 III. Editing the Makefiles 12 IV. End Notes 5 I. Using the Makefiles 6 A. How These Makefiles Work 7 B. Configuring the Environment 8 C. Obtaining the Sources 9 D. Running the Scripts 10 II. Editing the Makefiles 11 III. End Notes 13 12 14 13 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15 14 16 I. Introduction17 18 There have been many LiveCDs (aka BootCDs) made and used within the LFS19 community. Of particular note were Chris Lingard's and Jeremy Utley's. By some20 random freak of chance, and perhaps a bit of persistence on my part, a CD of21 mine was chosen to be used as the 'Official' LFS CD with the release of22 LFS 6.0.23 24 I based much of my work on the ideas and work of Chris and Jeremy, and from25 suggestions and comments from various LFS users, but the originalCD had still26 been largely my work. However, for the idea of an official CD to survive and27 grow within the community, help and ideas need to continue to come from more28 than just one source.29 30 My intention with the LFS LiveCD project, then, was to devise a framework, a31 usable setting in which others may contribute and build CDs that live up to the32 official standard. Originally, the idea was just to keep config files and a33 list of required packages in a Subversion repository. What actually happened34 was that a fully automated scripting system was devised specifically for the35 purpose of building the LiveCD iso. This allows both an easily repeatable way36 of building the CD and a means to track its configuration and history.37 38 Many thanks to all who have contributed to the production of these Makefiles39 (and the CDs they in turn produce) by either suggestions, ideas, support, or40 submitted edits.41 42 - Jeremy Huntwork43 15 44 16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 17 46 I I. Using the Makefiles18 I. Using the Makefiles 47 19 48 20 A. How These Makefiles Work … … 53 25 that are used throughout the build. Inside the packages directory there is 54 26 a sub-directory for each package the LiveCD will build and install. Each of 55 those directories contains a Makefile specific for that package, with the 56 specific instructions it needs in order to compile. Any patches which that 57 package needs (and which are not part of the LFS or BLFS books) are included 58 in that directory as well. 27 those directories contains a Makefile with the specific instructions it needs to 28 compile that package. Any patches which that package needs (and which are not 29 part of the LFS or BLFS books) are included in that directory as well. 59 30 60 31 Part of the build is run as an unprivileged user, 'lfs', and the rest is … … 68 39 69 40 In the correct order, and in the proper environment, each package's Makefile 70 is called and run. These download the source files it needs, verifies that71 they are correct via sha1sum, unpacks the tarballs into its own directory, 72 runs the build instructions and sendsthe output into a log-file.41 is called and run. These download the source files needed, verify the SHA1 sums, 42 unpack the tarball(s) into its own directory, run the build instructions, and 43 send the output into a log-file. 73 44 74 45 B. Configuring the Environment … … 77 48 as this README before attempting to run the scripts. There are a few variables 78 49 that you may want to customize to meet the needs of your own particular setup 79 and for the type of CD you are hoping to produce. Here 's a list of the main50 and for the type of CD you are hoping to produce. Here is a list of the main 80 51 variables to look for: 81 52 … … 86 57 follow a specific versioning scheme. 87 58 88 * KVERS 89 This is the version of the Linux kernel to include on the CD 90 91 * MP 59 * MPBASE 92 60 This is the Mount Point, the directory that you will be using to house the 93 61 build as it runs. These scripts (this entire directory and its sub-directories) 94 should be placed inside the MPdirectory and run from there. Default is62 should be placed inside the $MPBASE directory and run from there. Default is 95 63 /mnt/lfs. 96 64 97 65 * ROOT 98 This signifies the root-point of the build scripts. In other words, this 99 is the name of the actual directory containing the build scripts. Default is 100 /lfs-livecd. If you accept the defaults for both this variable and MP, then 101 this directory and all its sub-directories should exist as 'lfs-livecd' within 102 the direcotry '/mnt/lfs'. It is important that this variable have a leading 103 '/' as it is referenced by the scripts in both the host environment and the 104 chroot environment. 66 This signifies the root-point of the build scripts. In other words, this is 67 the name of the directory containing the build scripts. A symlink will be made 68 from this directory to the root of the host filesystem. The default name of this 69 directory is lfs-livecd. If you accept the defaults for both this variable and 70 $MPBASE, then this directory will exist as /mnt/lfs/lfs-livecd. A symlink will 71 be made to /lfs-livecd on the host system. It is important that this variable 72 have a leading '/' as it is referenced by the scripts in both the host 73 environment and the chroot environment. 105 74 106 * PM 107 This is the level of parallel building you want make to use for each 108 package. Default is -j3, but you may wish to increase or decrease it slightly 109 as the case may be. 110 111 Any of the other variables could be changed, but that isn't recommended. Some 112 of them are crucial to the successful building of the CD, especially the ones 113 containing environment variables. 75 All of the above variables (and others) can be edited directly in the 76 top-level Makefile (the one in the same directory as this README). However, if 77 you are tracking SVN, then each 'svn up' will overwrite your custom changes. To 78 overcome that, you can create a file called 'Makefile.personal' and add the 79 desired changes there. The original Makefile will source that file. 'svn up' 80 will not affect 'Makefile.personal'. 114 81 115 82 C. Obtaining the Sources 116 83 117 The scripts will attempt to download the sources as it needs them. Since it 118 is highly unlikely that you will have all the correct sources already 119 downloaded to your system, a working internet connection is almost a 120 necessity when using these scripts. 121 122 If you want to gather the source packages you'll need beforehand, you will 123 need to create a directory called 'sources' in the $(MP) directory and place 124 your packages there. You should either ensure that you download the *exact* 125 same package from the same URL the scripts use, or you should verify that 126 the SHA1 sum in that package's Makefile matches the tarball you have 127 downloaded. 84 The scripts will attempt to download the sources and book patches as it needs 85 them. If you want to gather the sources and book patches beforehand, create a 86 directory called 'sources' in the $(MPBASE) directory and place the sources and 87 book patches there. You should ensure that you download the *exact* same sources 88 and book patches the scripts use and then verify the SHA1 sums. This will 89 prevent the build from failing unexpectedly on a bad checksum during the build. 128 90 129 91 D. Running the Scripts … … 139 101 make 140 102 141 The above example makes use of the default variables for $(MP) and $(ROOT). 103 The above example makes use of the default variables for $(MPBASE) and 104 $(ROOT). 142 105 143 106 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144 107 145 II I. Editing the Makefiles108 II. Editing the Makefiles 146 109 147 110 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 111 149 I V. End Notes112 III. End Notes -
trunk/doc/README
r1870 r1874 82 82 The LiveCD attempts to configure X for your video card automatically. The 83 83 process may fail if you have more than one video card, if your video card 84 does n't support 24-bit color depth, or if your monitor is not Plug-n-Play85 compatible (in other words, does n't tell its characteristics to Xorg via DDC).84 does not support 24-bit color depth, or if your monitor is not Plug-n-Play 85 compatible (in other words, does not tell its characteristics to Xorg via DDC). 86 86 In such cases, you have to edit the /etc/X11/xorg.conf file manually, using 87 87 vim, joe or nano. … … 118 118 # report max dot clock = 0 MHz 119 119 HorizSync 30-92 # because gtf said "hsync: 91.38 kHz" 120 VertRefresh 56-86 # because a 85 Hz mode has been requested120 VertRefresh 56-86 # because an 85 Hz mode has been requested 121 121 # the Modeline may also be pasted here 122 122 EndSection … … 155 155 * /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key 156 156 Create those files as described in the ssh-keygen(1) manual page. If you 157 do n't do that, random host keys will be generated for you automatically158 during the boot process. This is less secure, because you can 't verify157 do not do that, random host keys will be generated for you automatically 158 during the boot process. This is less secure, because you cannot verify 159 159 them. 160 160 … … 194 194 195 195 While this CD configures the LANG environment variable, console font and 196 keymap for you, it 's your responsibility to configure other locale-dependent196 keymap for you, it is your responsibility to configure other locale-dependent 197 197 parameters manually. You may want to configure character sets for SAMBA in 198 198 /etc/samba/smb.conf, and to explicitly specify the "iocharset" and "codepage" … … 220 220 =========================== 221 221 The LiveCD includes the "brltty" program that allows a blind person to read 222 the contents of Linux text console on a Braille display. In order to222 the contents of the Linux text console on a Braille display. In order to 223 223 activate it: 224 224 225 * Insert the CD into the drive, reboot the computer. The BIOS will produce 226 a beep, indicating successful power-on self-testing. Then it will load 227 the boot loader from the CD, and the boot loader will produce a second beep. 228 * After the second beep, type: 225 * Insert the CD into the drive, reboot the computer. Some BIOSes will produce 226 a beep indicating successful power-on self-testing. If so, the boot loader 227 will produce a second beep indicating the boot prompt is available. 228 * After that beep (first or second depending on if your computer normally beeps 229 * upon startup), type: 229 230 230 231 linux brltty=eu,ttyS0 … … 236 237 Note: in some locales, brltty displays incorrect Braille patterns. This is 237 238 related to the fact that Braille tables in brltty are indexed with 238 encoding-dependent byte representing the character. Such representation239 encoding-dependent bytes representing the character. Such representation 239 240 becomes invalid when another encoding for the same language is used. 240 E.g., that 's why the "ru" table (designed for KOI8-R encoding) produces241 E.g., that is why the "ru" table (designed for KOI8-R encoding) produces 241 242 wrong result in the ru_RU.CP1251 locale. 242 243 243 244 Known non-working cases: 244 245 All CP1251-based locales (no CP1251 Braille table in brltty) 245 zh_TW (configuration instructions available in Chinese only) 246 zh_TW (configuration instructions available in Chinese only). If you use 247 this locale, please email livecd@linuxfromscratch.org and help us add 248 support for it. 246 249 All other Chinese, Japanese and Korean locales (no support in brltty) 247 250 248 If brltty displays incorrect Braille patterns displays incorrect Braille249 patterns in your locale, please revert to the en_US locale, thus avoiding 250 t he use of non-ASCII characters. If you know how to fix this problem251 for your locale, mail this information tolivecd@linuxfromscratch.org.251 If brltty displays incorrect Braille patterns in your locale, please revert to 252 the en_US locale, thus avoiding the use of non-ASCII characters. If you know how 253 to fix this problem for your locale, mail this information to 254 livecd@linuxfromscratch.org. 252 255 253 256 RESUMING THE BUILD … … 259 262 260 263 Instructions from there should work on this CD, however, there is a simpler 261 (but highly experimental) methoddescribed below.264 method (hibernation) described below. 262 265 263 266 1) Make sure you have (or are planning to create) a swap partition not used … … 269 272 linux LANG=ru_RU.UTF-8 TZ=Asia/Yekaterinburg resume=/dev/hda2 270 273 271 3) In chapter 2, the book tells you to create (if you didn't do it already), 272 format that partition with mkswap, and activate it with swapon. Follow the 273 instructions in the book. 274 275 4) If you use X window system, take the following into account: 274 On some systems, hibernation refuses to work if ACPI is enabled. You 275 can disable ACPI by adding "acpi=off" to the kernel arguments. 276 277 Alternatively, once the system is running, you can activate hibernation by 278 echoing the major and minor numbers of the partition to /sys/power/resume as 279 such: 280 281 # ls -l /dev/hda2 282 brw-rw---- 1 root disk 3, 2 2006-07-10 17:51 /dev/hda2 283 # echo 3:2 >/sys/power/resume 284 285 3) At this point, the system is up and running. If you do not already have a 286 swap partition, or wish to create a new one, chapter 2 of the LFS book will 287 show you how to create, format, and activate one. 288 289 4) If you use the X window system, take the following into account: 276 290 * Users of old S3 video cards should uncomment the "EnableVbetool" line 277 291 in the /etc/hibernate/common.conf file. … … 285 299 286 300 NOTE: you must unmount all USB flash drives and all partitions used by other 287 operating systems installed on your computer before hibernating! Do n't301 operating systems installed on your computer before hibernating! Do not 288 302 attempt to mount partitions used by a hibernated system from other systems 289 303 (even read-only, because there is no true read-only mount on journaled … … 297 311 298 312 9) The computer will load its state from the swap partition and behave as if 299 you did n't power it off at all (except breaking all network connections).313 you did not power it off at all (except breaking all network connections). 300 314 The build will automatically continue. 301 315 302 The procedure is a bit more complicated if your swap is on a LVM volume316 The procedure is a bit more complicated if your swap is on an LVM volume 303 317 or on software RAID. In this case, instead of passing the resume=... argument, 304 318 you should boot the CD as usual and make actions needed for the kernel to see 305 the swap device (for LVM, that 's "vgchange -ay"). After doing that, note319 the swap device (for LVM, that is "vgchange -ay"). After doing that, note 306 320 the major and minor device number for that device (assigning persistent numbers 307 321 is highly recommended), and echo them to /sys/power/resume. E.g., for LVM: … … 320 334 =========================== 321 335 This CD comes with the "jhalfs" tool that allows extracting commands from the 322 XML version of LFS or CLFS book into Makefiles and shell scripts. You can find323 the jhalfs installation in the home directory of the "jhalfs" user, and the324 XML LFS book is in /usr/share/LFS-BOOK-SVN-XML. In order to use jhalfs, you 325 haveto:336 XML version of the LFS or CLFS book into Makefiles and shell scripts. You can 337 find the jhalfs installation in the home directory of the "jhalfs" user, and the 338 XML LFS book is in /usr/share/LFS-BOOK-SVN-XML. In order to use jhalfs, you have 339 to: 326 340 327 341 * create a directory for your future LFS system and mount a partition there … … 330 344 * as user "jhalfs", follow the instructions in the jhalfs README file 331 345 332 Note that this user already has the required sudo access. 346 Note that this user already has the required root access (via sudo) to complete 347 the build. 333 348 334 349 THANKS -
trunk/etc/bashrc
r1277 r1874 1 1 alias ls='ls --color=auto' 2 alias ll='ls -l' 2 3 eval $(dircolors -b /etc/dircolors) 3 4 -
trunk/etc/issue
r1773 r1874 1 1 [H[J 2 2 This is the [0;1mOfficial Linux From Scratch LiveCD[00m 3 Created by: 4 [1;32mJeremy Huntwork[00m, [0;33mProject Leader[00m 5 [1;32mAlexander Patrakov[00m, [0;33mMaintainer, i18n[00m 6 [1;32mJustin Knierim[00m, [0;33mMaintainer[00m 7 [1;32mThomas Pegg[00m, [0;33mMaintainer[00m 3 4 Created by: [1;32mJeremy Huntwork[00m 5 Maintained by: [1;32mAlexander Patrakov[00m 8 6 [0;1m 9 7 Version: … … 18 16 [1;32mlivecd@linuxfromscratch.org[00m 19 17 20 Type [ 0;31mgreeting[00m at any time to view this message again.18 Type [1;31mgreeting[00m at any time to view this message again. 21 19 -
trunk/packages/glibc/Makefile
r1833 r1874 51 51 cd ../$(DIR) ; unpack ../$(FILE2) ; mv glibc-libidn-$(VRS) libidn 52 52 sed -i \ 53 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ $(LINKER)-o|' \53 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \ 54 54 ../$(DIR)/scripts/test-installation.pl 55 55 # LiveCD specific locale additions -
trunk/scripts/ll
r349 r1874 1 #!/bin/bash2 /bin/ls --color=always --almost-all --format=long --time-style=+"%Y.%m.%d %T" --block-size=1K $@ | grep -e^d3 /bin/ls --color=always --almost-all --format=long --time-style=+"%Y.%m.%d %T" --block-size=1K $@ | grep -e^[-lbc]
