MyLFS icon indicating copy to clipboard operation
MyLFS copied to clipboard

Making a multi-phased extensions

Open mkikets99 opened this issue 3 years ago • 8 comments

This also includes:

  • cosmetic changes
  • bug fixes
  • preparation for iso build
  • folder-like static and templates

mkikets99 avatar May 15 '22 06:05 mkikets99

I am going to change a way how it execute phases. It will be a loop with executing of same command strokes:

  • run_before_{PHASENAME} function will be skipped if not exists
  • build_phase {PHASENAME} {SECTION} function
  • run_after_{PHASENAME} function will be skipped if not exists
  • $ONEOFF && $FOUNDSTARTPHASE && unmount_image && exit

Is it ok?

mkikets99 avatar May 15 '22 07:05 mkikets99

regarding the missing GRUB build, it seems that one of the build scripts is messing with STDIN (which affects the while read loop), and that's why it skips the grub line in build_order.txt. https://stackoverflow.com/questions/13800225/while-loop-stops-reading-after-the-first-line-in-bash

I'm thinking one of the commands in phase4/linux.sh must be reading STDIN and accidentally pulling "grub" out of the stream before the while loop gets to it.

Possible fixes:

  • manually run the linux script in chroot to find out which command is reading stdin
  • change the while loop in build_phase to not rely on stdin, and thereby keep the loop safe from whatever the scripts are doing

krglaws avatar May 15 '22 15:05 krglaws

regarding the missing GRUB build, it seems that one of the build scripts is messing with STDIN (which affects the while read loop), and that's why it skips the grub line in build_order.txt. https://stackoverflow.com/questions/13800225/while-loop-stops-reading-after-the-first-line-in-bash

I'm thinking one of the commands in phase4/linux.sh must be reading STDIN and accidentally pulling "grub" out of the stream before the while loop gets to it.

Possible fixes:

  • manually run the linux script in chroot to find out which command is reading stdin
  • change the while loop in build_phase to not rely on stdin, and thereby keep the loop safe from whatever the scripts are doing

I'm on my way to check it... I'll search it on lfs book, and its rebuilding again with # on linux,grub and syslinux

There is also something with syslinux... it can't build cause it can't link something... more old script analyzing on the go

mkikets99 avatar May 15 '22 16:05 mkikets99

regarding the missing GRUB build, it seems that one of the build scripts is messing with STDIN (which affects the while read loop), and that's why it skips the grub line in build_order.txt. https://stackoverflow.com/questions/13800225/while-loop-stops-reading-after-the-first-line-in-bash

I'm thinking one of the commands in phase4/linux.sh must be reading STDIN and accidentally pulling "grub" out of the stream before the while loop gets to it.

Possible fixes:

  • manually run the linux script in chroot to find out which command is reading stdin
  • change the while loop in build_phase to not rely on stdin, and thereby keep the loop safe from whatever the scripts are doing

Founded. it is on make command:

  1. Enable legacy fbdev support for your modesetting driver (DRM_FBDEV_EMULATION) [Y/n/?] (NEW) 1.1. if Y - Overallocation of the fbdev buffer (DRM_FBDEV_OVERALLOC) [100] (NEW) ....
  2. Enable firmware EDID (FIRMWARE_EDID) [N/y/?] (NEW) - FB section is on so it is called
  3. Enable legacy fbcon hardware acceleration code (FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION) .....
  4. Bootup logo (LOGO) [N/y/?] (NEW)
  5. Select compiled-in fonts (FONTS) [N/y/?] (NEW) If you want i can check all Keys with their default values that are needed to add.

mkikets99 avatar May 15 '22 17:05 mkikets99

@krglaws Yoo-hoo.. having a progress with VM... It loaded a Kernel-panic.... at least it loaded a vmz for it I'll send some picks on discussion page

mkikets99 avatar May 15 '22 18:05 mkikets99

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

krglaws avatar May 15 '22 19:05 krglaws

One more edit on build_extension and i'll remove mainLFSbuild and set a build_extension lfs for it

mkikets99 avatar May 16 '22 07:05 mkikets99

The last one needs testing on that section... Also, i must add checker if LFS built completely, or not... so extensions would not start if it is not... Also, i think, it would be better if Build instructions for build_phase and build_package would be in config.sh or build.config.sh

mkikets99 avatar May 17 '22 09:05 mkikets99