-
Notifications
You must be signed in to change notification settings - Fork 30
Making a multi-phased extensions #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Mkikets99 dev
Preparation for "Multi_Phase" Extensions
Also: prepared for iso build, added --phase-id option(optional), made output cosmetics, moved config(CHROOT part) to separate file(will be changed in next commit
|
I am going to change a way how it execute phases.
Is it ok? |
Added `run_before` and `run_after` functions also done folder like style for `static` and `templates`
version-check.sh
Outdated
| if [ -x dummy ] | ||
| then echo "g++ compilation OK"; | ||
| else echo "g++ compilation failed"; fi | ||
| rm -f dummy.c dummy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file isn't necessary since it's already built in to the script with mylfs.sh --check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but there is some output issues with some files, like yacc...
I think that ill just set it in .gitignore...
| # unmount and detatch image | ||
| unmount_image | ||
|
|
||
| echo "build successful." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that you moved this into a separate function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it cause iso will work separately from building
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah makes complete sense, even without the iso build
|
|
||
| ``` | ||
| $ sudo ./build.sh --help | ||
| $ sudo ./mylfs.sh --help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof, can't believe I missed that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That what i meant in #6
| rm -rf $LFS/usr/share/{info,man,doc}/* | ||
| find $LFS/usr/{lib,libexec} -name \*.la -delete | ||
| rm -rf $LFS/tools | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will make Sections with phases more mobile and modular
| export PATCH_GLIBC=https://www.linuxfromscratch.org/patches/lfs/11.1/glibc-2.35-fhs-1.patch | ||
| export PATCH_KBD=https://www.linuxfromscratch.org/patches/lfs/11.1/kbd-2.4.0-backspace-1.patch | ||
| export PATCH_PERL=https://www.linuxfromscratch.org/patches/lfs/11.1/perl-5.34.0-upstream_fixes-1.patch | ||
| export PATCH_SYSLINUX=https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-boot/syslinux/files/syslinux-6.03-sysmacros.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I understand syslinux is some kind of bootloader. Will it "replace" GRUB whenever the script builds an ISO? Or will they need to coexist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grub will operate a boot of vmz and imglinux files. Syslinux helps to boot them from fat systems on which iso operates and boots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that they will cooperate...
But RN i have some issues with building syslinux... Must check how it built from that project.
| -t|--phase-id Specify which portion of script you need to execute. If | ||
| not specified, will run 'lfs' scripts. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I'm wrong, but it seems like we would only be able to build one "STARTSECTION" at a time. Is that right? I kind of like the idea of being able to build everything I need in a single command, like so:
sudo ./mylfs.sh --build-all --extend path/to/extension
rather than
sudo ./mylfs.sh --build-all --phase-id lfs && sudo ./mylfs.sh --build-all --phase-id path/to/extension
And I kind of prefer the --extend parameter name to the --phase-id parameter name. But I like where you are going with grouping phases together under a single directory.
so my_extension/ might have:
phase1/
phase2/
sudo ./mylfs.sh --build-all --extend path/to/my_extension would build the lfs phases AND the my_extension phases all in one go. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... what if make --extend as array? So when you add more of them they will build up in a list and build one by one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then i will just edit some of Build Extension function to work with multiple values
And it will auto start after the building...
But then something additional option needed, cause sometimes it can broke on extension, but not on the lfs part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, storing it as an array could work. And you could pass the extensions in either like --extend path1 --extend path2... or --extend path1,path2,.... Up to you.
As for restarting after a break in an extension, you could add another param like you mentioned:
# after a failure in 'my_extension'
sudo ./mylfs.sh --extend my_extension --start-extension my_extension --start-phase 2 --start-package some_packageThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also make it clear that the order in which you specify extensions is important, since that will be the order in which they are built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. so i'll redo changes for --phase-id and extend more functionality on --extend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And you could pass the extensions in either like
--extend path1 --extend path2...or--extend path1,path2,.... Up to you.
I am more prefer to have a multiple, or separated with : - like a PATH separation
So... About multiple - it will be working soon.
A oneliner - must do a separation function. But after that it will work with any symbol.
| HOUT+=$(repeat_echo ${#SSTR} '#';echo) | ||
| HOUT+="\n# ${SSTR}\n" | ||
| HOUT+="# $(repeat_echo ${#SSTR} '~';echo)" | ||
| echo -e $HOUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: this is a cosmetic change
This will make automatic top and bottom line for text
|
regarding the missing GRUB build, it seems that one of the build scripts is messing with STDIN (which affects the I'm thinking one of the commands in Possible fixes:
|
I'm on my way to check it... There is also something with |
Founded. it is on
|
|
@krglaws |
|
Awesome! I'm gonna be AFK most of today and tomorrow probably. But I'll be able to check in here and there. Seems like we are going to need to fix those prompts in the linux.sh script. I'll think about it in the meantime |
|
One more edit on |
Preparing to have a list of linux kernel parameters that are out of the list
Testing if everything working properly
Next: - Linux kernel build fixup - Searching for `vmz` aka `vmlinux` build in BLFS - Defining whats wrong with `syslinux` build - remaking `example_extension` folder to be like `lfs-build` folder
|
The last one needs testing on that section... |
… while building phases (and clearing after it) and now no input issue on`read` command inside of `build_phase` Also some TODO.txt enhancements and echo additions (like `Ending of building phase`
thinking on a idea with pkgs_used.txt
…main # Conflicts: # mylfs.sh
…timer with `--time`, fixed issue with $NAMEOVERRIDE to be empty
This also includes:
staticandtemplates