|
||||||||||||
VMware Development Platform for RockboxThis page is historical and should not be used for rockbox developmentIntroductionThe VMware development platform for Rockbox is a quick way to get involved with Rockbox. VMware is virtualization software that you can run in Windows that enables you to run other operating systems (such as Linux) at the same time in a virtual machine. VMware Player is relatively new software that allows this for free. VMware also recently released the VMware Server, which is also free. VMware Player is a limited version of the VMware system. It allows you to run VMware images, but not to create them. For the purposes of compiling Rockbox, this is all that's necessary. For Mac OS X users, VMware Fusion 3 works very well to run the Rockbox development platform. We've created a image that contains a small Linux installation along with all needed tools to compile Rockbox for the different targets. It even comes with the anonymous CVSROOT configured. Using VMware is not only simpler, compiling is a lot faster than using cygwin. The only downside is the boot-time, cygwin is up and running immediately, while you have to "boot" the VMware image. One workaround for this is to "pause" the virtual machine instead of "power off".Quick start guide
CompilingChecking out and compiling is as easy as in this example for a iriver H120/140:git clone git://git.rockbox.org/rockbox cd rockbox mkdir build_h120 cd build_h120 ../tools/configure makeThe directory you create in the mkdir command doesn't really matter, but it's better to be descriptive. To export the file, type: make zipMore development information: http://www.rockbox.org/twiki/bin/view/Main/DocsIndex#For_Developers If you log in as user you will most probably encounter a "file permission" error when you attempt to configure. A quick dirty work around: su (it will ask for root password) rockbox (root password) chmod 777 * -R (This will give full permissions for all files and folders, under the current directory) exit (exit root mode)WARNING: Input these commands (chmod) in your source tree, not in the '/'. Good luck! Username and passwordsConsole and SSH login:
File sharingTo make it easy to access the files in the virtual Linux operating system, we have included Samba. We've configured the user's home directory as a file share. This means that you can edit the source in your favorite Windows editor (that supports UNIX formatted files!) and compile in the virtual machine.
Keyboard layout configurationThe Rockbox Debian image is set to US keyboard layout. To change this run (as root):
Mouse button configurationBy default the mouse buttons are set for right-hand use. To reconfigure for left-hand use, you need to change 2 files in your home directory. For a standard wheel mouse you can use the following. (If your mouse has more (or less) buttons, you will need to adjust the �pointer� line accordingly.) First create a file named .Xmodmap ( notice that there is a period before the X) in our home directory (this is the directory you are in when you start Eterm). .Xmodmap contains the following on a line by itself:pointer = 3 2 1 4 5Next, create or edit the .xsession file. Add to it the following on a line by itself: xmodmap ~/.XmodmapThe next time you login, the buttons will be switched. If you are wondering why there are 5 buttons in the "pointer" line, it is because a standard wheel mouse has what is considered as 5 buttons: 1 on the left, 1 on the right, the wheel can be pressed, and scrolling up and down both count as buttons. Time zone configurationAfter installing, it is a good idea to check that the image is set to the correct time and timezone. If you are not logged in with the root account, then either login as root or from a Eterm or XTerm window type:su (you will be prompted for the root password) rockbox (root password)To set the timezone, run: tzconfig from a system shell (Eterm or XTerm) and follow the prompts. If you became root using the su method, finish by typing exit to return from the root account. The following is probably not needed since the VMware tools program always synchronizes the clock between guest and host computer, but is provided if you don't wish to run VMware tools. Use date to show the time. To change the hardware clock (actually the virtual hardware clock):
Contents
TroubleshootingProblems with accessing the Samba serverIf you have problems accessing the virtual PC through the SMB protocol, you should check if your network card settings in VMWare are set to Bridged and not to NAT; this way Debian will directly connect to your network (do this only if there is a DHCP server running on your network as it will request an IP). Using the VMware 'pause' functionality can sometimes leave the Samba server unresponsive when the image is re-started. The Samba server can be restarted by issuing the following command as root:/etc/init.d/samba restart Problems with physical memoryIf you don't have enough physical memory to run the image as downloaded (ie. you can't even start the image to change the memory usage from the player's GUI), open your "Rockbox.vmx" file in a text editor and change memsize = "XXX" to something smaller where "XXX" denoted the amount of physical ram in megabytes. NOTE: Some have found as little 48MB to be sufficient to run the image with tolerable performance using the provided Debian installation as a build tool only though at least 64MB is recommended for it to run acceptably.Problems with audio playback in the simulator'user' is not a member of the 'audio' group so it doesn't have permissions to access audio hardware. This causes the simulator to segfault when it tries to play back music. Running the following command as root fixes this:usermod -G audio user Additional TipsCopy and Paste between host and guest operating systemTo be able to copy and paste between the host and guest operating system (windows-linux) and vice versa, you have to have "vmware-toolbox&" running while you do it. From the command line type "vmware-toolbox&" and hit enter. A window will appear, don't close it. Minimize it and then proceed with normal operation.
#!/bin/bash vmware-toolbox & Eterm & fluxbox Change the resolutionTo change resolution, run "vmware-config-tools.pl" as a super user. If you want to use Qemu, you can use xrandr (man xrandr for details) to get a smaller resolution on-the-fly with non-permanent effects (rollback after a X-restart). Configuration of X-Server with /etc/X11/XF86Config-4 file is also a good (but dangerous) way to configure your virtual debian system with permanent issues ;).Run Windows applicationsI always disliked the fact that I couldn't use my favorite text editor (Notepad2) with the VMware Development Platform. The only option I had was to use samba and edit the files I wanted with Notepad2 from Windows but I would prefer not having to switch desktops. So I decided to install Wine on the VMware Debian image and try to enhance the Notepad2 application into the menu. Here's a quick guide on how to do this.
Use PuTTY and Xming with X11 forwardingIf you want to develop RBUtility, the simulators or WPS editor and don't want to work in the emulator's virtual window (and you're on Windows), but still want to have the power of Linux you can try running Xming and forward X11 through SSH.
Using Qemu instead of VMware PlayerYou are maybe a linux user and you don't want to install a non-free and closed part of software (who said vmware ??) in your smart free gnu/linux distro... Qemu can handle vmware's vmdk virtual disks for you ! Assuming you have qemu up and running in your box, and you are in the directory where you have unpacked 7zip archive, you can boot the rockbox's virtual machine with the command:qemu -hda rockbox-flat.vmdkThe first time you run this system, you will fall back on text console, this is simply because of VMware's configuration of X server. You can fix this replacing "vmware" by "cirrus" in /etc/X11/XF86Config-4 file (Section "Device") and then launch xdm again. (You must login as root to do this.) Using the VMware image with VirtualBoxVirtualBox is another open-source virtualization solution. If you have an (older) existing VirtualBox setup and want to use the VWware .vmdk image you can convert it to a VirtualBox .vdi image by following the instructions in this tutorial. As of version 2.1.0 VirtualBox can read .vmdk images, so you should be able to create a new virtual system and associate it with the .vmdk image directly.Suggestions for improvementIf you have any ideas for improving the VMware image, please write them down here! The following suggestions have been submitted:
Screenshotr92 - 02 Apr 2021 - 20:46:07 - UnknownUser
Copyright © by the contributing authors.
|