diff options
-rw-r--r-- | meta/classes/bootimg.bbclass | 11 | ||||
-rw-r--r-- | meta/classes/image.bbclass | 9 |
2 files changed, 8 insertions, 12 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass index ec9d0b7d52..ed9afb92f6 100644 --- a/meta/classes/bootimg.bbclass +++ b/meta/classes/bootimg.bbclass | |||
@@ -172,10 +172,6 @@ build_iso() { | |||
172 | fi | 172 | fi |
173 | 173 | ||
174 | isohybrid $isohybrid_args ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso | 174 | isohybrid $isohybrid_args ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso |
175 | |||
176 | cd ${DEPLOY_DIR_IMAGE} | ||
177 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso | ||
178 | ln -s ${IMAGE_NAME}.iso ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso | ||
179 | } | 175 | } |
180 | 176 | ||
181 | build_fat_img() { | 177 | build_fat_img() { |
@@ -280,10 +276,6 @@ build_hddimg() { | |||
280 | fi | 276 | fi |
281 | 277 | ||
282 | chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg | 278 | chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg |
283 | |||
284 | cd ${DEPLOY_DIR_IMAGE} | ||
285 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg | ||
286 | ln -s ${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg | ||
287 | fi | 279 | fi |
288 | } | 280 | } |
289 | 281 | ||
@@ -294,7 +286,10 @@ python do_bootimg() { | |||
294 | bb.build.exec_func('build_efi_cfg', d) | 286 | bb.build.exec_func('build_efi_cfg', d) |
295 | bb.build.exec_func('build_hddimg', d) | 287 | bb.build.exec_func('build_hddimg', d) |
296 | bb.build.exec_func('build_iso', d) | 288 | bb.build.exec_func('build_iso', d) |
289 | bb.build.exec_func('create_symlinks', d) | ||
297 | } | 290 | } |
291 | do_bootimg[subimages] = "hddimg iso" | ||
292 | do_bootimg[imgsuffix] = "." | ||
298 | 293 | ||
299 | IMAGE_TYPEDEP_iso = "ext4" | 294 | IMAGE_TYPEDEP_iso = "ext4" |
300 | IMAGE_TYPEDEP_hddimg = "ext4" | 295 | IMAGE_TYPEDEP_hddimg = "ext4" |
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index e85869da7b..58b75da76e 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -398,7 +398,7 @@ python () { | |||
398 | d.setVarFlag('do_image_%s' % t, 'fakeroot', '1') | 398 | d.setVarFlag('do_image_%s' % t, 'fakeroot', '1') |
399 | d.setVarFlag('do_image_%s' % t, 'prefuncs', debug + 'set_image_size') | 399 | d.setVarFlag('do_image_%s' % t, 'prefuncs', debug + 'set_image_size') |
400 | d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks') | 400 | d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks') |
401 | d.setVarFlag('do_image_%s' % t, 'subimages', subimages) | 401 | d.setVarFlag('do_image_%s' % t, 'subimages', ' '.join(subimages)) |
402 | d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) | 402 | d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) |
403 | d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME') | 403 | d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME') |
404 | 404 | ||
@@ -461,15 +461,16 @@ python create_symlinks() { | |||
461 | link_name = d.getVar('IMAGE_LINK_NAME', True) | 461 | link_name = d.getVar('IMAGE_LINK_NAME', True) |
462 | manifest_name = d.getVar('IMAGE_MANIFEST', True) | 462 | manifest_name = d.getVar('IMAGE_MANIFEST', True) |
463 | taskname = d.getVar("BB_CURRENTTASK", True) | 463 | taskname = d.getVar("BB_CURRENTTASK", True) |
464 | subimages = d.getVarFlag("do_" + taskname, 'subimages', False) | 464 | subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split() |
465 | imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or ".rootfs." | ||
465 | os.chdir(deploy_dir) | 466 | os.chdir(deploy_dir) |
466 | 467 | ||
467 | if not link_name: | 468 | if not link_name: |
468 | return | 469 | return |
469 | for type in subimages: | 470 | for type in subimages: |
470 | if os.path.exists(img_name + ".rootfs." + type): | 471 | if os.path.exists(img_name + imgsuffix + type): |
471 | dst = deploy_dir + "/" + link_name + "." + type | 472 | dst = deploy_dir + "/" + link_name + "." + type |
472 | src = img_name + ".rootfs." + type | 473 | src = img_name + imgsuffix + type |
473 | bb.note("Creating symlink: %s -> %s" % (dst, src)) | 474 | bb.note("Creating symlink: %s -> %s" % (dst, src)) |
474 | if os.path.islink(dst): | 475 | if os.path.islink(dst): |
475 | if d.getVar('RM_OLD_IMAGE', True) == "1" and \ | 476 | if d.getVar('RM_OLD_IMAGE', True) == "1" and \ |