如何在源代码控制下获取buildroot项目 [英] How to get a buildroot project under source control

查看:258
本文介绍了如何在源代码控制下获取buildroot项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的公司开发了一款产品,需要我们使用的嵌入式Linux,以及许多其他的 Buildroot

在任何情况下,我都希望使用Git在源代码控制下获得该项目,因为它是我们用于该公司所有其他项目的源代码管理工具。问题是我不知道我应该在源代码管理中保留哪些文件(因为保持整个 buildroot 目录似乎过度使用)。

解决方案

我最近在组织中解决了同样的问题,我觉得这是一个有趣的话题。我将在这里描述我们的部分解决方案:

管理您使用的buildroot版本

<编辑:最近的经验已经强调了这一点。



Buildroot为每个版本的Buildroot写入了不同的配置文件。为了能够共享这些,您需要向涉及到您的存储库所使用的Buildroot版本的每个人指定。


  1. 您可以在您的仓库中包含Buildroot作为git子模块。好的,如果你的公司只有一个Buildroot项目。

  2. 在README文件中指定要使用的版本,或者为其编写自定义检查。

  3. ol>

    构建树外

    强烈建议构建树: http://buildroot.org/downloads/manual/manual.html#_building_out_of_tree

      $ cd〜/ platform / proj-arm; make O = $ PWD -C path / to / buildroot 

    添加配置文件和目标覆盖图to git

    将.config文件和子配置文件添加到git存储库。我的回购包含以下内容:

      .config 
    README.md
    linux.config
    build / busybox-1.22.1 / .config
    libdc1394.patch
    opencv_2.3.1a.patch
    target-overlay / README〜
    target-overlay / etc / dropbear / dropbear_ecdsa_host_key
    target-overlay / etc / dropbear / dropbear_rsa_host_key
    target-overlay / etc / fstab
    target-overlay / etc / httpd.conf
    target-overlay / etc / init.d / S51mount_html
    target-overlay / etc / init.d / S52new_ip_address
    target-overlay / etc / init.d / S53httpd
    target-overlay / etc / network / interfaces
    target -overlay / etc / shadow
    target-overlay / etc / sshd_config
    target-overlay / lib / firmware / rtl_nic / rtl8168g-2.fw
    target-overlay / root / .ssh / authorized_keys

    将修改内容保存为buildroot



    每当您更改buildroot存储库中的内容时,请为该功能分支,并为其创建一个修补程序。将修补程序保存在存储库中,并使用README.md文件向其他人解释如何将其应用于buildroot树。


    The company I work for develops a product that requires embedded Linux for which we use, as many other, Buildroot.

    In any case, I would like to get the project under source control using Git, as it is our tool for source control for all the other projects the company has. The problem is that I don't know which files should I keep in source control (as keeping the whole buildroot directory seems overkilling).

    解决方案

    I've recently tackled the same problem in our organisation, and I find this an interesting topic. I'll describe our partial solution here:

    Manage which buildroot version you use

    EDIT: Recent experience has emphasized this point for me.

    Buildroot writes a different config files for each version of Buildroot. To be able to share these you need to specify to everyone involved which version of Buildroot your repository uses.

    1. You could include Buildroot as a git submodule in your repo. Ok, if your company only has one Buildroot project.
    2. Specify in the README file which version to use, or write a custom check for it.

    Building out-of-tree

    I strongly recommend to build out of tree: http://buildroot.org/downloads/manual/manual.html#_building_out_of_tree

    $ cd ~/platform/proj-arm; make O=$PWD -C path/to/buildroot
    

    Add configuration files and target overlay to git

    Add the .config file and sub-configuration files to the git repository. My repo contains the following:

    .config
    README.md
    linux.config
    build/busybox-1.22.1/.config
    libdc1394.patch
    opencv_2.3.1a.patch
    target-overlay/README~
    target-overlay/etc/dropbear/dropbear_ecdsa_host_key
    target-overlay/etc/dropbear/dropbear_rsa_host_key
    target-overlay/etc/fstab
    target-overlay/etc/httpd.conf
    target-overlay/etc/init.d/S51mount_html
    target-overlay/etc/init.d/S52new_ip_address
    target-overlay/etc/init.d/S53httpd
    target-overlay/etc/network/interfaces
    target-overlay/etc/shadow
    target-overlay/etc/sshd_config
    target-overlay/lib/firmware/rtl_nic/rtl8168g-2.fw
    target-overlay/root/.ssh/authorized_keys
    

    Save your changes to buildroot as patches

    Whenever you change stuff in the buildroot repository, branch out for that feature, and create a patch for it. Keep the patch in your repository, and use the README.md file to explain to others how to apply it to the buildroot tree.

    这篇关于如何在源代码控制下获取buildroot项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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