- Shell 83.6%
- Python 13.1%
- Makefile 3.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bootstrap | ||
| dev | ||
| editor/vim/9.1.0 | ||
| example/hello/1.0.0 | ||
| lib | ||
| net | ||
| scripts | ||
| shell/bash/5.2.32 | ||
| sys | ||
| util | ||
| www/lynx/2.9.2 | ||
| x11 | ||
| .gitignore | ||
| BOOTSTRAP-CYCLE.md | ||
| BUILDING.md | ||
| Makefile | ||
| README.md | ||
| ROADMAP.md | ||
tpkg Package Repository
This repository holds tpkg packages for building a Linux From Scratch (LFS)
system, organized in a category/package/version/ directory hierarchy.
Quick Start
Build an entire LFS system with a single command:
./bootstrap/build-lfs.sh
Or step by step:
./bootstrap/verify-host.sh
make # Build temp toolchain
sudo ./bootstrap/enter-chroot.sh
tpkg install lfs-base # Inside chroot
./bootstrap/configure-bootloader.sh
See BUILDING.md for detailed step-by-step instructions.
LFS Chapter Mapping
This repository's package structure maps to the LFS book as follows:
| LFS Chapter | tpkg Phase | Packages/Commands |
|---|---|---|
| Ch 2: Host Requirements | Phase 1 - Prep | bootstrap/verify-host.sh |
| Ch 4: Environment Setup | Phase 1 - Prep | bootstrap/setup-lfs-env.sh |
| Ch 5: Cross Toolchain | Phase 2 - Toolchain | dev/binutils/2.43, dev/gcc/14.2.0, lib/glibc/2.40 |
| Ch 6: Chroot Build | Phase 3 - Core | bootstrap/enter-chroot.sh + tpkg install lfs-base |
| Ch 7: System Config | Phase 4 - Config | sys/sysvinit/3.08, sys/base-files/1.0 |
| Ch 8: Boot | Phase 5 - Boot | sys/linux/6.11.5, sys/grub/2.12 |
| BLFS Packages | Post-LFS | net/wget/1.24.5, net/openssh/9.8p1, editor/vim/9.1.0 |
Directory Layout
<category>/
<package>/
<version>/
package.json # Package metadata (required)
patches/ # Optional LFS patches
001_fix-build.p1.patch
Category Reference
Valid categories and their contents:
| Category | Contains |
|---|---|
| dev | Development tools: binutils, gcc, m4, make, patch, pkg-config |
| lib | Libraries: glibc, ncurses |
| shell | Shells: bash |
| util | Utilities: coreutils, diffutils, findutils, gawk, grep, gzip, sed, tar, xz, bzip2 |
| sys | System: linux, util-linux, e2fsprogs, grub, sysvinit, base-files, profile, eudev |
| net | Networking: openssl, openssh, wget, curl |
| www | Web: lynx |
| editor | Editors: vim |
| x11 | X11: libxcb, xorg-server, xfce4 |
Troubleshooting
Circular dependency: glibc <-> linux
The kernel build doesn't need glibc (it's self-contained). The build order is: linux headers -> glibc -> full linux kernel. See BOOTSTRAP-CYCLE.md.
Missing dependencies: perl, zlib
openssl needs perl (use host perl), curl needs zlib (not yet packaged).
These are build-time only; warnings can be safely ignored.
Toolchain verification fails
Run make check or python3 scripts/dep-resolve --check-cycles to verify
the dependency graph. Ensure $LFS and $LFS_TGT are set correctly.
Patch application issues
Patches in patches/ directories are applied in indexed order (001-999).
Verify patch strip level matches the .p0/.p1 suffix.