Since the up-to-date VMWare still doesn't support FC linux officially, you need to pay some effort installing and configuring FC6. I assume the readers have successful installation experience of other linux under VMware before, so only key points related to FC6 installation will be addressed.
1. Create a VM:
Open VM's "New Virtual Machine Wizard", make sure you choose the following options: "Custom" -> New - Workstation 5 -> "Other Linux with 2.6.x kernel" -> ... -> LSI Logic (for SCSI Adaptor) -> ... -> SCSI (recommended).
The above options will make sure FC6 installation wizard find your virtual disk properly.
2. Install VMWare Tools:
Make sure you have kernel-devel corresponding your running kernel installed, which provides the kernel headers needed by VMWare Tools. By default, you need to download and install kernel-devel by yourself. Note that the version of kernel-devel must match your running kernel exactly (for example, "2.6.18-1.2798.fc6xen.i686" does not match with "2.6.18-1.2798.fc6.i686), so if you cannot find a kernel-devel matches the kernel, you need to install a kernel that matches the kernel-devel. I don't recommend using yum to update the kernel and kernel-devel, because they don't always match (and you may not be able to find a co-existing pair). So we go the traditional rpm way.
To check your current running kernel, use "uname -r".
To download kernel-devel, goto "http://fedora.redhat.com/download/mirrors.html", find a mirror site close to your place, and download the rpm package of kernel-devel. For example, I would go to "ftp://ftp.oss.eznetsols.org/linux/fedora/6/i386/os/Fedora/RPMS/" in Singapore, and download "kernel-devel-2.6.18-1.2798.fc6.i686.rpm", and install it by "rpm -ivh kernel-devel-2.6.18-1.2798.fc6.i686.rpm".
You may need to download and install the kernel matches the kernel-devel as well. Similarly, download kernel-2.6.18-1.2798.fc6.i686.rpm and install it. Then reboot your linux. Stroke "enter" at boot up to choose the newly installed kernel. Or you can modify the grub configuration file "/etc/grub.conf", change the "default=" parameter (0 for the first kernel, 1 for the second kernel) for the new kernel.
Now you can locate the kernel headers under, for example, /usr/src/kernels/2.6.18-1.2798.fc6-i686/include.
Then mount your VMWare Tools iso, and run "vmware-install.pl". Key in the above kernel headers when asked. You should be able to install it successfully now.
3. Configure resolution of your X.
Edit "/etc/X11/xorg.conf" with root. Add the following section at the beginning of the file.
Section "Monitor"
Identifier "vmware"
HorizSync 1.0 - 10000.0
VertRefresh 1.0 - 10000.0
EndSection
Add a line "DefaultDepth 24" after "Mornitor "vmware"" line in "Screen" section (assuming you have a OK graphic card). Then change the "Modes" line under Depth 24 to your desired resolution. For example "Modes 1280x800". Then startX.
Reference
http://www.thoughtpolice.co.uk/vmware/howto/fedora-core-6-vmware-tools-install.html
http://www.linuxquestions.org/questions/showthread.php?t=503651
http://www.lowlevel.cz/log/pivot/entry.php?id=80
Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts
Monday, March 19, 2007
Thursday, March 15, 2007
How to add custom instructions (ISE) to Trimaran
This guide is incomplete at the moment. With the project evolving, more comprehensive and detailed instructions will be gradually patched. Currently, only custom instructions up to 4 inputs and 4 outputs are supported, with minimum modification to the original Trimaran code.1. Generate custom instructions in Elcor.
This step involves adding an extra stage to Elcor, before instruction scheduling and register allocation stages, in order to identify suitable subgraphs for custom instructions, and then replace the subgraphs with custom operations.
ISE identification code is under elcor/src/ISE.
Other files to be modified:
elcor/src/Graph:
opcode.h: define the opcode. In enum type IR_ROOT_OPCODE, define a new root opcode:
ROOT_CUSTOM32 = 191,
In enum type Opcode, define a new opcode in terms of root opcode:
CUSTOM32_W = ROOT_CUSTOM32,
opcode.cpp: Instruction name (a string) and its opcode (a macro value) should be bounded in two maps el_string_to_opcode_map and el_opcode_to_string_map, in one of the map initialization functions. Here, we add custom instruction bounding in el_init_elcor_opcode_maps_arithmetic():
el_string_to_opcode_map.bind("CUSTOM32_W", CUSTOM32_W);
el_opcode_to_string_map.bind(CUSTOM32_W, "CUSTOM32_W");
elcor/src/Main:
el_driver_init.cpp: insert a global switch variable "El_do_custom_instruction = 1;" to turn on/off ISE phase.
processor_function.cpp: Insert "#include "ise_main.h" " at the beginning, which provides definitions of functions of the ISE code.
Insert a call to "ise_main(f);" before instruction scheduling function "El_collect_pre_processing_stats(f);" to enter the ISE phase.
Modify GNUmakdfile under elcor/src in order to find the ISE code and produce corresponding libraries for ISE.
Modify elcor/includes/makelinks, add links to header files of the ISE code. Any changes on existence of header files require executing "makelinks" manually again.
After adding or removing files to Elcor source (mainly we refer to elcor/ISE) and modifying corresponding places in GNUmakefile, "make depend" need to be issued in order to generate dependency files under each source directory (".dependences"), otherwise, modifying the new .cpp file won't cause recompilation.
2. Append new machine description (mdes) sections for the custom instructions.
Machine description defines the format, resource usage, and timing for each instruction (operation and operands), and is the information database where Trimaran instruction scheduler refers to. Note that you do not need to define the detailed semantics of a custom instruction in the machine description file. Instead, you define "Scheduling_Alternative" which groups instructions with the same semantics but different resource usages (e.g., encoding, reservation table, timing); "Scheduling_Alternative" is used by the instruction scheduler to choose an appropriate instruction for an operation to minimize the schedule length. In most cases, a custom operation corresponds to only one custom instruction, i.e., only one "Scheduling_Alternative". Execution semantics of a custom instruction is defined in the Simu (Simulator).
High level machine description file (*.hmdes) need to be compiled using "hc" compiler to low level correspondence (*.lmdes).
3. Generate Rebel form.
The Simu uses Rebel form to simulate execution of test programs.
4. Modify Simu.
(a). Define the semantics of custom instructions in "PD_ops.h" and "PD_int_arith_ops.c" (if you want to put the function definition there). The simulator actually calls the functions defined here to "execute" the instructions. If you observe the "binary" generated from Elcor to Simulatable source code (the "urbenchmark.O_el.simu.c.tbls" file), the function name appears in the fifth field of each instruction.
(b). Add custom instructions in "PD_ops.list" for the dissembler (if you ever want to use it).
Step (a) and (b) assure the Simulator understand how to execute a custom instruction, but yet we are not able to convert the Rebel form to the Simulatable source code. Step (c) fills this code gen gap.
(c). Modify "opcode.h" and "opcode.cpp" under elcor/src/Graph directory. In "opcode.h", add custom instruction opcode (digit) to IR_ROOT_OPCODE and Op_code section. In "opcode.cpp", bind custom instruction opcode with corresponding custom instruction name in function "el_init_elcor_opcode_maps_arithmatic()" (if u want, in this function...). This binding will let the code gen recognize the custom instructions appearing in the Rebel form.
Subscribe to:
Posts (Atom)
