当前位置: 首页 > news >正文

天津网站建设需要多少钱电子商务公司起名

天津网站建设需要多少钱,电子商务公司起名,怎么看实时街景地图,企业展厅图片修改原有程序 通常情况下我们会需要修改OpenBMC原有的程序来适配我们的项目,本节将介绍一般的流程。 为此首先我们需要了解devtool这个工具,注意它不是前端开发用的那个devtool,而是由OE(或者Yocto?)提供…

修改原有程序

通常情况下我们会需要修改OpenBMC原有的程序来适配我们的项目,本节将介绍一般的流程。

为此首先我们需要了解devtool这个工具,注意它不是前端开发用的那个devtool,而是由OE(或者Yocto?)提供的一个用于构建、测试和打包程序的工具,在7 devtool Quick Reference — The Yocto Project ® 4.2.999 documentation有具体的介绍,我们一般用它来编辑和打包源代码。

devtool的帮助说明如下:

jw@HOME:~/openbmc/build$ devtool --help
NOTE: Starting bitbake server...
usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q] [--color COLOR] [-h] <subcommand> ...OpenEmbedded development tooloptions:--basepath BASEPATH   Base directory of SDK / build directory--bbpath BBPATH       Explicitly specify the BBPATH, rather than getting it from the metadata-d, --debug           Enable debug output-q, --quiet           Print only errors--color COLOR         Colorize output (where COLOR is auto, always, never)-h, --help            show this help message and exitsubcommands:Beginning work on a recipe:add                   Add a new recipemodify                Modify the source for an existing recipeupgrade               Upgrade an existing recipeGetting information:status                Show workspace statussearch                Search available recipeslatest-version        Report the latest version of an existing recipecheck-upgrade-status  Report upgradability for multiple (or all) recipesWorking on a recipe in the workspace:build                 Build a reciperename                Rename a recipe file in the workspaceedit-recipe           Edit a recipe filefind-recipe           Find a recipe fileconfigure-help        Get help on configure script optionsupdate-recipe         Apply changes from external source tree to recipereset                 Remove a recipe from your workspacefinish                Finish working on a recipe in your workspaceTesting changes on target:deploy-target         Deploy recipe output files to live target machineundeploy-target       Undeploy recipe output files in live target machinebuild-image           Build image including workspace recipe packagesAdvanced:create-workspace      Set up workspace in an alternative locationextract               Extract the source for an existing recipesync                  Synchronize the source tree for an existing recipemenuconfig            Alter build-time configuration for a recipeexport                Export workspace into a tar archiveimport                Import exported tar archive into workspace
Use devtool <subcommand> --help to get help on a specific command

下面开始介绍如何修改源码并最终将修改之后的结果放到我们自己的项目中使用,这里以webui-vue为例。

  1. 首先我们创建一个workspace用来放置源码,前面已经提到过,OpenBMC框架中并没有实际的代码,而是需要在构建的过程中下载来,具体存放的位置就是build下的download目录:
jw@HOME:~/openbmc/build$ ls downloads/
Cython-0.29.33.tar.gz		git2_source.denx.de.u-boot.u-boot.git.tar.gz		nbd-3.24.tar.xz
Cython-0.29.33.tar.gz.done	git2_source.denx.de.u-boot.u-boot.git.tar.gz.done	nbd-3.24.tar.xz.done
Jinja2-3.1.2.tar.gz			git2_sourceware.org.git.glibc.git.tar.gz			net-snmp-5.9.3.tar.gz
Jinja2-3.1.2.tar.gz.done	git2_sourceware.org.git.glibc.git.tar.gz.done		net-snmp-5.9.3.tar.gz.done
# 后面略

这些压缩包不应该直接去修改,为此我们先创建一个目录来存放解压缩之后的源代码,这里通过devtool的create-workspace子命令来创建存放源代码的目录,执行的命令如下:

