[PlanetCCRMA] Kernel Rebuild for NTFS Support

Fernando Lopez-Lezcano nando@ccrma.Stanford.EDU
Mon Sep 25 15:03:01 2006


On Mon, 2006-09-25 at 21:40 +0100, Ken Smith wrote:
> Hi Folks,
> 
> I've just set up an additional partition on my system with FC5. I like 
> the changes from FC3 but I'd really like NTFS access if possible. The 
> system is running 2.6.16-1.2080.16.rrt.rhfc5.ccrmasmp. I've installed 
> the sources and a test rpm rebuild of the kernel in unmodified form 
> takes a while but runs fine and produces rpm files.
> 
> Now, I think I'm doing the right things. I've modified the .config files 
> in the SOURCES directory to enable NTFS but my build is failing because 
> I don't think I know how to change the kernel.spec file to properly 
> update the kernel version. I've tried making a few changes to the 
> beginning of the file in this bit....(this is the original version)
> 
> # Polite request for people who spin their own kernel rpms:
> # please modify the "release" field in a way that identifies
> # that the kernel isn't the stock distribution kernel, for example by
> # adding some text to the end of the version number.
> #
> %define sublevel 16
> %define kversion 2.6.%{sublevel}
> %define rpmversion 2.6.%{sublevel}
> %define rhbsys  .16.%{?preemptdesktop:rdt}%{!?preemptdesktop:rrt}
> %define release %(R="$Revision: 1.2080 $"; RR="${R##: }"; echo 
> ${RR%%?})%{rhbsys}
> %define signmodules 0
> %define make_target bzImage
> %define kernel_image x86
> 
> But I don't understand the syntax here and my uninformed blundering 
> around hasn't produced a file that will build. The rpm build fails just 
> after the patches get applied, like this:
> 
> + perl -p -i -e 's|CONFIG_4KSTACKS=y|# CONFIG_4KSTACKS is not set|g' 
> .config
> + '[' '' '!=' xen ']'
> + make ARCH= nonint_oldconfig
> Makefile:438: 
> /usr/src/redhat/BUILD/kernel-2.6.16/linux-2.6.16.i686/arch//Makefile: No 
> such file or directory
> make: *** No rule to make target 
> `/usr/src/redhat/BUILD/kernel-2.6.16/linux-2.6.16.i686/arch//Makefile'.  
> Stop.
> error: Bad exit status from /var/tmp/rpm-tmp.71042 (%prep)
> 
> I'd really appreciate some advice on how to do this or if there is a 
> shortcut way just to build the module I need rather than what appears to 
> be a "boil the ocean" of re-building the whole kernel. I know how to do 
> that outside of rpm but I'd really prefer an rpm solution so that the 
> configuration is reasonably well managed.

Ahh, yes, that bits me almost every time I change things manually...
The .config file needs to be prefixed with the architecture you will be
building this for. 

Just add this at the top of the .config files you modified:

---- cut here ----
# i386
#
---- cut here ----

-- Fernando