[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiling User-Mode-Linux kernel



On Mon, Jan 08, 2007 at 12:43:00PM -0700, Gordon Haverland wrote:
[...]
> PATCH_THE_KERNEL=AUTO 
> make-kpkg --revision=newmain.2 --config=defconfig --arch=um --arch_in_name 
> kernel_image
> 
> Since I am not patching anything the PATH_THE_KERNEL=AUTO 
> environment variable setting really shouldn't do anything (it 
> came from the compile line I used for a host kernel with skas 
> (yes, I seen it was recommended NOT to uset he skas patch)).
> 
> I am still getting errors in trying to compile things.  Editing 
> the make output, ...
> 
> This is kernel package version 10.065.
> /usr/bin/make    ARCH=um \
>                              vmlinux
> make[1]: Entering directory `/usr/src/linux-source-2.6.18'
>   SYMLINK arch/um/include/kern_constants.h
>   SYMLINK arch/um/include/sysdep
> make[2]: `arch/um/sys-i386/user-offsets.s' is up to date.
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   CC      arch/um/kernel/asm-offsets.s
> In file included from include/asm/smp.h:17,
>                  from include/linux/smp.h:18,
>                  from include/linux/sched.h:63,
>                  from arch/um/include/sysdep/kernel-offsets.h:2,
>                  from arch/um/kernel/asm-offsets.c:1:
> include/asm/mpspec.h:6:25: error: mach_mpspec.h: No such file or 
> directory

probably you missed `make clean mrproper` before building UML.

Time to try it myself :)

# sudo apt-get install linux-source-2.6.18=2.6.18-8
...blabla...
The following packages will be upgraded:
  linux-source-2.6.18
...blabla...wait...blabla...

# tar xjf linux-source-2.6.18.tar.bz2
# cd linux-source-2.6.18/
# PATCH_THE_KERNEL=AUTO make-kpkg --revision=newmain.2 --config=defconfig --arch=um --arch_in_name kernel_image
exec make -f /usr/share/kernel-package/ruleset/minimal.mk debian
DEBIAN_REVISION=newmain.2  KPKG_ARCH=um   ARCH_IN_NAME=YES 
/usr/share/kernel-package/ruleset/minimal.mk:53: No .config file found
/usr/share/kernel-package/ruleset/minimal.mk:98: *** Please create a .config file.  Stop.
Failed to create a ./debian directory: No such file or directory at /usr/bin/make-kpkg line 1096.
# make defconfig ARCH=um
# PATCH_THE_KERNEL=AUTO make-kpkg --revision=newmain.2 --config=defconfig --arch=um --arch_in_name kernel_image
...
...goes far beyond the asm-offsets.c but
...
  CC      arch/um/os-Linux/skas/process.o
arch/um/os-Linux/skas/process.c: In function 'copy_context_skas0':
arch/um/os-Linux/skas/process.c:328: error: 'PAGE_SHIFT' undeclared (first use in this function)
...

DOH! oh, now I remember :) we have a fix in the user-mode-linux package
see here:
http://svn.debian.org/wsvn/pkg-uml/trunk/src/user-mode-linux/debian/patches/?rev=0&sc=0

> I'll continue to plug away at this (waiting for drywall compound 
> to dry) for a while, but if someone has a pointer, I would be 
> glad to see it.  :-)

you may also want to try build the user-mode-linux from source by
yourself, eg: 

apt-get source user-mode-linux
cd user-mode-*;
dpkg-buildpackage -uc -us -b -rfakeroot

-- 
mattia
:wq!



Reply to: