-
Notifications
You must be signed in to change notification settings - Fork 324
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
kboot status report for 2023 Q2 #202
Conversation
Since I'm not selling anything, I don't need r or tm. I don't want to imply I'm selling anything by using them. The other comments look good and I'll likely include them all... |
This comment was marked as outdated.
This comment was marked as outdated.
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.
Thanks for your report. I made a few suggestions too and I have also spotted a few typos.
|
||
The old Sony Playstation 3 port used a boot loader called 'kboot' to accomplish this in that environment. | ||
That code has been greatly expanded, made generic with easily replaceable per-architecture plug ins. | ||
The normal FreeBSD /boot/loader is built as a Linux binary that reads in the FreeBSD kernel, modules and tunables. |
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.
It is probably better to use the filename markup here:
[.filename]#/boot/loader#
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
Cross-reference https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266881#c3 re: discovery of markup such as this.
For UEFI enabled systems, it passes the UEFI memory table, and pointer to UEFI runtime services to the new kernel. | ||
|
||
It supports loading files from the host's filesystem, from any loader(8) supported filesystem on the host's block devices (including ZPOOLS that span multiple devices), from ram disk images and from files downloaded over the network. | ||
Any mix of these is available, so configuraiton overrides can be loaded from the host's filesystem, but the kernel can be loaded from dedicated storage (say NVME) or a ram disk image. |
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.
s/configuraiton/configuration/
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
It supports loading files from the host's filesystem, from any loader(8) supported filesystem on the host's block devices (including ZPOOLS that span multiple devices), from ram disk images and from files downloaded over the network. | ||
Any mix of these is available, so configuraiton overrides can be loaded from the host's filesystem, but the kernel can be loaded from dedicated storage (say NVME) or a ram disk image. | ||
It supports a host console running over stdin/stdout. | ||
It supports explicit locations like `/dev/nvme0ns1:/boot/loader/gerbil.conf` to be explicit about where to load filesystems from. |
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.
[.filename]#/dev/nvme0ns1:/boot/loader/gerbil.conf#
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
close enough to real filename, but only in the context of the boot loader. And only the new kboot loader.
So I'm unsure what to do with this advice.
It supports explicit locations like `/dev/nvme0ns1:/boot/loader/gerbil.conf` to be explicit about where to load filesystems from. | ||
If supports ZFS boot environments, including the boot-once feature. | ||
|
||
FreeBSD/aarch64 now can boot from Linux in a LinuxBoot environment, with comparable support and functionality as loader.efi. |
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.
[.filename]#loader.efi#
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.
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.
went with @grahamperrin 's suggestion instead that he linked.
|
||
FreBSD/amd64 in progress, maybe 80% done. | ||
The amd64 boot environment has more quirks and details to get right than the aarch64 environment given its much older lineage. | ||
The kernel boots part way before panicing because things aren't setup correctly. |
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 am unsure about "panicing". Maybe it should be "panicking"?
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
The kernel panics partway through initialization since all the prerequisites from the boot loader have not been discovered and implemented.
|
||
Help needed: | ||
|
||
1. Currently, there is no documentation on how to use loader.kboot, nor on how to create test images. |
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.
[.filename]#loader.kboot#
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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've updated this with
1. man:loader.kboot[8] needs to be written. It should document how to use loader.kboot, how to create images, and the different use cases that work today.
1. Currently, there is no documentation on how to use loader.kboot, nor on how to create test images. | ||
1. Finish amd64 support. | ||
1. The current elf arch-specific metadata code is copied from efi. + | ||
Unifying the kboot eand efi copies is needed. + |
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.
s/eand/and/
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
done
1. Finish amd64 support. | ||
1. The current elf arch-specific metadata code is copied from efi. + | ||
Unifying the kboot eand efi copies is needed. + | ||
This is complicated because they aren't identical. |
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.
Please do not use contractions:
s/aren't/are not/
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
reworded as
1. The current elf arch-specific metadata code is copied from efi. +
Unifying the kboot and efi copies is needed. +
While they are mostly the same, compile-time differences remain that complicate sharing. +
In addtion, the build infrastructure makes sharing awkward.
Sponsored by: Netflix
pushed update that I claim addresses all the feedback here. |
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.
Thanks,
… Please let me know if I missed anything …
One typo (kenrel), so I took the opportunity to speed-read the whole thing with fresh eyes.
Take only what you want from the suggested changes, no need to explain any discards (unless you want to).
… if all my 'accept' generated insane spam)
It's a neat feature, I never thought of it as spammy :-)
It places them into memory as if it were running in a pre-boot environment and then loads that image into the Linux kernel with man:kexec_load[2] and does a special reboot to that kernel image. | ||
For UEFI enabled systems, it passes the UEFI memory table, and pointer to UEFI runtime services to the new kernel. | ||
|
||
It supports loading files from the host's filesystem, from any man:loader[8]-supported filesystem on the host's block devices (including pools that span multiple devices), from ram disk images and from files downloaded over the network. |
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.
It supports loading files from the host's filesystem, from any man:loader[8]-supported filesystem on the host's block devices (including pools that span multiple devices), from ram disk images and from files downloaded over the network. | |
It supports loading files from the local filesystem, from any man:loader[8]-supported filesystem on the host's block devices (including pools that span multiple devices), from ram disk images, and from remote filesystems. |
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 your change. but would say 'from the network' rather than 'from networked files'. Comments?
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.
Thanks. Suggestion revised. Have I twisted the meaning?
The amd64 boot environment places more requirements on the boot loader to provide data for the kenrel than aarch64 due to amd64 being an older port. | ||
All sources for data in the BIOS enviornment had to be provided by the boot loader since the kernel had no access to them from long mode. | ||
While UEFI and ACPI provide ways for the kernel to get this data, much of the data must still be provided by the boot loader. | ||
The kernel panics during initialization since all these prerequisites have not been discovered and implemented. |
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.
The kernel panics during initialization since all these prerequisites have not been discovered and implemented. | |
[.filename]#loader.kboot# does not yet implement the entire amd64 boot protocol, so the kernel still panics. |
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.
How about
Loader.kboot does not yet implement the entire amd64 boot protocol, so the kernel still panics.
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.
Suggestion revised, NB:
- lowercase
l
[.filename]#⋯#
markup seems reasonable here.
Co-authored-by: Graham Perrin <[email protected]>
Co-authored-by: Graham Perrin <[email protected]>
Co-authored-by: Graham Perrin <[email protected]>
Co-authored-by: Graham Perrin <[email protected]>
Co-authored-by: Graham Perrin <[email protected]>
Co-authored-by: Graham Perrin <[email protected]>
Co-authored-by: Graham Perrin <[email protected]>
Co-authored-by: Graham Perrin <[email protected]>
Accepted all but two. What do you think of my suggested changes to your suggested change ... If you like them, just make them a suggestion and I'll accept it. If not, we'll chat :) |
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.
Spelling and punctuation nits.
Co-authored-by: Pau Amma <[email protected]>
The normal FreeBSD [.filename]#/boot/loader# is built as a Linux binary that reads in the FreeBSD kernel, modules and tunables. | ||
It places them into memory as if it were running in a pre-boot environment, then loads that image into the Linux kernel with man:kexec_load[2] and does a special reboot to that image. |
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.
The normal FreeBSD [.filename]#/boot/loader# is built as a Linux binary that reads in the FreeBSD kernel, modules and tunables. | |
It places them into memory as if it were running in a pre-boot environment, then loads that image into the Linux kernel with man:kexec_load[2] and does a special reboot to that image. | |
The normal FreeBSD [.filename]#/boot/loader# is built as a Linux binary that reads in the FreeBSD kernel, modules, and tunables. | |
LinuxBoot places the FreeBSD kernel, modules, and tunables into memory as if it were running in a pre-boot environment, then loads that image into the Linux kernel with man:kexec_load[2] and performs a special reboot to the image. |
Disambiguate the words 'It' and 'them' … correct, or have I misunderstood?
(I might be slaving over this unnecessarily; the report acknowledges the need for a manual page.)
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.
as if loader.kboot were running as loader.efi and trying to load the kernel, tuneables and modules from there (similar memory layouts happen). I struggled with a way to say loader.kboot will present the same environment to the kernel's startup code after loader.kboot does its kexec that loader.efi does after loading everything and jumping to the kernel's startup code.
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 struggled with a way to say …
How about … a freehand sketch? (As if you have nothing better to do.)
It needn't be perfect; the absence of loader.kboot(8) is uppermost amongst your pleas for help.
File an image somewhere under /home/imp/public_html
then it can be linked from within the report. Just a thought.
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.
If an image is to be included, please remember that the report will also be sent by email. So either we include a link
reference or maybe a picture in Ascii art.
But a good wording is probably better.
Co-authored-by: Pau Amma <[email protected]>
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 have found two last minute small issues.
I think we can finally merge this report, is anything still missing?
|
||
Help needed: | ||
|
||
1. man:loader.kboot[8] needs to be written. It should document how to use [.filename]#loader.kboot#, how to create images, and the use cases that work today. |
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.
1. man:loader.kboot[8] needs to be written. It should document how to use [.filename]#loader.kboot#, how to create images, and the use cases that work today. | |
1. man:loader.kboot[8] needs to be written. | |
It should document how to use [.filename]#loader.kboot#, how to create images, and the use cases that work today. |
One sentence per line please, even in list elements.
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.
Rolled into (superseded by) #202 (comment)
Unifying the kboot and efi copies is needed. + | ||
While they are mostly the same, sharing is complicated by remaining compile-time differences. + | ||
In addtion, the build infrastructure makes sharing awkward. | ||
1. It would be nice to add riscv64 support |
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.
1. It would be nice to add riscv64 support | |
1. It would be nice to add riscv64 support. |
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.
Rolled into (superseded by) #202 (comment)
At a glance, at least:
https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#lists example 31 presents what's below the lead for a simple ordered list:
|
1. The current elf arch-specific metadata code is copied from efi. + | ||
Unifying the kboot and efi copies is needed. + | ||
While they are mostly the same, sharing is complicated by remaining compile-time differences. + | ||
In addtion, the build infrastructure makes sharing awkward. |
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.
PowerPC builds, but nothing more of its state is known. | ||
Attempts to acquire a suitable Playstation 3 proved to be too time consuming for the author. | ||
|
||
Help needed: |
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.
Help needed: | |
==== Help Needed |
- a simple subheading
- and then, what's currently an ordered list of numbered items can become an unnumbered series of simple paragraphs.
The final paragraph, sponsorship already in place, will not be misinterpreted as something with which you need help.
Thanks @bsdimp, @grahamperrin and @pauamma for your efforts to put in place a high quality report. Do you think you can complete the last few things you need in the next few days? It is already late July, I would like to publish the status report within August 15th, or even better within the end of the month. It does not matter if it is not perfect, as long as the content is there. If you do not have time and you want me to make the merge and fix any last minute thing, please just ask. |
I thought that Iwas done. what's left? |
oh, I see. The last few suggestions are fine: the hard breaks aren't intentional and the new section is fine. I don't have time to revise and repush, thought. |
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.
Re: #202 (comment)
… repush …
If it simplifies things:
- the two-click routine for each acceptable suggestion, then
- https://patch-diff.githubusercontent.com/raw/freebsd/freebsd-doc/pull/202.diff should be ready for Lorenzo to push (if everything that's required existed as a suggested change for step 1).
1. man:loader.kboot[8] needs to be written. It should document how to use [.filename]#loader.kboot#, how to create images, and the use cases that work today. | ||
1. Finish amd64 support. | ||
1. The current elf arch-specific metadata code is copied from efi. + | ||
Unifying the kboot and efi copies is needed. + | ||
While they are mostly the same, sharing is complicated by remaining compile-time differences. + | ||
In addtion, the build infrastructure makes sharing awkward. | ||
1. It would be nice to add riscv64 support | ||
1. PowerPC testing (it has been untested since the refactoring started). | ||
1. Creating a script to repackage EDK-II image (say, from QEMU) as a linux-boot image with a Linux kernel built on FreeBSD for CI testing. | ||
1. Testing it from the coreboot LinuxBoot. |
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.
1. man:loader.kboot[8] needs to be written. It should document how to use [.filename]#loader.kboot#, how to create images, and the use cases that work today. | |
1. Finish amd64 support. | |
1. The current elf arch-specific metadata code is copied from efi. + | |
Unifying the kboot and efi copies is needed. + | |
While they are mostly the same, sharing is complicated by remaining compile-time differences. + | |
In addtion, the build infrastructure makes sharing awkward. | |
1. It would be nice to add riscv64 support | |
1. PowerPC testing (it has been untested since the refactoring started). | |
1. Creating a script to repackage EDK-II image (say, from QEMU) as a linux-boot image with a Linux kernel built on FreeBSD for CI testing. | |
1. Testing it from the coreboot LinuxBoot. | |
man:loader.kboot[8] needs to be written. | |
It should document how to use [.filename]#loader.kboot#, how to create images, and the use cases that work today. | |
Finish amd64 support. | |
The current elf arch-specific metadata code is copied from efi. | |
Unifying the kboot and efi copies is needed. | |
While they are mostly the same, sharing is complicated by remaining compile-time differences. | |
In addtion, the build infrastructure makes sharing awkward. | |
It would be nice to add riscv64 support. | |
PowerPC testing (it has been untested since the refactoring started). | |
Creating a script to repackage EDK-II image (say, from QEMU) as a linux-boot image with a Linux kernel built on FreeBSD for CI testing. | |
Testing it from the coreboot LinuxBoot. |
- consistent with Warner's kboot status report for 2023 Q2 #202 (comment)
- consistent with (complementary to) my kboot status report for 2023 Q2 #202 (comment)
- consistent with Lorenzo's per-line markup from kboot status report for 2023 Q2 #202 (comment)
- includes the additional full stop from Lorenzo's kboot status report for 2023 Q2 #202 (comment)
- seven paragraphs instead of points 1–7.
My recent question to
|
Reviewed by: grahamperrin, status (Pau Amma <[email protected]>) Approved by: carlavilla (mentor, implicit) Pull Request: #202
Merged, thanks. I did my best to include the last minute changes that you agreed. If I misunderstood ot forgot something, please feel free to fix it, even without review (the month is coming to an end and I would like to speed things up to ensure the report is published within it). I will close the PR as soon as I have access to a computer: for some reason, the GitHub app does not allow me to close PRs on my smartphone... |
Merged. |
oh, and a little before too, but this is my first one