Suppress kernel image from the filesystem image
Hi,
When discussing the issue of suppressing the kernel image from the filesystem image, it was suggested it is still an open question:
<Crofton|work> the kernel image getting installed in the image has been a long standing headache
Several ways were mentioned, like fiddling with FILES variable and using BAD_RECOMMENDATIONS. But the correct method is supposed to be overriding the RDEPENDS_kernel-base from kernel.bbclass:
<pb___> denix0: these lines seem to suggest what the intended behaviour was:
<pb___> # Allow machines to override this dependency if kernel image files are <pb___> # not wanted in images as standard
<pb___> RDEPENDS_kernel-base ?= "kernel-image"
<pb___> but, for reasons that are not entirely clear to me at the moment, my efforts to override RDEPENDS_kernel-base did not meet with success.
I played with it for some time and realized that in order for it to work, the kernel needs to be rebuilt before the new dependencies take place. So, I added this to the local.conf:
RDEPENDS_kernel-base = ""
And after rebuilding the kernel and the filesystem I no longer see kernel image in the filesystem!
The only problem I see with this approach is it builds the kernel packages differently (USE-flags, anyone?) and if I use a public feed, I may end up installing kernel image into the system again...
Signature · 1 line
Denys
Quoted 8 lines · Denys Dmytriyenko
I played with it for some time and realized that in order for it to work, the kernel needs to be rebuilt before the new dependencies take place. So, I added this to the local.conf:
RDEPENDS_kernel-base = ""
And after rebuilding the kernel and the filesystem I no longer see kernel image in the filesystem!
Ah, very good. I wonder why that wasn't working properly for me when I tried it.
Quoted 3 lines
The only problem I see with this approach is it builds the kernel packages differently (USE-flags, anyone?) and if I use a public feed, I may end up installing kernel image into the system again...
I wouldn't have thought this would be too much of a problem in practice since, generally, the choice of whether or not to put the kernel in the rootfs is just going to be governed by the (DISTRO,MACHINE) tuple and doesn't depend on any other details of the image being built. Is that not true in your use-case?
p.