Build the VxWorks development environment in windows and implement the vmwarevm

Source: Internet
Author: User

This is my own note. I have referenced the two articles, which are similar.

The first article for reference:

Http://hi.baidu.com/hezhe1008/blog/item/26e5cd53364eb314377abe01.html

Article 2:

Http://hi.baidu.com/nanjidegou/blog/item/3fea95a13b13ce9246106463.html

Thanks for the above article.

The following is the body of the text. If you are careful enough, you can handle it in 1 hour. If you are slow, you can handle it in 2 hours.

Overall process:
(1) install VMware and create a virtual machine
(2) install tornado
(3) install ramdisknt and vro
(4) Compile the NIC Driver
(5) Compile bootrom
(6) Build an operating system
(7) start debugging

Note:
2. Construct BSP

2.1 Download and compile the NIC Driver

VMware provides support for virtual NICs for operating systems running on them, an AMD PC-NET that is included in the tornado development kit with drivers for this type of NICs, however, after testing, the driver does not work properly in the VMware environment, so you can download the latest driver from the amd website. Download an executable Installer. Run the package and a help file to release the package to the Tornado directory. If you are prompted whether to overwrite the file, select allow.

Ii. vxworks_end installation process: (this is important)

Vxworks_end.exe downloaded from the amdofficial website. By default, there are three files in the C: \ pcnet \ vxworks_end directory after installation,

One of them is ln97xend.tar1.gz. after decompression, there is a file ln97xend.tar. After decompression, there are four folders in the target folder,

Only target \ H \ DRV \ end \ ln97xend. H, target \ SRC \ DRV \ end \ ln97xend. C, makefile

Copy three files to the corresponding directory and replace the original files. (The other config \ pc486.972 and man folders are too old .)

Follow these steps to compile and replace the driver:

(1) Open a console window and run the batch processing program:

C: \ tornado2.2 \ host \ x86-win32 \ bin \ torvars. BAT;

The batch processing file is used to set environment variables. Its content is:

Rem command line build environments

Sets wind_host_type = x86-win32

Set wind_base = c: \ tornado2.2

Set Path = % wind_base % \ host \ % wind_host_type % \ bin; % PATH %

If not, you can manually set these environment variables.

(2) locate the c: \ tornado2.2 \ target \ SRC \ DRV \ end directory and run:

Make CPU = Pentium tool = GNU ln97xend. o

(3) locate the c: \ tornado2.2 \ target \ Lib \ Pentium \ common directory, and copy the file ln97xend. O generated in the previous step to this directory. Back up the file libdrv. A in this directory;

(4) run the arpentium-D libdrv. A ln97xend. O command to delete the original ln97xend module of libdrv.;

(5) run the command arpentium-ra iolicomend. O libdrv. A ln97xend. O to add the newly created ln97xend module.

2.2 modify the configuration file

We need to modify the config header file for compiling VxWorks. some parameters defined in H make the compiled system boot program and the image of VxWorks meet our requirements, and also modify sysln97xend. c.

(1) locate the directory c: \ tornado2.2 \ target \ config \ pcpentium and open the config. h file in the directory;

(2) locate the default_boot_line macro definition, and modify the pre-processing condition CPU = the definition of the Pentium branch as follows:

# Define default_boot_line \

"Lnpci (0, 0) your_host_name: D: \ VxWorks H = 192.168.80.169 E = 192.168.80.254 u = target PW = VxWorks Tn = target"

Where:

Lnpci (0th) specifies that 0th NICs and processors are used. The lnpci identifier varies depending on the driver used, but lnpci can be used here;
Host specifies the name of your host. You can use host;
D: \ VxWorks specifies the complete download path of the VxWorks image (which will be described later );
H = 192.168.80.169 is the IP address of the host machine, which can be modified according to the actual situation;
E = 192.168.80.254 is the IP address of the target machine, which can be modified according to the actual situation;
U = target specifies the FTP server user name, which is used to download the VxWorks image;
PW = VxWorks is the password corresponding to the FTP server and the user name target;
Tn = target: specify the name of the target machine.
(3) Specify the NIC Driver

