仅使用 Yocto/bitbake 快速重建设备树? [英] Quick rebuild of device tree only with Yocto/bitbake?

查看:59
本文介绍了仅使用 Yocto/bitbake 快速重建设备树?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,每次我修改设备树时,我通常都会更改自定义配方中的 dts 并重建映像.重建需要很长时间,因为它重建整个内核,然后需要构建镜像并最终部署到目标设备.

So, each time I modify the device tree I typically change the dts in a custom recipe and rebuild the image. The rebuild takes a long time since it rebuilds the entire kernel, and then the image needs to be built and finally deployed to the target device.

有什么我遗漏的技巧可以只重建设备树吗?

Is there any trick that I'm missing that rebuilds only the device tree?

更新:

我已将 g0hl1n 的答案标记为正确答案,因为它是我问题的答案.然而,我发现在 Yocto 中使用内核非常麻烦:奇怪的、长路径和文件在每次重建时被覆盖的风险,内核源在 tmp/work-shared 中,而内核在 tmp/work 中构建.

I've marked g0hl1n's answer as the correct one, since it is the answer to my question. However, I found it to be very cumbersome to work with the kernel in Yocto: strange, long paths and risk of files being overwritten on each rebuild, source of kernel in tmp/work-shared while the kernel is being built in tmp/work.

相反,我已经将内核开发移出了 Yocto.Yocto 有很好的工具来创建 SDK(请参阅 populate_sdk 任务),因此可以通过快速重建和手动(或脚本化)部署轻松设置内核开发环境.工作完成后,可以使用 git diff 将更改移到配方中.

Instead I've moved the kernel development out of Yocto. Yocto has good tools for creating an SDK (see populate_sdk task) and with that it's easy to setup an environment for kernel development with quick rebuilds and manual (or scripted) deployments. Once the work is done the changes can be moved to a recipe using git diff.

以下页面上的说明非常有用:http://jumpnowtek.com/beaglebone/Working-on-the-BeagleBone-kernel.html

The instructions on the following page was very helpful: http://jumpnowtek.com/beaglebone/Working-on-the-BeagleBone-kernel.html

推荐答案

AFAIK 有两种不同的方法可以做到这一点.

AFAIK there are two different ways of doing this.

  1. 内核方式:使用内核提供的脚本

  • 切换到您的内核源目录(/tmp/work////git/)
  • 执行设备树编译器:./scripts/dtc/dtc -I dts -O dtb -o ./devicetree.dtb path/to/devicetree.dts
    1. bitbake 方式:使用内核的部署作业

    • 调用 $ bitbake -f -c 部署
    • 生成的 device-tree-blob 然后可以在 /tmp/work////build/arch 中找到/arm/boot/dts/)
    • 至少对我来说,两个版本都在快速测试中工作.

      At least for me both versions worked in a quick test.

      更新:我刚刚在网上使用 yocto 构建了 dtb 的第三个版本.那个使用 yocto 的内核构建的 devshell.有关更多信息,请参阅 https 上的原始作者页面://splefty.blogspot.co.at/2015/09/compiling-device-tree-using-yocto.html.

      UPDATE: I just came over a third version of building the dtb with yocto on the net. That one uses yocto's devshell of the kernel build. For more information see the original authors page at https://splefty.blogspot.co.at/2015/09/compiling-device-tree-using-yocto.html.

      这篇关于仅使用 Yocto/bitbake 快速重建设备树?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