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
Implement kernel bootstrap up to building Linux. #253
Conversation
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 is a first-pass review, there's some things I haven't really looked at in detail yet but there's a few larger architectural things;
- I would like for
--kernel-bootstrap
to be the default, when QEMU is used. This is meant to be the default pathway. Then, if--kernel
is given, then we can not use the fiwix/builder-hex0 stuff. - I apologise for not communicating this one earlier, as this has been on my mind for a while with this. I'd like, when running under Fiwix, for an initramfs not to be used (or, at least, used to the minimal extent possible - but from my relatively brief look over this it doesn't appear required). At minimum, it'd be great if all the packages could be build on-disk rather than in-ram (initramfs). This will allow live-bootstrap to be build on much lower memory machines and allow for sysa to be expanded without issue. builder-hex0 does look like it can write to/read from disk, but I'm not sure if that extends to the creation of an EXT filesystem on a disk?
- This one is more of a question - what's the rationale for using builder-hex0 to start, instead of say, builder-hex0-mini? (it probably doesn't really matter, because both are hex0 anyway, but just wanted to hear your thoughts).
Thank you very much for this PR, I'm excited to get this in 🎉
Also, with your comment in #252, will this currently fail or do something else when transferring from fiwix -> linux? Other thing I just thought of, architecturally I think it would be more consistent to split sysa into sysa and sysb, where sysa is builder-hex0 and sysb is fiwix, and then the current sysb can be removed, since we have guranteed hard disk support in fiwix. |
@fosslinux
It is not very clear to me how a redesign with Fiwix as sysb would work exactly. Sysb is currently used for booting Linux (I think) so I don't see how that changes. (To be honest, I'm not sure I want to sign up for changing the method of booting Linux.) I think I'd need some more details to understand what you are suggesting. It might be a while until I submit the next updated PR. I'm taking a breather to work at a more leisurely pace for a little while. |
Perhaps it might be simpler to do something like this:
This would add another kexec like transition but perhaps code can mostly be shared with fiwix to linux transition? |
Sounds good. If you think that @stikonas method would be easier, or if two separate disks are used for builder-hex0 and fiwix, that's alright with me.
No worries about this for the time being, then - this can come later, as you said.
Ah, ok. In my opinion, let's still make
That is absolutely fine! It is good to spend some time for ourselves. |
I'm not sure this question matters yet. builder-hex0/BIOS may be able to write to a larger hard disk by using a bigger disk geometry. I just need to look into it. If not, maybe your Linux changes will save enough space. We need to save approx. 140MB to keep under the limit of the current geometry. (Which is 1024 cylinders * 32 heads * 63 sectors * 512 bytes/sector) @fosslinux The vast majority of the 1.2GB for processes is for mes. I could eliminate half (the memory for suspended processes) by implementing virtual memory but I'm reluctant to add that complexity. Long term really getting memory down means redesigning or replacing mes, IMHO. That said, there is a significant benefit to moving away from a Fiwix ram disk. My modification to Fiwix to support large ram drives was difficult/complex/messy and I'd rather not try to upstream it: So, I'll continue to look at how to boot Fiwix off a hard drive. For the transition to Linux, I expect sysb/run.sh would need to be modified to do one of: format the first drive (overwriting sysa), format a second partition on the first drive, or format a (or use a pre-formatted) second drive. |
This is not particularly problematic. If sysa is expanded or more packages are added, then the only added cost to RAM is distfiles & possibly the ext2 image. However, in the current state, we also need to have disk space available for the compilation process - this is where compiling large packages such as the Linux kernel can become very problematic. With Fiwix it seems we should be able to eliminate this problem.
If you can handle the Fiwix side, I'd be happy to do this bit. |
@fosslinux I'm not sure how. If we need more space for compilation then the ext2 image needs to be expanded and since that is created in memory with builder-hex0, it expands the memory requirements. builder-hex0 is near usable memory limits already which is 3GB without implementing PAE. |
The source tarball is provided as part of sysa distfiles and copied to sysc, which resolves the issue of finding a reliable plain HTTP mirror for curl. Splitted from fosslinux#253.
The source tarball is provided as part of sysa distfiles and copied to sysc, which resolves the issue of finding a reliable plain HTTP mirror for curl. Splitted from fosslinux#253.
The source tarball is provided as part of sysa distfiles and copied to sysc, which resolves the issue of finding a reliable plain HTTP mirror for curl. Splitted from fosslinux#253.
superseded by #272 |
Resolves #252