Difference between revisions of "ARM Kernel"
(Updated aarch32 instructions with the new kernel location) |
(Updated aarch64 instructions with new kernel location) |
||
Line 35: | Line 35: | ||
==== 64 bit kernel (AArch64) ==== | ==== 64 bit kernel (AArch64) ==== | ||
− | These are instructions to generate a | + | These are instructions to generate a 64-bit ARM Linux binary. |
+ | |||
+ | To checkout the aarch64 kernel, execute the following command: | ||
+ | <pre> | ||
+ | git clone https://github.com/gem5/linux-arm64-gem5.git | ||
+ | </pre> | ||
+ | |||
+ | The repository contains a tag per gem5 kernel release. Check the [https://github.com/gem5/linux-arm64-gem5/tags GitHub page] for a list of release tags. To checkout a tag, execute the following in the repository: | ||
+ | <pre> | ||
+ | git checkout -b TAGNAME | ||
+ | </pre> | ||
+ | |||
<pre> | <pre> | ||
− | |||
− | |||
− | |||
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- gem5_defconfig | make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- gem5_defconfig | ||
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- -j4 | make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- -j4 | ||
− | |||
</pre> | </pre> | ||
Testing the just built kernel: | Testing the just built kernel: | ||
<pre> | <pre> | ||
− | % ./build/ARM/gem5.opt configs/example/fs.py --kernel=/tmp/linux- | + | % ./build/ARM/gem5.opt configs/example/fs.py --kernel=/tmp/linux-arm64-gem5/vmlinux --machine-type=VExpress_EMM64 \ |
− | --dtb-file=/tmp/linux- | + | --dtb-file=/tmp/linux-arm64-gem5/arch/arm64/boot/dts/aarch64_gem5_server.dtb --disk-image=linaro-minimal-armv8.img |
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Mobile/Android Configuration === | === Mobile/Android Configuration === | ||
Coming soon! | Coming soon! |
Revision as of 05:31, 7 September 2015
This page contains instructions for building up-to-date kernels for gem5 running on ARM.
Contents
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) and AArch64 compiler by installing them from apt:apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
If you can't use these pre-made compilers the next easiest way to obtain the required compilers from Linaro.
Depending on the exact source of your cross compilers, the compiler names used below will required small changes.
32 bit kernel (AArch32)
These are instructions to generate a 32-bit ARM Linux binary.
To checkout the aarch32 kernel, execute the following command:
git clone https://github.com/gem5/linux-arm-gem5.git
The repository contains a tag per gem5 kernel release. Check the GitHub page for a list of release tags. To checkout a tag, execute the following in the repository:
git checkout -b TAGNAME
To compile the kernel, execute the following commands in the repository:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- vexpress_gem5_server_defconfig make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
Testing the just built kernel:
% ./build/ARM/gem5.opt configs/example/fs.py --kernel=/tmp/linux-arm-gem5/vmlinux \ --machine-type=VExpress_EMM --dtb-file=/tmp/linux-arm-gem5/arch/arm/boot/dts/vexpress-v2p-ca15-tc1-gem5.dtb
64 bit kernel (AArch64)
These are instructions to generate a 64-bit ARM Linux binary.
To checkout the aarch64 kernel, execute the following command:
git clone https://github.com/gem5/linux-arm64-gem5.git
The repository contains a tag per gem5 kernel release. Check the GitHub page for a list of release tags. To checkout a tag, execute the following in the repository:
git checkout -b TAGNAME
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- gem5_defconfig make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- -j4
Testing the just built kernel:
% ./build/ARM/gem5.opt configs/example/fs.py --kernel=/tmp/linux-arm64-gem5/vmlinux --machine-type=VExpress_EMM64 \ --dtb-file=/tmp/linux-arm64-gem5/arch/arm64/boot/dts/aarch64_gem5_server.dtb --disk-image=linaro-minimal-armv8.img
Mobile/Android Configuration
Coming soon!