Version 11.0-Systemd Published September 1St, 2021
Total Page:16
File Type:pdf, Size:1020Kb
Linux From Scratch Version 11.0-systemd Published September 1st, 2021 Created by Gerard Beekmans Managing Editor: Bruce Dubbs Editor: Douglas R. Reno Editor: DJ Lucas Linux From Scratch: Version 11.0-systemd: Published September 1st, 2021 by Created by Gerard Beekmans, Managing Editor: Bruce Dubbs, Editor: Douglas R. Reno, and Editor: DJ Lucas Copyright © 1999-2021 Gerard Beekmans Copyright © 1999-2021, 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 11.0-systemd Table of Contents Preface ......................................................................................................................................................................... viii i. Foreword ............................................................................................................................................................ viii ii. Audience ........................................................................................................................................................... viii iii. LFS Target Architectures .................................................................................................................................. ix iv. Prerequisites ........................................................................................................................................................ x v. LFS and Standards .............................................................................................................................................. x vi. Rationale for Packages in the Book ................................................................................................................. xi vii. Typography .................................................................................................................................................... xvii viii. Structure ...................................................................................................................................................... xviii ix. Errata and Security Advisories ..................................................................................................................... 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 .................................................................................................................................................... 9 1.5. Help ........................................................................................................................................................... 10 II. Preparing for the Build ........................................................................................................................................... 12 2. Preparing the Host System ................................................................................................................................ 13 2.1. Introduction ............................................................................................................................................... 13 2.2. Host System Requirements ....................................................................................................................... 13 2.3. Building LFS in Stages ............................................................................................................................ 15 2.4. Creating a New Partition .......................................................................................................................... 16 2.5. Creating a File System on the Partition ................................................................................................... 18 2.6. Setting The $LFS Variable ....................................................................................................................... 18 2.7. Mounting the New Partition ..................................................................................................................... 19 3. Packages and Patches ........................................................................................................................................ 21 3.1. Introduction ............................................................................................................................................... 21 3.2. All Packages ............................................................................................................................................. 21 3.3. Needed Patches ......................................................................................................................................... 30 4. Final Preparations .............................................................................................................................................. 31 4.1. Introduction ............................................................................................................................................... 31 4.2. Creating a limited directory layout in LFS filesystem ............................................................................. 31 4.3. Adding the LFS User ............................................................................................................................... 31 4.4. Setting Up the Environment ..................................................................................................................... 32 4.5. About SBUs .............................................................................................................................................. 34 4.6. About the Test Suites ............................................................................................................................... 35 III. Building the LFS Cross Toolchain and Temporary Tools .................................................................................... 36 Important Preliminary Material ....................................................................................................................... xxxvii i. Introduction ............................................................................................................................................. xxxvii ii. Toolchain Technical Notes ................................................................................................................... xxxvii iii. General Compilation Instructions .............................................................................................................. xli 5. Compiling a Cross-Toolchain ............................................................................................................................ 43 5.1. Introduction ............................................................................................................................................... 43 5.2. Binutils-2.37 - Pass 1 ............................................................................................................................... 44 iii Linux From Scratch - Version 11.0-systemd 5.3. GCC-11.2.0 - Pass 1 ................................................................................................................................. 46 5.4. Linux-5.13.12 API Headers ...................................................................................................................... 49 5.5. Glibc-2.34 ................................................................................................................................................. 50 5.6. Libstdc++ from GCC-11.2.0, Pass 1 ........................................................................................................ 53 6. Cross Compiling Temporary Tools ................................................................................................................... 54 6.1. Introduction ............................................................................................................................................... 54 6.2. M4-1.4.19 .................................................................................................................................................. 55 6.3. Ncurses-6.2 ................................................................................................................................................ 56 6.4. Bash-5.1.8 ................................................................................................................................................. 58 6.5. Coreutils-8.32 ...........................................................................................................................................