📄 colinux.html
字号:
tmpfs /dev/shm tmpfs defaults 0 0/dev/cobd2 swap swap defaults 0 0/dev/cobd1 /home ext3 defaults 0 0cofs00 /windows cofs defaults,noatime 0 0# You can simply add your cofs drives with a simple entry like:# cofsxx /mountpint cofs defaults,noatime 0 0# You can also use additinal options like "noauto", if you want to mount# the fs manually or "user", if you want the filesystem be user mountable. </pre><p>With just a few of these components CoLinux can be run in a stand alone mode. </p><pre class="code">colinux-daemon.exe @config.txt root=/dev/ram0</pre><p>In the above example config file the <strong>CoLinux</strong> working directory can be mounted as follows: </p><pre class="code">mkdir -p /colinuxmount -t cofs cofs01 /colinux</pre><p>Doing this will allow the use of Linux commands to manipulate the installation kit. For example to uncompress images after booting in stand alone mode and mounting the CoLinux image:</p><pre class="code">gunzip /colinux/swap.img.gzgunzip /colinux/home.img.gzgunzip /colinux/root.img.gz</pre></div><!-- SECTION [9597-12497] --><h3><a name="colinux_disk_images" id="colinux_disk_images">CoLinux Disk Images</a></h3><div class="level3"><p> There are two ways to create disk images with CoLinux, one uses a Windows based tool, the other is the “standard” Linux method. The Linux method only runs under a Linux System.</p><p>There is a <strong>mkFile.exe</strong> utility that can be used under Windows to build an image.</p><pre class="code"># At a Windows command prompt# example to create a 2G filemkFile -m mysys.img 2000</pre><p>This file will then have to be populated within CoLinux but the image <strong>mysys.img</strong> can be mounted within CoLinux if it is defined in the CoLinux config file. </p><pre class="code"># this is the entry in the config.txt filecobd4=.\mysys.img specify partition /dev/cobd4 to point to this file</pre><p>In the CoLinux virtual machine: </p><pre class="code"># first create an ext2 file system on the disk imagemke2fs -F /dev/cobd4#turn this into an ext3 filesystemtune2fs -i 0 -j /dev/cobd4# then under CoLinuxmkdir -p /mymntmount /dev/cobd4 /mymount</pre><p>The <strong>normal</strong> Linux way to make a blank disk image is as follows: </p><pre class="code">dd if=/dev/zero of=mysys.img bs=1k count=2048k</pre></div><!-- SECTION [12498-13560] --><h3><a name="starting_a_colinux_session" id="starting_a_colinux_session">Starting a Colinux Session</a></h3><div class="level3"><p> To avoid errors during initialization, the following CoLinux startup order is recommended: </p><ol><li class="level1"><div class="li"> Start Xming</div></li><li class="level1"><div class="li"> Start Blackfin-coLinux (Colinux main console)<pre class="code">Login = uclinux passwd = bf533 </pre></div></li><li class="level1"><div class="li"> Start bfin-uclinux (Putty console)<pre class="code">passwd = bf533 start konsole or xterm (in background) from Putty console</pre></div></li><li class="level1"><div class="li"> Launch minicom from the konsole or xterm terminal </div></li></ol><p> </p><pre class="code"> Goto Control Panel -> Administrative Tools -> Component Services -> Services Local -> Sygate Security Agent -> Under Properties, DISABLE firewall & Restart your PC </pre><p> </p></div><!-- SECTION [13561-14417] --><h3><a name="stopping_a_colinux_session" id="stopping_a_colinux_session">Stopping a Colinux Session</a></h3><div class="level3"><p>When you are ready to end your colinux session, in super user mode, type ‘shutdown -h now’ within the main console. Wait until the main console prints ‘Power down’ before closing all linux windows. This shut down procedure will allow Colinux to start up normally the next time without a reboot.</p><p>The following commands can be used to terminate a CoLinux session (in super user mode):</p><ul><li class="level1"><div class="li"> <strong>halt</strong></div></li><li class="level1"><div class="li"> <strong>shutdown -h now</strong></div></li></ul><p> Both of these will Power Down the virtual machine.</p><p>The CoLinux Console can then be closed using the <strong>Quit</strong> command.</p></div><!-- SECTION [14418-14996] --><h3><a name="more_about_debian" id="more_about_debian">More about Debian</a></h3><div class="level3"><p>The CoLinux system is based on the <a href="http://www.debian.org" class="urlextern" title="http://www.debian.org" rel="nofollow">Debian</a> Distribution.</p><p>One of the key features of the Debian System is its method of package management. The CoLinux installation can be set up to download upgraded packages from a package server.</p><p>Consider the example used to hold (temporarily) the Blackfin toolchain. </p><pre class="code">Add the new source of the Debian packagesplace the line deb http://wwwa.jura.uni-tuebingen.de/~s-hej4/debs ./into the file /etc/apt/sources.listThen type the following to include the new packages apt-get updateafter this type apt-get install bfin-gccTo install the blackfin tool chain.</pre><p> </p><p></p><p> </p><p>After using <strong>apt-get</strong> to download and install a package an archive of installed packages is kept in a local cache directory: </p><pre class="code">/var/cache/apt/archives</pre></div><!-- SECTION [14997-15935] --><h3><a name="debian_package_layout" id="debian_package_layout">Debian Package Layout</a></h3><div class="level3"><p>Normally a Debian source “package” contains just the original sources in a tarball (somesource-0.9.32.orig.tar.gz) and a patch (somesource-0.9.32.diff.gz). The patch contains changes, that makes the software conform to Debian standards, like a changelog, proper manpages and so on. The patch also contains a <strong>DEBIAN</strong> subdirectory with at least a control and a rules file. The control file has all the package information in it, like the name, the version, the author, dependencies The rules file includes a script that tells the build tools how to make the package.</p><p>The Blackfin toolchain uses a simpler approach. Compile it with the script and install it in <strong>/opt/uClinux</strong>. Then copy everything to <strong>/tmp/build</strong>. You now have a <strong>/tmp/build/opt/uClinux</strong> directory. Then make a <strong>DEBIAN</strong> sub directory in <strong>/tmp/build</strong> and put the control file it. The “<strong>dpkg-deb -b /tmp/build /tmp</strong>” command will then build the package in <strong>/tmp</strong>.</p><p>The Blackfin control file looks like this: </p><pre class="code">contents of /tmp/build/DEBIAN/controlThis was obtained from bfin-gcc_3.4-2005R3.1_i386.deb usingdpkg -e bfin-gcc_3.4-2005R3.1_i386.deb======================================Package: bfin-gccVersion: 3.4-2005R3.1Maintainer: http://blackfin.uclinux.orgDescription: This is the Blackfin ToolchainSection: DevelopmentArchitecture: i386Installed-Size: 81580======================================</pre></div><!-- SECTION [15936-17374] --><h3><a name="networking" id="networking">Networking</a></h3><div class="level3"><p>The basic CoLinux system uses a “slirp” interface. This is a user space network protocol that allows the CoLinux system and Windows to “share” a network connection. The “slirp” configuration line in the <strong>config.txt</strong> file is: </p><pre class="code">eth0=slirp,"",tcp:333:22/tcp:1000:1000/udp:69:69</pre><p>This sets up an ethernet connection sharing the Windows ethernet device.</p><p>Some ports are mapped directly to services running directly on CoLinux.</p><ul><li class="level1"><div class="li"> tcp 333:22 (ssh)</div></li><li class="level1"><div class="li"> tcp 1000:1000 (webmin)</div></li><li class="level1"><div class="li"> udp 69:69 (tftp)</div></li></ul></div><h4><a name="tap" id="tap">TAP</a></h4><div class="level4"><p>There is another interface called TAP. This is a userspace network connection to a Windows virtual device. The Windows device is provided by a package distributed with CoLinux. Once installed this package sets up a Tap interface under Windows that can communicate directly to eth1 in CoLinux.</p><p>It is important that the device name is setup under Windows to match the name used in CoLinux. In this example “tuntap” is the name used by both systems. You typically give the Windows TAP a private IP like 10.12.12.1, in CoLinux you set eth1 to 10.12.12.2</p><p>To set up eth1 under CoLinux the file <strong>/etc/network/interfaces</strong> should be modified to add the eth1 details.</p><pre class="code">Append this to /etc/network/interfaces========================auto eth1iface eth1 inet staticaddress 10.12.12.2netmask 255.0.0.0========================</pre></div><!-- SECTION [17375-18749] --><h3><a name="samba" id="samba">Samba</a></h3><div class="level3"><p>Samba only works over a <a href="#networking" title=":colinux.txt ↵" class="wikilink1">TAP</a> network.</p><p>The <strong>smbmount</strong> command under CoLinux is used to mount a shared directory. </p><pre class="code">/usr/bin/smbmount //server/share /mnt/localdir -N</pre><p> ’<strong>smbpasswd</strong> </p></div><!-- SECTION [18750-19169] --><h3><a name="xwindows_with_colinux" id="xwindows_with_colinux">XWindows with CoLinux</a></h3><div class="level3"><p> The <a href="http://freedesktop.org/wiki/Xming" class="urlextern" title="http://freedesktop.org/wiki/Xming" rel="nofollow">Xming</a> package can be used as an XWindows display for CoLinux. The system comes with an installer and is relatively easy to set up.</p><p> </p><p>The system comes with a configurator xlaunch. More instructions later. <img src="images/smileys/fixme.gif" align="middle" alt="FIXME" /></p><p>To use Xming as a display driver run the server on the Windows System: </p><pre class="code">xlaunch -run <configfile></pre><p>Then select the display under <strong>CoLinux</strong> and launch <strong>xterm</strong> </p><pre class="code">export DISPLAY=192.168.1.103:0.0xterm&</pre><p>In the remote xterm any Unix command will inherit the <strong>DISPLAY</strong> definition.</p></div><!-- SECTION [19170-19845] --><h3><a name="starting_with_blackfin_development_on_colinux" id="starting_with_blackfin_development_on_colinux">Starting with Blackfin Development on coLinux</a></h3><div class="level3"><p> After the successful installation of coLinux you can start it with either <strong>colinux-daemon.exe @config.txt</strong> inside the coLinux directory or with a double click on the <strong>Blackfin-coLinux icon</strong>. The coLinux console will appear and you should see the co Linux boot process. (You should know that coLinux works independently of the console. You can close it if you want and restart it later. Closing the console will not close coLinux.) You shouldn’t use the coLinux console to do work with coLinux, because it is slow. You can even close it now if you wish. (But not the first window that opens when you double click on the icon.) To connect to coLinux you should first start the <strong>Xming X-server</strong> and then double click on the <strong>bfin-uclinux icon</strong>. </p><p>The password is <strong>bf533</strong> for both the uclinux and the root account. You should change this (with passwd). You should also change the SMB password with smbpasswd (it is also initially <strong>bf533</strong>).</p><p>Now you can install additional software with synaptic or aptitude.</p><p>To start the uClinux development you should login as user <strong>uclinux</strong>. If you used a CD to install coLinux then it is available via 鈥渕ount /mnt/cdrom鈥
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -