歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

在VmWare下搭建Moblin MID開發環境

  

1.    安裝VmWare

      a)VmWare 6.5以上版本提供對Ubuntu Hardy的VmWare Tools支持;

      b)安裝時最好預留32G的磁盤空間(根據具體項目情況);

 

2.    安裝Ubuntu Desktop Edition 8.0.4 LTS

    a)遵照通用安裝流程;

      i.磁盤分區:

      1.Swap: 512M;

      2./boot:128M;

      3./: ~

      ii. 鍵盤選擇:

      1.China/China

b)重啟後進行更新;

      i.修改軟件源:

     1.備份軟件源:

      a)sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

     2.修改軟件源:

      a)sudo gedit /etc/apt/sources.list

deb http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse

deb-src http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse

 

      3.更新:

      a)sudo apt-get updatec)安裝VmWare Tools:

      i.將VmWare安裝目錄下的”linux.iso”載入鏡像光驅(VM->Settings…);
      ii.點擊VM->Install VMware Tools…,系統會自動加載CD-ROM。把VMwareTools-e.x.p-xxxxx.tar.gz(注意:不是rpm包!)從CM-ROM拖至Ubuntu Desktop;

      iii.下載VwWare Tools補丁至Desktop:open-vm-tools-xxxx.xx.xx-xxxxxx.tar.gz

      iv.打開Ubuntu Terminal (Applications->Accessories->Terminal);

      v.安裝依賴軟件包:

            1.sudo apt-get install build-essential libgtk2.0-dev libicu-dev

            2.sudo apt-get install libproc-dev libdumbnet-dev xorg-dev

      vi.解壓VmWare Tools包:

            1.cd ~/Desktop/

            2.tar zxvf VMwareTools-e.x.p-xxxxx.tar.gz

      vii.解壓並安裝VmWare Tools補丁包:./

            1.tar zxvf open-vm-tools-xxxx.xx.xx-xxxxxx.tar.gz

            2.cd open-vm-tools-xxxx.xx.xx-xxxxxx/

            3../configure

            4.make

            5.cd module/linux/

            6.for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done

            7.cd ../../..

            8.mv -f open-vm-tools-xxxx.xx.xx-xxxxxx/modules/linux/*.tar vmware-tools-              distrib/lib/modules/source/

      viii.安裝VmWare Tools包:

            1.cd vmware-tools-distrib/

            2.sudo ./vmware-install.pl

      ix.重啟Ubuntu;

 

       3.安裝Moblin Image Creator:

    a)     
       git-core      //一種軟件配置工具

       automake      //生成Makefile的工具

       autotools-dev //Used by the automake and libtool packages

       build-essential

       //本軟件包包含一個列表,表中列出了在編譯 Debian 軟件包時所必須的軟件包

       dh-make//Creates Debian source packages for PHP PEAR and PECL extensions

       fakeroot      //Gives a fake root environment

       python //是一種面向對象的解釋性的計算機程序設計語言

       //Python 具有腳本語言中最豐富和強大的類庫,足以支持絕大多數日常應用。

       debootstrap   //Bootstrap the Debian system

     b)安裝Image Creator

       i.方法一:

       $ git clone http://moblin.org/repos/tools/moblin-image-creator.git

       $ cd moblin-image-creator

       $ git pull

       $ ./autogen.sh

       $ sudo make install

       $ sudo image-creator

       ii.方法二:

       在http://moblin.org/downloads.php上,找到Moblin Image Creator package for Ubuntu* Feisty Fawn,在lpia目錄下,用moblin-image-creator_0.45_all.deb通過Synaptic Package Manager進行安裝;
       iii.方法三:

       在http://moblin.org/downloads.php上,找到Moblin Image Creator package for Ubuntu* Feisty Fawn,在lpia目錄下,下載moblin-image-creator_0.45.tar.gz進行解壓安裝;

     c) 安裝Image Creator時可能遇到的錯誤:

       i.錯誤1:/usr/bin/git-clone: 374: curl: not found

       原因:缺少curl這個工具,curl是一個利用URL語法在命令行方式下工作的文件傳輸工具;

       解決:sudo apt-get install curl

       ii.錯誤2:./autogen.sh: 1: intltoolize: not found

       解決:apt-get install intltool

 

     4.在Image Creator下創建Plateform Project

      a)在Image Creator下,Platform Project->Add;

      b)指定Name, Desc, Path, Platform(menlow-lpia或menlow-lpia-ubuntu-hardy) -> OK

      c)自動下載安裝(視網絡情況,大約需要十幾到二十分鐘);

      d)可能出現問題:

    i.在建立menlow-lpia-ubuntu-hardy時,出現apt-get install –f執行錯誤

      原因:可能是網站維護問題;

      解決:過一段時間再試試看?!

 

    5.在Image Creator下創建Target

      a)指定Platform Project;

      b)Targets->Add;

      c)輸入Target名字,Image Creator將在指定Platform Project的文件系統中,/target/下生成該目標文件系統;

      d) 添加fset:Target->Add Function Sets,指定開發用工具包(視網絡情況,大概需要兩個小時):

      i.core

      ii.crownbeach-config

      iii.developer-tools

      iv.gnome-mobile

      v.moblin-crownbeach-full-mobile-stack-with-proprietary

      vi.moblin-kernel
      vii.ubuntu-kernel

      viii.ubuntu-mobile


      6. 安裝目標設備顯示依賴工具:xserver-xephyr

      Xephyr is an X server that can be run inside another X server, much like Xnest. It is based on the kdrive X server, and as a result it supports newer extensions than Xnest, including render and composite.

 

      a)打開Target下的Terminal;

      b)在Target的文件系統中安裝xserver-xephyr

      # apt-get install xserver-xephyr

 

      7. 運行UME User

      a)打開Host的Terminal,執行:

      $ xhost +SI:localuser:root

      b)打開Target的Terminal,配置並執行Xephyr:

      # export DISPLAY=:0

      # /etc/init.d/dbus start

      # xinit /etc/X11/xinit/xinitrc -- /usr/bin/Xephyr :2 -host-cursor -screen 1024x600x32 -dpi 96 -ac

      或者如果安裝了full-mobile-stack fset,可以直接執行腳本:

      # ume-xephyr-start

      *可以通過修改Target文件系統下/usr/bin/ume-xephyr-start腳本來修改分辨率:

RES=”800x480” 或 RES=”1024x600”

      或者直接運行 ume-xephyr-start 800x480

      c)可能發生的錯誤:

      i.錯誤一:出現如下錯誤提示:

Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!

Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!

 

Fatal server error:

could not open default font 'fixed'

    解決:這是由於找不到X11字體所致,需要將/usr/share/fonts/X11的字體從Host拷貝到目標文件系統;如果Host上也沒有cyrillic字體,則需要現在Host上安裝在拷貝到目標文件系統;

    $sudo apt-get install xfonts-cyrillic

    ii. 錯誤二:運行ume-xephyr-start失敗,可能出現如下錯誤提示後退出:

Setting screen resolution to 1024x600

DISPLAY already set to  :0.0

Starting dbus

 * system message bus already started; not starting.

Starting UI in Xephyr

 

Extended Input Devices not yet supported. Impelement it at line 625 in ../../../../hw/kdrive/src/kinput.c

 

waiting for X server to shut down FreeFontPath: FPE "/usr/share/fonts/X11/misc" refcount is 2, should be 1; fixing.

      解決:從Target上的Terminal運行:

      #pkill gconfd 或 #killall gconfd-2

      This will tell the target to use the target's gconfd instead of the parent's.

Copyright © Linux教程網 All Rights Reserved