Difference between revisions of "ARM Kernel"

From gem5
Jump to: navigation, search
(32 bit kernel (AArch32))
Line 2: Line 2:
  
 
=== Linux command-line Configurations ===  
 
=== Linux command-line Configurations ===  
These instructions are for running headless systems. That is a more "server" style system where there is no frame-buffer. The description has been created using the latest known-working tag in the repositories linked below, however the tables in each section list previous tags that are known to work.  
+
These instructions are for running headless systems. That is a more "server" style system where there is no frame-buffer. The description has been created using the latest known-working tag in the repositories linked below, however the tables in each section list previous tags that are known to work. To built the kernels on an x86 host you'll need ARM cross compilers. If you're running a reasonably new version of ubuntu you can get a AArch32 (32-bit compiler) by <pre>apt-get install  gcc-arm-linux-gnueabihf</pre> and a AArch64 (64-bit compiler) by <pre>apt-get install gcc-aarch64-linux-gnu</pre>. If you can't use these pre-made compilers the next easiest way to obtain the required compilers from [[Linaro][http://releases.linaro.org/latest/components/toolchain/binaries/]].  
  
  
Line 13: Line 13:
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- vexpress_gem5_server_defconfig
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- vexpress_gem5_server_defconfig
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
 
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
 +
mv vmlinux vmlinux.arm.ll_20131205.0-gem5
 +
</pre>
  
 +
Testing the just built kernel:
 +
<pre>
 +
% ./build/ARM/gem5.opt configs/example/fs.py  --kernel=/tmp/linux-linaro-tracking-gem5-ll_20131205.0-gem5-325b404/vmlinux.arm.ll_20131205.0-gem5  --machine-type=VExpress_EMM --dtb-file=/tmp/linux-linaro-tracking-gem5-ll_20131205.0-gem5-325b404/arch/arm/boot/dts/vexpress-v2p-ca15-tc1-gem5.dtb
 
</pre>
 
</pre>
  
Line 24: Line 29:
 
==== 64 bit kernel (AArch64) ====
 
==== 64 bit kernel (AArch64) ====
 
These are instructions to generate a 32-bit ARM Linux binary.  
 
These are instructions to generate a 32-bit ARM Linux binary.  
 +
<pre>
 
wget "http://www.linux-arm.org/git?p=linux-aarch64-gem5.git;a=snapshot;h=20140821;sf=tgz" -O 20140821-gem5_aarch64.tar.gz
 
wget "http://www.linux-arm.org/git?p=linux-aarch64-gem5.git;a=snapshot;h=20140821;sf=tgz" -O 20140821-gem5_aarch64.tar.gz
 
tar zxf 20140821-gem5_aarch64.tar.gz
 
tar zxf 20140821-gem5_aarch64.tar.gz
 +
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- gem5_server_defconfig
 +
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- j4
 +
mv vmlinux vmlinux.arm64.20140821
 +
</pre>
 +
 +
  
 
===== Known working tags =====
 
===== Known working tags =====

Revision as of 19:43, 5 September 2014

This page contains instructions for building up-to-date kernels for gem5 running on ARM.

Linux command-line Configurations

These instructions are for running headless systems. That is a more "server" style system where there is no frame-buffer. The description has been created using the latest known-working tag in the repositories linked below, however the tables in each section list previous tags that are known to work. To built the kernels on an x86 host you'll need ARM cross compilers. If you're running a reasonably new version of ubuntu you can get a AArch32 (32-bit compiler) by
apt-get install  gcc-arm-linux-gnueabihf
and a AArch64 (64-bit compiler) by
apt-get install gcc-aarch64-linux-gnu
. If you can't use these pre-made compilers the next easiest way to obtain the required compilers from [[Linaro][1]].


32 bit kernel (AArch32)

These are instructions to generate a 32-bit ARM Linux binary.

wget "http://www.linux-arm.org/git?p=linux-linaro-tracking-gem5.git;a=snapshot;h=ll_20131205.0-gem5;sf=tgz" -O ll_20131205.0-gem5.tar.gz
tar zxf  ll_20131205.0-gem5.tar.gz
cd linux-linaro-tracking-gem5-ll_20131205.0-gem5-325b404/
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- vexpress_gem5_server_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
mv vmlinux vmlinux.arm.ll_20131205.0-gem5

Testing the just built kernel:

% ./build/ARM/gem5.opt configs/example/fs.py  --kernel=/tmp/linux-linaro-tracking-gem5-ll_20131205.0-gem5-325b404/vmlinux.arm.ll_20131205.0-gem5  --machine-type=VExpress_EMM --dtb-file=/tmp/linux-linaro-tracking-gem5-ll_20131205.0-gem5-325b404/arch/arm/boot/dts/vexpress-v2p-ca15-tc1-gem5.dtb 
Known working tags
Latest tag:
ll_20131205.0-gem5

64 bit kernel (AArch64)

These are instructions to generate a 32-bit ARM Linux binary.

wget "http://www.linux-arm.org/git?p=linux-aarch64-gem5.git;a=snapshot;h=20140821;sf=tgz" -O 20140821-gem5_aarch64.tar.gz
tar zxf 20140821-gem5_aarch64.tar.gz
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- gem5_server_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- j4
mv vmlinux vmlinux.arm64.20140821


Known working tags
Latest tag:


Mobile/Android Configuration

Coming soon!