blob: cd494ec233f46cc3d5c54586b7733047985b98f1 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001SUMMARY = "A meta recipe to build native tools used by wic."
2
3LICENSE = "MIT"
4
5DEPENDS = "\
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 "
10DEPENDS_append_x86 = " syslinux grub-efi systemd-boot"
11DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot"
12
13INHIBIT_DEFAULT_DEPS = "1"
14inherit 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.
18RM_WORK_EXCLUDE += "${PN}"
19
20python 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}
32addtask do_build_sysroot after do_prepare_recipe_sysroot before do_build