-
Notifications
You must be signed in to change notification settings - Fork 4
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
Trim Busybox, supply other essential commands #5
Comments
Maybe dropbear also can be provided as a must-have inside initramfs? |
Indeed, |
I will also look into replacing with the Gentoo |
@AKuHAK, the All tools are statically linked, which means some duplication of Musl being separately linked into all of them. The advantage however is that they have no library dependencies, so commands can easily be added to or removed from the initramfs, as needed. Further on, it’d make sense to supply a set of different kinds of initramfs, tailored for different needs. To be useful, Dropbear needs additional configuration files, for example The |
Great, probably we need to configure dispatch action, so after changes in this repo, produced binary in linux repo will also automatically change. |
I removed redundant GNU libc linked packages in commit d2ab811. I also made proper scripts for the commands used, in commit 3017bca, so the exact same installation can be done in a plain Gentoo, with no Docker whatever, avoiding some of its obnoxious |
Since this repo compiles the kernel, we’ve got a cyclic dependency between the two repos. When updating the linux repo, it will rebuild itself. But then this repo has an old kernel, so it will have to be rebuilt too, which will trigger another rebuild of the linux repo... That’s a good reason to remove the kernel and IOP modules from this repo, and have it focus on Gentoo and tooling. |
Its not actually true cyclic, cause Docker image can contain old kernel, while linux repo should be up to date always. I only ask for linux artifacts regeneration, when Docker image updates, not vice versa. Buy yes, if this is confusing, you can remove linux kernel sources from Docker image and leave initramfs without kernel modules. This will also reduce Docker size heavily. |
Busybox has got gentoo-mipsr5900el/configs/busybox Lines 615 to 617 in 87d58f1
I haven’t verified it has feature parity with sys-apps/fbset in gentoo-mipsr5900el/scripts/install-packages Lines 12 to 13 in 87d58f1
but if it does, we might as well remove this package, and save another 102424 bytes. :-) |
Removed kernel in commit 9591cf1, and IOP modules and tools in commit 5e10f35. Added
|
Why? IOP modules are essential for initramfs, this means that current artifacts in linux repo are broken. IOP tools also are nice addition. Also iop tools are taking less than 1mb. |
They’d be out-of-sync with the Besides, the IOP modules and tools absolutely must be in-sync when the kernel compiles, so they’re compiled in Also, I’m considering removing the kernel modules from the downloadable initramfs archives, because they’re kernel version specific and generally won’t work with any other kernel. Hence, anyone who uses such initramfs archives with their own kernels will run into trouble with those modules, and should discard them anyway.
IOP tooling could be an exception, but then again, they’re downloadable from the Anyone who wants either IOP tools or modules (or both) in the Docker can simply do
and have them in a minute? |
The idea of Docker container is to keep as much as possible inside container to decrease the probability of user error, and so it is container's holder responsibilty that container is working. Qemu, iopmod modules, cross compiler, iopmod tools, all of that is kernel dependencies. Of course it is possible to remove everything from container and move it inside Github Action, but currently github action in linux is broken, cause produced initramfs will not contain iopmod modules. Dispatch action cycle to my mind should be such: As I understand you suggest a bit different order: As linux repo isnt a dependency for any other repo, it should not produce dispatch action to any other repos. Maybe @fjtrujy (as ps2dev and pspdev container holder) can suggest something? |
I think one can say that initramfs can have different levels of ‘completeness’:
Of these, configurations, scripts, and programs are likely to work with almost any kernel, so supplying them in downloadable initramfs archives is helpful. It saves people some tedious work with details and cross-compilation of programs. IOP module firmware is somewhat more dependent on the kernel drivers used, and the kernel modules (the So a complete initramfs is actually generally only useful with a single, at one time compiled, specific kernel and nothing else. |
Busybox is currently 2.6 MB and comes with a lot of unnecessary functions. Remove at least half of them. See also frno7/iopmod#7 (comment).
The text was updated successfully, but these errors were encountered: