欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
2-Octeon SDK 配置和構建系統

1. Introduction

The Octeon SDK config and build system builds the simple executive library and any required components as part of the application build process. 
Since each application builds its own libraries, no prebuilt libraries are provided with SDK.
因為每個(gè)應用程序都生成它字節的庫,所以SDK不提供預先生成的庫。

The build system for simple executive supports building 64-bit and 32-bit applications. By default 64-bit applications are built and the object files are placed in the 'obj' dir in the application build directory. The "make" variable OCTEON_TARGET must be defined to the cvmx_n32 to build 32-bit applications. The object files and executable name will be postfixed with '-cvmx_n32'.

SE的構建系統支持生成64位和32位的應用程序。默認情況下,生成64位的應用程序,生成的目標文件放在應用程序生成目錄下的obj下面。要生成32位應用程序,make變量OCTEON_TARGET必須被定義成cvmx_n32 。生成的目標文件和可執行文件的名字將被加上'-cvmx_n32'后綴。

The build system supports building for either compile time or runtime Octeon model selection. Please see the "Supporting multiple Octeon models" section of the simple executive documentation page and octeon-model.h for more details.

構建系統支持生成編譯時(shí)或運行時(shí)模塊選擇。詳細信息請看SE文檔"Supporting multiple Octeon models" 章節和octeon-model.h。

When the envionment is sourced with OcteonII model, for example OCTEON_CN63XX, the application is compiled with -march=octeon2 ISA. This toolchain option generates Octeon2 specific instructions. The application will not run on Octeon and OcteonPlus models.

當環(huán)境來(lái)源于OcteonII模塊時(shí),比如OCTEON_CN63XX,應用程序編譯時(shí)加上了-march=octeon2 ISA。這個(gè)工具鏈的選項生成octeon2特性的指令。應用程序將不能運行在octeon和octeonplus模塊上。

2. How to use

To use the build system, the application Makefile should use the template provided below. The template provides the proper order of inclusion for the various Makefile fragments(碎片) provided by the build system, such as common.mk, cvmx.mk and application.mk. If additional components are used in the application, the component will provide a component Makefile fragment to be included as well. Below is the application Makefile template showing an application target "app_exe" being built from "app1.c" and "app2.c":

##  application Makefile##  $Id: doc-build-system.h 50321 2010-06-19 00:55:39Z cchavva $##    subdirectory config/ contains all the configuration header files.#        for example config/cvmx-config.h contains the system resource config,#        config/executive-config.h contains the simple executive config,#        config/global-config.h contains global config across components,#        config/comp1-config.h contains component config for comp1.#    subdirectory obj/ contains intermediate build and library files.##  default targetdefault: application-target#  standard common Makefile fragmentinclude $(OCTEON_ROOT)/common.mk#  include needed component Makefile fragmentsdir := $(OCTEON_ROOT)/executiveinclude $(dir)/cvmx.mk# dir := $(OCTEON_ROOT)/components/comp1# include $(dir)/comp1.mk## dir := $(OCTEON_ROOT)/components/comp2# include $(dir)/comp2.mk#  application specificationTARGET        =  app_exe$(PREFIX)//->目標OBJS          =  $(OBJ_DIR)/app1.o $(OBJ_DIR)/app2.o//依賴(lài)文件CFLAGS_LOCAL = -g -O2 -W -Wall -Wno-unused-parameterinclude $(OCTEON_ROOT)/application.mk#  clean targetclean:    rm -f $(TARGET)    rm -f $(CVMX_CONFIG)    rm -fr $(OBJ_DIR)

Some items have special meaning:

  • application-target: This target depends on the TARGET variable and provides a way to intercept the default make target prior to the value of TARGET being defined.
  • application-target:這個(gè)目標依賴(lài)于TARGET變量,它提供一個(gè)攔截默認make目標的途徑。???
  • dir: For each component needed by the application, this variable needs to be set to where the component source is located. Note the required immediate evaluation assignment syntax.
  • dir:對于每個(gè)被應用程序需要的組件,這個(gè)變量需要被設置到這些組件源所在的目錄。注意需要立即評估任務(wù)的語(yǔ)法。
  • TARGET: The name of the application to be built.
  • TARGET:將要生成的應用程的名字
  • OBJS: Each application source file should have its corresponding object file listed here.
  • OBJS:每個(gè)應用程序源文件應該將相應的目標文件列舉在這里
  • CFLAGS_LOCAL: CFLAGS that will be used for building files listed in OBJS.
  • CFLAGS_LOCAL: CFLAGS用于生成列舉在OBJS中的文件

