Skip to content

Instantly share code, notes, and snippets.

@bradfa
Created August 5, 2015 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradfa/397d8063daf5b155bed2 to your computer and use it in GitHub Desktop.
Save bradfa/397d8063daf5b155bed2 to your computer and use it in GitHub Desktop.
Gitman Desires

I want to have a tool like Google's repo but which is specific (or generic, but specific at first sounds easier) to managing OpenEmbedded development for product development. Basically, I want to have a two step process where you write a set of metadata that describes how to layout a directory structure of OE layers/bitbake/etc given a set of git repos and directories which exist alongside the metadata (and maybe perforce, ew, depot directories, via git-p4), and then a second step where those directories/repos are setup for you and everything gets checked out to the right state so that you can simply source oe-init-build-env and then run your bitbake.

The goal would be that you would have metadata describing a set of git repos and where to put them, like:


repo/dir name remote url or dir remote branch/tag/SHA directory path


poky git://git.yoctoproject.org/poky fido poky

meta-ti git://git.yoctoproject.org/meta-ti fido poky/meta-ti

beaglebone-conf ./beaglebone N/A poky/beaglebone


This metadata would be stored in a git repo. And in my example, that git repo would also have a directory called beaglebone that would have the local.conf and bblayers.conf files. This top level git repo would also have a .gitignore file which excludes all of the entries in the "directory path" column, or however you see fit to not pollute the top level directory with your OE stuff.

In this way, then you have one git repo per product (combination of hardware and software that are to be made together as a unit), hence the inclusion of the local.conf and bblayers.conf files.

So you have your metadata, then you call the tool and the tool goes and makes sure that each directory path that you specified is up to date with the given directory or git configuration.

The metadata might be in JSON or YAML or XML or whatever, like:

{
	"projects": [
		{
			"name": "poky",
			"type": "git",
			"remote": "git://git.yoctoproject.org/poky",
			"branch": "fido",
			"commit": "HEAD",
			"path": "poky"
		},
		{
			"name": "meta-ti",
			"type": "git",
			"remote": "git://git.yoctoproject.org/meta-ti",
			"branch": "fido",
			"commit": "HEAD",
			"path": "poky/meta-ti"
		},
		{
			"name": "beaglebone-conf",
			"type": "directory",
			"directory": "beaglebone-conf",
			"path": "poky/beaglebone"
		}
	]
}

So after you run the setup, you'd have your poky directory, which is a git clone of git://git.yoctoproject.org/poky, and within poky/ you'd have your meta-ti directory which is a git clone of git://git.yoctoproject.org/meta-ti, and you'd have a copy of the beaglebone-conf dir's contents to poky/beaglebone. At this point, you could simply source poky/oe-init-build-env poky/beaglebone and then do your bitbake core-image-minimal (or what ever image you want to build).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment