Changes between Version 28 and Version 29 of Developer/Simulators/QEMU/CANEmulation


Ignore:
Timestamp:
Aug 14, 2013, 8:33:13 AM (6 years ago)
Author:
C Rempel
Comment:

/* Detail */

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Simulators/QEMU/CANEmulation

    v28 v29  
    162162
    163163
    164 =  Detail  =
    165 
    166 The CAN simulation environment is based on QEMU-1.4.2, you can download it from https://github.com/Jin-Yang/QEMU-1.4.2 or get a copy using the following command(Linux)
     164=  Building a Minimal Linux Environment in Qemu  =
     165
     166The purpose of starting with a minimal Linux (as opposed to RTEMS) environment in qemu is the software configurations have been more thoroughly tested and documented. The first phase of the project should start out using the last stable release... unless it's minor digit is a 0... usually the minor digit being anything above a 0 means the free and open source software FOSS had some bug-fix releases.
     167=  CAN project example  =
     168
     169The section below is largely based upon http://jin-yang.github.io/2013/07/24/build-minimal-linux-environment.html by Jin-Yang during the summer of 2013.
     170The CAN simulation environment is based on QEMU-1.4.2, because 1.5.0 was just released, and we wanted a solid starting point.
     171
     172''NOTE: before you compile QEMU, "libglib2-dev" should be installed, or you will get the error "ERROR: glib-2.12 required to compile QEMU". In Ubuntu, we use command "sudo apt-get install libglib2-dev" to do that.''
     173You can download the qemu-can project from https://github.com/Jin-Yang/QEMU-1.4.2 or get a copy using the following command(Linux).
     174
     175First, we should configure QEMU using the following command, this will take about two minutes.
    167176  git clone https://github.com/Jin-Yang/QEMU-1.4.2.git .
    168 Then you can build it through
    169   ./configure --prefix=/opt/qemu --target-list="i386-softmmu" --enable-sdl && make && make install
     177
     178QEMU has two modes to simulate a platform, the user mode and the system mode. We only need the i386 system simulation environment here, so only system mode (i386-softmmu) is needed. In order to save time, we just compile the source-code that relates to i386-softmmu.[http://jin-yang.github.io/2013/07/24/build-minimal-linux-environment html [1<nowiki>]</nowiki>]. For simplicity of coding, we select the hard-coded --prefix=/opt/qemu so we can write scripts assuming that's where our installed qemu is.
     179
     180  ./configure --prefix=/opt/qemu --target-list="i386-softmmu" --enable-sdl && make && sudo make install
     181
     182 *  --prefix: specify the location where you want to install.
     183 *  --target-list: the platform you want to simulation, here we only need the i386-softmmu.
     184 *  --enable-sdl: we also need the sdl (Simple DirectMedia Layer) support.
     185
     186To call the just installed qemu you can add ''/opt/qemu/bin'' to the PATH environment variable or just use ''/opt/qemu/bin/qemu-system-i386'' to start QEMU.
    170187= RTEMS environment =
    171188