VMware Virtual machine emulation VxWorks hardware environment

Source: Internet
Author: User
Tags win32

Making floppy disk boot disk

The boot disk means that it is bootrom to run a program on the machine without installing the system. This section will be implemented through the VMware Virtual machine simulation VxWorks hardware environment, through the virtual floppy disk emulation diskette to achieve the production of the boot disk.

The meaning of Bootrom

Bootrom is the boot code for VxWorks operating system integration, which enables the VxWorks kernel to be downloaded and debugged using some of the tools integrated with tornado. The bootrom can be compiled directly in the Build menu of the Tornado integrated development environment.

Bootrom program mainly has the following functions:

    • Download the operating system image via the serial port.
    • Upgrade your own image via the serial port.
    • Download the system configuration file and system information file via serial port.
    • Load the operating system image so that it starts normally.
Installing VMware and RAMDISKNT

The VMware version used here is 9.0.1,RAMDISKNT version 1.5. VMware can virtual VxWorks hardware development environment, RAMDISKNT can be virtual floppy disk drive to implement the experiment. The installation process is similar to that of other Windows applications, which is not summarized here.

1. Configuring the VxWorks Hardware Environment

Open the VMware software, click File | The new virtual Machine command creates an additional VM named other. As shown in the key steps, the default settings are used for all others.

We chose to configure the method as a custom way, as shown in 2.1.


Figure 2.1 Choosing How to Configure

Now only need to configure the environment does not need to install the system, so choose to temporarily not install the system, 2.2 shows.


Figure 2.2 System Installation

There is no choice for VxWorks systems in VMware, so the system chooses the other version as shown in other,2.3.


Figure 2.3 Selecting a system

2. Virtual one floppy drive

Open the Ramdisknt software will prompt whether to register, here Select Register later can. After opening ramdisknt, select disk type 1.44MB floppy;driver letter A; tick start Driver at boot and click the Start button. Its specific steps and settings are shown in 2.4.


Figure 2.4 Creating a virtual floppy drive

After setting the RAMDISKNT as shown in Figure 2.4, clicking the OK button completes the creation of the virtual floppy drive. After restarting, the virtual floppy drive created will not take effect.
Virtual Floppy Boot Bootrom

To implement the virtual floppy drive boot bootrom, first compile the bootrom through the Tornado integrated development environment and then import the bootrom into the virtual floppy drive area via the commands provided by Tornado.

1. Making the boot disk

(1) Compiling bootrom

Open Tornado 2.2 Integrated development environment, click menu item Build | BUiD Boot Rom ... Command. The Bootrom compilation is done by using the default settings and clicking the OK button in the BUiD Boot rom dialog box that pops up. As shown in 2.5.


Figure 2.5 Compiling the Bootrom

The generated bootrom file can be found in the C:\Tornado2.2\target\config\pcPentium directory.

(2) Build command environment

The boot disk needs to be completed with the Mkboot command, but the command environment needs to be built before using the command. Start by opening the command prompt, and then enter the C:\Tornado2.2\host\x86-win32\bin\torvars.bat command, which runs C:\Tornado2.2\host\x86-win32\ The Torvars.bat file under the bin directory. As shown in result 2.6 after running.


Figure 2.6 Setting the command environment results

After running the Torvars.bat, the system will set the necessary environment variables and paths for the user to build the command environment. This allows the user to use some of the commands provided by the tornado, which will be done under CMD. Note that it is not valid to run the Torvars.bat batch file directly by double-clicking, and you need to run the file in cmd each time you need to use a command.

(3) Making the boot disk

Enter the CD C:\Tornado2.2\target\config\pcPentium in CMD to go to the Pcpentium directory, because the BSP driver selected when the Bootrom was compiled is pcpentium. Then, use the Mkboot command provided by tornado to copy the bootrom to a floppy disk and make it into a boot disk. The command is: Mkboot a:bootrom. Run as shown in post 2.7.


Figure 2.7 Making a boot disk

Where a represents the drive letter of the floppy disk. The command first writes a short boot program to the boot sector of the floppy disk, and then copies the bootrom to the floppy disk and renames it to Bootrom.sys.

2. Boot the virtual machine

When booting a virtual machine, the floppy drive of the virtual machine must be specified as a: drive letter, but often the virtual floppy drive cannot be detected by the virtual machine, as shown in 2.8.


Figure 2.8 Floppy drive in virtual machine settings

At this point, you also need to use the RAMDISKNT software to obtain the floppy disk image file. Open Ramdisknt, click the Save Disk image button in the lower right corner of the dialog box, and a ramdsknt.img image file will be found in the C-drive. Loading the image file with a virtual machine boot boot can get the same effect as the floppy drive boot. The floppy drive settings in the virtual machine are shown in 2.9.


Figure 2.9 Setting up the floppy image file for loading

After selecting the floppy image file in the virtual machine settings and clicking the OK button, click the Green Triangle arrow button in the VMware software to start the virtual machine, as shown in 2.10.


Figure 2.10 Booting Virtual machine results

Where V1.6 represents the version of the bootstrapper, and the continuous ' + ' sign indicates the boot process. Depending on the bootrom, the ' + ' length is also different.

Figure 2.10 Booting Virtual machine results

Where V1.6 represents the version of the bootstrapper, and the continuous ' + ' sign indicates the boot process. Depending on the bootrom, the ' + ' length is also different.

3. Support Console

VxWorks 5.5 The console support is not available by default. If you need to support the console, you have to modify the Config.h file in the corresponding BSP directory. The file path to be modified here is: C:\Tornado2.2\target\config\pcPentium\config.h. Open the Config.h file, locate the Include_pc_console, and navigate to the following macro definition:

#undef include_pc_console/                * PC keyboard and VGA CONSOLE */
Modify #undef include_pc_console to # define Include_pc_console. When modified, the macro definition looks like this:
#define INCLUDE_PC_CONSOLE/                * PC keyboard and VGA CONSOLE */
Save the modified Config.h file and re-execute the 1, 2 segment of the production boot disk and boot the virtual machine. As shown in the final result 2.11.


Figure 2.11 Support for console bootrom

Floppy disk boot target is the simplest way, is also the default boot method of VxWorks. Of course, there are other types of boot devices, such as: U disk, hard drive, ROM and so on.

VMware Virtual machine emulation VxWorks hardware environment

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.