This build system should be used for applications that require cvmx-config.h (system resource config). All SDK examples that need cvmx-config.h use this build system.

構建系統應該被用于需要cvmx-config.h (系統資源配置)的應用程序。所有的需要cvmx-config.h的SDK示例都是用了構建系統。

2.1 Environment variables and global configuration  環(huán)境變量和全局配置

There are several environment variables that can be used to add options to various stages of the build. These are:
有一些可以用于向build各階段添加選項的環(huán)境變量:

  • OCTEON_CPPFLAGS_GLOBAL_ADD
  • OCTEON_CFLAGS_GLOBAL_ADD
  • OCTEON_ASFLAGS_GLOBAL_ADD
  • OCTEON_LDFLAGS_GLOBAL_ADD

The contents of these variables (if defined) will be added to the respective FLAGS variable in the build system. The build system current uses OCTEON_CPPFLAGS_GLOBAL_ADD for the following configuration options:

  • runtime model checking: Runtime model checking is optionally enabled by the env-setup script. This is done by adding the "-DUSE_RUNTIME_MODEL_CHECKS=1" to this environment variable. This is the default behaviour.
  • runtime checking of POW consistency, CSR addresses, and other parameters: To enable this, pass the --checks argument to the env-setup script. This is _strongly_ recommended, as it can identify coding errors that may be difficult to find otherwise.
  • Not using 1-1 TLB mappings for simple executive application:. To disable use of 1-1 mappings, the string "-DCVMX_USE_1_TO_1_TLB_MAPPINGS=0" to the environment variable. This will cause the application initialization code to not setup 1-1 mappings, and also cvmx_phys_to_ptr() and cvmx_ptr_to_phys() to do the proper convertions.

3. Config system

Each component in the SDK may have configuration settings, which are specified in the component-config.h header file. When creating a new application, a config subdirectory should be created, and application-specific config header files should be placed in the config subdirectory. Templates (starting points) for such config header files can be found in the component directory as component-config.h.template. For example, the simple executive's configuration header file template is found at OCTEON-SDK/executive/executive-config.h.template. The application should make a copy of it in the application directory as config/executive-config.h.
SDK中每一個(gè)組件都可能有配置設定,這些設定在component-config.h 頭文件中。當創(chuàng )建一個(gè)新應用程序時(shí),一個(gè)配置子目錄應該被創(chuàng )建,應用程序特定的config頭文件應該被放到這個(gè)config子目錄中。這個(gè)config頭文件的模板可以在組件目錄中找到且名字為component-config.h.template。例如:SE的配置頭文件模板在OCTEON-SDK/executive/executive-config.h.template。應用程序應該復制一份這個(gè)模板放到應用程序目錄config/executive-config.h。

Example: creating an application that uses simple executive% mkdir application% cd application% mkdir config% cp $OCTEON_ROOT/executive/executive-config.h.template config/executive-config.h(then edit config/executive-config.h to tune the flags/settings as appropriate for the application)

The build system will take care of creating a system resource header file, by running the cvmx-config tool on all the configuration header files in the application's config subdirectory. The automatically generated file will be config/cvmx-config.h.

根據應用程序配置子目錄中的所有配置頭文件,運行cvmx-config工具,構建系統將會(huì )創(chuàng )建一個(gè)系統資源頭文件。這個(gè)自動(dòng)生成的文件就是config/cvmx-config.h。