jw@HOME:~/openbmc/build$ devtool create-workspace
NOTE: Starting bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (22:46:33.532066)
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (22:46:33.532066)
NOTE: Retrying server connection (#1)... (22:46:33.532066)
NOTE: Starting bitbake server...

此时build下就会多一个workspace目录:

jw@HOME:~/openbmc/build$ ls
bitbake-cookerdaemon.log  cache  conf  downloads  sstate-cache  tmp  workspace
jw@HOME:~/openbmc/build$ tree workspace/
workspace/
├── README
└── conf└── layer.conf1 directory, 2 files

里面也会有一个layer文件,实际上create-workspace就是创建了一个新的分层,并且还会修改build目录下的bblayers.conf文件来包含这个分层,这样这里面的代码才会在后续被编译和使用:

BBLAYERS ?= " \/home/jw/openbmc/meta \/home/jw/openbmc/meta-poky \/home/jw/openbmc/meta-openembedded/meta-oe \/home/jw/openbmc/meta-openembedded/meta-networking \/home/jw/openbmc/meta-openembedded/meta-python \/home/jw/openbmc/meta-phosphor \/home/jw/openbmc/meta-aspeed \/home/jw/openbmc/meta-beni \/home/jw/openbmc/build/workspace \ # 这个就是新增的"

之后我们找一个配方来修改其代码,这里就以webui-vue为例:

jw@HOME:~/openbmc/build$ bitbake -s | grep webui
phosphor-webui                      :1.0+gitAUTOINC+e16bb5c358-r1                                                    
webui-vue                           :1.0+gitAUTOINC+0f6147ca25-r1
  1. 我们需要解压它的源码并放到workspace目录中,为此需要执行devtool的modify子命令:
jw@HOME:~/openbmc/build$ devtool modify webui-vue
NOTE: Starting bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (22:50:43.681700)
Loading cache: 100% |###############################################################################################################| Time: 0:00:00
Loaded 4383 entries from dependency cache.
Parsing recipes: 100% |###############################################################################################################| Time: 0:00:00
Parsing of 2709 .bb files complete (2708 cached, 1 parsed). 4384 targets, 566 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION           = "2.4.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "arm-openbmc-linux-gnueabi"
MACHINE              = "beni-ast2500"
DISTRO               = "openbmc-phosphor"
DISTRO_VERSION       = "nodistro.0"
TUNE_FEATURES        = "arm thumb arm1176jzs"
TARGET_FPU           = "soft"
meta                 
meta-poky            
meta-oe              
meta-networking      
meta-python          
meta-phosphor        
meta-aspeed          = "HEAD:67c9d4e715c705cd05fd04f7c8cd4fad300a4666"
meta-beni            = "master:37708567fc4efacfcba74f8274edc924e7ba7a1e"
workspace            = "HEAD:67c9d4e715c705cd05fd04f7c8cd4fad300a4666"Initialising tasks: 100% |###############################################################################################################| Time: 0:00:00
Sstate summary: Wanted 0 Local 0 Mirrors 0 Missed 0 Current 20 (0% match, 100% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 93 tasks of which 90 didn't need to be rerun and all succeeded.
INFO: Source tree extracted to /home/jw/openbmc/build/workspace/sources/webui-vue
INFO: Using source tree as build directory since that would be the default for this recipe
INFO: Recipe webui-vue now set up to build from /home/jw/openbmc/build/workspace/sources/webui-vue

此时再次查看workspace目录:

jw@HOME:~/openbmc/build$ tree workspace/
workspace/
├── README
├── appends
│   └── webui-vue_git.bbappend
├── conf
│   └── layer.conf
└── sources└── webui-vue├── # 中间略└── vue.config.js97 directories, 318 files

然后我们修改webui-vue中的某些代码,这里修改登录界面的LOGO,替换成Apple的音乐图标。重新编译webui-vue:

jw@HOME:~/openbmc/build$ devtool build webui-vue
NOTE: Starting bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (23:04:57.342934)
Loading cache: 100% |###############################################################################################################| Time: 0:00:00
Loaded 4383 entries from dependency cache.
Parsing recipes: 100% |###############################################################################################################| Time: 0:00:00
Parsing of 2709 .bb files complete (2707 cached, 2 parsed). 4384 targets, 566 skipped, 0 masked, 0 errors.
Removing 1 recipes from the allarch sysroot: 100% |###############################################################################################################| Time: 0:00:03
Removing 1 recipes from the beni_ast2500 sysroot: 100% |###############################################################################################################| Time: 0:00:00
Loading cache: 100% |###############################################################################################################| Time: 0:00:03
Loaded 4383 entries from dependency cache.
Parsing recipes: 100% |###############################################################################################################| Time: 0:00:00
Parsing of 2709 .bb files complete (2707 cached, 2 parsed). 4384 targets, 566 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependenciesBuild Configuration:
BB_VERSION           = "2.4.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "arm-openbmc-linux-gnueabi"
MACHINE              = "beni-ast2500"
DISTRO               = "openbmc-phosphor"
DISTRO_VERSION       = "nodistro.0"
TUNE_FEATURES        = "arm thumb arm1176jzs"
TARGET_FPU           = "soft"
meta                 
meta-poky            
meta-oe              
meta-networking      
meta-python          
meta-phosphor        
meta-aspeed          = "HEAD:67c9d4e715c705cd05fd04f7c8cd4fad300a4666"
meta-beni            = "master:37708567fc4efacfcba74f8274edc924e7ba7a1e"
workspace            = "HEAD:67c9d4e715c705cd05fd04f7c8cd4fad300a4666"Initialising tasks: 100% |###########################################################################################################| Time: 0:00:00
Sstate summary: Wanted 0 Local 0 Mirrors 0 Missed 0 Current 94 (0% match, 100% complete)
NOTE: Executing Tasks
NOTE: webui-vue: compiling from external source tree /home/jw/openbmc/build/workspace/sources/webui-vue
NOTE: Tasks Summary: Attempted 435 tasks of which 427 didn't need to be rerun and all succeeded.

可以看到编译没有问题,说明修改本身也没有问题,下面的步骤就需要合入修改的代码。

  1. 由于实际的源码是下载来的压缩包,所以无法直接修改,因此为了使最终结果生效,我们需要采取的方式是打补丁,为此先需要合入代码,这需要通过git commit的方式:
jw@HOME:~/openbmc/build/workspace/sources/webui-vue$ git commit -m "[ADD]Modify." src/assets/images/applemusic.svg --no-
verify
[devtool 53f5b88] [ADD]Modify.1 file changed, 1 insertion(+)create mode 100644 src/assets/images/applemusic.svg
jw@HOME:~/openbmc/build/workspace/sources/webui-vue$ git commit -m "[ADD]Modify." --no-verify src/layouts/LoginLayout.vue
[devtool 02f4773] [ADD]Modify.1 file changed, 1 insertion(+), 1 deletion(-)

这里增加了一个SVG图片,修改了Web的一行代码指向新的图片,总共有两个修改,都合入即可。然后通过devtool的update-recipe子命令生成补丁和对应的bbappend文件,并存放在我们的自定义项目目录中:

jw@HOME:~/openbmc/build$ devtool update-recipe webui-vue -a ../meta-beni/
NOTE: Starting bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)... (00:14:14.267139)
Loading cache: 100% |####################################################################################| Time: 0:00:00
Loaded 4382 entries from dependency cache.
Parsing recipes: 100% |##################################################################################| Time: 0:00:00
Parsing of 2709 .bb files complete (2707 cached, 2 parsed). 4384 targets, 566 skipped, 0 masked, 0 errors.
NOTE: Writing append file /home/jw/openbmc/meta-beni/recipes-phosphor/webui/webui-vue_git.bbappend
NOTE: Copying 0001-ADD-Modify.patch to /home/jw/openbmc/meta-beni/recipes-phosphor/webui/webui-vue/0001-ADD-Modify.patch
NOTE: Copying 0002-ADD-Modify.patch to /home/jw/openbmc/meta-beni/recipes-phosphor/webui/webui-vue/0002-ADD-Modify.patch

得到的结果:

└── recipes-phosphor├── packagegroups│   └── packagegroup-obmc-apps.bbappend└── webui	# 新增目录├── webui-vue│   ├── 0001-ADD-Modify.patch│   └── 0002-ADD-Modify.patch└── webui-vue_git.bbappend
  1. 这样补丁文件就已经在我们自己的项目中了,之后可以将webui-vue在workspace中的内容删除:
jw@HOME:~/openbmc/build$ devtool reset webui-vue
NOTE: Starting bitbake server...
INFO: Cleaning sysroot for recipe webui-vue...
INFO: Preserving source tree in /home/jw/openbmc/build/workspace/attic/sources/webui-vue.20230809002034
If you no longer need it then please delete it manually.
It is also possible to reuse it via devtool source tree argument.

此时源码还在,不过已经变了名字了,如果不需要就手动删除即可。

  1. 最后重新编译OpenBMC二进制,成功之后执行该二进制,然后通过浏览器再次访问BMC的Web,得到的登录界面变成了如下的样子:

在这里插入图片描述

红框部分就是新的LOGO。

到此,修改OpenBMC原有程序的操作就已经完成了。

http://www.yayakq.cn/news/750714/

相关文章:

  • 织梦关闭网站安阳给商家做网站推广
  • 网站设计经典案例欣赏企业门户网站建设 北京
  • 用C语言做网站登录界面现在装网线多少钱一年
  • 潍坊市建设监理协会网站做冰饮视频网站
  • 网站开发薪资免费网站建设代理
  • 百度做网站吗申请账号注册
  • 做网站去哪里网站建设纟金手指下拉壹陆
  • 网站建设法律网页游戏网站哪个最好
  • 做药公司的网站前置审批品牌网站建设服务机构
  • 网站系统规划报告博兴专业做网站
  • 商城网站开发需求分析抽奖的网站怎么做
  • 企业展示型网站phpwordpress畅言插件
  • 做网站用服务器文化公司网站建设
  • 仿58同城分类信息网站源码竞价推广是做什么的
  • 使用ftp软件连接到网站空间网站开发人力成本
  • 目前最好的旅游网站山东广饶建设银行网站
  • 湖北网站建设联系电话网站建设策划 流程
  • 手机端网站建设哪家好免费推广app平台有哪些
  • 网站建站华为云百度获客
  • 做三个月网站 广告收入国外做多媒体展览的网站
  • 精湛的合肥网站建设微信名字制作软件小程序
  • wordpress标题设置淄博做网站优化
  • cpa单页网站怎么做wordpress 评论 折叠
  • 大学网站建设排名易优cms仿站教程
  • 安徽省网站备案快吗网站弹窗代码
  • 高端的网站开发公司营销网站都有哪些
  • 网站建设公司微信公众号模板wordpress 免登陆接口
  • 号网站开发空投糖果网站开发
  • 著名建站公司怎么免费建立自己的网站平台
  • 青海省城乡建设厅网站首页seo推广怎么收费