准备开发详述:使用映像创建者


简介
Image Creator uses Projects, Targets, and Functional Sets to organize files and packages.

映像创建者使用项目,目标和功能集(fset)来组织文件和包。

Moblin Image Creator provides three fundamental features which allow you to:

Moblin Image Creator需要设定3个基本部分:

  • Create a platform-specific build-environment, or "project".
  • 创建特殊平台建立环境,即“项目”。
  • Create a platform-specific target file-system, or "target", which can be used for developing and installing applications written specifically for the build-environment.
  • 创建特殊平台目标文件系统,即“目标”,可用来开发和安装应用程序写入特定建设环境。
  • Create images of the target file system for the embedded device.
  • 创建虚拟设备目标文件系统映像。

Users of Image Creator will generally follow these steps:

映像创建者的用户通常要进行下列步骤:

1.       Create a project.

2.       创建项目

3.       Add a target to the project.

4.       创建项目的目标

5.       Install desired fset on the target.

6.       安装需要的fset在目标设备上

7.       Add your own code or applications to the target.

8.       添加你自己的代码或应用程序到目标设备

9.       Create an image from the target.

10.    通过目标设备创建一个映像

11.    Write the image to a USB drive.

12.    写一个映像到USB设备

o        Live images will allow you to boot from the USB drive, without modifying the mobile device hard drive.

o        活动映像将允许你导入到USB设备,除修改移动设备硬件以外。

o        Non-live images will erase and replace the mobile device hard drive contents with the contents of the image.

o        非活动映像将通过映像内容擦除或替换移动设备硬件内容。

13.    Boot the device off of the image.

14.    脱离映像启动设备。

If you have not done so already, install Moblin Image Creator.

如果你还没有准备好这些,先安装Moblin Image Creator.

Running Moblin Image Creator

运行Moblin Image Creator
Moblin Image Creator has both a graphical and command-line user interface. You must be root to run Moblin Image Creator. You can start Moblin Image Creator from the command line, using
sudo, or by selecting it from the desktop menu.

Moblin Image Creator 同时拥有图形和命令行用户界面。必须用Root身份运行Moblin Image Creator,可通过命令行使用sudo以启动Moblin Image Creator,或从桌面菜单上选择。

To run the Moblin Image Creator UI, you can start the tool with the following command, omitting any arguments:

运行Moblin Image Creator界面,不需要任何参数输入下列命令:

$ sudo image-creator


You can also run Moblin Image Creator entirely through the command line, by running it with different arguments. To see the available list of command-line arguments, use the following command:

通常能够完全通过命令行运行Moblin Image Creator,使用不同的运行参数。查看可用命令行参数列表,使用下列命令:

$ sudo image-creator --help

Hint: Moblin Image Creator installs a bash completion configuration file, so if you are using bash, you can press the Tab key. After typing a few letters of a given command line argument, bash will auto-complete (provide you a list of possible completions).

提示:Moblin Image Creator 安装了一个bash自动完成命令设置,所以如果你使用bash,可以按TAB键。在输入一些命令特定字母后,base将自动完成(提供一个可能是全部命令的列表)。

Project Assistant: Creating a Project, Target, and Adding Fsets in One Shot

项目助手:创建一个项目,目标,以及添加Fset
One of the newest features in the Moblin Image Creator UI is The Project Assistant, which allows you to create a project, add a target to that project, and add fsets to that target, through one dialog.

Moblin Image Creator界面中一个最新特色是项目助手,它允许你通过一个对话框创建项目,添加目标到项目,并且增加fset到目标。

The Project Assistant can be found by selecting the Project Assistant option from the File menu.

项目助手可在“文件”菜单中“项目助手”选项被找到。

Step 1: Create a Project

1步:创建一个项目
The first step is to create a project. Enter values for the name, description, path, and platform parameters.

第一步是创建项目。输入名称、描述、路径和平台参数数值。


Figure 2-1: Moblin Image Creator wizard asking for the project name, description, path, and platform.

2-1Moblin Image Creator 向导询问询问项目名,描述,路径和平台。

Parameter descriptions:

参数描述:

Project Name

项目名称

This is the name used to reference the project.

项目所涉及名称

Project Description

项目描述

This is a description of the project, what it's used for, what it will contain, etc.

这是项目的描述,它用来做什么,将包含什么,等等

Project Path

项目路径

This is a full path on your local file-system that specifies where the project's build-environment and file-system are created. You must specify an empty folder, and it is recommended that you have at least one GB of free space.

