1 --- xen-4.13.0/tools/xenpmd/Makefile.orig 2019-12-17 14:23:09.000000000 +0000
2 +++ xen-4.13.0/tools/xenpmd/Makefile 2020-01-22 22:13:16.564873608 +0000
6 CFLAGS += $(CFLAGS_libxenstore)
7 +CFLAGS += -Wno-error=format-truncation
9 LDLIBS += $(LDLIBS_libxenstore)
11 --- xen-4.13.1/tools/firmware/etherboot/Config~ 2020-05-14 14:19:32.000000000 +0200
12 +++ xen-4.13.1/tools/firmware/etherboot/Config 2020-06-07 17:14:49.704183136 +0200
15 CFLAGS += -UCONSOLE_SERIAL
16 CFLAGS += -DCONSOLE_SERIAL=1
18 +CFLAGS += -Wno-error=array-bounds -Wno-error=enum-conversion
19 --- xen-4.13.1/stubdom/Makefile~ 2020-06-07 17:54:17.000000000 +0200
20 +++ xen-4.13.1/stubdom/Makefile 2020-06-07 17:57:37.373200925 +0200
22 patch -d $@ -p1 < vtpm-cmake-Wextra.patch
23 patch -d $@ -p1 < vtpm-implicit-fallthrough.patch
24 patch -d $@ -p1 < vtpm_TPM_ChangeAuthAsymFinish.patch
25 + patch -d $@ -p1 < vtpm-gcc10.patch
27 cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
29 --- xen-4.13.1/stubdom/vtpm-gcc10.patch~ 2020-06-07 17:54:17.000000000 +0200
30 +++ xen-4.13.1/stubdom/vtpm-gcc10.patch 2020-06-07 17:57:37.373200925 +0200
32 +--- tpm_emulator-x86_64/tpm/tpm_emulator_extern.h~ 2011-12-20 19:30:06.000000000 +0100
33 ++++ tpm_emulator-x86_64/tpm/tpm_emulator_extern.h 2020-06-07 17:52:04.278217629 +0200
38 +-void (*tpm_log)(int priority, const char *fmt, ...);
39 ++extern void (*tpm_log)(int priority, const char *fmt, ...);
41 + #if defined(_WIN32) || defined(_WIN64)
42 + #define __BFILE__ ((strrchr(__FILE__, '\\') ? : __FILE__ - 1) + 1)
44 + #define error(fmt, ...) tpm_log(TPM_LOG_ERROR, "%s:%d: Error: " fmt "\n", \
45 + __BFILE__, __LINE__, ## __VA_ARGS__)
46 + /* initialization */
47 +-int (*tpm_extern_init)(void);
48 +-void (*tpm_extern_release)(void);
49 ++extern int (*tpm_extern_init)(void);
50 ++extern void (*tpm_extern_release)(void);
52 + /* memory allocation */
54 +-void* (*tpm_malloc)(size_t size);
55 ++extern void* (*tpm_malloc)(size_t size);
57 +-void (*tpm_free)(/*const*/ void *ptr);
58 ++extern void (*tpm_free)(/*const*/ void *ptr);
60 + /* random numbers */
62 +-void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes);
63 ++extern void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes);
65 + /* usec since last call */
67 +-uint64_t (*tpm_get_ticks)(void);
68 ++extern uint64_t (*tpm_get_ticks)(void);
72 +-int (*tpm_write_to_storage)(uint8_t *data, size_t data_length);
73 +-int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length);
74 ++extern int (*tpm_write_to_storage)(uint8_t *data, size_t data_length);
75 ++extern int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length);
77 + #endif /* _TPM_EMULATOR_EXTERN_H_ */
79 --- xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.h.orig 2020-06-07 18:20:43.261215712 +0200
80 +++ xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.h 2020-06-07 18:20:56.731170041 +0200
82 #define RSA_KEY_SIZE 0x0800
83 #define RSA_CIPHER_SIZE (RSA_KEY_SIZE / 8)
90 struct tpm_hardware_version {
93 --- xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.c~ 2020-05-14 14:19:32.000000000 +0200
94 +++ xen-4.13.1/stubdom/vtpmmgr/vtpmmgr.c 2020-06-07 18:23:14.950766928 +0200
104 struct tpm_hardware_version hardware_version = {
105 .hw_version = TPM1_HARDWARE,