Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | LICENSE = "MIT" |
| 2 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
| 3 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 4 | MCMACHINE:virtclass-mcextend-musl = "qemux86-64" |
| 5 | MCMACHINE:virtclass-mcextend-tiny = "qemux86" |
| 6 | MCIMGTYPE:virtclass-mcextend-musl = "ext4" |
| 7 | MCIMGTYPE:virtclass-mcextend-tiny = "cpio.gz" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 8 | |
| 9 | MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}" |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame^] | 10 | MC_DEPLOY_IMAGE_BASENAME = "core-image-minimal" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 11 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 12 | do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc::${MCNAME}:virtual/kernel:do_deploy" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 13 | |
| 14 | do_install () { |
| 15 | install -d ${D}/var/lib/machines/${MCNAME} |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame^] | 16 | install ${MC_DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/${MC_DEPLOY_IMAGE_BASENAME}.${MCIMGTYPE} |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME} |
| 18 | } |
| 19 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame^] | 20 | # for IMAGE_LINK_NAME, IMAGE_BASENAME |
| 21 | inherit image-artifact-names |
| 22 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | python () { |
| 24 | mcname = d.getVar('MCNAME') |
| 25 | if not mcname: |
| 26 | raise bb.parse.SkipRecipe("Not a multiconfig target") |
| 27 | multiconfigs = d.getVar('BBMULTICONFIG') or "" |
| 28 | if mcname not in multiconfigs: |
| 29 | raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname) |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame^] | 30 | |
| 31 | # these will most likely start with my BPN multiconfig-image-packager, but I want them from core-image-minimal |
| 32 | # as there is no good way to query core-image-minimal's context lets assume that there are no overrides |
| 33 | # and that we can just replace IMAGE_BASENAME |
| 34 | image_link_name = d.getVar('IMAGE_LINK_NAME') |
| 35 | image_basename = d.getVar('IMAGE_BASENAME') |
| 36 | machine = d.getVar('MACHINE') |
| 37 | mcmachine = d.getVar('MCMACHINE') |
| 38 | image_to_deploy = d.getVar('MC_DEPLOY_IMAGE_BASENAME') |
| 39 | image_link_name_to_deploy = image_link_name.replace(image_basename, image_to_deploy).replace(machine, mcmachine) |
| 40 | bb.warn('%s: assuming that "%s" built for "%s" has IMAGE_LINK_NAME "%s"' % (d.getVar('PN'), mcmachine, image_to_deploy, image_link_name_to_deploy)) |
| 41 | d.setVar('IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL', image_link_name_to_deploy) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | BBCLASSEXTEND = "mcextend:tiny mcextend:musl" |