The application can specify its own config/resource requirements via this system as well. For example, config/app-config.h can be created to list application configs and requirements. All header files of the form config/*-config.h will be picked up by the config/build system.

通過(guò)構建系統,應用程序也可以指定它自己的config/resource需求。例如:config/app-config.h可以被創(chuàng )建,且它列舉了應用程序的配置和需求。所有的config/*-config.h這種形式的頭文件都將被配置/構建系統所讀取。

Each component-config.h file contains two sections: first, the component configuration section should detail the various compilation flags and settings that can be defined to control the behavior of that particular component. Flags may be used to enable/disable features, settings may be used to define parameters required for that component. This section is normal C code.

每一個(gè) component-config.h 包含兩個(gè)段:首先,.組件配置段,它應該詳細描述各種編譯選項和設置,可以被定義去控制那個(gè)特定組件的行為。選項可以用來(lái)去使能或禁止特性,設置可以用來(lái)定義組件需要的參數。這個(gè)段通常用C去寫(xiě)。

The second section contains the resource requirements of the component. This section is not C code, and is therefore bracketed by #ifdef CAVIUM_COMPONENT_REQUIREMENT/#endif. The resource requirement section may be split into another file and included in the component-config.h file. This is done for the simple executive with the resources described in the cvmx-resources.config file that is included by executive-config.h.

第二段包含組件需要的資源。這段不是用C寫(xiě)的,且被用#ifdef CAVIUM_COMPONENT_REQUIREMENT/#endif括起來(lái)。需要的資源段可能被分離到另外一個(gè)文件并被包含在component-config.h文件中。這樣做是為了用于在cvmx-resources.config文件中描述的資源的SE,cvmx-resources.config文件被包含在executive-config.h文件中。

The resource requirements are always specified in the format of section name "cvmxconfig", followed by open brace, followed by the resource requirement specifications, then finally ending with a close brace.

需要的資源總是在名為"cvmxconfig"的段中被描述,格式是:cvmxconfig, + 左花括號 + 需要的資源描述 +右花括號。

cvmxconfig{    ... resource requirement specifications go here ...}

There are three types of resources requirements: fpa, fau, and scratch.

有3種所需資源類(lèi)型:fpa, fau 和 scratch

Each resource specification start with the resource type, followed by the definition name (the name of macros that will end up in the generated cvmx-config.h), followed by a series of name = value pairs, terminating with semicolon.

每種資源描述開(kāi)頭是資源類(lèi)型,跟著(zhù)是定義的名字(最終在生成的cvmx-config.h文件中的宏名),再跟著(zhù)是一系列 “name = value;”這種格式。

For fpa resource specification, the following name value pairs are recognized:

 pool = <integer>        ranges from 0 through 7, specifies the required FPA pool number, for pools that must be fixed. size = <integer>        specifies the size of buffers in the pool in number of cache lines.  (default: 1) priority = <integer>    ranges from 1 through 8, specifies the desired priority (1 = highest priority).  (default: 8) protected = <boolean>   if true, no other fpa resource can map to the hardware pool assigned to this resource.  (default: false) description = <string>  doubly quoted string, which will appear as comment in the generated cvmx-config.h. <boolean> can be "true", "yes", or "1" for true, and "false", "no", or "0" for false.

 Example fpa resource specification: the packet buffer pool            fpa CVMX_FPA_PACKET_POOL                    pool        = 0                    size        = 8                    priority    = 1                    description = "Packet buffers";

For fau resource specification, the following name value pairs are recognized:

 size = <integer>        specifies the number of bytes per element.  (default: 8) count = <integer>       specifies the number of elements.  (default: 1) description = <string>  doubly quoted string, which will appear as comment in the generated cvmx-config.h.

 Example fau resource specification: an array of 8 bytes for output queue index            fau CVMX_FAU_REG_OQ_INDEX_BASE                    size        = 1                    count       = 8                    description = "FAU registers for the position in PKO command buffers";

For scratch resource specification, the following name value pairs are recognized:

 permanent = <boolean>   if true, this scratch location cannot be shared with another scratch resource.  (default: true) size = <integer>        specifies the number of bytes per element.  (default: 8) count = <integer>       specifies the number of elements.  (default: 1) iobdma = <boolean>      if true, this scratch location can be used as an IOBDMA destination.  (default: true)

 Example scratch resource specification: output queue buffer preallocation            scratch CVMX_SCR_OQ_BUF_PRE_ALLOC                    size        = 8                    iobdma      = true                    permanent   = true                    description = "Pre allocation for PKO queue command buffers";

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
JSF (Java Server Faces) 開(kāi)發(fā)指南 step by step
單獨編譯linux-3.9.2-301的bonding內核模塊
uClinux上的應用程序設計||操作系統|
Linux內核配置文件之解讀Makefile
Linux下smi/mdio總線(xiàn)驅動(dòng)
px4 px4_parse_function_args
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久