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

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

/* Detail */


  • Developer/Simulators/QEMU/CANEmulation

    v28 v29  
    164 =  Detail  =
    166 The CAN simulation environment is based on QEMU-1.4.2, you can download it from or get a copy using the following command(Linux)
     164=  Building a Minimal Linux Environment in Qemu  =
     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  =
     169The section below is largely based upon 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.
     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 or get a copy using the following command(Linux).
     175First, we should configure QEMU using the following command, this will take about two minutes.
    167176  git clone .
    168 Then you can build it through
    169   ./configure --prefix=/opt/qemu --target-list="i386-softmmu" --enable-sdl && make && make install
     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.[ 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.
     180  ./configure --prefix=/opt/qemu --target-list="i386-softmmu" --enable-sdl && make && sudo make install
     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.
     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 =