-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Quartz64 | Migrate to kernel with more features #6151
Comments
If you want to try the Debian kernel (again), you need to have one from the 6.1 series in which several kernel modules for Quartz64 devices got enabled and later on several patches (mostly DT related) got backported from 6.2 to Debian's 6.1 kernel. |
Okay, but this is applicable for Bookworm images only to get updates via APT. If we are lucky, the Bullseye backport kernel gets a bump to v6.1 as well. |
Correct. I have no idea (if/)when a 6.1 backports will be made though. Best to periodically check https://tracker.debian.org/pkg/linux for that. |
I just checked and all 3 mentioned issues should be resolved with Debian's 6.1 kernel: $ grep -E "CONFIG_CAN_GS_USB|CONFIG_SQUASHFS_XZ|CONFIG_BRIDGE_NETFILTER" /boot/config-6.1.0-4-arm64
CONFIG_BRIDGE_NETFILTER=m
CONFIG_CAN_GS_USB=m
CONFIG_SQUASHFS_XZ=y |
Yes it does, also v6.0 and earlier versions. And all Armbian kernels have it as well. Peter's build is quite special in being very minimal 😉. Also the fact that he uses RC versions only shows that it is more for testing than for productive systems. I hope I'm able to rebase the kernel branch onto e.g. v6.1.8. |
Own builds are running: https://gitlab.com/MichaIng/quartz64_ci/-/pipelines/776450060 Looks pretty good. Tomorrow I'll try merging Linux v6.1.11. |
Shouldn't be too hard. Usually it's the upgrade to a new major version which can be difficult. AFAICT Peter's primary 'concern' is getting things in the upstream kernel and for that you should base your patches on the most recent RC1 version. |
Makes sense. Same for U-Boot. Another approach would be to just build with unmodified upstream Linux and U-Boot. |
What do you mean by unmodified upstream (Linux)? One major reason the Debian kernel for arm64 is (way?) bigger, is that it supports a whole bunch of different arm64 devices. Next to the 'standard features' which are present in all Debian's kernels. |
I mean the And another approach again would be (probably when Linux 6.2 has been released) to also use upstream defconf but applying customisation with a patch. Ah I see now upstream is just a single |
I'm not so sure you'd get what you want with that. It will add support for various devices which you don't seem to support. |
Note the second part of my sentence "applying customisation" which implies removing support for all but the Quartz64 variants. We are still DietPi, so I'm gonna build an own kernel, it will have minimal unnecessary overhead 😉. |
Good news:
Bad news:
|
There it is: https://about.gitlab.com/pricing/ 400 minutes. That is done with 2-3 kernel builds 😄. Moving to GitHub tomorrow. |
All done. U-Boot finally is only the stable v2022.04 (was rc1). I was able to migrate some parts for latest v2023.01, but others I wasn't able to figure out, especially the ATF (ARM Trusted Firmware) integration (actually optional(?) but nice to have). And also some SPL related RAM size/offset/address value which is suddenly needed and I don't know what to set it correctly. However, images working now very well, Kernel (and bootloader) can be upgraded with firmware packages from here: https://dietpi.com/downloads/binaries/ |
The kernel configuration is now hosted here: https://github.com/MichaIng/DietPi/blob/dev/.build/images/Quartz64/quartz64_defconfig This is kinda new land for me, so please give feedback about it. I'm sure there are still a lot of features missing, which one typically expects, respectively which is needed for any of all the software titles we offer. And on the other hand I'm sure there are features enabled which are not needed, or which are not needed builtin but can be made a kernel module, to keep the main kernel slim. I already found and disabled a bunch of features, like VirtIO drivers, legacy PTY nodes and such things, not sure how they made their way into this config in the first place. |
Assuming the request was directed at me, I'm not sure what kind of feedback you're looking for. What I do know is making your own initial kernel config is a huge undertaking. You need to figure out what you need and don't need/want and figure out how to make that work as 1 kernel module possibly depends on another, which depends on several others ... turtles all the way down. |
Just to anyone who reads this. The new kernel solves a lot of reported issues/requests, so if anyone has some kernel config/build experience/knowledge, I'm happy for any input 🙂.
It still uses a
This is why I used Peter's which worked "well" (with the limitations) since we offer Quartz64 images, and extended/modified it as much as needed to solve reported requests and a little more about things I know about/looked up 🙂. No starting from zero intended.
Apart of all features we offer in our scripts and support for all software titles, that is indeed likely an iterative undertaking. This is why I am asking for input. There may be (there were, removed already) features enabled which are nonsense, probably only there for testing/debugging with downsides/overhead in production systems. VirtIO drivers are still some included, I didn't radically remove everything directly, but made them modules at least, the way they are on Debian. But I think they are actually pointless. There is
AFAIK this is internally solved. Linux has a dependency system, and I've seen features being available which are/were not explicitly enabled in your config, disabled by default, but found them to be needed for other features.
Exactly what I am looking for 🙂. Not same SoC, but same manufacturer for SoC and SBC, so I lot of things apply to both the same way. |
No, upstream's
That's the general gist of things, but there are more factors which play a
That helps ... for Quartz64 devices, but I thought DietPi supported more
FTR: it's no longer enabled in Debian's kernels.
I don't know enough about the upstream build system, but I think it's |
I do not mean upstream files, but that they use the same type of config files with
The issue here is about the Quartz64 kernel only. In all other cases we do no own kernel builds but use Debian/Armbian/vendor kernel builds. We may build more own kernels in the future, possible even taking the config from here as a reference, at least the learnings or find of features we definitely need (independently of hardware). But for now Quartz64 only.
Do not take me wrong, I'm happy for your input, but I know about general development procedures 😉. I really only need feedback about the individual config entries of the above linked file, hints about features we definitely do not need or those we do need, or do not need as builtins, as far as hardware-independent or known for Rockchip SoCs (like, well, they do not contain VirtIO devices). All onboard hardware features work fine already and all software titles which did not work before (without workarounds) do work now, so it's about fine tuning, disabling nonsense and enabling missing things we might not be aware of yet, e.g. possibly hardware acceleration for video features, encryption or hashing which is currently missing but just done without noise on software basis.
In the end, its |
EDIT: That one I mean: https://github.com/MichaIng/DietPi/blob/dev/.build/images/Quartz64/quartz64_defconfig |
I'll close this issue now. Major issues have been solved and the new kernel + bootloader seem to work pretty well. Further optimisations can be tracked in dedicated issues. |
There are a couple of issues related to Peter Geis' kernel which has quite some limitations (missing kernel modules):
It seems to be intended since he is not reacting to my merge requests to add those features.
I now tested a bunch of alternative kernel builds, but none of them is great:
rk35xx
kernel builds. These have device trees for all Quartz64 variants, but otherwise seem to be not meant for these SBCs, since major features, like onboard Ethernet, do not work.media
kernel builds, used for the community-provided images as well. Thecurrent
branch works actually okay. There is no dtb package (there are, but for older non-matching kernel versions only), but the device trees in /boot are embedded into the kernel package. It performs a little less good then Peter's in CPU and RAM read benchmarks, but that would be worth it. The problem is it will becomeedge
.I also tested the Debian kernel: It boots, but at least Linux 6.0 from Bullseye backports lacks major features. One cannot check or change CPU governor or see current frequencies, to start with. And it is ~400 MiB vs ~100 MiB, as a single kernel for ALL 64-bit ARM devices.
So what do I aim to do instead?
I'm gonna merge the needed changes for Peter's builds into my own fork, adjust the CI pipeline, hope that it works just the same way, so that we just do our own builds and updates. This is also an opportunity to gather some experience in kernel and bootloader builds.
The text was updated successfully, but these errors were encountered: