diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 49 | ||||
| -rw-r--r-- | scripts/lib/wic/utils/oe/misc.py | 4 |
2 files changed, 4 insertions, 49 deletions
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index 3858fd439b..15fd858d22 100644 --- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py | |||
| @@ -194,55 +194,6 @@ class IsoImagePlugin(SourcePlugin): | |||
| 194 | return initrd | 194 | return initrd |
| 195 | 195 | ||
| 196 | @classmethod | 196 | @classmethod |
| 197 | def do_stage_partition(cls, part, source_params, creator, cr_workdir, | ||
| 198 | oe_builddir, bootimg_dir, kernel_dir, | ||
| 199 | native_sysroot): | ||
| 200 | """ | ||
| 201 | Special content staging called before do_prepare_partition(). | ||
| 202 | It cheks if all necessary tools are available, if not | ||
| 203 | tries to instal them. | ||
| 204 | """ | ||
| 205 | # Make sure parted is available in native sysroot | ||
| 206 | if not os.path.isfile("%s/usr/sbin/parted" % native_sysroot): | ||
| 207 | msger.info("Building parted-native...\n") | ||
| 208 | exec_cmd("bitbake parted-native") | ||
| 209 | |||
| 210 | # Make sure mkfs.ext2/3/4 is available in native sysroot | ||
| 211 | if not os.path.isfile("%s/sbin/mkfs.ext2" % native_sysroot): | ||
| 212 | msger.info("Building e2fsprogs-native...\n") | ||
| 213 | exec_cmd("bitbake e2fsprogs-native") | ||
| 214 | |||
| 215 | # Make sure syslinux is available in sysroot and in native sysroot | ||
| 216 | syslinux_dir = get_bitbake_var("STAGING_DATADIR") | ||
| 217 | if not syslinux_dir: | ||
| 218 | msger.error("Couldn't find STAGING_DATADIR, exiting.\n") | ||
| 219 | if not os.path.exists("%s/syslinux" % syslinux_dir): | ||
| 220 | msger.info("Building syslinux...\n") | ||
| 221 | exec_cmd("bitbake syslinux") | ||
| 222 | if not os.path.exists("%s/syslinux" % syslinux_dir): | ||
| 223 | msger.error("Please build syslinux first\n") | ||
| 224 | |||
| 225 | # Make sure syslinux is available in native sysroot | ||
| 226 | if not os.path.exists("%s/usr/bin/syslinux" % native_sysroot): | ||
| 227 | msger.info("Building syslinux-native...\n") | ||
| 228 | exec_cmd("bitbake syslinux-native") | ||
| 229 | |||
| 230 | #Make sure mkisofs is available in native sysroot | ||
| 231 | if not os.path.isfile("%s/usr/bin/mkisofs" % native_sysroot): | ||
| 232 | msger.info("Building cdrtools-native...\n") | ||
| 233 | exec_cmd("bitbake cdrtools-native") | ||
| 234 | |||
| 235 | # Make sure mkfs.vfat is available in native sysroot | ||
| 236 | if not os.path.isfile("%s/sbin/mkfs.vfat" % native_sysroot): | ||
| 237 | msger.info("Building dosfstools-native...\n") | ||
| 238 | exec_cmd("bitbake dosfstools-native") | ||
| 239 | |||
| 240 | # Make sure mtools is available in native sysroot | ||
| 241 | if not os.path.isfile("%s/usr/bin/mcopy" % native_sysroot): | ||
| 242 | msger.info("Building mtools-native...\n") | ||
| 243 | exec_cmd("bitbake mtools-native") | ||
| 244 | |||
| 245 | @classmethod | ||
| 246 | def do_configure_partition(cls, part, source_params, creator, cr_workdir, | 197 | def do_configure_partition(cls, part, source_params, creator, cr_workdir, |
| 247 | oe_builddir, bootimg_dir, kernel_dir, | 198 | oe_builddir, bootimg_dir, kernel_dir, |
| 248 | native_sysroot): | 199 | native_sysroot): |
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py index 2a2fcc94fb..73d8c225ad 100644 --- a/scripts/lib/wic/utils/oe/misc.py +++ b/scripts/lib/wic/utils/oe/misc.py | |||
| @@ -36,8 +36,11 @@ from wic.utils import runner | |||
| 36 | 36 | ||
| 37 | # executable -> recipe pairs for exec_native_cmd | 37 | # executable -> recipe pairs for exec_native_cmd |
| 38 | NATIVE_RECIPES = {"bmaptool": "bmap-tools", | 38 | NATIVE_RECIPES = {"bmaptool": "bmap-tools", |
| 39 | "grub-mkimage": "grub-efi-native", | ||
| 40 | "isohybrid": "syslinux", | ||
| 39 | "mcopy": "mtools", | 41 | "mcopy": "mtools", |
| 40 | "mkdosfs": "dosfstools", | 42 | "mkdosfs": "dosfstools", |
| 43 | "mkisofs": "cdrtools", | ||
| 41 | "mkfs.btrfs": "btrfs-tools", | 44 | "mkfs.btrfs": "btrfs-tools", |
| 42 | "mkfs.ext2": "e2fsprogs", | 45 | "mkfs.ext2": "e2fsprogs", |
| 43 | "mkfs.ext3": "e2fsprogs", | 46 | "mkfs.ext3": "e2fsprogs", |
| @@ -45,6 +48,7 @@ NATIVE_RECIPES = {"bmaptool": "bmap-tools", | |||
| 45 | "mkfs.vfat": "dosfstools", | 48 | "mkfs.vfat": "dosfstools", |
| 46 | "mksquashfs": "squashfs-tools", | 49 | "mksquashfs": "squashfs-tools", |
| 47 | "mkswap": "util-linux", | 50 | "mkswap": "util-linux", |
| 51 | "mmd": "syslinux", | ||
| 48 | "parted": "parted", | 52 | "parted": "parted", |
| 49 | "sfdisk": "util-linux", | 53 | "sfdisk": "util-linux", |
| 50 | "sgdisk": "gptfdisk", | 54 | "sgdisk": "gptfdisk", |
