diff options
author | Nico Huber <nico.huber@secunet.com> | 2012-12-10 13:34:10 +0000 |
---|---|---|
committer | David Hendricks <david.hendricks@gmail.com> | 2017-06-03 20:13:06 +0200 |
commit | 454f61338213f73ca74fda54c0bf86afb01947de (patch) | |
tree | 5c981a1a181c130467d3c37b99cdeaf686ff49c8 /Makefile | |
parent | 7af0e79b44bdc86497a992a90855f284e74d73f1 (diff) | |
download | flashrom-454f61338213f73ca74fda54c0bf86afb01947de.tar.gz flashrom-454f61338213f73ca74fda54c0bf86afb01947de.tar.bz2 flashrom-454f61338213f73ca74fda54c0bf86afb01947de.zip |
Add a convenient libflashrom interface
This adds a minimal libflashrom interface based on the draft in the
wiki. While the glue code in libflashrom.c is build on top of the
existing code instead on overhauling it, the interface in libflashrom.h
is supposed to be stable. So we can keep the interface and adapt
internals later if favoured, without breaking clients.
A new make target, libinstall, is also added. It installs libflashrom.a
and libflashrom.h in lib/ and include/ dirs respectively.
Hooking this into the build would break linking of the CLI and is post-
poned until that got fixed.
v2: Rebase and fixes by Anton Kochkov.
v3: o fl_image_*() rewritten with layout support (touch only included regions).
o Moved read/erase/write/verify operations to flashrom.c.
o Added layout pointer and flags to the flash context.
v4: Removed libflashrom.o from LIB_OBJS until CLI is adapted.
v5: o Incorporated David's comments.
o Added `fl_flashprog_t` as dummy parameter to hide the fact that
we have global state all around, and for future-proofness ofc.
v6: o Change namespace prefix to flashrom_.
o Remove typedefs.
Change-Id: I00f169990830aa17b7dfae5eb74010d40c476181
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1357,6 +1357,12 @@ install: $(PROGRAM)$(EXEC_SUFFIX) $(PROGRAM).8 $(INSTALL) -m 0755 $(PROGRAM)$(EXEC_SUFFIX) $(DESTDIR)$(PREFIX)/sbin $(INSTALL) -m 0644 $(PROGRAM).8 $(DESTDIR)$(MANDIR)/man8 +libinstall: libflashrom.a libflashrom.h + mkdir -p $(DESTDIR)$(PREFIX)/lib + $(INSTALL) -m 0644 libflashrom.a $(DESTDIR)$(PREFIX)/lib + mkdir -p $(DESTDIR)$(PREFIX)/include + $(INSTALL) -m 0644 libflashrom.h $(DESTDIR)$(PREFIX)/include + export: $(PROGRAM).8 @rm -rf $(EXPORTDIR)/flashrom-$(RELEASENAME) @svn export -r BASE . $(EXPORTDIR)/flashrom-$(RELEASENAME) |