Forum › Forums › General › Other Distros › Building a minimal Linux OS from source code
- This topic has 8 replies, 3 voices, and was last updated Feb 23-11:06 pm by Brian Masinick.
-
AuthorPosts
-
February 17, 2023 at 1:31 pm #99839Moderator
Brian Masinick
The following article from the Dev community may be of interest.
It’s not as complicated as it may seem at first, though the code in the various components is definitely significant.
If you’re curious, take a look. If the link is not accessible to you, contact me and I can send you the contents
of the work.Building a minimal Linux OS from source code
--
Brian MasinickFebruary 17, 2023 at 5:16 pm #99870Member
andyprough
::I like building Linux from Scratch, it’s so educational with long articles about each piece of the system as you build them and piece them together.
February 17, 2023 at 6:25 pm #99879Moderator
Brian Masinick
::I have actually built a few systems from scratch. I’ve used Linux From Scratch at least once, Gentoo Linux as a starting point and then of course I have remastered our own distribution, though not at all from scratch.
My findings are that as far as efficiencies gained by compiling specifically for your hardware provide negligible improvement, if any. The primary gain is learning more about the elements that go into building the software. The Dev writer did a good job explaining one method of building a basic system.
--
Brian MasinickFebruary 17, 2023 at 7:28 pm #99882Member
techore
::I like building Linux from Scratch, it’s so educational with long articles about each piece of the system as you build them and piece them together.
Agreed. I am very appreciative that we have alternatives from Linux from Scratch, but it is very educational.
I have remastered our own distribution
anticapitalista referenced build scripts, recently. I don’t particularly want to build antiX but love to review the scripts to better understand it. Where can they be found?
February 17, 2023 at 8:18 pm #99884Moderator
Brian Masinick
::I’m not sure if everything you’re looking for is here, but antiX does have a https://gitlab.com/antiX-Linux site.
Maybe some of the things you are interested in can be examined there.--
Brian MasinickFebruary 17, 2023 at 9:29 pm #99893Member
techore
February 23, 2023 at 10:38 pm #100497Member
techore
::I believe this is the script being used to create antiX 22. Looks pretty cool. I need to dig into it and broaden my mind. 😛
https://gitlab.com/antiX-Linux/Build-iso/-/blob/master/build-iso
February 23, 2023 at 10:56 pm #100499Moderator
Brian Masinick
::Yes, that is a very cool procedure and it utilizes many powerful features.
One of these “features” is the use of additional terms that make the procedure look good,
but these terms, or commands, are NOT standard Bash.This means that there must be other scripts, alias definitions or functions defined
somewhere else, so in order to actually use the build-iso tool, you actually need
whatever additional configuration, libraries, tools, or set up conveniences that are
used when running build-iso.Even if you put together your own build environment, you would need the complete
setup to actually get this tool to work.My guess is that when you get into whatever environment they use, something in that
environment probably simplifies all that so that the keywords work properly.--
Brian MasinickFebruary 23, 2023 at 11:06 pm #100500Moderator
Brian Masinick
::I found this at https://gitlab.com/antiX-Linux/Build-iso/ as part of the README documentation
I’m including just a little bit here. Even with ALL of this information, I’m certain there is more to it.Anyway, this provides a high level overview of the process:
“The work of build-iso is split up into 8 different stages.
When each stages is successfully completed, a stage-N.out file is
created in the Output/ directory. Each time build-iso is
run, it will start working on the first stage that lacks an
output file. These files also let the program pass information
for one stage to the next across restarts. Therefore there is
almost no penalty for stopping the program after each stage. If
there is an error condition then the penalty for stopping the
program, fixing the error, and then restarting the program is
minimized.
The 10 stages of processing are:
Gather inputs and set defaultsMake directories and symlinks
Run debootstrap
Prepare chroot
Inside of chroot
Finalize and clean the chroot
Prepare iso directory
Create squashfs file
Create iso file
Clean up and prepare to start over”--
Brian Masinick -
AuthorPosts
- You must be logged in to reply to this topic.