LFS-BOOK-9.0.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Linux From Scratch Version 9.0 Published September 1st, 2019 Created by Gerard Beekmans Managing Editor: Bruce Dubbs Linux From Scratch: Version 9.0 : Published September 1st, 2019 by Created by Gerard Beekmans and Managing Editor: Bruce Dubbs Copyright © 1999-2019 Gerard Beekmans Copyright © 1999-2019, 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 9.0 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. Typography .................................................................................................................................................... xvii viii. Structure ...................................................................................................................................................... xviii ix. Errata ............................................................................................................................................................. xviii 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 .................................................................................................................................................... 7 1.5. Help ............................................................................................................................................................. 8 II. Preparing for the Build ........................................................................................................................................... 10 2. Preparing the Host System ................................................................................................................................ 11 2.1. Introduction ............................................................................................................................................... 11 2.2. Host System Requirements ....................................................................................................................... 11 2.3. Building LFS in Stages ............................................................................................................................ 14 2.4. Creating a New Partition .......................................................................................................................... 14 2.5. Creating a File System on the Partition ................................................................................................... 16 2.6. Setting The $LFS Variable ....................................................................................................................... 17 2.7. Mounting the New Partition ..................................................................................................................... 18 3. Packages and Patches ........................................................................................................................................ 19 3.1. Introduction ............................................................................................................................................... 19 3.2. All Packages ............................................................................................................................................. 19 3.3. Needed Patches ......................................................................................................................................... 27 4. Final Preparations .............................................................................................................................................. 28 4.1. Introduction ............................................................................................................................................... 28 4.2. Creating the $LFS/tools Directory ........................................................................................................... 28 4.3. Adding the LFS User ............................................................................................................................... 28 4.4. Setting Up the Environment ..................................................................................................................... 29 4.5. About SBUs .............................................................................................................................................. 30 4.6. About the Test Suites ............................................................................................................................... 31 5. Constructing a Temporary System .................................................................................................................... 33 5.1. Introduction ............................................................................................................................................... 33 5.2. Toolchain Technical Notes ....................................................................................................................... 33 5.3. General Compilation Instructions ............................................................................................................. 35 5.4. Binutils-2.32 - Pass 1 ............................................................................................................................... 36 5.5. GCC-9.2.0 - Pass 1 ................................................................................................................................... 38 5.6. Linux-5.2.8 API Headers .......................................................................................................................... 41 5.7. Glibc-2.30 ................................................................................................................................................. 42 iii Linux From Scratch - Version 9.0 5.8. Libstdc++ from GCC-9.2.0 ...................................................................................................................... 44 5.9. Binutils-2.32 - Pass 2 ............................................................................................................................... 46 5.10. GCC-9.2.0 - Pass 2 ................................................................................................................................. 48 5.11. Tcl-8.6.9 .................................................................................................................................................. 51 5.12. Expect-5.45.4 .......................................................................................................................................... 53 5.13. DejaGNU-1.6.2 ....................................................................................................................................... 55 5.14. M4-1.4.18 ................................................................................................................................................ 56 5.15. Ncurses-6.1 .............................................................................................................................................. 57 5.16. Bash-5.0 .................................................................................................................................................. 58 5.17. Bison-3.4.1 .............................................................................................................................................. 59 5.18. Bzip2-1.0.8 .............................................................................................................................................