11 Commits
Author SHA1 Message Date
Ahmad Fatoum 9582278906 mmc-utils: support overriding CFLAGS without setting -DVERSION
Build tools like OpenEmbedded set the CFLAGS environment variable to be
in line with distro-wide decisions. Updating OpenEmbedded-core to point
at the new mmc-utils breaks, because VERSION would then be undefined.

Instead of having users workaround this by feeding in -DVERSION from
the outside, let's just move it out of environment-overridable CFLAGS
and into AM_CFLAGS instead.

This will inconvenience users that set their own VERSION a bit: The
Makefile sets -Werror and specifying -DVERSION twice will trigger it
because of the duplicate definition. This can be resolved by specifying
-UVERSION first. Given that the VERSION macro has only been there for a
month, this is deemed acceptable.

Fixes: 145c74ab6f ("mmc-utils: Change version string to git hash")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.kernel.org/r/20230526081100.1741293-1-a.fatoum@pengutronix.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-05-26 15:05:46 +02:00
Christian Loehle 145c74ab6f mmc-utils: Change version string to git hash
Since mmc-utils versioning has always been 0.1 and changes are not
made frequently and formal releases do not happen, packaged versions
are just pulled from git anyway, using the git hash for version is
probably the best idea for now.

Signed-off-by: Christian Loehle <cloehle@hyperstone.com>
Link: https://lore.kernel.org/r/28623fa7390242e9b003a44016c0235f@hyperstone.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-04-17 10:29:05 +02:00
Uwe Kleine-König a04361659d mmc-utils: make use of dependency information generated by gcc
While these dependency information was generated from the start of mmc-utils
it was never used.

Using these informations results in mmc being rebuild when e.g. mmc.h
was touched.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Chris Ball <chris@printf.net>
2018-02-16 20:19:31 -05:00
Sebastian Rasmussen 4af1749d23 mmc-utils: Merge the lsmmc tool into mmc-utils
The lsmmc tools contains an extensive parser of the CID, CSD, SCR
registers from userspace. The utility works as-is and uses sysfs
to read the register values.

The original code is created by Sebastian Rasmussen and still lives
in an attachment in the mail archive of linux-mmc. It need to be merged
into mmc-utils repository, which is convenient for testing MMC device
from userspace.

Change since v3:
 - Remove the unused EXT_CSD parser in lsmmc.c file.

Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
Signed-off-by: Chris Ball <chris@printf.net>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
2016-02-26 09:42:38 -05:00
Roman Peniaev 35c31feacf mmc-utils: RPMB: add HMAC SHA256 support
RPMB requires digital signature of the message.  Take the implementation
of HMAC SHA256 from this place https://github.com/ogay/hmac.git

Actually this is BSD license, IANAL but according to my understanding
nothing terrible will happen if we provide all the original copyrights.

Signed-off-by: Roman Pen <r.peniaev@gmail.com>
Cc: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <chris@printf.net>
2014-08-12 10:29:37 -04:00
Mike Frysinger a8276f539b fix make handling
Fix the recurisve make targets by using $(MAKE).  Otherwise we get lots of
warnings and issues with parallel builds.

Fix the install target -- the man subdir was missing a dummy target.

Add proper .PHONY markings.

Change-Id: I640d42af0bdf96baf6ff0ca022fd3f7f444b2d05
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/179621
Reviewed-by: Grant Grundler <grundler@chromium.org>
Signed-off-by: Chris Ball <chris@printf.net>
2014-01-23 14:24:41 -05:00
Ben Gardiner 6117755361 allow environment and command-line supplied make vars
Most useful when cross-compiling.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:04 -04:00
Chris Ball d4faeabb78 Turn on gcc optimization (-O2)
This is required by distros that use Fortify.
2012-09-21 18:16:22 +08:00
Chris Ball 45541d55fa Hook up "mmc extcsd read/write" commands.
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-12 12:03:30 -05:00
Johan RUDHOLM a8bfde77e0 Add extcsd write-protect read/write code
This was posted to linux-mmc@ by Johan Rudholm.

Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-12 11:52:25 -05:00
Goffredo Baroncelli 80d2660fa9 Create "mmc" utility
This commit was made by Chris Ball, but reuses framework code from
Goffredo's btrfs-progs/btrfs.c.

Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-12 11:43:14 -05:00