uname.txt
created april, 10th 2002 by Whygee@f-cpu.org

so i've patched this a bit for YGLFS.

You specify the desired target with a simple number
and you modify commands.auto accordingly. It's the $TARGET
variable which is by default to 4, meaning a i486.

===================================================================

I've encountered some strange things (for a non-kernel hacker)
when attempting to insert the new module, it said that the kernel
version was wrong. After some crawling though the sources, i found
/usr/include/linux/version.h which contains :

  You should not include /usr/include/{linux,asm}/ header
  files directly for the compilation of kernel modules.

  glibc now uses kernel header files from a well-defined
  working kernel version (as recommended by Linus Torvalds)
  These files are glibc internal and may not match the
  currently running kernel. They should only be
  included via other system header files - user space
  programs should not directly include <linux/*.h> or
  <asm/*.h> as well.
  To build kernel modules please do the following:
   o Have the kernel sources installed
   o Make sure that the symbolic link
     /lib/modules/`uname -r`/build exists and points to
     the matching kernel source directory
   o Now copy /boot/vmlinuz.version.h to
     /lib/modules/`uname -r`/build/include/linux/version.h
   o When compiling, make sure to use the following
     compiler option to use the correct include files:
     -I/lib/modules/`uname -r`/build/include
   instead of
     -I/usr/include/linux
  Please adjust the Makefile accordingly.

And it worked, i just did a
  cp /boot/vmlinuz.version.h /usr/src/linux/include/linux/version.h
and recompiled the stuff.

===============================================================

Something else :
YGLFS automatically checks whether it can execute a file named
  $YGLFS/src/uname-trick/commands.auto
and it runs it before running the chroot etc. so you can safely
rerun the installation scripts, without doing the gcc/insmod stuff
manually. If no cross-compiling is needed,
either rename this directory or the commands.auto file.

This file contains the check, compilation and module insertion,
modify it to reflect your desired target platform.
After a build, don't forget to remove the module and do some
"uname -m" to check whether everything is ok, right ?
