[Nix-dev] AUFS 2.1 for 2.6.37

Shea Levy shea at shealevy.com
Sun Mar 27 16:14:24 CEST 2011


On 03/27/2011 10:02 AM, Lluís Batlle i Rossell wrote:
> On Sun, Mar 27, 2011 at 09:36:37AM -0400, Shea Levy wrote:
>> Resubmitting this patch with notes.
>>     * The make target for the aufs2.1 headers uses a Makefile in the
>>       kernel build directory that requires that unifdef be in the
>>       scripts/ subdirectory of the build directory. The way I've dealt
>>       with this here is by adding "make $makeFlags -C scripts unifdef"
>>       to the postBuild in the kernel builder. Since the builder is used
>>       by all kernel versions, this will require rebuilding every kernel
>>       and kernel-dependent package if the patch is accepted, so one
>>       alternative I thought of would be to create a fake kernel build
>>       directory where everything is symlinked to the real build
>>       directory except scripts/, which is first copied and then make
>>       unifdef is run before building aufs2.1. If that more complicated
>>       solution is preferred, or if anyone has ideas for another one, I
>>       can do that and submit a new patch.
> Sorry, but I prefer to ask before trying to understand this 'make -C scripts
> unifdef' alone.
>
> Does really this single change in the kernel builder makes the $out path have
> anything different (have the unifdef script, in this case)? It looks as if it
> would only build unifdef, but not install it. And isn't unifdef always built
> when building the kernel target?
>
> Regards,
> Lluís.
Lluís,

make -C scripts unifdef compiles the unifdef application in the scripts/ 
directory, and when Nix copies over the build tree to 
$out/lib/modules/$version/build for kernel modules to reference, it 
copies over all of scripts/ except the .o files. I can't speak for other 
kernel versions, but at the least for 2.6.37.1 unifdef is not built by 
default. If you look at the Makefile in scripts, unifdef is listed  
under a comment saying that the following programs are only built on-demand.

~Shea



More information about the nix-dev mailing list