Install simics + gems

Source: Internet
Author: User

1. installation environment

Servers: x86 and Intel quad-core

Operating System: rhel4.1.1

GCC: 4.1.1

Hostname: localhost. localdomain

USR: Root

GEMS: gems-2.1.

Simics: simics-3.0.31

Auxiliary software: flexlm11.6.1.0

Reference: gems_ubuntu.pdf

Ii. Install simics_3.0 + gems_2.1

1. Install flexlm

When applying for the simics registration code, there will be a flexlm download link. Select the one that meets your own installation environment.

Unzip and install:

Tar-zxvf lmgrd_i86_re3.tar.gz

Tar-zxvf lmutil-i86_re3.tar.gz

/Lmadmin-i86_re3-11_1_0.bin

Obtain lmhostid:./lmutil lmhostid

2. Set Environment Variables

Vim./root/. bash_profile

Add the following fields:

Export gems =/root/gems

Export simics_install =$ GEMS/simics-3.0.31

Export simics_extra_lib =./modules

Export pythonpath =./modules

Reboot after exiting Vim

3. Install simics

A) create a gems folder in the/root directory.

Mkdir gems

CD gems

Tar xvf simics_path/simics-pkg-20-3.0.31-linux.tar

B) install simics

CD simics-3.0-install

/Install-simics.sh

When you enter the sequence number, find the registration information --ssmics_reg.doc sent with the registration file after the registration is successful, and enter the serial number

C) Registration

I. After installation is complete, copy the registration file simics_3.0.lic to $ GEMS/simics-3.0.31/licenses

II. modify simics_3.0.lic: replace this_host in the second line with the hostname of the server. (preferably the default Host Name: localhost. localdomain, which is related to the setting during operating system installation. If you manually modify the host name after installation, authentication will always fail !). Add the VTech path at the end of the third line. If not, reinstall flexlm.

III ../lmgrd-C $ GEMS/simics-3.0.31/licenses/simcs_3_0.lic

4. Install GMES

A) decompress gems-release2.1.tar.gz

CD $ gems

Tar-zxvf gems_path/gems-release2.1.tar.gz

