Dear gem5 users,

I successfully built an x86 on gem5 with scons build/x86/gem5.opt.

Then, I compiled a C code on my host (an x86 running an Ubuntu 14.04.2 LTS with kernel version 3.16.0-38-generic) and mounted the executable on the disk image linux-x86.img.

After executing :
build/X86/gem5.opt configs/example/fs.py --disk-image=linux-x86.img
and launching the execution of my executable (through terminal) I got the message: "kernel too old" (according to the posts on the gem5 mailing list this is due to a version problem of glibc).

In fact, applying "file" command to my executable, I get : "statically linked, for GNU/Linux 2.6.24" whereas the kernel used by gem5 is the one you get from "http://www.m5sim.org/Download"; (full system files for x86) which is "version 2.6.22.9".


I basically need a newer kernel for the x86 on gem5.

------------------------------------------------------------------

For getting a newer version of the kernel I followed the simple indications from : http://www.m5sim.org/Linux_kernel to compile a 2.6.28.4 kernel. While executing "make vmlinux -j 4" or simply "make" (I tried both) this error appeared:

ursu@ursu-OptiPlex-745:~/linux-2.6.28.4$ make vmlinux -j 4
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  VDSO    arch/x86/vdso/vdso.so.dbg
gcc: error: elf_x86_64: No such file or directory
gcc: error: unrecognized command line option ‘-m’
make[1]: *** [arch/x86/vdso/vdso.so.dbg] Error 1
make: *** [arch/x86/vdso] Error 2
make: *** Waiting for unfinished jobs....


After searching in google, the typical answer was:
Edit "arch/x86/vdso/Makefile":
Change "-m elf_x86_64" to "-m64"
Change "-m elf_x86" to "-m32"

I did it and executed "make vmlinux -j 4" again :

ursu@ursu-OptiPlex-745:~/linux-2.6.28.4$ make vmlinux -j 4
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  VDSO    arch/x86/vdso/vdso.so.dbg
gcc: error:  : No such file or directory
make[1]: *** [arch/x86/vdso/vdso.so.dbg] Error 1
make: *** [arch/x86/vdso] Error 2
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes.  Stop.

There, I don't find any solution.

-----------------------------------------------------------------------------

-----------------------QUESTIONS : ----------------------------------------

At this point I don't really know what to do :

--Comments on google indicate that it is not obvious to compile and use an older version of glibc on a computer having a new version.

--Trying to use crosstools (http://www.kegel.com/crosstool/crosstool-0.43/doc/crosstool-howto.html) for building a crosscompiler targetting an x86_64--gcc-4.1.0--glibc-2.3.6 (hopping that gcc-4.1.0--glibc-2.3.6 will be ok for kernel 2.6.22.9) leads to many errors during compilation. Is this a good path ?

Does someone know how the kernel 2.6.22.9 (from http://www.m5sim.org/Download) was compiled for gem5 ?

How do you proceed for compiling kernels for your gem5 simulations ?


Best regards,

Roman Ursu











http://www.m5sim.org/Linux_kernel
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to