-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
RFC: Introduce armbian-bootconfig
#5087
base: main
Are you sure you want to change the base?
Conversation
Cool. I'm gonna copy&paste from other PR, for context. I mentioned Digging into
Your implementation here is essentially making the kernel package drop a "note" (say, I'd invert this, by templating the bootscript itself, not making it read yet-another file (we already have armbianEnv.txt). That's the same way u-boot-update creates extlinux.conf (extlinux.conf doesn't get any other external info). |
Well, I think here are our sticking points: Your options:
My options:
For the first point, I think you are right. The previous issue I cared is that different family have different kernel type ( But now, I think the For the second point, here are my options:
What' more, leting it proivded by For the third point, I think templating bootscript is difficult. We have multi-version Writing the normal bootscript is easier than writing a template. For example, as what I said before, use And image another situation: user upgrade the kernel but it's failed to boot. We need to provide some methods to let he recover and boot into the system, even auto-fix. |
Yes, your understanding is excellent. Thank you.
Simply because Ubuntu/Debian themselves do not do this. Kernel PPA does not do this. No respectable .deb kernel packaging puts DTBs in /boot directly. That is a bootloader-related detail and should be handled by bootloader-related tooling, not the kernel package.
Yeah, but actually what we have today are less than 30 bootscripts, while 3-6 of them represent 80%+ of all boards. In this RFC we'd end up having to modify all bootscripts anyway (to read and use the values in the bootconfig file) so why not go all the way and instead template the whole thing with jinja2 ? |
You can think like that: the bootscript is the The tool write the configuration into |
A note about timing. I think the priority at this point in the release process for 20.05 is not to make invasive changes in this area. We need to get a release out on the new build framework first before we start making fundamental changes to the booting process across boards/families. |
Much of the discussion has been around the bootscripts. I consider all of those "legacy" as there has been much discussion in the past about moving away from bootscriptss to extlinux and/or efi/grub. So I think we need to make sure we are looking at solutions that work for all the environments. I have a particular interest in the extlinux path as that is what the amlogic TV boxes that I support use. So to the extent I can, that is where I intend to contribute. |
I am also happy we are having a progress here, but from next week on we should move focus to stabilisation of existing code and close as many problems as possible. This still can move on if we have a consensus on how this should look like and where to draw a line - what is considered "legacy" and what should be driven by (u)EFI.
We need to sort out two critical mechanism:
... perhaps something else? |
5c3324f
to
7e95c77
Compare
For more easier to manage the boot files.
This sounds like an interesting idea. Bootscripts are indeed considered legacy even by U-Boot themselves, see https://docs.u-boot.org/en/latest/usage/cmd/source.html#legacy-u-boot-image But here we are without much progress over one year later 😄 Unfortunately, I currently don't know much about boot stuff in general to be much help in this move away from legacy scripts to a more modern and secure approach. |
Unfortunately while I've wanted to, I haven't had time to dig into this. But I have thought about it some. One thought I have had is that armbianEnv.txt is the proper central place for all boot config information (used by legacy u-boot scripts, by extlinux.conf and grub, etc). The proposal here creates a new /boot/bootconfig file that has some duplicative information from armbianEnv.txt. |
Description
Add a tool named
armbian-bootconfig
to manage the boot files.If this is OK, I will update all bootscripts to support it.
The previous discussions are in #5076.
How Has This Been Tested?
apt install linux-image-current-meson
and reboot tocurrent
apt install linux-image-edge-meson
and reboot toedge
apt purge linux-image-edge-meson
and reboot tocurrent
Checklist:
Need Common: Keep other version files under
/boot
when install kernel #5076