release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Search | Go
Wiki > Main > CoLinuxDevelopmentPlatform

coLinux Development Platform for Rockbox


Introduction

The coLinux development platform is yet another way to get you hacking away at the Rockbox code under windows quickly. coLinux allows you to run a full Linux installation along side windows, unlike VMware where Linux is run under an emulated computer, and cygwin which isn't really Linux. (coLinux also appears to be faster than VMware.)

This method has several limitations. It will work on a multi-core CPU, but Linux will only be able to access one CPU core. Compiles from within Linux won't be able to take advantage of multiple cores by running multiple jobs in parallel. CoLinux will not work on 64-bit Windows. It also won't work on Windows 9x or Me. (It should work on Windows 2000, although an upgrade to Windows XP or later is recommended because earlier versions do not receive security updates and are not safe for the Internet.)


Instructions

First you need to go to coLinux and download the latest version. Uncheck the box asking if you want to install a root filesystem image. Run the installer and when Windows asks you if you wish to download the TAP network driver say yes.

When the installer is done, download my premade disc image from here or here (335MB self extracting 7-zip, unzips to about 1.3GB) and extract it to the coLinux installation folder.

Now download Toporesize from here and run the .bat file. Select the uncompressed root_fs file and resize it to as large as you need. (1.3GB should be plenty until/unless you need to run rockboxdev.sh).

  • Note: I had a problem resizing the image with Toporesize. It would resize the image, but not the file system. If this is a problem for you, the workaround I discovered was to enlarge the image to a size larger than you need, save, then launch Toporesize again and shrink the image to the size you want, this forces a resizing of the file system within the image.
Next, download a swap partition from here (the 64MB partition is plenty for this) and extract it to the coLinux install folder.

Edit your example.conf file and modify the 2 lines with the locations of the root_fs and the swap file.

Now you are ready to go. Run colinux-daemon.exe @e:\colinux\example.conf (change e:\colinux\example.conf to the location of the file for you).

If everything is working in about 5 seconds you should be prompted to login. The installation is a success!


Using coLinux

If you followed the instructions above and have a login prompt then you can login with either of the 2 setup accounts:

username: rockdev
password: rb

or

username: root
password: qwe
(Although it is not recommended to log in as root)

Like the cygwin devkit, you have 2 aliases to make life easier: getsvn will download the entire SVN repository (after you set up the network, naturally) and rbconf will run ../tools/configure.


Installed programs

This is basically a Debian installation, so if you need something not installed yet, run aptitude or apt-get to install what you need.. I have installed the following...
  • Linux kernel 2.6.11
  • vim
  • ssh
  • cvs (no longer needed)
  • screen
  • sudo
  • wget
  • patch
  • perl
  • subversion (1.14)
  • zip
  • unzip
  • samba
  • less
  • ccache (2.4)
  • make (3.81)
The following compilers are being used
Compiler Version Used for
arm-elf-gcc 4.0.3 Ipod, ifp-700, H10, Gigabeat
m68k-elf-gcc 3.4.6 Iriver H3xx/H1xx, Iaudio
sh-elf gcc 4.0.3 Archos
x86 gcc 3.3.6 Native compiler
binutils 2.16.1 (Not a compiler)

Rockbox now uses Git instead of Subversion, so the git package needs to be installed via apt-get. Also newer arm and m68k compilers are now used, so they need to be built via tools/rockboxdev.sh.


Compiling

Checking out and compiling is as easy as:
  • Get the Rockbox source: UsingGit
  • cd rockbox
  • mkdir build_h120
  • cd build_h120
  • rbconf
  • make


Keyboard layout configuration

The Rockbox Debian image is set to US keyboard layout.

To change this run (as root):

- dpkg-reconfigure console-data


Time zone configuration

After installing it is a good idea to check that the image is set to the correct time and timezone.

To set the timezone run: base-config

Use "date" to show the time.

And to change the hardware clock (or actually the virtual hardware clock):
  • date MMDDhhmmCCYY
  • hwclock --utc --systohc
  • hwclock --show
This will set system and hardware time to MM/DD hh:mm, CCYY. Times are displayed in local time but hardware time uses UTC.


Networking

The network settings should work out of the box with Internet Connection Sharing enabled on your primary network connection. Make sure to tell your firewall that the TAP Adaptor is a trusted network. You will also need to update DNS server settings in /etc/resolv.conf.

Using a version of coLinux after 0.6.4 and Windows XP I could not successfully configure my network so that coLinux could use it. -- MarcGuay - 17 Dec 2008


Advanced stuff

I suggest installing coLinux as a system service so it starts up when Windows does. (I have it set to use 64MB RAM, and its running now with me logged in, using a total of 6MB RAM over the 2 processes). do so by running E:\coLinux\colinux-daemon.exe -c e:\colinux\colinux.xml --install-service "CoLinux" and make sure you change the paths.. then go start-> run > services.msc and change the coLinux service to start automatically... then start it and your all set.

I don't see a need to have X, since with samba your Linux install is just like a network drive. If you want X I suggest installing it and connecting by VNC, its bloody fast because its on the local comp, and you can always login over the net without needing a X server installed at your remote comp... follow this guide to install x and vnc (don't bother with the XDM), then this one to get vnc running at startup (follow the Debian steps...)

You can also mount your music device in coLinux. The newest versions support direct writing to Windows filesystems. You will need to add this line to your colinux.xml file:

<cofs_device index="0" type="flat" path="\DosDevices\H:\" enabled="true" />

where H is whatever drive letter your music device is. Then create a mount point in coLinux, eg., /mnt/ipod by first creating the directory and adding this line to /etc/fstab

# file system mount point type options dump pass
cofs0:/ /mnt/ipod cofs defaults 0 0

Now either do 'mount /mnt/ipod' or restart your coLinux and you're fine to write files there directly! Note that coLinux warns that cofs is still considered experimental and filesystems have been hosed. It is intended for copying files to and from Linux only.


Comments and stuff

  • I (Soap on the forums) am taking over maintaining the coLinux image. If you have any questions, or comments, I welcome them in the form of a PM on the forums, or a shout on the IRC channel.-- DavidHall - 24 Jan 2007
  • Simulator building appears broken - on the case. -- DavidHall - 27 Apr 2007
  • Cleaned up the page to match the changes made after v0.6.4. Still hammering out the network sharing stuff. -- MarcGuay - 17 Dec 2008


External Links

http://colinux.wikia.com/wiki/Getting_Started_with_coLinux_-_Long_manual


r21 - 02 Apr 2021 - 20:46:06 - UnknownUser

Copyright © by the contributing authors.