这是项目在你本地文件系统的路径上的全称,用来建立环境和文件系统。你必须定义一个空目录,同时它拥有不少于1GB的空闲空间。

Note: Later, you can chroot from this file location to develop software for your targets.

提示:此后,你可以交互在这个文件目录,为目标设备开发软件。

Project Platform

项目平台

This is the platform which will determine kernel configuration and device drivers. It should be based on the architecture of the target device on which you wish to install the image.

平台将决定内核设置和设备驱动。它将要基于目标设备的结构建立你希望安装的映像。

Menlow and McCaslin are the names of the low power Intel® Architecture (IA) platforms. Existing Intel-processor-based, ultra-mobile systems, such as the Samsung Q1 Ultra*, use the McCaslin platform. The next generation of ultra-mobile systems will use the Menlow platforms.

MenlowMcCaslin是以低功耗Intel® Architecture (IA)平台命名的。现有INTEL处理器结构,ultra-moblie系统,Samsung Q1 Ultra*, 使用McCaslin平台。下一代ultra-mobile系统将使用Menlow 平台.


Once this is complete, select the Forward button.

当这些操作完成,选择“Forward”按钮。

 

Step 2: Create a Target and Add fsets

2步:创建一个目标和添加fset
After you create a project, you can use The Project Assistant to add a target to that project and select which fsets you want added to your target. Each target must have a unique name.

在创建项目后,可以使用项目向导添加目标到项目中,并且选择你想要添加到目标的fset。每个目标必需有唯一名称。

Figure 2-2: Moblin Image Creator wizard displaying a list of fsets.

2-2Moblin Image Creator 向导显示的fset列表。

Parameter description:

参数描述:

Name

名称

This is the name used to reference the target. This will become a directory located in the <project-location>/targets directory and will contain the file-system for your target. It must be unique.

这是所涉及目标的名称。它将成为一个目录放置在<project-location>/targets文件夹下面,同时它将包含你的目标设备的文件系统。这个名称是唯一的。

Depending on your objectives, you can select among the different available fsets. Each fset installs a bundle of related packages. For example, if you would like a full GUI, select the fset that says "full-mobile-stack-with-proprietary" (see note on Adobe Flash* below). If you select an fset that depends on the installation of other fsets, these are automatically selected and installed, as well. For more information about the fsets, click here.

基于你的目标,你可以选择一组不同的可用fset。每个fset安装在相关包里。例如,如果你需要完整的GUI,选择描述为"full-mobile-stack-with-proprietary"fset (查看提示在 Adobe Flash* 下面)。如果你选择的fset依赖于其他fset的安装,通常相关fset将会被自动安装。更多关于fset的信息,点这里

About Adobe Flash* Plug-in

关于Adobe Flash* 插件
The UI currently uses Adobe Flash. The Flash plug-in is included in the
full-mobile-stack-with-proprietary fset. The Flash program is owned and licensed by Adobe Systems Inc. Users wishing to build an image containing the Flash program must agree to a license for Flash. Use, installation, or distribution of a user interface using the Flash program on certain devices may require a separate license from Adobe.

现在的UI普遍使用Adobe FlashFlash插件被包含在full-mobile-stack-with-proprietary fset中。Flash程序为Adobe公司所拥有。用户希望建立的映像中包含Flash程序,必须取得Flash的授权。使用,安装或分发用户接口所用到Flash程序的这些设备,需要ADOBE的分发许可。

About Wireless Driver

关于无线驱动
The Samsung Q1 Ultra has an Atheros AR5006X Wireless Network Adapter. The Samsung Q1 Ultra kernel configuration includes the MadWiFi Linux driver for the Atheros chipset. This describes connecting to an access point. Once this is complete, select the Forward button.

Samsung Q1 Ultra拥有Atheros AR5006X无线网络适配器。它的内核结构包括Atheros 芯片的MadWiFi Linux驱动 该描述连接到一个通道点。一旦完成,选择向前按钮。

Step 3: Review and Apply

3步:回顾和应用
Make sure that your configuration is correct, and click the Apply button. Moblin Image Creator will create a project, add a target to the project, and add fsets to the target.

确定你的设置是正确的,点应用按钮。Moblin Image Creator将创建项目,添加目标到项目,并且添加fset到目标。

Creating a New Project from the GUI

GUI创建新项目
The GUI also allows you to create a new project without using the Project Assistant, by selecting the Add button in the Platform Projects section. Moblin Image Creator will display a dialog box, asking you to enter the project parameters, described above. You also have the option to add a target to the project.

