| Summary: | world-image as bitbake build target | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Martin Jansa <Martin.Jansa> | ||||
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | Medium | CC: | poky.bs.watcher, poky.watcher, sgw | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 2.1 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | Yes (doc changes required) | |||||
| Attachments: |
|
||||||
|
Description
Martin Jansa
2012-11-28 15:23:22 UTC
Created attachment 977 [details]
0001-world-image-add-extra-target.patch
(In reply to comment #1) > Created attachment 977 [details] > 0001-world-image-add-extra-target.patch This is unfinished version of what I was trying to do to support world image. Patches sent for review: http://lists.linuxtogo.org/pipermail/bitbake-devel/2013-January/004091.html http://lists.linuxtogo.org/pipermail/openembedded-core/2013-January/034917.html This task is a bit stuck on weird OSError: [Errno 7] Argument list too long Please check if you have any idea about issue described in this thread: http://lists.openembedded.org/pipermail/openembedded-core/2013-January/074001.html There are 2 implementations, preferred is "ad-hoc" image, because doesn't need bitbake change and is more flexible: http://git.openembedded.org/openembedded-core-contrib/log/?h=jansa/target-image and world-image: http://git.openembedded.org/openembedded-core-contrib/log/?h=jansa/world-image + https://github.com/shr-distribution/bitbake/tree/jansa/world-image The problem is the OSError from previous comment, but I haven't tried it many times since then. Paul has added http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=76a281c870621f5b5608d098a70504c6069ccd11 which should go some way to making this possible (as used by http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=d3a4f72896aaea7374bd8915cfe3adaaecc55a2d) With the patches from Paul, you can write a recipe like the following which 'works' against OE-Core assuming the bug it finds in cogl is fixed:
SUMMARY = "Image which includes world packages"
WORLD_IMAGE_EXCLUDE ?= "epiphany webkitgtk qt4 forktest nss meta-world-pkgdata"
def extend_image_install(d):
if not d.getVar("BB_WORKERCONTEXT", False):
return ""
import oe.packagedata
pkgdatadir = d.getVar("PKGDATA_DIR", True)
packagelist = []
files = os.listdir(pkgdatadir)
for pn in filter(lambda f: not os.path.isdir(os.path.join(pkgdatadir, f)), files):
try:
pkgdata = oe.packagedata.read_pkgdatafile(os.path.join(pkgdatadir, pn))
except OSError:
continue
packages = pkgdata.get("PACKAGES") or ""
for pkg in packages.split():
if pkg.endswith("-dbg"):
continue
if pkg.endswith("-dev"):
continue
if pkg != pn:
continue
if not os.path.exists(os.path.join(pkgdatadir, "runtime", pn + ".packaged")):
continue
if pkg.startswith("nativesdk-"):
continue
if pkg in ["kbd", "dropbear", "console-tools", "packagegroup-core-ssh-dropbear"]:
continue
packagelist.append(pkg)
return " ".join(packagelist)
IMAGE_INSTALL_append = "${@extend_image_install(d)}"
python calculate_extra_depends() {
exclude = '${WORLD_IMAGE_EXCLUDE}'.split()
for p in world_target:
if p == self_pn:
continue
if p in exclude:
continue
deps.append(p)
}
Resolving as the example given here appears to be able to do what is needed (or be extended so it does so). |