Bug 7631 - wic complains about not finding mkdosfs and has poor message
Summary: wic complains about not finding mkdosfs and has poor message
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: deployment (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9
Assignee: Ed Bartosh
QA Contact: Daniel Istrate
URL:
Whiteboard:
: 8474 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-20 12:46 UTC by Phlip Balister
Modified: 2015-10-09 15:41 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phlip Balister 2015-04-20 12:46:01 UTC
[balister@thuvia build]$ wic create ../meta-sdr/contrib/wks/sdimage-8G.wks  -e gnuradio-dev-image -o images/$MACHINE
Checking basic build environment...
Done.

Creating image(s)...

Error: A native program mkdosfs required to build the image was not found (see details above). Please make sure it's installed and try again.

This led me to try:

 bitbake mkdosfs-native


Which doesn't exist.

bitbake dosfstools-native

Did work.

Same issue for mcopy, run mtools-native.

I wouldn't be so picky, but the message says to check the details above and there are none.
Comment 1 Phlip Balister 2015-04-20 12:47:20 UTC
I am using openembedded-core, not oe-classic.
Comment 2 Phlip Balister 2015-04-30 14:51:36 UTC
Any interest in a simple bbclass images can inherit so that these utilities get built at image time?
Comment 3 Ed Bartosh 2015-05-05 15:17:25 UTC
I'm not sure we should create some artificial images as people might not use them. I'd rather implement dependency check in wic.
Comment 4 Phlip Balister 2015-05-05 15:44:53 UTC
Do we want wic running bitbake to fufill the dependencies? The key is
making it easy to build images, without turning bitbake into skynet.

I'm also thinking we could add some tasks to a wic bbclass to run wic.
Comment 5 Phlip Balister 2015-05-05 17:06:43 UTC
(In reply to comment #3)
> I'm not sure we should create some artificial images as people might not use
> them. I'd rather implement dependency check in wic.

Ed, the idea is to use a bbclass that an image recipe would inherit that adds DEPENDS on the bits wic needs to assemble the image. THe downside is slightly longer build time for people using the image recipe, but not wic.
Comment 6 Ed Bartosh 2015-05-06 11:23:13 UTC
Thank you for explaining your idea. That makes sense to do, but I doubt it can be accepted because of longer build time. Maintainers are really picky about buld time regressions nowadays :)
Comment 7 Phlip Balister 2015-05-06 11:36:57 UTC
Well, it screws my build time, because I need to remember what recipes to build so I can make an image. Doing it automatically saves time.
Comment 8 Ed Bartosh 2015-05-21 10:37:27 UTC
Would it be ok if I add optional command line option to wic to bake parted-native dosfstools-native and mtools-native?
Comment 9 Phlip Balister 2015-05-21 12:10:18 UTC
1) The error message should tell the user what recipes to build so he does not need to hunt around.

2) I still prefer a wic class. This also gives us a path for letting bitbake run wic via a task append.
Comment 10 Ed Bartosh 2015-06-10 10:59:38 UTC
Bug 7672 (In reply to comment #9)
> 1) The error message should tell the user what recipes to build so he does
> not need to hunt around.

Completely agree. Unfortunately this is hard to implement without integrating bitbake and wic. Bug 7672 is about this integration. As soon as users will have bitbake recipies for partitioned images it would be just a matter of adding dependencies to the recipe.

> 2) I still prefer a wic class. This also gives us a path for letting bitbake
> run wic via a task append.

wic class is too generic solution for this class from my point of view as some of wic runtime dependencies depend on the type of the image, bootloader and other image details.

PS: Added dependency to bug 7672
Comment 11 Ed Bartosh 2015-08-03 13:59:36 UTC
I decided to go simple way: I put executable->recipe pairs for all tools to misc.py and made exec_native_cmd to suggest how to build them.

Please, review: http://lists.openembedded.org/pipermail/openembedded-core/2015-August/108258.html
Comment 13 Daniel Istrate 2015-09-09 13:36:15 UTC
Verified on master db92bc23880794be77373b0f2d8c26279dcecb84

[daniel@fedora-ws build]$ wic create directdisk -e core-image-minimal
Checking basic build environment...
Done.

Creating image(s)...

Error: A native program mkdosfs required to build the image was not found (see details above).

Please bake it with 'bitbake dosfstools-native' and try again.

[daniel@fedora-ws build]$ bitbake dosfstools-native
Loading cache: 100% |#################################################################################| ETA:  00:00:00
Loaded 1319 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.27.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-21"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "genericx86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.8+snapshot-20150909"
TUNE_FEATURES     = "m64 core2"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:db92bc23880794be77373b0f2d8c26279dcecb84"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 72 tasks of which 71 didn't need to be rerun and all succeeded.
[daniel@fedora-ws build]$ 
[daniel@fedora-ws build]$ 
[daniel@fedora-ws build]$ wic create directdisk -e core-image-minimal
Checking basic build environment...
Done.

Creating image(s)...

Info: The new image(s) can be found here:
  /var/tmp/wic/build/directdisk-201509091633-sda.direct

The following build artifacts were used to create the image(s):
  ROOTFS_DIR:                   /home/daniel/poky-M2/build/tmp/work/genericx86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
  BOOTIMG_DIR:                  /home/daniel/poky-M2/build/tmp/sysroots/genericx86-64/usr/share
  KERNEL_DIR:                   /home/daniel/poky-M2/build/tmp/deploy/images/genericx86-64
  NATIVE_SYSROOT:               /home/daniel/poky-M2/build/tmp/sysroots/x86_64-linux


The image(s) were created using OE kickstart file:
  /home/daniel/poky-M2/scripts/lib/wic/canned-wks/directdisk.wks
Comment 14 Daniel Istrate 2015-10-09 15:41:02 UTC
*** Bug 8474 has been marked as a duplicate of this bug. ***