CP-r $ GEMS/GEMS-2.1/* $ gems

Rm-r $ GEMS/GEMS-2.1

B) Create a workstation

Mkdir $ GEMS/simics_3_workspace

CD $ simics_install/bin

./Workspace-setup $ GEMS/simics_3_workspace

C) Modify makesymlinks. Sh.

CD scripts

Vim makesymlinks. Sh

Add ln-S $ simics_install/Import after Echo "Making symlink for import Directory"

D) Run makesymlinks. Sh.

CD $ GEMS/simics_3_workspace

../Scripts/makesymlinks. Sh

E) link to simics Workspace

CD $ gems

Ln-s simics_3_workspace simics

F) Modify $ GEMS/common/makefile. simics_version.

Simics_version: = 3.0

G) Modify $ GEMS/common/makefile. Common

Cc_version = 4.1.1

Host_type = x86-linux and comment out the original assignment

Modify the following two items after ifeq ($ (simics_version), 3.0)

Simics_root: = $ (gems_root)/simics

Simics_include_root: = $ (simics_install)/src/include

H) Modify $ GMES/Ruby/module/makefile

Cc_version = 4.1.1

Modify gems_root to note the statements after for simics 2. x and describe the statements after for simics 3.0.

Host_type = x86-linux and comment out the original assignment

I) Modify $ GMES/opal/module/makefile

Cc_version = 4.1.1

Modify gems_root to note the statements after for simics 2. x and describe the statements after for simics 3.0.

Host_type = x86-linux and comment out the original assignment

J) Modify $ GMES/tourmaline/module/makefile

Cc_version = 4.1.1

Host_type = x86-linux and comment out the original assignment

5. Compile Ruby

CD $ GEMS/Ruby

Make protocol = mosi_smp_bcast Destination = mosi_smp_bcast

 

Note: Common Errors:

1). Error: sim_hap_register_callback

A: In the ruby. c file, change sim_hap_register_callback to sim_hap_add_callback.

2) When libelf. so.0 is not found

/Root/simics-3.0.31/x86-linux/bin/libsimics-common.so: Undefined reference to 'elf _ nextscn'

/Root/simics-3.0.31/x86-linux/bin/libsimics-common.so: Undefined reference to 'elf64 _ getshdr'

.....................

A: download and install libelf. so.0 from the Internet.

3). Error: simics SLA not accepted, exiting since in batch-mode,

A: Run simics software in workspcae:./simics

4). Error:

Using the simics 3.0 API for Ruby Module

Ccld Ruby. So

Make [2]: *** [/opt/GEMS-2.1/simics_3_workspace/x86-linux/obj/modules/Ruby. So] Error 2

Make [2]: *** deleting file "opt/GEMS-2.1/simics_3_workspace/x86-linux/obj/modules/Ruby. So"

A: This mistake has depressed me for two weeks. I finally found out that it is because of the Chinese system. My youth and my dead hearts are all there !! Add an item in/root/. bash_profile

Export lc_all = en_US.UTF-8

6. Compile opal

CD $ GEMS/opal

Make module destinaion = mosi_smp_bcast

3. Install Solaris 10

1. download the following file (other versions are not supported)

Sol-10-u2-ga-sparc-v1.iso;

Sol-10-u2-ga-sparc-v2.iso;

Sol-10-u2-ga-sparc-v3.iso;

Sol-10-u2-ga-sparc-v4.iso;

Sol-10-u2-ga-sparc-v5.iso;

2. Installation

CD $ GEMS/simics-3.0.31/targets/Serengeti

2) Vim abisko-sol10_cd-install1.simics.

Modify it after if not defined cdrom_path

$ Cdrom_path = "sol-10-u2-ga-sparc-v1.iso_path"

3) Vim abisko-sol10_cd-install2.simics.

Modify it after while $ idx <6

$ Cdrom_path [$ idx] = ("sol-10-u2-ga-sparc-v" + $ idx + ". ISO ")

4) CD.../../bin

A)./simics ../targets/Serengeti/abisko-sol10-cd-install1.simics

When the terminal prompts "Now exit simics and continue with the abisko-sol10-cd-install2.simics", enter the command exit and exit

B)./simics ../targets/Serengeti/abisko-sol10-cd-install2.simics

When the terminal prompts "Now exit simics and continue with the abisko-sol10-cd-install3.simics", enter the command exit and exit

C)./simics ../targets/Serengeti/abisko-sol10-cd-install3.simics

Simics> exit

5) Start simics

Vim ../targets/serengti/abisko-setup.inc lude.

Change the first sentence to if not defined OS {$ OS = "solaris10 "}

./Simics-x tartgets/Serengeti/abisko-common.simics

Simics> continue

Note: Common Errors

1) unable to qualify my own domain name (Abisko) -- using short name

A: Add localhost.localdomain.com ($ (hostname). com) at the end of the last line of the/etc/hosts file)

2) showmount: Tesler: RPC: program not registered

Do you want to continue? (Y or N): broadcast message from root (pts/4) on

Tesler Wed May 22 17:47:15...

False alarm: The system Tesler will not be brought down.

Showmount: Tesler: RPC: program not registered

Shutdown aborted.

A: There is always a problem with Solaris. Enter the command

Share-F nfs/mnt

Unshared/mnt

 

4. Install simicsfs

1. Overview

View simics-3.0.31/doc/simics-user-guide-unix.pdf files, simicsfs for file transfer between the target machine and the virtual machine. supports solaris7, 8, 9, 10, as well as Linux kernel 2.0, power 2.2, 2.4, download https://www.simics.net/pub/ installation and compilation methods in readme_2.4 and
Readme_2.6 the methods to copy files to the target machine are network, loopback disk access, or CD-ROM

There are the following restrictions:

Virtual OS

Restrictions

Linux

The access method is read-only. (The experiment supports write operations)

Solaris

Truncating files (truncated files) are not supported ).

Other

Not Supported

If the kernel version is less than 2.4 in Linux, simicsfs kernel model is hostfs. Later versions are called simicsfs. Therefore, when installed on a Linux target machine of a lower version, replace the following simicsfs with hostfs.

2. the target machine is Linux

1) create a directory/lib/modules/on the target machine/Version/Kernel/fs/simicsfs/, whereVersionIs the kernel version of the target machine.

2) copy the newly compiled simicsfs model file to the/lib/modules/Version/Kernel/fs/simicsfs/directory. Note: For Linux versions not later than 2.4, the model file name is simicsfs. O, and for linux2.6, simicsfs. Ko.

3) create a mount point mkdir/host on the target machine.

4) Add the following content to the/etc/fstab file of the target machine (replace/host with a mount point)

Special/host simicsfs noauto, RO 0 0

Note: RO indicates read-only, RW indicates that experiment write operations are supported.

5) Mount simicsfs: Mount/host on the target machine

In this way, simicsfs can work, and the host file list can be obtained through ls/host on the target machine.

Earlier simics versions were called hostfs instead of simicsfs. Refer to setup_simicsfs.sh

3. the target machine is Solaris.

1) to facilitate the transfer of simics-3.0.31/import/sun4u/mount_simicsfs and simics-3.0.31/import/sun4u/simicsfs-sol10 to the target machine, we will make the two into an ISO file, namely:

CD $ GEMS/simics-3.0.31/import/sun4u/

Mkdir sol10-simicsfs

CP mount_simicsfs sol10-simicsfs.

CP simicsfs-sol10 sol10-simicsfs

CD sol10-simicsfs

MV mount_simicsfs Mount

Music simicsfs-sol10 simicsfs

CD ../

Mkisofs-O 10.iso-J-r sol10-simicsfs //-O output file name,-J compatible with windows,-r compatible with Unix/Linux

The sol10-simicsfs.iso is the required mirror phase File

2) Run./simcis-x ../target/Serengeti/abisko-common.simics

Simics> continue

3) When "#" appears in xterm, that is, after the startup is complete, CTRL + C returns to the simcis> interface to load the 10. ISO file.

Simics> New-file-CDROM 10. iso_path

Simics> cd0.insert ISO

Simics> con0.input "mount-F hsfs-O ro/dev/DSK/c0t6d0s0/mnt \ n"

Simics> con0.input "mkdir/usr/lib/fs/simicsfs \ n"

4) copy the mount_si file and rename it as Mount,

Simics> con0.input "CP-r/mnt/Mount/usr/lib/fs/simicsfs \ n"

5) copy the file simicsfs,

Simics> con0.input "CP-r/mnt/simicsfs/usr/kernel/fs/sparcv9 \ n"

6) add a line to the/etc/vfstab file of the target machine, that is

Simics> con0.input "Echo simicsfs-/host simicsfs-no->/etc/vfstab \ n"

7) create a mount point on the target machine and add the path:

Simics> con0.input "mkdir/host \ n"

Simics> continue

8) when the target machine is running, enter the command

Mount/Host

Ls/Host: view the file list on the host

4. Use simicsfs

By default, files on the host are accessed under/host. you can also run the

Note: When the check point is loaded, the files in the last mounted simicsfs remain unchanged.

Note: Common Errors:

1) mkisofs-O sol10-simicsfs.iso-J-r sol10-simicsfs

An error occurred while running simics and loading the ISO file:

Simcis> cd0.insert ISO

Argument error: argument 1 (ISO) given to '<SCSI-CDROM>'. insert has the wrong type; object expected. Synopsis: <SCSI-CDROM>. Insert Medium

A: I always thought it was a problem with the production of the CD, for a variety of ways to make the CD, such as dd If = filedirectory of = sol10-simicsfs.iso, mkisofs-O sol10-simicsfs.iso-jrv filedirectory, etc, but they all get the same results. Later we found that the ISO file name contains English letters. when loading the ISO file on the simics command line, the file name can only contain numbers!

 

5. Load and configure Ruby and opal

1. Configure simics

./Simics-stall

Simics> instruction-fetch-mode instruction-fetch-trace

Simics> ISTC-Disable

Simics> dstc-Disable

Simics> CPU-switch-time 1

Simics> Read-configuration file. simics_path

2. Load Ruby and opal

Simics> load-module Ruby

Simics> load-module opal // usually does not need to load opal

3. Configure Ruby and opal

Ruby0.setparam g_num_processors 1

Ruby0.setparam g_memory_size_bytes 4294967296

Ruby0.init

 

Opal0.init

4. Run Ruby and opal

Ruby0.dump-Stats

Opal0.sim-step 10000000000

Opal0.listparam

Opal0.stats

 

Note: Common Errors:

1) error loading module 'Ruby ': failed to load module 'Ruby' ('/root/gems/simics_3_workspace/x86-linux/lib/Ruby. so '): "version 'gcc _ 4.2.0' not found (required by/usr/lib/libstdc ++. so.6) "or error loading module 'Ruby ': module 'Ruby' not found

A: LDD Ruby. So can find library functions that Ruby. So depends on and remove libgcc_s.so.1.

2) After Ruby is loaded, save the checkpoint and restart the checkpoint. An error occurs:

Physical memory object cannot be found. If you are not compiling Ruby and you see this message, something is wrong. This message is part of the normal complication process.

A: loading Ruby is generally the last operation before running the target machine. After loading ruby, it does not support checkpoint operations.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.