You need a few things to run ironkernel:
masterbranch or 0.9 release
- binutils for arm-none-eabi
- Optionally for debugging
Clone this repository and update rust-core.
$ git clone https://github.com/wbthomason/ironkernel.git $ cd ironkernel $ git submodule update --init ### you can also pull latest rust-core: $ git submodule foreach git pull origin master
Simply install all dependencies:
# pacman -S base-devel qemu rust llvm tmux # yaourt -S arm-none-eabi-gcc
Note that you will want Rust 0.9 and LLVM 3.4
To set things up on OSX, do this:
qemu from homebrew:
$ brew install nasm $ brew install qemu
Install binutils from source.
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.gz tar xzvf binutils-2.23.2.tar.gz cd binutils-2.23.2 export ARMTOOLS=~/arm-none-eabi ./configure --target=arm-none-eabi --prefix=$ARMTOOLS make all install
To get edge Rust going, grab it from git:
$ git clone https://github.com/mozilla/rust $ cd rust $ ./configure $ make && make install
You may have to make some small changes before it builds.
Namely, you may need to adjust the rust prefix in the makefile (I did). Hopefully nothing else.
To compile, simply execute
To run, use:
$ make run # emulate default platform (ARM) $ make debug # debug on arm
Heap memory allocation modification
This Iron Kernel version includes safeguards around the heap memory system to prevent user-level programs and processes from directly accessing memory and from interfering with memory space assigned to another program/process. System of providing keys to programs is used as a method to provide memory abstraction to programs. The programs use these keys to access their information stored in memory. The actual location of the program in memory is be stored in a hash table as a pointer. The keys to those locations are an offset of the location of the hash table in memory. In order to further improve security of the system, the offset is encrypted and sent back as the key instead of being directly mapped to a location in the hash table. The location for the hash table in memory is placed under safeguards to prevent access to that specific part of memory unless a specific key is provided or a new program was started.