Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel

From: Joel Fernandes
Date: Thu Mar 07 2019 - 22:16:28 EST


On Thu, Mar 07, 2019 at 03:40:37PM -0800, hpa@xxxxxxxxx wrote:
> On March 7, 2019 3:12:07 PM PST, Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> wrote:
> >Enrico,
> >
> >On Thu, Mar 07, 2019 at 11:11:22PM +0100, Enrico Weigelt, metux IT
> >consult wrote:
> >> On 07.03.19 21:55, Greg KH wrote:
> >>
> >> > Ick, no, no more squashfs please, let's just kill that mess once
> >and for
> >> > all :)
> >>
> >> okay, then: s/squashfs/whatever_fs_image_or_archive_you_like/;
> >>
> >> > Again, putting this in a simple compressed tar image allows anyone
> >to do
> >> > whatever they need to with this. If they want a full filesystem,
> >> > uncompress it and use it there. If they just want it in-memory
> >where
> >> > they can uncompress it and then discard it, that works too.
> >>
> >> And let me stress the point: doesn't need any kernel changes at all,
> >> when it's just a file in the same place where the .ko's live.
> >
> >Yes, but you're missing the point that some people would also opt to
> >build it
> >into the kernel during their development/debugging (Config=y). For such
> >folks, they don't want to update the FS with anything during debug runs
> >either. Your "whole same place where the .ko lives" doesn't address
> >Daniel's
> >usecase. You may say "initrd", but this is a much cleaner solution to
> >that
> >IMO. There is no initrd needed and the path to the header files will be
> >at a
> >standard location that is already pre-decided by the kernel.
> >
> >As Greg said, you are welcome to keep it disabled for yourself if you
> >don't
> >want it. This doesn't affect anyone else who doesn't use it.
>
> You do know that initrd can be built into the kernel, right?

Yes of course, Hans. I meant the proposed solution is cleaner than the initrd
(built-in or otherwise). The proc file location is fixed and all tools can
just refer to it than worrying about where in the initrd are the headers
located.

thanks!

- Joel