Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 1 | SUMMARY = "A meta recipe to build native tools used by wic." |
| 2 | |
| 3 | LICENSE = "MIT" |
| 4 | |
| 5 | DEPENDS = "\ |
| 6 | parted-native syslinux-native gptfdisk-native dosfstools-native \ |
| 7 | mtools-native bmap-tools-native grub-efi-native cdrtools-native \ |
| 8 | btrfs-tools-native squashfs-tools-native \ |
| 9 | " |
| 10 | DEPENDS_append_x86 = " syslinux grub-efi systemd-boot" |
| 11 | DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot" |
| 12 | |
| 13 | INHIBIT_DEFAULT_DEPS = "1" |
| 14 | inherit nopackages |
| 15 | |
| 16 | # The sysroot of wic-tools is needed for wic, but if rm_work is enabled, it will |
| 17 | # be removed before wic has a chance to use it, hence the exclusion below. |
| 18 | RM_WORK_EXCLUDE += "${PN}" |
| 19 | |
| 20 | python do_build_sysroot () { |
| 21 | bb.build.exec_func("extend_recipe_sysroot", d) |
| 22 | |
| 23 | # Write environment variables used by wic |
| 24 | # to tmp/sysroots/<machine>/imgdata/wictools.env |
| 25 | outdir = os.path.join(d.getVar('STAGING_DIR'), d.getVar('MACHINE'), 'imgdata') |
| 26 | bb.utils.mkdirhier(outdir) |
| 27 | with open(os.path.join(outdir, "wic-tools.env"), 'w') as envf: |
| 28 | for var in ('RECIPE_SYSROOT_NATIVE', 'STAGING_DATADIR', 'STAGING_LIBDIR'): |
| 29 | envf.write('%s="%s"\n' % (var, d.getVar(var).strip())) |
| 30 | |
| 31 | } |
| 32 | addtask do_build_sysroot after do_prepare_recipe_sysroot before do_build |