First, locate the text "Network Driver options" to ensure that the two macros include_end and include_ln_97x_end are in the defined State (define), and the other macros are in the UNDEF state, that is:

The following is a reference clip:
/* Network Driver options */
# Define include_end/* Enhanced Network Driver Support */
# UNDEF include_dec21x40_end/* (end) DEC 21x4x PCI interface */
# UNDEF include_el_3c90x_end/* (end) 3Com fast etherlink xl pci */
# UNDEF include_elt_3c509_end/* (end) 3Com etherlink III interface */
# UNDEF include_ene_end/* (end) Eagle/Novell ne2000 interface */
# UNDEF include_fei_end/* (end) Intel 8255 [7/8/9] PCI interface */
# UNDEF include_gei8254x_end/* (end) intel 82543/82544 PCI interface */
# Define de_ln_97x_end/* (end) amd 79c97x PCI interface */
# UNDEF include_ultra_end/* (end) SMC elite16 ultra interface */
# UNDEF include_bsd/* BSD/netif Driver Support (Deprecated )*/
# UNDEF include_eex/* (BSD) intel etherexpress interface */
# UNDEF include_eex32/* (BSD) intel etherexpress flash 32 */
# UNDEF include_elc/* (BSD) SMC elite16 interface */
# UNDEF include_esmc/* (BSD) SMC 91c9x Ethernet interface */
(4) include pc_console

By default, the Vxworks system does not accept input from external input devices (such as keyboards) or output data to external output devices (such as monitors. To facilitate debugging, we must change its default status, including support for the PC console. Find and locate the macro include_pc_console to make sure it is in the defined State (define), that is:

The following is a reference clip:
# Define include_pc_console/* PC keyboard and VGA console */
# Ifdef include_pc_console
# Define pc_console (0)/* console number */
# Define n_virtual_cmdles (2)/* shell/application */
# Endif/* include_pc_console */

(5) Modify sysln97xend. c

Open sysln97xend in the C: \ tornado2.2 \ target \ config \ pcpentium directory. in the c file, first locate the text "memory-mapped Io base", and then set the preceding parameters to pcirsrc [endunit]. modify bar [1] to none and save it. That is:

The following is a reference clip:
Sprintf (paramstr, paramtemplate,
Endunit,/* end unit number */
None,/* memory-mapped Io base */
Pcirsrc [endunit]. BAR [0],/* IO address space base */
Pci2dram_base_adrs,/* Host PCI mem. Base */
Pcirsrc [endunit]. irqvec,/* IRQ vector */
Pcirsrc [endunit]. IRQ,/* IRQ Number */
Ln97x_csr3_value,/* csr3 register value */
Ln97x_offs_value,/* offset */
Ln97x_rsvd_flags,/* flags (Reserved )*/
& Ln97xstrdesc [typeidx]/* Device Description */
);

2.4 create a boot floppy disk

Since the target machine starts from a floppy disk, we need to create a VxWorks boot disk for guiding the image of the VxWorks operating system. Go to the C: \ tornado2.2 \ target \ config \ pcpentium directory, insert a formatted floppy disk, and run:

Mkboot A: bootrom

This command will create a boot partition for the VxWorks System on the floppy disk and copy the boot program to the floppy disk.

3.1 configure the FTP server

The FTP server on the host machine is used to download the running image of VxWorks after the system is successfully guided. It is best to use the FTP service software that comes with the tornado development environment.

11. Open tornado FTP server, select the "users/rights" sub-menu under the "Security" menu, set the user name to "target", and change "home directory" to "D: \ "(that is, the VxWorks image directory specified in the default_boot_line parameter). Change the username to" target "and the password to" VxWorks ". Click" done "to complete the modification, the FTP service is started.

3.2 configure target server

13. Open your tornado development environment, select the "tools-> target server-> Configure" menu, and enter any name in "Description". Here is "net00 "; in "available back", select "wdbrpc" and fill in the IP address of the target machine in the following IP Address box. Here is "192.168.80.254" (determined by the default_boot_line parameter ); change the "target server properties" drop-down box to "Core File and symbols", and select the full path of your image in the "file path" field. Here is "D: \ VxWorks "(determined by the default_boot_line parameter ).

The software is linked in my reference document.

Related Article

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.