I want to tell you about building all sorts of LFS Linux .
For starters LFS It's linux built roughly from bits and pieces of their source code .
Your own hands as you want.
Naturally this gives you the same security advantages. If you build packages as you want, control everything. And I think it is convenient to customize everything initially.
Yes , it is definitely better to write your own linux , but I dont have that much time , I think many of you do too .🙃
Let's have some of those details and stuff about building lfs.
In fact I recently built lfs and wanted to do a detailed breakdown with screenshots . I thought it would be better to add it to my article about linux which I still write.
So here I will just give you some useful tips 🧩
https://www.linuxfromscratch.org/
all the documentation and books on this site . Here is the link to the books https://www.linuxfromscratch.org/lfs/downloads/stable/. Here are more videos on youtube of how a guy builds lfs according to the documentationhttps://youtube.com/playlist?list=PLTd7y0vdxhK614YGAImDjaD3M3lkJRZsT
I want to advise you some cool packs 🙃 and tell you how to assemble them.
I give you an example of llvm package. (Everybody loves compilers, right?)
You need to start by downloading the followinghttps://anduin.linuxfromscratch.org/BLFS/llvm/llvm-cmake-15.0.1.src.tar.xz
The cmake modules for llvm
clanghttps://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.1/clang-15.0.1.src.tar.xz
compiler rthttps://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.1/compiler-rt-15.0.1.src.tar.xz
You might also need a python package, so you have to install it first.Here is a link to the manual https://www.linuxfromscratch.org/blfs/view/svn/general/python3.html
The installation itself (note: you must have the environment preconfigured like in your book) :
Unpack llvm in the folder
tar xf ../llvm-cmake-15.0.1.src.tar.xz &&unpack clang
mv cmake-15.0.1.src ../cmake
tar -xf ../clang-15.0.1.src.tar.xz -C tools &&unpack compiler rt
mv tools/clang-15.0.1.src tools/clang
tar -xf ../compiler-rt-15.0.1.src.tar.xz -C projects &&Create and change these folders
mv projects/compiler-rt-15.0.1.src projects/compiler-rt
cd cmakeConfigure the compiler
mkdir -v build &&
cd build &&
CC=gcc CXX=g++ \Installing
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_ENABLE_FFI=ON \
-DCMAKE_BUILD_TYPE=Release
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DCLANG_DEFAULT_PIE_ON_LINUX=ON \
-Wno-dev -G Ninja ... &&
ninjaGenerally, building your Linux system and especially the selection of packages is a very interesting task and depends very much on what you want.
ninja install
I can't give you any advice about packages because it depends on what you need.
I also suggest you read the security advisory https://www.linuxfromscratch.org/blfs/advisories/consolidated.html .
In the future, when an article will be published (I hope this won't be too long before it is written), it will be about the security oriented lfs.
Well, good luck on your lfs journey.
Thanks for reading❤️
And remember, if the Cheshire cat says that everything is not as it seems at the hatter's tea party, it may be true.🐱🎩
#linux #lfs