devtool
devtool
devtool常用命令: add、 modify、reset、build、build-image、status
[penghu4x@bmcdev-S2600WF0license-manager$ devtool -h
NOTE: Starting bitbake server...
WARNING: Duplicate inclusion for /media/disk3/penghu4x/work/dsg-openbmc-openbmc/meta/conf/distro/include/security_flags.inc in /media/disk3/penghu4x/work/dsg-openbmc-openbmc/meta-phosphor/conf/distro/include/phosphor-defaults.inc
usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q] [--color COLOR] [-h] <subcommand> ...
OpenEmbedded development tool
options:
--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 exit
subcommands:
Beginning work on a recipe:
add Add a new recipe
modify Modify the source for an existing recipe
upgrade Upgrade an existing recipe
Getting information:
status Show workspace status
latest-version Report the latest version of an existing recipe
check-upgrade-status Report upgradability for multiple (or all) recipes
search Search available recipes
Working on a recipe in the workspace:
build Build a recipe
rename Rename a recipe file in the workspace
edit-recipe Edit a recipe file
find-recipe Find a recipe file
configure-help Get help on configure script options
update-recipe Apply changes from external source tree to recipe
reset Remove a recipe from your workspace
finish Finish working on a recipe in your workspace
Testing changes on target:
deploy-target Deploy recipe output files to live target machine
undeploy-target Undeploy recipe output files in live target machine
build-image Build image including workspace recipe packages
Advanced:
create-workspace Set up workspace in an alternative location
export Export workspace into a tar archive
import Import exported tar archive into workspace
extract Extract the source for an existing recipe
sync Synchronize the source tree for an existing recipe
menuconfig Alter build-time configuration for a recipe
Use devtool <subcommand> --help to get help on a specific command
1.1 获取所有recipe 名称
在开发过程中,先在build目录下用bitbake -g xxxxxxx生成pn-buildlist。注意这个命令在哪个目录执行就会把文件生成在哪个目录。
在pn-buildlist中包含所有的recipe的名称。
也可以使用命令bitbake -g recipes-name,该命令是查看一个recipe所有的依赖包,同样会生成pn-buildlist文件和dot文件。
使用该命令可以在recipe对应的源码目录下,同样在build目录下使用该命令会把以前产生的文件覆盖。
1.2 status、modify、reset recipes
选择你需要的recipe,使用devtool modify 命令把源码拉到你的工作目录下。
拉代码之前可以用status命令看一下当前环境中有哪些recipes,把一些不需要的recipes reset。
已bmcweb为例,先用reset命令把当前工作环境下的bb文件清除,注意源码的文件夹不会删除。
当工作目录下已经存在源码的文件夹,之后使用modify命令会报错,这里需要使用**-n**, 使用该命令把会建立一个bb文件指向已存在的源码目录。
[penghu4x@bmcdev-S2600WF0build$ devtool status
NOTE: Starting bitbake server...
......
Summary: There were 3 WARNING messages shown.
INFO: Recipe bmcweb now set up to build from /media/disk3/penghu4x/work/EGS/dsg-openbmc-openbmc/build/workspace/sources/bmcweb
[penghu4x@bmcdev-S2600WF0build$
注意devtool reset 可以同时reset多个recipes
devtool reset frb2-watchdog default-fru beepcode-mgr
1.3 build、build-image
在上一步中获取源码后,可以使用cscode修改代码,之后使用build或者bitbake命令进行编译。
[penghu4x@bmcdev-S2600WF0bmcweb$ devtool build bmcweb
......
Summary: There were 5 WARNING messages shown.
个人使用devtool 较多,bitbake 编译一个recipe比较耗时。devtool编译较为轻快。
单个recipe编译完成后可以使用build-iamge编译image。编译完成后也有提示文件保存的路径。
[penghu4x@bmcdev-S2600WF0bmcweb$ devtool build-image xxxxxx
......
Summary: There were 6 WARNING messages shown.
INFO: Successfully built xxxxxx. You can find output files in /media/disk3/penghu4x/work/EGS/dsg-openbmc-openbmc/build/tmp/deploy/images/xxxx-ast2600
1.4 编译生成的文件及log
使用devtool编译完成后再目录中会产生连个oe开头的文件夹。这两个文件夹是软连接,指向build/tmp目录下的文件夹,编译过程中生成的文件都在该目录下保存。
[penghu4x@bmcdev-S2600WF0bmcweb$ ls
bmcweb_config.h.in build_x86.sh Dockerfile.base MAINTAINERS OEM_SCHEMAS.md README.md src
bmcweb.service.in COMMON_ERRORS.md http meson.build oe-workdir redfish-core static
bmcweb.socket DEVELOPING.md include meson_options.txt OWNERS Redfish.md subprojects
build_x86_docker.sh Dockerfile LICENCE oe-logs pam-webserver scripts
[penghu4x@bmcdev-S2600WF0bmcweb$ pwd
/media/disk3/penghu4x/work/EGS/dsg-openbmc-openbmc/build/workspace/sources/bmcweb
[penghu4x@bmcdev-S2600WF0bmcweb$ ls oe* -alh
lrwxrwxrwx 1 penghu4x penghu4x 131 5月 8 16:40 oe-logs -> /media/disk3/penghu4x/work/EGS/dsg-openbmc-openbmc/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git999-r0/temp
lrwxrwxrwx 1 penghu4x penghu4x 126 5月 8 16:40 oe-workdir -> /media/disk3/penghu4x/work/EGS/dsg-openbmc-openbmc/build/tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/bmcweb/1.0+git999-r0
oe-logs目录下存放的是编译过程中产生的所有log。
编译过程大致可以分为:fetch、config、compile、package、install。
编译过程中遇到问题可以在这里查看。
[penghu4x@bmcdev-S2600WF0oe-logs$ ls -alh
total 4.2M
drwxr-xr-x 2 penghu4x penghu4x 20K 6月 4 03:47 .
drwxr-xr-x 19 penghu4x penghu4x 4.0K 6月 4 03:47 ..
lrwxrwxrwx 1 penghu4x penghu4x 21 6月 4 03:33 log.do_compile -> log.do_compile.136089
-rw-r--r-- 1 penghu4x penghu4x 12K 6月 4 03:21 log.do_compile.131556
-rw-r--r-- 1 penghu4x penghu4x 4.5K 6月 4 03:37 log.do_compile.136089
-rw-r--r-- 1 penghu4x penghu4x 9.7K 5月 26 03:01 log.do_compile.3960504
lrwxrwxrwx 1 penghu4x penghu4x 24 5月 26 02:54 log.do_configure -> log.do_configure.3958039
-rw-r--r-- 1 penghu4x penghu4x 12K 5月 26 02:54 log.do_configure.3958039
lrwxrwxrwx 1 penghu4x penghu4x 19 5月 26 02:23 log.do_fetch -> log.do_fetch.793904
-rw-r--r-- 1 penghu4x penghu4x 193K 5月 26 02:23 log.do_fetch.793904
lrwxrwxrwx 1 penghu4x penghu4x 21 6月 4 03:37 log.do_install -> log.do_install.136408
-rw-r--r-- 1 penghu4x penghu4x 77K 6月 4 03:37 log.do_install.136408
-rw-r--r-- 1 penghu4x penghu4x 77K 5月 26 03:01 log.do_install.394748
lrwxrwxrwx 1 penghu4x penghu4x 21 6月 4 03:37 log.do_package -> log.do_package.136428
-rw-r--r-- 1 penghu4x penghu4x 15K 6月 4 03:37 log.do_package.136428
-rw-r--r-- 1 penghu4x penghu4x 16K 5月 26 03:01 log.do_package.402054
lrwxrwxrwx 1 penghu4x penghu4x 25 6月 4 03:37 log.do_packagedata -> log.do_packagedata.136801
-rw-r--r-- 1 penghu4x penghu4x 6.4K 6月 4 03:37 log.do_packagedata.136801
-rw-r--r-- 1 penghu4x penghu4x 3.8K 5月 26 03:01 log.do_packagedata.428313
lrwxrwxrwx 1 penghu4x penghu4x 24 6月 4 03:46 log.do_package_qa -> log.do_package_qa.148046
-rw-r--r-- 1 penghu4x penghu4x 4.5K 6月 1 21:57 log.do_package_qa.1207845
lrwxrwxrwx 1 penghu4x penghu4x 31 6月 4 03:46 log.do_package_write_rpm -> log.do_package_write_rpm.143382
lrwxrwxrwx 1 penghu4x penghu4x 26 5月 26 02:23 log.do_populate_lic -> log.do_populate_lic.814025
-rw-r--r-- 1 penghu4x penghu4x 3.8K 5月 26 02:23 log.do_populate_lic.814025
lrwxrwxrwx 1 penghu4x penghu4x 30 6月 4 03:37 log.do_populate_sysroot -> log.do_populate_sysroot.136429
-rw-r--r-- 1 penghu4x penghu4x 65K 6月 4 03:37 log.do_populate_sysroot.136429
-rw-r--r-- 1 penghu4x penghu4x 8.7K 5月 26 03:01 log.do_populate_sysroot.402095
lrwxrwxrwx 1 penghu4x penghu4x 37 5月 26 02:53 log.do_prepare_recipe_sysroot -> log.do_prepare_recipe_sysroot.3952855
-rw-r--r-- 1 penghu4x penghu4x 14K 5月 26 02:54 log.do_prepare_recipe_sysroot.3952855
lrwxrwxrwx 1 penghu4x penghu4x 20 5月 26 02:23 log.do_unpack -> log.do_unpack.810574
-rw-r--r-- 1 penghu4x penghu4x 201K 5月 26 02:23 log.do_unpack.810574
lrwxrwxrwx 1 penghu4x penghu4x 26 5月 26 02:23 log.do_write_config -> log.do_write_config.810542
-rw-r--r-- 1 penghu4x penghu4x 387 5月 26 02:23 log.do_write_config.810542
-rw-r--r-- 1 penghu4x penghu4x 1.5K 6月 4 03:46 log.task_order
-rw-r--r-- 1 penghu4x penghu4x 285 5月 26 02:23 run.base_do_fetch.793904
-rw-r--r-- 1 penghu4x penghu4x 303 5月 26 02:23 run.base_do_unpack.810574
-rwxrwxr-x 1 penghu4x penghu4x 16K 5月 28 22:51 run.BUILDSPEC.960501
-rw-r--r-- 1 penghu4x penghu4x 5.1K 6月 4 03:37 run.debian_package_name_hook.136428
-rw-r--r-- 1 penghu4x penghu4x 5.1K 5月 26 03:01 run.debian_package_name_hook.402054
lrwxrwxrwx 1 penghu4x penghu4x 21 6月 4 03:33 run.do_compile -> run.do_compile.136089
-rwxrwxr-x 1 penghu4x penghu4x 12K 6月 4 03:21 run.do_compile.131556
-rwxrwxr-x 1 penghu4x penghu4x 12K 6月 4 03:33 run.do_compile.136089
-rwxrwxr-x 1 penghu4x penghu4x 12K 5月 26 02:54 run.do_compile.3960504
lrwxrwxrwx 1 penghu4x penghu4x 24 5月 26 02:54 run.do_configure -> run.do_configure.3958039
-rwxrwxr-x 1 penghu4x penghu4x 16K 5月 26 02:54 run.do_configure.3958039
lrwxrwxrwx 1 penghu4x penghu4x 19 5月 26 02:23 run.do_fetch -> run.do_fetch.793904
-rw-r--r-- 1 penghu4x penghu4x 341 5月 26 02:23 run.do_fetch.793904
lrwxrwxrwx 1 penghu4x penghu4x 21 6月 4 03:37 run.do_install -> run.do_install.136408
-rwxrwxr-x 1 penghu4x penghu4x 15K 6月 4 03:37 run.do_install.136408
-rwxrwxr-x 1 penghu4x penghu4x 15K 5月 26 03:01 run.do_install.394748
lrwxrwxrwx 1 penghu4x penghu4x 21 6月 4 03:37 run.do_package -> run.do_package.136428
-rw-r--r-- 1 penghu4x penghu4x 105K 6月 4 03:37 run.do_package.136428
-rw-r--r-- 1 penghu4x penghu4x 105K 5月 26 03:01 run.do_package.402054
lrwxrwxrwx 1 penghu4x penghu4x 25 6月 4 03:37 run.do_packagedata -> run.do_packagedata.136801
-rw-r--r-- 1 penghu4x penghu4x 2.6K 6月 4 03:37 run.do_packagedata.136801
-rw-r--r-- 1 penghu4x penghu4x 2.6K 5月 26 03:01 run.do_packagedata.428313
lrwxrwxrwx 1 penghu4x penghu4x 24 6月 4 03:46 run.do_package_qa -> run.do_package_qa.148046
-rw-r--r-- 1 penghu4x penghu4x 18K 5月 28 22:51 run.do_package_qa.960505
-rw-r--r-- 1 penghu4x penghu4x 34K 5月 28 22:51 run.do_package_rpm.960501
lrwxrwxrwx 1 penghu4x penghu4x 31 6月 4 03:46 run.do_package_write_rpm -> run.do_package_write_rpm.143382
-rw-r--r-- 1 penghu4x penghu4x 36K 5月 28 22:51 run.do_package_write_rpm.960501
lrwxrwxrwx 1 penghu4x penghu4x 26 5月 26 02:23 run.do_populate_lic -> run.do_populate_lic.814025
-rw-r--r-- 1 penghu4x penghu4x 8.3K 5月 26 02:23 run.do_populate_lic.814025
lrwxrwxrwx 1 penghu4x penghu4x 30 6月 4 03:37 run.do_populate_sysroot -> run.do_populate_sysroot.136429
-rw-r--r-- 1 penghu4x penghu4x 1.2K 6月 4 03:37 run.do_populate_sysroot.136429
-rw-r--r-- 1 penghu4x penghu4x 1.2K 5月 26 03:01 run.do_populate_sysroot.402095
lrwxrwxrwx 1 penghu4x penghu4x 37 5月 26 02:53 run.do_prepare_recipe_sysroot -> run.do_prepare_recipe_sysroot.3952855
-rw-r--r-- 1 penghu4x penghu4x 26K 5月 26 02:53 run.do_prepare_recipe_sysroot.3952855
-rw-r--r-- 1 penghu4x penghu4x 5.4K 5月 26 02:54 run.do_qa_configure.3958039
-rw-r--r-- 1 penghu4x penghu4x 3.1K 6月 4 03:37 run.do_qa_staging.136429
-rw-r--r-- 1 penghu4x penghu4x 3.1K 5月 26 03:01 run.do_qa_staging.402095
-rw-r--r-- 1 penghu4x penghu4x 365 5月 26 02:23 run.do_qa_unpack.810574
lrwxrwxrwx 1 penghu4x penghu4x 20 5月 26 02:23 run.do_unpack -> run.do_unpack.810574
-rw-r--r-- 1 penghu4x penghu4x 361 5月 26 02:23 run.do_unpack.810574
lrwxrwxrwx 1 penghu4x penghu4x 26 5月 26 02:23 run.do_write_config -> run.do_write_config.810542
-rwxrwxr-x 1 penghu4x penghu4x 14K 5月 26 02:23 run.do_write_config.810542
-rw-r--r-- 1 penghu4x penghu4x 6.1K 6月 4 03:37 run.emit_pkgdata.136428
-rw-r--r-- 1 penghu4x penghu4x 6.1K 5月 26 03:01 run.emit_pkgdata.402054
-rw-r--r-- 1 penghu4x penghu4x 26K 5月 28 22:51 run.extend_recipe_sysroot.960505
-rw-r--r-- 1 penghu4x penghu4x 279 6月 4 03:21 run.externalsrc_compile_prefunc.131556
-rw-r--r-- 1 penghu4x penghu4x 279 6月 4 03:33 run.externalsrc_compile_prefunc.136089
-rw-r--r-- 1 penghu4x penghu4x 279 5月 26 02:54 run.externalsrc_compile_prefunc.3960504
-rw-r--r-- 1 penghu4x penghu4x 1.4K 5月 26 02:54 run.externalsrc_configure_prefunc.3958039
-rw-r--r-- 1 penghu4x penghu4x 9.9K 6月 4 03:37 run.fixup_perms.136428
-rw-r--r-- 1 penghu4x penghu4x 9.9K 5月 26 03:01 run.fixup_perms.402054
-rw-r--r-- 1 penghu4x penghu4x 428 5月 26 02:54 run.meson_do_qa_configure.3958039
-rw-r--r-- 1 penghu4x penghu4x 407 6月 4 03:37 run.package_convert_pr_autoinc.136428
-rw-r--r-- 1 penghu4x penghu4x 407 5月 26 03:01 run.package_convert_pr_autoinc.402054
-rwxrwxr-x 1 penghu4x penghu4x 12K 6月 4 03:37 run.packagedata_translate_pr_autoinc.136801
-rwxrwxr-x 1 penghu4x penghu4x 12K 5月 26 03:01 run.packagedata_translate_pr_autoinc.428313
-rw-r--r-- 1 penghu4x penghu4x 5.4K 6月 4 03:37 run.package_depchains.136428
-rw-r--r-- 1 penghu4x penghu4x 5.4K 5月 26 03:01 run.package_depchains.402054
-rw-r--r-- 1 penghu4x penghu4x 1.8K 6月 4 03:37 run.package_do_filedeps.136428
-rw-r--r-- 1 penghu4x penghu4x 1.8K 5月 26 03:01 run.package_do_filedeps.402054
-rw-r--r-- 1 penghu4x penghu4x 3.0K 6月 4 03:37 run.package_do_pkgconfig.136428
-rw-r--r-- 1 penghu4x penghu4x 3.0K 5月 26 03:01 run.package_do_pkgconfig.402054
-rw-r--r-- 1 penghu4x penghu4x 13K 6月 4 03:37 run.package_do_shlibs.136428
-rw-r--r-- 1 penghu4x penghu4x 13K 5月 26 03:01 run.package_do_shlibs.402054
-rw-r--r-- 1 penghu4x penghu4x 2.5K 6月 4 03:37 run.package_do_split_locales.136428
-rw-r--r-- 1 penghu4x penghu4x 2.5K 5月 26 03:01 run.package_do_split_locales.402054
-rw-r--r-- 1 penghu4x penghu4x 1.7K 6月 4 03:37 run.package_fixsymlinks.136428
-rw-r--r-- 1 penghu4x penghu4x 1.7K 5月 26 03:01 run.package_fixsymlinks.402054
-rw-r--r-- 1 penghu4x penghu4x 2.3K 6月 4 03:37 run.package_get_auto_pr.136801
-rw-r--r-- 1 penghu4x penghu4x 2.3K 5月 26 03:01 run.package_get_auto_pr.428313
-rw-r--r-- 1 penghu4x penghu4x 5.2K 6月 4 03:37 run.package_name_hook.136428
-rw-r--r-- 1 penghu4x penghu4x 5.2K 5月 26 03:01 run.package_name_hook.402054
-rw-r--r-- 1 penghu4x penghu4x 12K 6月 4 03:37 run.package_prepare_pkgdata.136428
-rw-r--r-- 1 penghu4x penghu4x 12K 5月 26 03:01 run.package_prepare_pkgdata.402054
-rw-r--r-- 1 penghu4x penghu4x 12K 6月 4 03:37 run.perform_packagecopy.136428
-rw-r--r-- 1 penghu4x penghu4x 12K 5月 26 03:01 run.perform_packagecopy.402054
-rw-r--r-- 1 penghu4x penghu4x 5.3K 5月 26 02:23 run.populate_lic_qa_checksum.814025
-rw-r--r-- 1 penghu4x penghu4x 11K 6月 4 03:37 run.populate_packages.136428
-rw-r--r-- 1 penghu4x penghu4x 11K 5月 26 03:01 run.populate_packages.402054
-rw-r--r-- 1 penghu4x penghu4x 1.4K 6月 4 03:37 run.read_shlibdeps.136428
-rw-r--r-- 1 penghu4x penghu4x 1.4K 5月 26 03:01 run.read_shlibdeps.402054
-rw-r--r-- 1 penghu4x penghu4x 1.6K 5月 28 22:51 run.read_subpackage_metadata.960505
-rwxrwxr-x 1 penghu4x penghu4x 15K 6月 4 03:37 run.remove_libtool_la.136408
-rwxrwxr-x 1 penghu4x penghu4x 15K 5月 26 03:01 run.remove_libtool_la.394748
-rw-r--r-- 1 penghu4x penghu4x 490 6月 4 03:37 run.rm_systemd_unitdir.136408
-rw-r--r-- 1 penghu4x penghu4x 490 5月 26 03:01 run.rm_systemd_unitdir.394748
-rw-r--r-- 1 penghu4x penghu4x 671 6月 4 03:37 run.rm_sysvinit_initddir.136408
-rw-r--r-- 1 penghu4x penghu4x 671 5月 26 03:01 run.rm_sysvinit_initddir.394748
-rw-r--r-- 1 penghu4x penghu4x 16K 6月 4 03:37 run.split_and_strip_files.136428
-rw-r--r-- 1 penghu4x penghu4x 16K 5月 26 03:01 run.split_and_strip_files.402054
-rwxrwxr-x 1 penghu4x penghu4x 17K 5月 28 22:51 run.sstate_create_package.960505
-rw-r--r-- 1 penghu4x penghu4x 2.6K 5月 28 22:51 run.sstate_hardcode_path.960505
-rw-r--r-- 1 penghu4x penghu4x 2.5K 5月 28 22:51 run.sstate_hardcode_path_unpack.960505
-rw-r--r-- 1 penghu4x penghu4x 2.2K 5月 28 22:51 run.sstate_report_unihash.960505
-rw-r--r-- 1 penghu4x penghu4x 13K 5月 28 22:51 run.sstate_task_postfunc.960505
-rw-r--r-- 1 penghu4x penghu4x 4.8K 5月 28 22:51 run.sstate_task_prefunc.960505
-rwxrwxr-x 1 penghu4x penghu4x 13K 6月 4 03:37 run.sysroot_stage_all.136429
-rwxrwxr-x 1 penghu4x penghu4x 13K 5月 26 03:01 run.sysroot_stage_all.402095
-rw-r--r-- 1 penghu4x penghu4x 585 6月 4 03:37 run.sysroot_strip.136429
-rw-r--r-- 1 penghu4x penghu4x 585 5月 26 03:01 run.sysroot_strip.402095
-rw-r--r-- 1 penghu4x penghu4x 6.3K 6月 4 03:37 run.systemd_populate_packages.136428
-rw-r--r-- 1 penghu4x penghu4x 6.3K 5月 26 03:01 run.systemd_populate_packages.402054
-rwxrwxr-x 1 penghu4x penghu4x 23K 5月 26 02:54 run.useradd_sysroot.3952855
-rw-r--r-- 1 penghu4x penghu4x 958 6月 4 03:37 run.useradd_sysroot_sstate.136429
-rw-r--r-- 1 penghu4x penghu4x 958 5月 26 02:54 run.useradd_sysroot_sstate.3952855
-rw-r--r-- 1 penghu4x penghu4x 958 5月 26 03:01 run.useradd_sysroot_sstate.402095
-rw-r--r-- 1 penghu4x penghu4x 28K 5月 28 22:51 run.write_specfile.960501
[penghu4x@bmcdev-S2600WF0oe-logs$
oe-workdir文件夹下主要iamge和recipe-sysroot文件夹,
[penghu4x@bmcdev-S2600WF0oe-workdir$ ls -alh
total 544K
drwxr-xr-x 19 penghu4x penghu4x 4.0K 6月 4 03:47 .
drwxr-xr-x 3 penghu4x penghu4x 4.0K 5月 26 02:23 ..
......
drwxr-xr-x 6 penghu4x penghu4x 4.0K 6月 4 03:36 bmcweb-1.0+git999
-rw-r--r-- 1 penghu4x penghu4x 36K 6月 4 03:46 bmcweb.spec
-rw-r--r-- 1 penghu4x penghu4x 212K 6月 4 03:37 debugsources.list
drwxr-xr-x 3 penghu4x penghu4x 4.0K 6月 4 03:46 deploy-rpms
drwxr-xr-x 2 penghu4x penghu4x 4.0K 5月 26 02:23 eventservice
drwxr-xr-x 3 penghu4x penghu4x 4.0K 5月 26 02:23 git
drwxr-xr-x 6 penghu4x penghu4x 4.0K 6月 4 03:37 image
drwxr-xr-x 3 penghu4x penghu4x 4.0K 5月 26 02:23 license-destdir
-rw-r--r-- 1 penghu4x penghu4x 2.3K 5月 26 02:23 meson.cross
drwxr-xr-x 6 penghu4x penghu4x 4.0K 6月 4 03:37 package
drwxr-xr-x 9 penghu4x penghu4x 4.0K 6月 4 03:37 packages-split
drwxr-xr-x 6 penghu4x penghu4x 4.0K 6月 4 03:37 pkgdata
drwxr-xr-x 6 penghu4x penghu4x 4.0K 6月 4 03:37 pkgdata-pdata-input
drwxr-xr-x 6 penghu4x penghu4x 4.0K 6月 4 03:37 pkgdata-sysroot
drwxr-xr-x 2 penghu4x penghu4x 4.0K 6月 4 03:46 pseudo
drwxr-xr-x 7 penghu4x penghu4x 4.0K 6月 4 03:46 recipe-sysroot
drwxr-xr-x 9 penghu4x penghu4x 4.0K 5月 26 02:53 recipe-sysroot-native
drwxr-xr-x 5 penghu4x penghu4x 4.0K 6月 4 03:37 sysroot-destdir
drwxr-xr-x 2 penghu4x penghu4x 4.0K 5月 26 02:23 telemetry
drwxr-xr-x 2 penghu4x penghu4x 20K 6月 4 03:47 temp
iamge中是该recipe编译生成的文件,包括bin、头文件、库文件等
recipe-sysroot中是这个repo所依赖的头文件、库文件等
recipe-sysroot-native ?
[penghu4x@bmcdev-S2600WF0oe-workdir$ ls image/
etc lib usr var
[penghu4x@bmcdev-S2600WF0oe-workdir$ ls recipe-sysroot
etc home lib sysroot-providers usr
1.5 image 文件
编译生成的image文件如下所示,常用的image-mtd、tar文件。
image-mtd是个软连接指向最新生成的bin文件。
注意build-image是先一个拼接文件的过程,把uboot、zimage、rootfs等文件拼在一起组成最终的bin文件。
之后可以使用uboot刷写flash。
1.在111.54服务器上把编译出来的image复制到/tftp下
2.在板子上kernel下执行reboot,
3.在再次启动时敲回车,停在uboot
4.uboot中执行以下命令:
dhcp
setenv serverip 10.112.111.54
tftp 83000000 lph/lph_fcp.mtd
sf probe 0; sf update 0x83000000 0 0x4000000
总结
开发过程中,
- 先用devtool status, 查看当前环境下的recipes,把不需要的recipe reset。
- modify 需要的recipe,之后修改代码,devtool build
- devtool build-image,使用uboot、redfish、dediprog、fwupd.sh刷写flash