Flashsim configuration process details

Source: Internet
Author: User
Tags whm

FlashSimDetailed configuration process

Written by kimmy: 2011-10-25

SSD simulator FlashSim is required for SSD experiments recently. Because it is almost difficult to find detailed information about the configuration process on the Internet, the process of self-configuration is quite twists and turns, and many problems are encountered in the middle. Step by step, the configuration is successful. Write down this configuration process and share it with you, hoping to provide some inspiration for children's shoes with the same requirements ~

First, make preparations: (The Flash SIM running environment based on disksim is linux. A lower version of gcc compiler is required, and bison and flex scripts are required .)

 

1, InstallationUbuntuOperating System

Both ubuntu10.04 and ubuntu10.10 are available (tested successfully ).

Note: Do not install it online. OtherwiseUbuntuThe installation will be updated online at the same time, and the process will be several hours long!

Installation Process: unzip. The unzip interface is displayed.

 

After decompression, go to the ubuntu Installation Guide interface.

You can select any drive disk in windows, but ensure that the idle capacity is 10 Gb or above (the larger the better, the faster the system runs, and avoid capacity insufficiency due to later application expansion ). Select Chinese for the right language, and set the user name and password. After completing the preceding steps, click "OK" to install the ubuntu system. The installation process is completed in about 5 minutes offline.

After Windows is installed, restart your computer and choose to enter the ubuntu system. The subsequent installation will be completed automatically.

So far, the ubuntu system has been successfully installed. You can enter the graphical interface or open the terminal for free ~

 

2, InstallationGccCompiler

The gcc version installed by default in ubuntu 10.04 is a gcc-4. *, while disksim needs to install a lower version of gcc (ubuntu gcc-2.95 compilation disksim can be confirmed by the author in RHEL5 install gcc-3.3.6, it seems that can also accurately compile disksim ). Because installation from source code is troublesome, you can download the. deb package for installation.

Is:

Http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-2.95/

Download the following five files in sequence:

Cpp-2.95_2.95.4-24_i386.deb;

Gcc-2.95_2.95.4-24_i386.deb;

G + +-2.95 _ 2.95.4-24_i386.deb;

Libstdc ++ 2.10-glibc2.2 _ 2.95.4-24_i386.deb;

Libstdc ++ 2.10-dev_2.95.4-24_i386.deb

4th packages libstdc ++ 2.10-glibc2.2 _ 2.95.4-24_i386.deb ubuntu cannot be found on the official website. You need to search and download them from other places.

After the download is completed, the installation is forced in the order above. The terminal command is:

Sudo dpkg -- force-depends-I xxx. deb

(Note: If the installation sequence is not accurate, the supervisor will prompt you to adjust the sequence and reinstall it ~)

Then change the soft connection and run the following command:

Sudo ln-fs/usr/bin/gcc-2.95/usr/bin/gcc

View gcc version: gcc-v, you can see that the version is gcc-2.95.4.

In this way, the gcc version used by default is the gcc-2.95.4 when software needs to be compiled.

3, InstallationBisonAndFlax

It can be directly installed online. Terminal commands are as follows:

Sudo apt-get install bison

Sudo apt-get install flex

After installing and using bison-v and flex-v, you can see that the version information is bison-2.4.3 and flex-2.5.35 (or flex-2.5.4)

 

Next, we will officially start the installation of flashsim. During this process, you must re-compile and install the source code packages of disksim3.0 and flashsim, select the original compressed package, and decompress the package.

4, CompilationDisksim-3.0

Uncompress disksim-3.0.tar.gz, assuming that extract to the current user's home directory, decompress the file name for disksim-3.0

Whm @ ubuntu :~ $ Cd disksim-3.0/# Go To The disksim-3.0 directory

Whm @ ubuntu :~ /Disksim-3.0 $ make # compile the entire project

If no compilation error is prompted, you can go to the/disksim-3.0/valid directory and run the runvalid file. If you can accurately run, it indicates that the disksim-3.0 compilation is correct.

 

5InDisksim-3.0Based on CompilationFlashsim

(1)decompress the src.release.tar.gz package in flashsim-psuto generate the src. release folder, paste it into the disksim-3.0 directory, rename it src, replace the existing src directory in the disksim-3.0

(2) mount the flashsim-20100324.patch file in flashsim-psu into the/disksim-3.0/src directory, and then the command line enters the src directory to patch some of the files. (Why patch? Some of the previous code writing is not standardized, may lead to compilation, but the flashsim-20100324.patch file is to correct those non-standard writing .) The command is as follows:

Whm @ ubuntu :~ /Disksim-3.0/src $ patch-p1-I flashsim-20100324.patch

During running, you may be prompted that the patch command cannot be found. This is because the ubuntu system does not install the patch by default. You need to install it first. Command:

Sudo apt-get install patch

After the Patch is successfully installed, run the preceding command. Generally, the patch can pass. If an error similar to the following occurs:

Patching file fast. c
Hunk #1 failed at 58.

Hunk #2 failed at 266.
Hunk #3 failed at 294.

......

6 out of 6 hunks failed -- saving rejects to file fast. C. rej

It indicates that the src. release copied from flashsim-psu is not the original version. At the beginning, I made this careless mistake because I didn't understand the true meaning of the patch file. Because read src. some comments were added to the Code in release, causing line numbers to not correspond to the original (the number of lines has increased), while the execution of the flashsim-20100324.patch file is to strictly follow the line number to revise the nonstandard code in the original version, therefore, the patch is always passable. After realizing the crux of the problem, use the src. release decompressed again and then execute the patch operation. The problem is quickly solved.

(3) After the patch is passed, return to the disksim-3.0 directory and compile again.

Whm @ ubuntu :~ Disksim-3.0 $ make

The compilation is correct. Now the flash SIM configuration is complete. You can run some of its own FTL algorithms ~

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.