2012-05-21 12:53:18

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [Lf_driver_backport] scripts in compat tree

On Mon, May 21, 2012 at 5:32 AM, Ozan Çağlayan <[email protected]> wrote:
> Hi,
>
> I will be working on the GSoC project to prepare compat graphics drivers.
>
> Looking at the scripts (ckmake and get-compat-kernels) in the compat tree, I
> see that they are only handling Ubuntu systems. First of all, should they
> really be distro-aware?

When I wrote this I posted the patch to lkml [0] for wider review and
naturally I got the same reaction from folks. I wrote it originally
with the goal to do something distro-agnostic and in fact it is, its
just that I haven't figured out a quick way to make this work across
the board.

[0] https://lkml.org/lkml/2012/2/7/501

More below.

> Why not to download the tarballs from kernel.org?
> Isn't it a more generic approach?

Well kernel.org does not have already built kernels. Ubuntu's PPA
kernels *are* vanilla kernels, in fact that is why they were put up,
they are guaranteed to be built on vanilla kernels. We couldn't get a
more generic approach then. The only thing though is -- the PPA
kernels obviously have the kernels integrated on .debs. There are a
few options here:

1) If Ubuntu can dpkg -x the kernels for us onto tarballs that'd be swell
2) We could write our own script to do this with C code that does
the dpkg -x for us

There are ways to do 2) suggested in the thread above.

> If this makes sense, I'd like to extend those scripts to handle vanilla
> kernels with a cmdline switch which won't care at all about lsb_release. I
> will hardcode end-of-life products and parse kernel.org to dynamically
> detect new versions, download and extract them under /lib/modules if they
> don't exist in there, etc.

That'd be amazing!

> I'm waiting for your feedback :)

Thanks!

Luis


2012-05-21 13:40:28

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [Lf_driver_backport] scripts in compat tree

On Mon, May 21, 2012 at 6:15 AM, Ozan Çağlayan <[email protected]> wrote:
>> Well kernel.org does not have already built kernels. Ubuntu's PPA
>> kernels *are* vanilla kernels, in fact that is why they were put up,
>> they are guaranteed to be built on vanilla kernels. We couldn't get a
>> more generic approach then. The only thing though is -- the PPA
>> kernels obviously have the kernels integrated on .debs. There are a
>> few options here:
>>
>>  1) If Ubuntu can dpkg -x the kernels for us onto tarballs that'd be swell
>>  2) We could write our own script to do this with C code that does
>> the dpkg -x for us
>>
>> There are ways to do 2) suggested in the thread above.
>
> ah you are right, we need to have built kernels in order to build the
> modules. Well then the 2nd solution seems reasonable if we can mimic
> dpkg -x. I googled a bit and people says that debs are generic .ar
> archives so it would be easy to take the tarball inside of them.
>
> If I succeed this can be used on any distro since that they are
> vanilla without any patches. But if the PPA disappears one day, we'll
> have to find another solution :)

Indeed :) the PPA must not seize to exist! Or something.

> BTW you also download the kernel images probably for booting into them
> to test the compat builds. Booting using those images on other
> distributions can be messy and unsuccessful as initramfs and booting
> mechanisms differ widely. I'll test those too.

Yeap... indeed. Mandrake for example loves to compress their modules.
compat-wireless handles the initramfs I think well, so *if* you do
want to address that, you could look at how we address initramfs
there, but I frankly don't think having this option available for all
distributions is a requirement. It'd be nice, but I think it'd be
nicer if ckmake itself could run for all options without root
privileges. So for example right now ckmake does require privileges to
install the debs, it'd be nicer if instead we just unload the kernels
to a $USER/ dir somewhere that ckmake has rights to under the user
calling it. In this case I'd be willing to remove the option to even
boot into these kernels.

Luis

2012-05-21 13:15:06

by Ozan Çağlayan

[permalink] [raw]
Subject: Re: [Lf_driver_backport] scripts in compat tree

> Well kernel.org does not have already built kernels. Ubuntu's PPA
> kernels *are* vanilla kernels, in fact that is why they were put up,
> they are guaranteed to be built on vanilla kernels. We couldn't get a
> more generic approach then. The only thing though is -- the PPA
> kernels obviously have the kernels integrated on .debs. There are a
> few options here:
>
>  1) If Ubuntu can dpkg -x the kernels for us onto tarballs that'd be swell
>  2) We could write our own script to do this with C code that does
> the dpkg -x for us
>
> There are ways to do 2) suggested in the thread above.

ah you are right, we need to have built kernels in order to build the
modules. Well then the 2nd solution seems reasonable if we can mimic
dpkg -x. I googled a bit and people says that debs are generic .ar
archives so it would be easy to take the tarball inside of them.

If I succeed this can be used on any distro since that they are
vanilla without any patches. But if the PPA disappears one day, we'll
have to find another solution :)

BTW you also download the kernel images probably for booting into them
to test the compat builds. Booting using those images on other
distributions can be messy and unsuccessful as initramfs and booting
mechanisms differ widely. I'll test those too.


--
Ozan Çağlayan