Project

General

Profile

Feature #6040

Building ARM-aspectator

Added by Vladimir Gratinskiy over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Documentation
Start date:
06/05/2015
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

This instruction is for installing cross-compiling tools for using LDV for verification of ARM drivers. It was tested for Ubuntu 12.04 with the latest versions of binutils, gawk and glibc at 8 May 2013. But anyway it doesn't garantee 100% successfull installation on Ubuntu 12.04 and 100% unsuccessfull installation on other systems. You can try newer versions of binutils, gawk and glibc if you want. You should know that building 'cif' is not so fast as you might expect.

If you are still here, let's start. Let assume that {MY_WORKING_DIR} is your working directory (full path).

$ export MY_DIR={MY_WORKING_DIR}
$ sudo apt-get install texinfo

download binutils-2.23.tar.gz (http://ftp.gnu.org/gnu/binutils/)
extract it to {MY_WORKING_DIR}/binutils-2.23/

$ export PREFIX=$MY_DIR/cross TARGET=arm-unknown-linux-gnueabi
$ mkdir build-binutils && cd build-binutils
$ ../binutils-2.23/configure --target=$TARGET --prefix=$PREFIX --disable-nls
$ make all
$ make install
$ cd .. && export PATH=$PATH:$PREFIX/bin
$ git clone git://forge.ispras.ru/cif.git --recursive
$ git checkout 7d912b08e173310c59
$ git submodule update --recursive
$ cd cif
$ cp Makefile1_cross Makefile

Next command will finish with error

$ prefix=$MY_DIR/cross/ make install
$ cd aspectator-build
$ make all-gcc

Next two commands will finish with error

$ make install all-gcc
$ make -k all-target-libgcc
$ make -i install-target-libgcc
$ make install-gcc

If next command will finish with as: unrecognized option '-meabi=5' then everything is going fine. Otherwise this instruction can't help you.

$ ../aspectator-bin/bin/arm-unknown-linux-gnueabi-gcc -xc /dev/null
$ cp -r ../aspectator-bin/* ../../cross/
$ cd ../../

Download gawk-4.0.2.tar.xz (http://mirrors.ustc.edu.cn/gnu/gawk/) and extract it to {MY_WORKING_DIR}/gawk-4.0.2

$ cd gawk-4.0.2
$ ./configure --target=$TARGET --prefix=$PREFIX
$ make all
$ make install
$ cd ..
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
$ cd linux-stable
$ git checkout v3.7.3
$ make ARCH=arm headers_check
$ make ARCH=arm INSTALL_HDR_PATH=$MY_DIR/cross/arm-unknown-linux-gnueabi/ headers_install
$ cd ..

Download glibc-2.17.tar.bz2 (http://mirrors.ustc.edu.cn/gnu/libc/) and extract it to {MY_WORKING_DIR}/glibc-2.17

$ mkdir build-glibc && cd build-glibc
$ ../glibc-2.17/configure --with-binutils=$MY_DIR/cross/arm-unknown-linux-gnueabi/bin --prefix=$PREFIX --disable-nls libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes --without-fp --host=$TARGET --with-headers=$MY_DIR/cross/arm-unknown-linux-gnueabi/include
$ make
$ make install
$ cd ../cif
$ cp Makefile2_cross Makefile
$ make clean
$ prefix=$PREFIX make install
$ cd ..
$ rm -rf $PREFIX/bin/aspectator
$ ln -s $PREFIX/bin/aspectator-bin/bin/arm-unknown-linux-gnueabi-gcc $PREFIX/bin/aspectator

Now you can run LDV with next options:

 PATH=$PATH:{MY_WORKING_DIR}/cross/bin LDV_ASPECTATOR={MY_WORKING_DIR}/cross/bin/aspectator CONFIG_OPT=allmodconfig,arm,arm-unknown-linux-gnueabi-

Also available in: Atom PDF