mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
bitbake: toaster: attach kernel artifacts to targets
The bzImage and modules files were previously attached to a build, rather than to the target which produced them. This meant it was not possible to determine which kernel artifact produced by a build came from which target; which in turn made it difficult to associate existing kernel artifact with targets when those targets didn't produce artifacts (e.g. if the same machine + target combination was built again and didn't produce a bzImage or modules file because those files already existed). By associating kernel artifacts with the target (via a new TargetArtifactFile model), we make it possible to find all the artifacts for a given machine + target combination. Then, in cases where a build is completed but its targets don't produce any artifacts, we can find a previous Target object with the same machine + target and copy its artifacts to the targets for a just-completed build. Note that this doesn't cover SDK artifacts yet, which are still retrieved in toaster.bbclass and show up as "Other artifacts", lumped together for the whole build rather than by target. [YOCTO #8556] (Bitbake rev: 9b151416e428c2565a27d89116439f9a8d578e3d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e9808576da
commit
4125da7763
@@ -74,7 +74,7 @@
|
||||
{% for target in targets %}
|
||||
{% if target.target.is_image %}
|
||||
<div class="well well-transparent dashboard-section">
|
||||
<h3><a href="{% url 'target' build.pk target.target.pk %}">{{target.target}}</a></h3>
|
||||
<h3><a href="{% url 'target' build.pk target.target.pk %}">{{target.target.target}}</a></h3>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Packages included</dt>
|
||||
<dd><a href="{% url 'target' build.pk target.target.pk %}">{{target.npkg}}</a></dd>
|
||||
@@ -124,6 +124,19 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>
|
||||
Kernel artifacts
|
||||
</dt>
|
||||
<dd>
|
||||
<ul class="list-unstyled">
|
||||
{% for artifact in target.target_artifacts|dictsort:"basename" %}
|
||||
<li>
|
||||
<a href="{% url 'build_artifact' build.id 'targetartifactfile' artifact.id %}">{{artifact.basename}}</a>
|
||||
({{artifact.file_size|filtered_filesizeformat}})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -31,6 +31,7 @@ from django.shortcuts import render, redirect, get_object_or_404
|
||||
from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, LogMessage, Variable
|
||||
from orm.models import Task_Dependency, Recipe_Dependency, Package, Package_File, Package_Dependency
|
||||
from orm.models import Target_Installed_Package, Target_File, Target_Image_File, BuildArtifact, CustomImagePackage
|
||||
from orm.models import TargetArtifactFile
|
||||
from orm.models import BitbakeVersion, CustomImageRecipe
|
||||
from bldcontrol import bbcontroller
|
||||
from django.views.decorators.cache import cache_control
|
||||
@@ -509,6 +510,8 @@ def builddashboard( request, build_id ):
|
||||
targetHasNoImages = True
|
||||
elem[ 'imageFiles' ] = imageFiles
|
||||
elem[ 'targetHasNoImages' ] = targetHasNoImages
|
||||
elem['target_artifacts'] = t.targetartifactfile_set.all()
|
||||
|
||||
targets.append( elem )
|
||||
|
||||
##
|
||||
@@ -2294,6 +2297,10 @@ if True:
|
||||
elif artifact_type == "buildartifact":
|
||||
file_name = BuildArtifact.objects.get(build = build, pk = artifact_id).file_name
|
||||
|
||||
elif artifact_type == "targetartifactfile":
|
||||
target = TargetArtifactFile.objects.get(pk=artifact_id)
|
||||
file_name = target.file_name
|
||||
|
||||
elif artifact_type == "licensemanifest":
|
||||
file_name = Target.objects.get(build = build, pk = artifact_id).license_manifest_path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user