LINUX from SCRATCH Linux from Scratch Version 7.8
Total Page:16
File Type:pdf, Size:1020Kb
GERARD BEEKMANS LINUX FROM SCRATCH Linux From Scratch Version 7.8 Created by Gerard Beekmans Managing Editor is Bruce Dubbs Linux From Scratch: Version 7.8 by Created by Gerard Beekmans and Managing Editor is Bruce Dubbs Copyright © 1999-2015 Gerard Beekmans Copyright © 1999-2015, Gerard Beekmans All rights reserved. This book is licensed under a Creative Commons License. Computer instructions may be extracted from the book under the MIT License. Linux® is a registered trademark of Linus Torvalds. Linux From Scratch - Version 7.8 Table of Contents Preface ......................................................................................................................................................................... viii i. Foreword ............................................................................................................................................................ viii ii. Audience ........................................................................................................................................................... viii iii. LFS Target Architectures .................................................................................................................................. ix iv. LFS and Standards ............................................................................................................................................. x v. Rationale for Packages in the Book ................................................................................................................... xi vi. Prerequisites ..................................................................................................................................................... xvi vii. Host System Requirements ............................................................................................................................ xvi viii. Typography .................................................................................................................................................... xix ix. Structure ............................................................................................................................................................ xx x. Errata ................................................................................................................................................................. xxi I. Introduction ................................................................................................................................................................. 1 1. Introduction .......................................................................................................................................................... 2 1.1. How to Build an LFS System .................................................................................................................... 2 1.2. What's new since the last release ............................................................................................................... 2 1.3. Changelog ................................................................................................................................................... 4 1.4. Resources .................................................................................................................................................... 8 1.5. Help ............................................................................................................................................................. 8 II. Preparing for the Build ........................................................................................................................................... 11 2. Preparing a New Partition ................................................................................................................................. 12 2.1. Introduction ............................................................................................................................................... 12 2.2. Creating a New Partition .......................................................................................................................... 12 2.3. Creating a File System on the Partition ................................................................................................... 13 2.4. Setting The $LFS Variable ....................................................................................................................... 14 2.5. Mounting the New Partition ..................................................................................................................... 14 3. Packages and Patches ........................................................................................................................................ 16 3.1. Introduction ............................................................................................................................................... 16 3.2. All Packages ............................................................................................................................................. 16 3.3. Needed Patches ......................................................................................................................................... 23 4. Final Preparations .............................................................................................................................................. 25 4.1. Introduction ............................................................................................................................................... 25 4.2. Creating the $LFS/tools Directory ........................................................................................................... 25 4.3. Adding the LFS User ............................................................................................................................... 25 4.4. Setting Up the Environment ..................................................................................................................... 26 4.5. About SBUs .............................................................................................................................................. 27 4.6. About the Test Suites ............................................................................................................................... 28 5. Constructing a Temporary System .................................................................................................................... 30 5.1. Introduction ............................................................................................................................................... 30 5.2. Toolchain Technical Notes ....................................................................................................................... 30 5.3. General Compilation Instructions ............................................................................................................. 32 5.4. Binutils-2.25.1 - Pass 1 ............................................................................................................................ 33 5.5. GCC-5.2.0 - Pass 1 ................................................................................................................................... 35 5.6. Linux-4.2 API Headers ............................................................................................................................. 38 5.7. Glibc-2.22 ................................................................................................................................................. 39 5.8. Libstdc++-5.2.0 ......................................................................................................................................... 42 iii Linux From Scratch - Version 7.8 5.9. Binutils-2.25.1 - Pass 2 ............................................................................................................................ 44 5.10. GCC-5.2.0 - Pass 2 ................................................................................................................................. 46 5.11. Tcl-core-8.6.4 .......................................................................................................................................... 49 5.12. Expect-5.45 ............................................................................................................................................. 51 5.13. DejaGNU-1.5.3 ....................................................................................................................................... 53 5.14. Check-0.10.0 ........................................................................................................................................... 54 5.15. Ncurses-6.0 .............................................................................................................................................. 55 5.16. Bash-4.3.30 ............................................................................................................................................. 56 5.17. Bzip2-1.0.6 .............................................................................................................................................. 57 5.18. Coreutils-8.24 .......................................................................................................................................... 58 5.19. Diffutils-3.3 ............................................................................................................................................