GUI通常可以不使用项目助手创建新项目,选择Add按钮在平台项目区域。Moblin Image Creator将显示对话框询问你项目参数,参考前述。你也可以添加目标到项目。

Adding a New Target from the GUI

GUI添加新目标
By selecting a project in the Platform Projects section, you can see a list of all of the project's targets displayed in the Targets section. You can add more targets to the selected project by selecting the Add button in the Targets section. Moblin Image Creator will display a dialog box asking you to enter the target parameters, described above.

在平台项目区域选择项目后,可在目标区域看见一个项目目标的列表。通过点击“Add”按钮,向被选项目添加更多目标。Moblin Image Creator会显示一个对话框要求你输入目标的条件,如前所述。

Adding Functional Sets to an Existing Target

添加fset到当前Target
You can add fsets to a selected target by selecting the Add Functional Sets button in the Targets section of Moblin Image Creator. Moblin Image Creator will display a dialog box asking you to select among the different available fsets. Each fset installs a bundle of related packages. For example, if you would like a full GUI, select the fset that says, "full-mobile-stack-with-proprietary". If you select a fset that depends on the installation of other fsets, these are automatically selected and installed, as well. For more information about the fsets, click here.

你可通过点击Moblin Image CreatorTarget区域,“Add Functional Sets”按钮,添加fset到已选择目标。Moblin Image Creator将显示一个对话框要求你选择fset。每个fset安装一系列相关包。例如,如果你需要一个完整GUI,选择描述为"full-mobile-stack-with-proprietary"fset即可。如果你选择的fset依赖于其他fset的安装,通常相关fset将会被自动安装。更多关于fset的信息,点这里

 

Chrooting into the Project and Target Build Environments and File Systems

交互进入项目、Target建立环境及文件系统
If you wish to install, configure, build, or run applications from a chroot into the projects build-environment, you can do so by selecting the Terminal button in either the Targets section or the Platform Projects system. This will launch a chrooted terminal, with the default prompt delineated with a "#".

如果你希望通过交互进入项目建立环境安装,配置,建立,或运行应用程序,可在项目区域或Target区域点击Terminal按钮,它将启动交互终端,默认提示符号为”#”

Note: In the following examples, commands issued from a workstation's terminal will have a bash delineation of "$", and commands issued on a chrooted target or project terminal, will have a bash delineation of "#".

提示:在下列例子中,从工作站的终端产生的命令将拥有bash提示符”$”,从项目或target的交互终端产生的命令将拥有bash提示符”#”.

Creating a New Project from the Command Line

通过命令行创建新项目
You can also create a project by running Moblin Image Creator from the command line, with the following command and arguments. You must specify values for the project parameters, described above.

你可以通过下列命令和参数,在命令行运行Moblin Image Creator创建新项目。你需要定义项目参数的值,如前所述。

$ sudo image-creator -c create-project /
--platform-name [platform-name] /
--project-name "<your-project-name>" /
--project-path "<full-path-to-project>" /
--project-description "<your-description>"

The above command extracts the buildroot rootstrap in the /usr/src/myproject directory, and then installs additional, required build packages into that new file-system. You must specify an empty folder where your project's build-environment will be created.

上面命令在/usr/src/myproject目录建立环境,将选则所需要的包到该文件系统。你必须选择一个空文件夹创建你的项目建立环境。

To obtain a list of available platform names, you can run the following command:

输入下列命令,可显示可用平台名称列表。

$ sudo image-creator -c list-platforms


Once the project is created, you can use Moblin Image Creator to chroot into the new buildroot by using the following command:

一旦项目被创建,就可以使用Moblin Image Creator的交互终端进入到建立环境的根,通过下列命令:

$ sudo image-creator -c chroot-project --project-name "[project-name]"


Creating a new Target from the Command Line

从命令行创建新Target
You can target a project using the following command and arguments. You must specify an existing project and unique name for the target.

你可以使用下列命令和参数创建新目标,但必须选择一个现存的项目,以及不重复的目标名。

$ sudo image-creator -c create-target /
--project-name "[project-name]" /
--target-name "<your-target-name>"


To obtain a list of the available project names, you can run the following command:

获得一个可用项目列表,可运行下列命令:

$ sudo image-creator -c list-projects


You can chroot inside the target file-system using:

交互进入到Target文件系统,用:

$ sudo image-creator -c chroot-target /
--project-name "[project-name]" /
--target-name "[target-name]"


