bvb_refimpl: Move library code to refimpl/ sub-directory.

This makes it easier to see exactly which files belong to the reference
implementation.

BUG=None
TEST=Code builds and unit tests pass.

Change-Id: Iebcc603985847c2f0af9df76396da138438edbef
diff --git a/Android.mk b/Android.mk
index 7edbca8..4c93406 100644
--- a/Android.mk
+++ b/Android.mk
@@ -51,13 +51,13 @@
 LOCAL_LDFLAGS := $(bvb_common_ldflags)
 LOCAL_C_INCLUDES :=
 LOCAL_SRC_FILES := \
-    bvb_property.c \
-    bvb_rsa.c \
-    bvb_sha256.c \
-    bvb_sha512.c \
-    bvb_sysdeps_stub.c \
-    bvb_util.c \
-    bvb_verify.c
+    refimpl/bvb_property.c \
+    refimpl/bvb_rsa.c \
+    refimpl/bvb_sha256.c \
+    refimpl/bvb_sha512.c \
+    refimpl/bvb_sysdeps_stub.c \
+    refimpl/bvb_util.c \
+    refimpl/bvb_verify.c
 include $(BUILD_HOST_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -68,7 +68,7 @@
 LOCAL_CFLAGS := $(bvb_common_cflags)
 LOCAL_CPPFLAGS := $(bvb_common_cppflags)
 LOCAL_LDFLAGS := $(bvb_common_ldflags)
-LOCAL_C_INCLUDES := external/gtest/include
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/refimpl external/gtest/include
 LOCAL_STATIC_LIBRARIES := \
     libbvb_refimpl \
     libgmock_host \
diff --git a/README b/README
index f146540..37c5dac 100644
--- a/README
+++ b/README
@@ -5,58 +5,40 @@
 
 -- FILES AND DIRECTORIES
 
- bvb_boot_image.h
+ refimpl/
 
-   The specification for a Brillo Boot Image as a C header file.
+   The reference implementation for boot image verification and A/B
+   selection is in the refimpl sub-directory.
 
- bvb_verify.[ch]
+   Part of this code is considered internal to the reference
+   implementation and should not be used outside it. This includes the
+   bvb_rsa.[ch] and bvb_sha.[ch] files.
 
-   Code for cryptographically verifying a Brillo Boot Image.
-
- bvb_property.[ch]
-
-   Code for looking up properties (key/value pairs) embedded in the
-   boot image.
-
- bvb_sha.h, bvb_sha{256, 512}.c
-
-   Code for calculating SHA-256 and SHA-512. Only to be used internally.
-
- bvb_rsa.h, bvb_rsa.c
-
-   Code for verifying RSA signatures. Only to be used internally.
-
- bvb_util.[ch]
-
-   Various utility code.
-
- bvb_sysdeps.h
-
-   Declarations of system dependencies expected to be provided by the
-   platform the reference implementation is used by. If the platform
-   provides the standard C runtime you can use bvb_sysdeps_stub.c.
-
- bvb_sysdeps_stub.c
-
-   An implementation of system dependencies for the standard C runtime.
+   System dependencies expected to be provided by the platform is
+   defined in bvb_sysdeps.h. If the platform provides the standard C
+   runtime bvb_sysdeps_stub.c can be used.
 
  Android.mk
 
    Build instructions for building the reference implementation and
    associated unit tests.
 
- bvb_*_unittest.cc
+ bvb_util_unittest.cc, bvb_verify_unittest.cc, bvb_unittest_util.h
 
    Unit tests for the reference implementation.
 
- test/
+ bvbtool_unittest.cc
 
-   Contains test data used in unit tests.
+   Unit tests for bvbtool.
 
  bvbtool
 
    A tool written in Python for working with Brillo boot images.
 
+ test/
+
+   Contains test data used in unit tests.
+
 -- AUDIENCE AND PORTABILITY NOTES
 
 This code is intended to be used in bootloaders in devices running
@@ -82,15 +64,15 @@
 compiling the code. The code must be compiled into a separate library.
 
 Applications using the compiled library must only include the
-bvb_refimpl.h file (which will include all public interfaces) and must
-not have the BVB_REFIMPL_COMPILATION preprocessor symbol set. This is
-to ensure that internal code that may be change in the future (for
-example bvb_sha.[ch] and bvb_rsa.[ch]) will not be visible to
-application code.
+refimpl/bvb_refimpl.h file (which will include all public interfaces)
+and must not have the BVB_REFIMPL_COMPILATION preprocessor symbol
+set. This is to ensure that internal code that may be change in the
+future (for example refimpl/bvb_sha.[ch] and refimpl/bvb_rsa.[ch])
+will not be visible to application code.
 
 -- COMPATIBILITY NOTES
 
-The Brillo Boot Image structure (as defined in bvb_boot_image.h)
+The Brillo Boot Image structure (as defined in refimpl/bvb_boot_image.h)
 guarantees forwards- and backwards-compatibility provided the major
 version does not change.
 
diff --git a/bvb_boot_image_header.h b/refimpl/bvb_boot_image_header.h
similarity index 100%
rename from bvb_boot_image_header.h
rename to refimpl/bvb_boot_image_header.h
diff --git a/bvb_property.c b/refimpl/bvb_property.c
similarity index 100%
rename from bvb_property.c
rename to refimpl/bvb_property.c
diff --git a/bvb_property.h b/refimpl/bvb_property.h
similarity index 100%
rename from bvb_property.h
rename to refimpl/bvb_property.h
diff --git a/bvb_refimpl.h b/refimpl/bvb_refimpl.h
similarity index 100%
rename from bvb_refimpl.h
rename to refimpl/bvb_refimpl.h
diff --git a/bvb_rsa.c b/refimpl/bvb_rsa.c
similarity index 100%
rename from bvb_rsa.c
rename to refimpl/bvb_rsa.c
diff --git a/bvb_rsa.h b/refimpl/bvb_rsa.h
similarity index 100%
rename from bvb_rsa.h
rename to refimpl/bvb_rsa.h
diff --git a/bvb_sha.h b/refimpl/bvb_sha.h
similarity index 100%
rename from bvb_sha.h
rename to refimpl/bvb_sha.h
diff --git a/bvb_sha256.c b/refimpl/bvb_sha256.c
similarity index 100%
rename from bvb_sha256.c
rename to refimpl/bvb_sha256.c
diff --git a/bvb_sha512.c b/refimpl/bvb_sha512.c
similarity index 100%
rename from bvb_sha512.c
rename to refimpl/bvb_sha512.c
diff --git a/bvb_sysdeps.h b/refimpl/bvb_sysdeps.h
similarity index 100%
rename from bvb_sysdeps.h
rename to refimpl/bvb_sysdeps.h
diff --git a/bvb_sysdeps_stub.c b/refimpl/bvb_sysdeps_stub.c
similarity index 100%
rename from bvb_sysdeps_stub.c
rename to refimpl/bvb_sysdeps_stub.c
diff --git a/bvb_util.c b/refimpl/bvb_util.c
similarity index 100%
rename from bvb_util.c
rename to refimpl/bvb_util.c
diff --git a/bvb_util.h b/refimpl/bvb_util.h
similarity index 100%
rename from bvb_util.h
rename to refimpl/bvb_util.h
diff --git a/bvb_verify.c b/refimpl/bvb_verify.c
similarity index 100%
rename from bvb_verify.c
rename to refimpl/bvb_verify.c
diff --git a/bvb_verify.h b/refimpl/bvb_verify.h
similarity index 100%
rename from bvb_verify.h
rename to refimpl/bvb_verify.h