Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 590616 - sys-boot/vboot-utils requires mosys (and flashmap) for /usr/bin/crossystem to function
Summary: sys-boot/vboot-utils requires mosys (and flashmap) for /usr/bin/crossystem to...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Zac Medico
Depends on:
Reported: 2016-08-06 06:19 UTC by S. Gilles
Modified: 2017-04-22 15:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description S. Gilles 2016-08-06 06:19:09 UTC
sys-boot/vboot-utils provides /usr/bin/crossystem.  In order for crossystem to read data (at least on my C201), the program /usr/sbin/mosys is expected to exist (it is hardcoded in host/lib/crossystem.c around line 32).  Mosys is not in portage, however (nor is the flashmap library, which mosys depends upon).

If the correct course of action is to provide these programs in portage, they may be found at and respectively (the versions hosted on are out of date and unusable).  Ebuilds used in the Chromium OS tree may be found at and respectively.

These programs need some minor patching before compiling (at least on a C201 using musl).  In case they are useful for reference, I have placed sys-apps/flashmap and sys-boot/vboot-utils in (many aspects of the ebuilds are probably quite wrong, but they compile and allow crossystem to work).

Reproducible: Always

Steps to Reproduce:
1. Install Gentoo on an Asus C201 (or some other suitable CrOS device - I'm not sure which ones)
2. Install sys-boot/vboot-utils
3. Run `crossystem' as root
Actual Results:  
Stderr is filled with `waitpid() or mosys error' lines.  Many fields show only the value `(error)'

Expected Results:  
There should be nothing printed to stderr, or two lines regarding FDT properties.  No values should show (error).

The hardware for reproduction might be a bit specific.  I will try to test any patches, etc., provided I don't brick the device in the meantime.
Comment 1 Felix Janda 2016-08-06 16:58:31 UTC
I've experienced the same bug (I need it for Acer CB5-311).

I've put my ebuilds to
(didn't know about the ones from chromeos).

We have identical musl fixes.
flashmap is dual licensed. One license is GPL-2, the other looked like BSD to me.
The flashmap description is stolen from you.

sys-boot/vboot-utils has many other tools, which do not depend on mosys.
Maybe it is worth looking into adding a use flag for sys-boot/vboot-utils
controlling whether crossystem is shipped or not.
Comment 2 SpanKY gentoo-dev 2016-08-10 04:46:14 UTC
fixes to the projects themselves should be sent to the respective upstreams.  not having the ebuilds in the Gentoo tree now doesn't prevent that from happening sooner.
Comment 3 S. Gilles 2016-08-10 07:10:30 UTC
That seems reasonable.  Felix's patches seem superior to mine (I've tested them on my system) and limit the change to one package, so I'd prefer that those be submitted.
Comment 4 Felix Janda 2016-08-12 19:27:37 UTC
I've improved the patches and view them now as suitable for upstream.

However I'm a bit put off by the setup required to get the patch to
gerrit... So I would be very grateful if someone else could send them
(maybe further improved) upstream.
Comment 5 Felix Janda 2016-09-03 16:02:27 UTC
The mosys patches are now upstream.
Comment 6 Zac Medico gentoo-dev 2017-04-22 01:35:17 UTC
I see that we have 2 choices for flashmap:

They are identical except for the PRESUBMIT.cfg file added here:
Comment 7 S. Gilles 2017-04-22 15:09:47 UTC
Yeah, at the time I submitted the original report, dhendrix's mirrors on Github were several years out of date and (IIRC) didn't compile.  It seems that's changed, however, and that both and are being kept up to date (mosys a bit less so).  Using those repos seems to work fine.