CoLinux 简化嵌入式开发环境

   厌烦了慢速的虚拟机,现在colinux帮你加速,在嵌入式开发中运行一个linux,主要功能就是提供一个gcc的交叉编译环境,那么colinux应该是目前最好的选择。

 

   在windows系统下,以应用方式运行一个linux 内核,而且原有的linux发行版只要稍作修改即可以让其运行在windows中了。

 

   colinux的优点:

      绝对比虚拟机快,因为它不是虚拟,而是移植内核代码到windows,除了内核变化,其他应用可以完全二进制兼容

      使用cofs可以很方便的使用windows数据,任何目录都可以映射

      可以使用物理分区,也可以使用虚拟硬盘

 

  缺点:

     目前还不支持原始的图形,只能通过xserver来实现图形,framebuffer的支持,已经在开发路线上了

 

以下是我测试的过程:

Download & Setup
 download colinux & ubuntu 9.04 rootfs at "http://sourceforge.net/projects/colinux/files/"
 setup coLinux-0.7.5.exe to "D:/coLinux"
  next
  I agree
  del Rootfile system download
  next
  change to "D:/coLinux"
  next
  next
  next
  finish
 setup Network TunTap(I'm in DHCP network)
  click "Network Neighborhood" -> "Property"
  rename "Tap-Win32 adapter" to "colinux"
  Bridge "colinux" and "Local connection"
 
 extract Ubuntu-9.04-1gb.7z ->D:/coLinux/Ubuntu-9.04.ext3.1gb.fs

Create coLinux config file(D:/coLinux)
 ##########################
 #example.conf
 kernel=vmlinux
 initrd=initrd.gz
 mem=256
 cobd0=Ubuntu-9.04.ext3.1gb.fs
 eth0=tuntap,"colinux"
 root=/dev/cobd0
 ro
 ###########################

First run colinux
 Create shortcut
  target:D:/coLinux/colinux-daemon.exe -t nt "@example.conf"
  start directory:D:/coLinux
 Run shortcut
  username:root
  password:root
 Check network
  ping xxx.xxx.xxx.xx
  halt
  
Resize rootfs imgages
 Ms Windows command create 10G empty file:
   D:
   cd coLinux
     fsutil file createnew ubuntu9.04_10G.fs 10737418240

 Modify colinux "example.conf":
  add line "cobd1=ubuntu9.04_10G.fs" to config file
  ##########################
  #example.conf
  kernel=vmlinux
  initrd=initrd.gz
  mem=256
  cobd0=Ubuntu-9.04.ext3.1gb.fs
  cobd1=ubuntu9.04_10G.fs
  eth0=tuntap,"colinux"
  root=/dev/cobd0
  ro
  ###########################
 
 Start colinux and resize disk:
  dd if=/dev/cobd0 of=/dev/cobd1 bs=1M
  e2fsck -f /dev/cobd1
  resize2fs /dev/cobd1
  halt
 
Run colinux with new root image:
 Modify config file,and add line cofs0="d:/"
 ##########################
 #example.conf
 kernel=vmlinux
 initrd=initrd.gz
 mem=256
 #cobd0=Ubuntu-9.04.ext3.1gb.fs
 cobd0=ubuntu9.04_10G.fs
 eth0=tuntap,"colinux"
 root=/dev/cobd0
 ro
 cofs0="d:/"
 ###########################
 Start new colinux.
 Access Ms Windows filesystem:
  mount -t cofs 0 /mnt
 
 install application:
  apt-get install man
  apt-get install manpages-dev
  apt-get install build-essential
  apt-get install ubuntu-desktop
 
 Config system:
  vi "/etc/gdm/gdm.conf"# modify line "[xdmcp] Enable=true"
  useradd colinux -g root -d /home/colinux/ -s /bin/bash
  passwd colinux
  vi "/etc/suders" # add line "colinux ALL=(ALL) ALL" ; wq!
  mkdir -m 0750 /home/colinux;chown colinux /home/colinux
 reboot
 
XDMCP login colinux:
 download xming "http://sourceforge.net/projects/xming/"
 setup
 run "XLaunch"
 select "One windwo withou titlebar"
 next
 select "Open session via XDMCP"
 next
 select "Search for hosts (broadcast)"
 next
 next
 finish
 
 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值