Re: Problems trying to recompile the Linux Kernel 64 bits on Knoppix 6.7
Hello Gilles,
On Sat, Aug 20, 2011 at 03:07:02PM -0700, Gilles van Ruymbeke wrote:
> Hi Klaus,
> I still have problems trying to recompile the Linux Kernel 64 bits on
> Knoppix 6.7:
> After un-tar of the /usr/src/linux-source-2.6.39.3-64.tar.bz2 included in
> the Knoppix 6.7 DVD and then
> run "make xconfig" I find out that the header of the .config file changed
> such as the kernel name is not
> 64 bits anymore as in the /boot/config-2.6.39.3-64 (no more "-64" at the
> end of the 2.6.39.3 cf below)
I would expect the 64bit options to vanish if you are trying to compile
a 64bit kernel on a 32bit system without cross-compiling. However, the
kernel name or version number is not part of .config.
I compile both kernels on a 32bit system without any amd64 libraries,
you don't need them for the kernel.
For the 32-bit kernel, I use
make CONCURRENCY_LEVEL=8 ARCH=i386 bzImage modules && \
rm -rf debian; CONCURRENCY_LEVEL=8 ARCH=i386 MODULE_LOC=`pwd`/../modules fakeroot make-kpkg --us --uc kernel_image modules_image kernel_headers kernel_source
and for the 64-bit kernel, I use
make CONCURRENCY_LEVEL=8 ARCH=x86_64 bzImage modules && \
rm -rf debian; MODULE_LOC=`pwd`/../modules fakeroot make-kpkg --arch=x86_64 --cross-compile=- --append-to-version=-64 --us --uc kernel_image modules_image kernel_headers kernel_source
> which after compile and install creates serious issues (as for the
> location of the kernel modules
> in /lib/modules as an example). What file needs to be fixed for the kernel
> name to be correct ?
Basically, the main Makefile (look for EXTRAVERSION), but make-kpkg
--append-to-version=-64 will do this for you when building the package.
> Did you try to recompile the Kernel 64 bits using the Knoppix 6.7 DVD ?
No, but compiler version and kernel-package are the same version as on
my build system.
> (6.5 was ok)
> I also have trouble compiling and create 64 bits binaries without forcing
> it with the -m64 flag.
> It looks like that something changed with gcc between Knoppix 6.5 and
> Knoppix 6.7.
gcc has been updated, but I think it's the Makefile variables and the
make-kpkg flags that do the trick. If compiling a 64-bit kernel on a
32-bit host, or a 32-bit kernel on a 64-bit host, you are
cross-compiling and need to tell make via the ARCH flag.
Regards
-Klaus
Reply to: