summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-06-14 14:52:41 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-22 04:37:19 +0000
commit0b3ce4621893e4b4c0ecf3d50529f38a7633dd67 (patch)
treec91039b2bfa38e0652651b049fd1c28e9478df64
parent4bcb8ceb90fba5b15ab5fc650fb09314ded47d63 (diff)
downloadvboot-0b3ce4621893e4b4c0ecf3d50529f38a7633dd67.tar.gz
vboot: replace sysincludes.h with 2sysincludes.h
sysincludes.h and 2sysincludes.h are almost identical except for one extra header (ctype.h) in the vboot1 variant. Add this to 2sysincludes.h, and nuke sysincludes.h. Depends on: https://review.coreboot.org/c/coreboot/+/33525 BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: Iaba21a9b8bb2ae0c081184019576663898317bd1 Signed-off-by: Joel Kitching <kitching@google.com> Cq-Depend: chromium:1680325 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1659990 Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Auto-Submit: Joel Kitching <kitching@chromium.org>
-rw-r--r--firmware/2lib/include/2sysincludes.h9
-rw-r--r--firmware/lib/cgptlib/cgptlib.c1
-rw-r--r--firmware/lib/cgptlib/cgptlib_internal.c2
-rw-r--r--firmware/lib/cgptlib/crc32.c2
-rw-r--r--firmware/lib/cgptlib/include/cgptlib.h2
-rw-r--r--firmware/lib/cgptlib/include/cgptlib_internal.h2
-rw-r--r--firmware/lib/cgptlib/include/crc32.h2
-rw-r--r--firmware/lib/ec_sync.c1
-rw-r--r--firmware/lib/ec_sync_all.c1
-rw-r--r--firmware/lib/gpt_misc.c1
-rw-r--r--firmware/lib/include/rollback_index.h2
-rw-r--r--firmware/lib/include/sysincludes.h30
-rw-r--r--firmware/lib/include/utility.h2
-rw-r--r--firmware/lib/mocked_rollback_index.c3
-rw-r--r--firmware/lib/tpm_lite/mocked_tlcl.c2
-rw-r--r--firmware/lib/tpm_lite/tlcl.c1
-rw-r--r--firmware/lib/utility_string.c2
-rw-r--r--firmware/lib/vboot_api_kernel.c2
-rw-r--r--firmware/lib/vboot_audio.c1
-rw-r--r--firmware/lib/vboot_common.c2
-rw-r--r--firmware/lib/vboot_common_init.c1
-rw-r--r--firmware/lib/vboot_display.c2
-rw-r--r--firmware/lib/vboot_kernel.c2
-rw-r--r--firmware/lib/vboot_ui.c2
-rw-r--r--firmware/lib/vboot_ui_common.c2
-rw-r--r--firmware/linktest/main.c3
-rw-r--r--tests/cgptlib_test.h2
-rw-r--r--tests/tpm_lite/tlcl_tests.c2
-rw-r--r--utility/tlcl_generator.c4
29 files changed, 18 insertions, 72 deletions
diff --git a/firmware/2lib/include/2sysincludes.h b/firmware/2lib/include/2sysincludes.h
index 4c9e66c6..792ece43 100644
--- a/firmware/2lib/include/2sysincludes.h
+++ b/firmware/2lib/include/2sysincludes.h
@@ -4,15 +4,16 @@
*/
/*
- * System includes for vboot reference library. With few exceptions, this is
- * the ONLY place in firmware/ where system headers may be included via
- * #include <...>, so that there's only one place that needs to be fixed up for
- * platforms which don't have all the system includes.
+ * System includes for vboot reference library. This is the ONLY
+ * place in firmware/ where system headers may be included via
+ * #include <...>, so that there's only one place that needs to be
+ * fixed up for platforms which don't have all the system includes.
*/
#ifndef VBOOT_REFERENCE_2_SYSINCLUDES_H_
#define VBOOT_REFERENCE_2_SYSINCLUDES_H_
+#include <ctype.h>
#include <inttypes.h> /* For PRIu64 */
#include <stddef.h>
#include <stdint.h>
diff --git a/firmware/lib/cgptlib/cgptlib.c b/firmware/lib/cgptlib/cgptlib.c
index 0995b945..f8b3cb40 100644
--- a/firmware/lib/cgptlib/cgptlib.c
+++ b/firmware/lib/cgptlib/cgptlib.c
@@ -6,7 +6,6 @@
#include "2sysincludes.h"
#include "2common.h"
-#include "sysincludes.h"
#include "cgptlib.h"
#include "cgptlib_internal.h"
#include "crc32.h"
diff --git a/firmware/lib/cgptlib/cgptlib_internal.c b/firmware/lib/cgptlib/cgptlib_internal.c
index 77a0de2b..a29d2535 100644
--- a/firmware/lib/cgptlib/cgptlib_internal.c
+++ b/firmware/lib/cgptlib/cgptlib_internal.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "cgptlib.h"
#include "cgptlib_internal.h"
diff --git a/firmware/lib/cgptlib/crc32.c b/firmware/lib/cgptlib/crc32.c
index 286cfa09..72f73fc4 100644
--- a/firmware/lib/cgptlib/crc32.c
+++ b/firmware/lib/cgptlib/crc32.c
@@ -39,7 +39,7 @@
/* polynomial $edb88320 */
/* */
/* -------------------------------------------------------------------- */
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "crc32.h"
diff --git a/firmware/lib/cgptlib/include/cgptlib.h b/firmware/lib/cgptlib/include/cgptlib.h
index df85494e..93d15da9 100644
--- a/firmware/lib/cgptlib/include/cgptlib.h
+++ b/firmware/lib/cgptlib/include/cgptlib.h
@@ -6,7 +6,7 @@
#ifndef VBOOT_REFERENCE_CGPTLIB_H_
#define VBOOT_REFERENCE_CGPTLIB_H_
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "gpt_misc.h"
/**
diff --git a/firmware/lib/cgptlib/include/cgptlib_internal.h b/firmware/lib/cgptlib/include/cgptlib_internal.h
index f19ef819..b9331b93 100644
--- a/firmware/lib/cgptlib/include/cgptlib_internal.h
+++ b/firmware/lib/cgptlib/include/cgptlib_internal.h
@@ -6,7 +6,7 @@
#ifndef VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_
#define VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "cgptlib.h"
#include "gpt.h"
diff --git a/firmware/lib/cgptlib/include/crc32.h b/firmware/lib/cgptlib/include/crc32.h
index 23361138..e2825ced 100644
--- a/firmware/lib/cgptlib/include/crc32.h
+++ b/firmware/lib/cgptlib/include/crc32.h
@@ -5,7 +5,7 @@
#ifndef VBOOT_REFERENCE_GPT_CRC32_H_
#define VBOOT_REFERENCE_GPT_CRC32_H_
-#include "sysincludes.h"
+#include "2sysincludes.h"
uint32_t Crc32(const void *buffer, uint32_t len);
diff --git a/firmware/lib/ec_sync.c b/firmware/lib/ec_sync.c
index 447bc843..719a8be1 100644
--- a/firmware/lib/ec_sync.c
+++ b/firmware/lib/ec_sync.c
@@ -10,7 +10,6 @@
#include "2misc.h"
#include "2nvstorage.h"
-#include "sysincludes.h"
#include "ec_sync.h"
#include "vboot_api.h"
#include "vboot_common.h"
diff --git a/firmware/lib/ec_sync_all.c b/firmware/lib/ec_sync_all.c
index 4a8cf670..467c3300 100644
--- a/firmware/lib/ec_sync_all.c
+++ b/firmware/lib/ec_sync_all.c
@@ -10,7 +10,6 @@
#include "2misc.h"
#include "2nvstorage.h"
-#include "sysincludes.h"
#include "ec_sync.h"
#include "vboot_api.h"
#include "vboot_common.h"
diff --git a/firmware/lib/gpt_misc.c b/firmware/lib/gpt_misc.c
index 45885834..38646437 100644
--- a/firmware/lib/gpt_misc.c
+++ b/firmware/lib/gpt_misc.c
@@ -6,7 +6,6 @@
#include "2sysincludes.h"
#include "2common.h"
-#include "sysincludes.h"
#include "cgptlib.h"
#include "cgptlib_internal.h"
#include "crc32.h"
diff --git a/firmware/lib/include/rollback_index.h b/firmware/lib/include/rollback_index.h
index c5b119e2..9d6cfcc3 100644
--- a/firmware/lib/include/rollback_index.h
+++ b/firmware/lib/include/rollback_index.h
@@ -10,7 +10,7 @@
#define VBOOT_REFERENCE_ROLLBACK_INDEX_H_
#include "2return_codes.h"
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "tss_constants.h"
/* TPM NVRAM location indices. */
diff --git a/firmware/lib/include/sysincludes.h b/firmware/lib/include/sysincludes.h
deleted file mode 100644
index 28aa96c5..00000000
--- a/firmware/lib/include/sysincludes.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* System includes for vboot reference library. This is the ONLY
- * place in firmware/ where system headers may be included via
- * #include <...>, so that there's only one place that needs to be
- * fixed up for platforms which don't have all the system includes.
- *
- * Files in firmware/stub may still include system headers, because
- * they're local implementations and will be ported to each system
- * anyway. */
-
-#ifndef VBOOT_REFERENCE_SYSINCLUDES_H_
-#define VBOOT_REFERENCE_SYSINCLUDES_H_
-
-#include <ctype.h>
-#include <inttypes.h> /* For PRIu64 */
-#include <stddef.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(HAVE_ENDIAN_H) && defined(HAVE_LITTLE_ENDIAN)
-#include <byteswap.h>
-#include <memory.h>
-#endif
-
-#endif /* VBOOT_REFERENCE_SYSINCLUDES_H_ */
diff --git a/firmware/lib/include/utility.h b/firmware/lib/include/utility.h
index 272b9f42..879950b1 100644
--- a/firmware/lib/include/utility.h
+++ b/firmware/lib/include/utility.h
@@ -12,7 +12,7 @@
#define VBOOT_REFERENCE_UTILITY_H_
#include "2common.h"
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "vboot_api.h"
#ifdef VBOOT_DEBUG
diff --git a/firmware/lib/mocked_rollback_index.c b/firmware/lib/mocked_rollback_index.c
index 6dfeb5cf..4e8a74b0 100644
--- a/firmware/lib/mocked_rollback_index.c
+++ b/firmware/lib/mocked_rollback_index.c
@@ -6,11 +6,8 @@
* stored in the TPM NVRAM.
*/
-#include "sysincludes.h"
#include "utility.h"
-
#include "rollback_index.h"
-
#include "tss_constants.h"
diff --git a/firmware/lib/tpm_lite/mocked_tlcl.c b/firmware/lib/tpm_lite/mocked_tlcl.c
index 917532d1..d0dfb409 100644
--- a/firmware/lib/tpm_lite/mocked_tlcl.c
+++ b/firmware/lib/tpm_lite/mocked_tlcl.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "tlcl.h"
#include "tlcl_internal.h"
diff --git a/firmware/lib/tpm_lite/tlcl.c b/firmware/lib/tpm_lite/tlcl.c
index fac992f9..d102f9b8 100644
--- a/firmware/lib/tpm_lite/tlcl.c
+++ b/firmware/lib/tpm_lite/tlcl.c
@@ -19,7 +19,6 @@
#include "2hmac.h"
#include "2sha.h"
-#include "sysincludes.h"
#include "tlcl.h"
#include "tlcl_internal.h"
#include "tlcl_structures.h"
diff --git a/firmware/lib/utility_string.c b/firmware/lib/utility_string.c
index 63e43c68..87b2293b 100644
--- a/firmware/lib/utility_string.c
+++ b/firmware/lib/utility_string.c
@@ -5,7 +5,7 @@
* String utility functions that need to be built as part of the firmware.
*/
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "utility.h"
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 23ee6e8b..ec9aaa14 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -5,8 +5,6 @@
* High-level firmware wrapper API - entry points for kernel selection
*/
-#include "sysincludes.h"
-
#include "2sysincludes.h"
#include "2common.h"
#include "2misc.h"
diff --git a/firmware/lib/vboot_audio.c b/firmware/lib/vboot_audio.c
index ba0f98c2..d59b65bf 100644
--- a/firmware/lib/vboot_audio.c
+++ b/firmware/lib/vboot_audio.c
@@ -9,7 +9,6 @@
#include "2common.h"
#include "2misc.h"
-#include "sysincludes.h"
#include "utility.h"
#include "vboot_api.h"
#include "vboot_audio.h"
diff --git a/firmware/lib/vboot_common.c b/firmware/lib/vboot_common.c
index 87500452..b1c6d339 100644
--- a/firmware/lib/vboot_common.c
+++ b/firmware/lib/vboot_common.c
@@ -6,9 +6,7 @@
* (Firmware portion)
*/
-#include "sysincludes.h"
#include "2sysincludes.h"
-
#include "2common.h"
#include "2misc.h"
#include "2rsa.h"
diff --git a/firmware/lib/vboot_common_init.c b/firmware/lib/vboot_common_init.c
index 44b3eb26..174f39c7 100644
--- a/firmware/lib/vboot_common_init.c
+++ b/firmware/lib/vboot_common_init.c
@@ -9,7 +9,6 @@
#include "2sysincludes.h"
#include "2common.h"
-#include "sysincludes.h"
#include "vboot_api.h"
#include "vboot_common.h"
#include "utility.h"
diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
index 89ed694e..52d3510e 100644
--- a/firmware/lib/vboot_display.c
+++ b/firmware/lib/vboot_display.c
@@ -5,9 +5,7 @@
* Display functions used in kernel selection.
*/
-#include "sysincludes.h"
#include "2sysincludes.h"
-
#include "2common.h"
#include "2misc.h"
#include "2nvstorage.h"
diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c
index 85cc7823..0d1545c9 100644
--- a/firmware/lib/vboot_kernel.c
+++ b/firmware/lib/vboot_kernel.c
@@ -6,9 +6,7 @@
* (Firmware portion)
*/
-#include "sysincludes.h"
#include "2sysincludes.h"
-
#include "2common.h"
#include "2misc.h"
#include "2nvstorage.h"
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c
index 3bb1efa9..88bbfb65 100644
--- a/firmware/lib/vboot_ui.c
+++ b/firmware/lib/vboot_ui.c
@@ -5,8 +5,6 @@
* High-level firmware wrapper API - user interface for RW firmware
*/
-#include "sysincludes.h"
-
#include "2sysincludes.h"
#include "2common.h"
#include "2misc.h"
diff --git a/firmware/lib/vboot_ui_common.c b/firmware/lib/vboot_ui_common.c
index be5d1f24..09c96071 100644
--- a/firmware/lib/vboot_ui_common.c
+++ b/firmware/lib/vboot_ui_common.c
@@ -5,8 +5,6 @@
* High-level firmware wrapper API - user interface for RW firmware
*/
-#include "sysincludes.h"
-
#include "2sysincludes.h"
#include "2common.h"
diff --git a/firmware/linktest/main.c b/firmware/linktest/main.c
index 03195ed2..75dda291 100644
--- a/firmware/linktest/main.c
+++ b/firmware/linktest/main.c
@@ -3,8 +3,7 @@
* found in the LICENSE file.
*/
-#include "sysincludes.h"
-
+#include "2sysincludes.h"
#include "cgptlib.h"
#include "load_kernel_fw.h"
#include "rollback_index.h"
diff --git a/tests/cgptlib_test.h b/tests/cgptlib_test.h
index 0f226bd3..21ea6b9c 100644
--- a/tests/cgptlib_test.h
+++ b/tests/cgptlib_test.h
@@ -6,7 +6,7 @@
#define VBOOT_REFERENCE_CGPTLIB_TEST_H_
#include <stdio.h>
-#include "sysincludes.h"
+#include "2sysincludes.h"
enum {
TEST_FAIL = -1,
diff --git a/tests/tpm_lite/tlcl_tests.c b/tests/tpm_lite/tlcl_tests.c
index 353b16c6..40b98881 100644
--- a/tests/tpm_lite/tlcl_tests.c
+++ b/tests/tpm_lite/tlcl_tests.c
@@ -6,7 +6,7 @@
/* Shared code for tests.
*/
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "tlcl.h"
#include "tlcl_tests.h"
diff --git a/utility/tlcl_generator.c b/utility/tlcl_generator.c
index c021ed36..e34542b1 100644
--- a/utility/tlcl_generator.c
+++ b/utility/tlcl_generator.c
@@ -12,11 +12,9 @@
*/
#include <assert.h>
-#include <stddef.h>
#include <stdio.h>
-#include <stdlib.h>
-#include "sysincludes.h"
+#include "2sysincludes.h"
#include "tlcl_internal.h"
#include "tpmextras.h"
#include "tss_constants.h"