Well, that's slightly frustrating to have to use a separate toolchain than the one distributed with AOSP, but in any case I will attempt it this way. Which version do I need to download?Codebench Arm Lite Edition EABI or Codebench Arm Lite Edition GNU/Linux?
I would eventually like to be able to build custom kernels for gem5, specifically with Android ICS. I know Anthony is working on this, but the process shouldn't be too much different than whatever process was used to get the currently distributed kernel/image. So, I'm trying to duplicate that process as a starting point. The end goal is to use the same kernel/disk images on qemu and gem5, and use qemu to "fastforward" gem5. On Sun, Jun 3, 2012 at 9:11 AM, Anirudh Sivaraman <sk.anir...@gmail.com> wrote: > On Sat, Jun 2, 2012 at 8:40 PM, Ira Ray Jenkins <irarayjenk...@gmail.com> > wrote: >> On Sat, Jun 2, 2012 at 7:54 PM, Anirudh Sivaraman <sk.anir...@gmail.com> >> wrote: >>> This thread may be useful : >>> http://m5sim.org/cgi-bin/mailman/private/gem5-users/2012-June/019665.html >>> since I had a similar problem today morning. I used 2.6.35 and after >>> the fixes in that thread it worked. >>> >>> On Sat, Jun 2, 2012 at 7:30 PM, Ira Ray Jenkins <irarayjenk...@gmail.com> >>> wrote: >>>> I am attempting to duplicate the android kernel provided with gem5. >>>> >>>> Following the instructions here: >>>> http://www.linux-arm.org/LinuxKernel/LinuxAndroidPlatform >>>> >>>> I cloned the repo: git clone git://linux-arm.org/linux-2.6-armdroid.git >>>> >>>> and checkout'd 2.6.38-armdroid with: git checkout -b 2.6.38-armdroid >>>> >>>> From here I copied the .config file supplied by gem5 into the kernel >>>> tree root and compiled with the following: >>>> >>>> make -j9 ARCH=arm CROSS_COMPILE=arm-linux-androideabi- >>>> >>>> I had to modify fs/nfs/nfsroot.c, but the compilation completed >>>> successfully using the toolchain supplied by the AOSP. I copied the >>>> vmlinux over to the gem5/system/binaries directory, but gem5 stalls >>>> for some reason when run with this kernel. >>>> >>>> The command line output: >>>> gem5 Simulator System. http://gem5.org >>>> gem5 is copyrighted software; use the --copyright option for details. >>>> >>>> gem5 compiled Apr 26 2012 12:26:52 >>>> gem5 started Jun 2 2012 19:17:17 >>>> gem5 executing on Gaia >>>> command line: build/ARM/gem5.fast configs/example/fs.py -b ArmAndroid >>>> --kernel=test.vmlinux >>>> Global frequency set at 1000000000000 ticks per second >>>> info: kernel located at: /home/ray/gem5/system/binaries/test.vmlinux >>>> Listening for system connection on port 5900 >>>> Listening for system connection on port 3456 >>>> 0: system.remote_gdb.listener: listening for remote gdb on port 7000 >>>> info: Using bootloader at address 0x80000000 >>>> **** REAL SIMULATION **** >>>> info: Entering event queue @ 0. Starting simulation... >>>> warn: The clidr register always reports 0 caches. >>>> warn: clidr LoUIS field of 0b001 to match current ARM implementations. >>>> warn: The csselr register isn't implemented. >>>> *stalls here* >>>> >>>> The terminal output: >>>> ==== m5 slave terminal: Terminal 0 ==== >>>> <5>Linux version 2.6.35.8-armdroid1+ (ray@Gaia) (gcc version 4.4.3 >>>> (GCC) ) #1 SMP Sat Jun 2 19:07:52 EDT 2012 >>>> CPU: ARMv7 Processor [350fc000] revision 0 (ARMv(null)), cr=10c5387f >>>> CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache >>>> Machine: ARM-RealView PBX >>>> <4>Ignoring unrecognised tag 0x00000000 >>>> Memory policy: ECC disabled, Data cache writealloc >>>> *stalls here* >>>> >>>> My assumption is that I've missed a step, or incorrectly configured >>>> something. Thanks for the help, >>>> _______________________________________________ >>>> gem5-users mailing list >>>> gem5-users@gem5.org >>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>> _______________________________________________ >>> gem5-users mailing list >>> gem5-users@gem5.org >>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> >> >> >> I realized an error in my original question. Once I cloned the source, >> I did a checkout -b ( which creates a new branch); however, I was >> still on linux-2.6.35-armdroid. >> >> Beyond that, I didn't modify the provided .config at all, just copied >> it over. Should I do make oldconfig, in which case, what options >> should I select? Like I said, I just want to duplicate the process >> used to create the default/provided kernel. > > You don't need to select any options or do make oldconfig. You can > just copy the given config file onto .config and it should work. > > 1. Couple of things : Your cross-compiler tool chain is different from > the suggested one. Download it from here : > http://www.mentor.com/embedded-software/codesourcery. You should be > using arm-none-linux-gnueabi- > 2. You also need to add EXTRA_CFLAGS=-mno-unaligned-access because it > causes a kernel exception otherwise. So your make command will change > to : > > make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- > EXTRA_CFLAGS=-mno-unaligned-access -j<WhateverYouWant> > > After this it should work. You don't need to do any config. on your > own or add new config options. If I may ask, why are you trying to > compile the kernel ? I have been trying to do the same as well, so it > might help if we avoided duplication. > > Anirudh > > > >> _______________________________________________ >> gem5-users mailing list >> gem5-users@gem5.org >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users _______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users