Hello,
Did some one recently manage to use x86 in FS mode ? I built
scons/build/X86/gem5.opt successfully. I also manage to launch the built
x86 stystem with:
build/X86/gem5.opt configs/example/fs.py --disk-image=linux-x86.img
--caches --cacheline_size=64
--l1d_size=32kB --l1i_size=32kB --l1d_assoc=2 --l1i_assoc=2 --l2cache
--l2_size=128kB --l2_assoc=16 --cpu-type=detailed --mem-size=256MB
--mem-type=lpddr3_1600_x32 --mem-channels=2 --cpu-clock=200MHz
However as I launch my compiled C code on the x86 in FS mode (through
terminal) gem5 repports "kernel too old". The kernel(2.6.22.9) I use is
the one from : http://www.m5sim.org/Download.
Does any one know how could I get a newer kernel? Or how could I build a
newer one ?
The procedure for building a newer kernel(2.6.28.4) presented in
http://www.m5sim.org/Linux_kernel is not working: hg clone
http://www.kernel.org/hg/linux-2.6 is not working (no connection with
any server).
My host is a linuk version "3.16.0-38-generic".
Best regards,
Roman
On 2015-06-17 09:45, ursu wrote:
Hello,
I still try to solve the previous problem : build a linux kernel for
x86 to be used on gem5; the kernel provided on
http://www.m5sim.org/Download is too old for executing my C code. The
code I want to execute on gem5-x86 is compiled on my host x86 linux
version "3.16.0-38-generic".
My gaol is to build a newer version of the linux kernel.
I downloaded a source code kernel from :
http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
I then run menuconfig to specify the options of the kernel. Finally I
got a new kernel (I named it x86_64-vmlinux-2.6.22.9_new).
I then run gem5-x86 with that new kernel:
build/X86/gem5.opt configs/example/fs.py --disk-image=linux-x86.img
--kernel=x86_64-vmlinux-2.6.22.9_new --caches --cacheline_size=64
--l1d_size=32kB --l1i_size=32kB --l1d_assoc=2 --l1i_assoc=2 --l2cache
--l2_size=128kB --l2_assoc=16 --cpu-type=detailed --mem-size=256MB
--mem-type=lpddr3_1600_x32 --mem-channels=2 --cpu-clock=200MHz
The output is the following :
Global frequency set at 1000000000000 ticks per second
info: kernel located at:
/home/ursu/gem5-stable/Disk_Binaries/binaries/x86_64-vmlinux-2.6.22.9_new
0: rtc: Real-time clock set to Sun Jan 1 00:00:00 2012
Listening for com_1 connection on port 3456
warn: Reading current count from inactive timer.
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
**** REAL SIMULATION ****
info: Entering event queue @ 0. Starting simulation...
warn: x86 cpuid: unimplemented function 7
warn: x86 cpuid: unimplemented function 8
warn: instruction 'fninit' unimplemented
warn: Don't know what interrupt to clear for console.
warn: instruction 'wbinvd' unimplemented
688615290000: system.pc.com_1.terminal: attach terminal 0
panic: Access to unrecognized internal address space
0x1fff880200000000.
@ tick 757753290000
[translateInt:build/X86/arch/x86/tlb.cc, line 225]
Memory Usage: 510060 KBytes
Program aborted at tick 757753290000
Aborted (core dumped)
I checked the line in the "build/X86/arch/x86/tlb.cc" file. However I
don't have much experience with TLBs.
Does some one know which options I have to take care of in
menuconfig(while building the kernel) to avoid the above error message
with the TLB ?
Kind regards,
Roman Ursu
On 2015-06-04 17:15, ursu wrote:
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
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users