Installing Target Feature Sets from the Command Line

通过命令行安装fset到目标
You can install fsets to a target by using the following command. You must specify an existing project, target, and available fset.

使用下列命令可安装fset到目标,但必须选择一个存在的项目和目标,以及可用的fset

$ sudo image-creator -c install-fset /
--project-name "[project-name]" /
--target-name "[target-name]" /
--fset-name "[fset-name]"


To obtain a list of your available target names, you can run the following command:

可以运行下列命令获得一个可用目标名称列表:

$ sudo image-creator -c list-targets --project-name "[project-name]"


To obtain a list of your available fset names, you can run the following command:

运行下列命令可获得一个可用fset名称列表:

$ sudo image-creator -c list-fsets

For example, to install all needed fsets to boot a Samsung* Q1 Ultra and show the current Hildon desktop, you can use "full-mobile-stack" as the value for the "-fset-name" parameter.

例如,你安装所有Samsung* Q1 Ultra设备启动必须的fset,并且显示通用的Hildon桌面,使用"-fset-name"参数安装"full-mobile-stack"

Testing Applications from a Target File System

从目标文件系统测试应用程序

You can test your applications by chrooting into the target file-system and running a virtual X session inside your workstation's existing X session. If Xephyr, a popular tool for running a virtual X session, isn't installed on your target, you must install it.

通过交互进入目标 的文件系统或者运行虚拟的x会话代替当前工作站的x会话,可测试你的运用程序。例如Xephyr,它是一个常用的虚拟x会话工具,如果没有在目标上安装,那么必须先将它安装。

 

Installing and Using Xephyr

安装和使用Xephyr
To install Xephyr, run the following command from your target's terminal:

在目标的终端上运行下列命令,安装Xephyr

# apt-get install xserver-xephyr/


To run a virtual X session, you must enable access to your display, by running the following command from your workstation's terminal:

要使运行的x会话可以显示,必须在工作站终端上运行下列命令。

$ xhost +SI:localuser:root


From your target's terminal, run the following commands to configure and run Xephyr:

从目标的终端运行以下程序可以配置或者运行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
# killall gconfd-2


If you have the
full-mobile-stack fset installed, you can run a script that automatically installs, configures, and runs Xephyr:

如果安装有“full-mobile-stackfset,,你可以运行一个脚本,自动安装配置或者运行Xephyr

# ume-xephyr-start

 

Sharing Projects

共享项目
Moblin Image Creator lets you can share your projects with others. You can compress and save a project by selecting the Save Project option from the File menu. Moblin Image Creator can load a compressed project by selecting the Load Project option from the File menu.

Moblin Image可以使用共享项目。通过从文件菜单中选择保存项来压缩或者保存项目。同时,Moblin Image也可以通过选择文件菜单中的下载项来下载被压缩的项目。

 

Clearing Rootstraps

清除Rootstrap
Rootstraps are used to create a project by copying certain files, configurations, and environmental variables from your development workstation to the project file-system. You can clear the rootstraps of the selected project by selecting the Clear Rootstraps option from the Tools menu.

Rootstrap常用于复制某个文件、结构或者环境变量,使得工作站发展成为项目文件系统。你可以通过选择工具菜单中的清除rootstrap项目来清除。

Upgrading Projects and Targets

升级项目或Targets

You can upgrade your projects and targets by clicking the Upgrade Project/Target buttons in the Platform Projects or Targets sections. This runs apt-get update and apt-get upgrade from the respective chrooted environment.

通过对点击平台上的项目或目标区域中的Upgrade Project/Target按钮,可以升级你的项目或目标。运行 apt-get update ”或者“apt-get upgrade 可以在各自的交互环境下升级。



本文译自Moblin.org技术社区
<script type="text/javascript"> var page_title = "Moblin - Prep Dev - Use Image Creator"; // Used by the Site Catalyst code. </script><script src="http://www.intel.com/scripts-include/wa/wa_setup.js" type="text/javascript"> </script><script type="text/javascript"> var wa_pageName = page_title; var wa_geo="asmo-na"; var wa_language="eng"; var wa_org1="sw"; var wa_org2="isn"; var wa_org3="otc"; var wa_org4="moblin"; var wa_orgx=""; var wa_custom04="open source"; var wa_urlQueryString="all"; var wa_reportSuites="intelcorpsw,intelsorpswotc,intelcorpswmoblin"; </script><script src="http://www.intel.com/scripts-include/wa/wa_process.js" type="text/javascript"> </script>

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值