mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
xen: remove recipes for stubdoms and dependent components
Retiring these as the components are not in use and work on updating the recipes to build with the OE native tools rather than host tools has been discontinued. Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
abcdb5841d
commit
15caed2f43
|
@ -1,13 +0,0 @@
|
|||
Index: src/core/dhcp.c
|
||||
===================================================================
|
||||
--- a/src/core/dhcp.c
|
||||
+++ b/src/core/dhcp.c
|
||||
@@ -1356,7 +1358,7 @@ dhcp_create_request(struct netif *netif)
|
||||
dhcp->msg_out->giaddr.addr = 0;
|
||||
for (i = 0; i < DHCP_CHADDR_LEN; i++) {
|
||||
/* copy netif hardware address, pad with zeroes */
|
||||
- dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/;
|
||||
+ dhcp->msg_out->chaddr[i] = (i < (netif->hwaddr_len > NETIF_MAX_HWADDR_LEN ? NETIF_MAX_HWADDR_LEN : netif->hwaddr_len)) ? netif->hwaddr[i] : 0/* pad byte*/;
|
||||
}
|
||||
for (i = 0; i < DHCP_SNAME_LEN; i++) {
|
||||
dhcp->msg_out->sname[i] = 0;
|
File diff suppressed because it is too large
Load Diff
|
@ -1,155 +0,0 @@
|
|||
--- a/newlib/libc/stdio/fprintf_chk.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/newlib/libc/stdio/fprintf_chk.c 2009-02-26 19:02:53.000000000 -0500
|
||||
@@ -0,0 +1,21 @@
|
||||
+#include <stdarg.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+/*
|
||||
+ * Stub implementation of __fprintf_chk adapted from glibc 2.7. This
|
||||
+ * doesn't actually implement any buffer overflow protection. It just makes
|
||||
+ * the linker happy :)
|
||||
+*/
|
||||
+int
|
||||
+__fprintf_chk (FILE *fp, int flag, const char *format, ...)
|
||||
+{
|
||||
+ va_list ap;
|
||||
+ int done;
|
||||
+
|
||||
+ va_start (ap, format);
|
||||
+ done = vfprintf (fp, format, ap);
|
||||
+ va_end (ap);
|
||||
+
|
||||
+ return done;
|
||||
+}
|
||||
+
|
||||
--- a/newlib/libc/stdio/Makefile.am 2007-08-02 16:23:06.000000000 -0400
|
||||
+++ b/newlib/libc/stdio/Makefile.am 2009-02-26 18:14:53.000000000 -0500
|
||||
@@ -20,6 +20,7 @@
|
||||
flags.c \
|
||||
fopen.c \
|
||||
fprintf.c \
|
||||
+ fprintf_chk.c \
|
||||
fputc.c \
|
||||
fputs.c \
|
||||
fread.c \
|
||||
@@ -65,6 +66,7 @@
|
||||
sniprintf.c \
|
||||
snprintf.c \
|
||||
sprintf.c \
|
||||
+ sprintf_chk.c \
|
||||
sscanf.c \
|
||||
stdio.c \
|
||||
tmpfile.c \
|
||||
--- a/newlib/libc/stdio/Makefile.in 2007-12-19 17:36:38.000000000 -0500
|
||||
+++ b/newlib/libc/stdio/Makefile.in 2009-02-26 18:43:52.000000000 -0500
|
||||
@@ -63,7 +63,8 @@
|
||||
lib_a-fgets.$(OBJEXT) lib_a-fileno.$(OBJEXT) \
|
||||
lib_a-findfp.$(OBJEXT) lib_a-fiprintf.$(OBJEXT) \
|
||||
lib_a-flags.$(OBJEXT) lib_a-fopen.$(OBJEXT) \
|
||||
- lib_a-fprintf.$(OBJEXT) lib_a-fputc.$(OBJEXT) \
|
||||
+ lib_a-fprintf.$(OBJEXT) lib_a-fprintf_chk.$(OBJEXT) \
|
||||
+ lib_a-fputc.$(OBJEXT) \
|
||||
lib_a-fputs.$(OBJEXT) lib_a-fread.$(OBJEXT) \
|
||||
lib_a-freopen.$(OBJEXT) lib_a-fscanf.$(OBJEXT) \
|
||||
lib_a-fiscanf.$(OBJEXT) lib_a-fseek.$(OBJEXT) \
|
||||
@@ -86,6 +87,7 @@
|
||||
lib_a-setvbuf.$(OBJEXT) lib_a-siprintf.$(OBJEXT) \
|
||||
lib_a-siscanf.$(OBJEXT) lib_a-sniprintf.$(OBJEXT) \
|
||||
lib_a-snprintf.$(OBJEXT) lib_a-sprintf.$(OBJEXT) \
|
||||
+ lib_a-sprintf_chk.$(OBJEXT) \
|
||||
lib_a-sscanf.$(OBJEXT) lib_a-stdio.$(OBJEXT) \
|
||||
lib_a-tmpfile.$(OBJEXT) lib_a-tmpnam.$(OBJEXT) \
|
||||
lib_a-ungetc.$(OBJEXT) lib_a-vdiprintf.$(OBJEXT) \
|
||||
@@ -122,15 +124,15 @@
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
am__objects_4 = clearerr.lo fclose.lo fdopen.lo feof.lo ferror.lo \
|
||||
fflush.lo fgetc.lo fgetpos.lo fgets.lo fileno.lo findfp.lo \
|
||||
- fiprintf.lo flags.lo fopen.lo fprintf.lo fputc.lo fputs.lo \
|
||||
- fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \
|
||||
+ fiprintf.lo flags.lo fopen.lo fprintf.lo fprintf_chk.lo fputc.lo \
|
||||
+ fputs.lo fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \
|
||||
ftell.lo fvwrite.lo fwalk.lo fwrite.lo getc.lo getchar.lo \
|
||||
getc_u.lo getchar_u.lo getdelim.lo getline.lo gets.lo \
|
||||
iprintf.lo iscanf.lo makebuf.lo perror.lo printf.lo putc.lo \
|
||||
putchar.lo putc_u.lo putchar_u.lo puts.lo refill.lo remove.lo \
|
||||
rename.lo rewind.lo rget.lo scanf.lo sccl.lo setbuf.lo \
|
||||
setbuffer.lo setlinebuf.lo setvbuf.lo siprintf.lo siscanf.lo \
|
||||
- sniprintf.lo snprintf.lo sprintf.lo sscanf.lo stdio.lo \
|
||||
+ sniprintf.lo snprintf.lo sprintf.lo sprintf_chk.lo sscanf.lo stdio.lo \
|
||||
tmpfile.lo tmpnam.lo ungetc.lo vdiprintf.lo vdprintf.lo \
|
||||
viprintf.lo viscanf.lo vprintf.lo vscanf.lo vsiprintf.lo \
|
||||
vsiscanf.lo vsnprintf.lo vsniprintf.lo vsprintf.lo vsscanf.lo \
|
||||
@@ -344,6 +346,7 @@
|
||||
flags.c \
|
||||
fopen.c \
|
||||
fprintf.c \
|
||||
+ fprintf_chk.c \
|
||||
fputc.c \
|
||||
fputs.c \
|
||||
fread.c \
|
||||
@@ -389,6 +392,7 @@
|
||||
sniprintf.c \
|
||||
snprintf.c \
|
||||
sprintf.c \
|
||||
+ sprintf_chk.c \
|
||||
sscanf.c \
|
||||
stdio.c \
|
||||
tmpfile.c \
|
||||
@@ -508,6 +512,7 @@
|
||||
siprintf.def \
|
||||
siscanf.def \
|
||||
sprintf.def \
|
||||
+ sprintf_chk.def \
|
||||
sscanf.def \
|
||||
tmpfile.def \
|
||||
tmpnam.def \
|
||||
@@ -678,6 +683,12 @@
|
||||
lib_a-fprintf.obj: fprintf.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf.obj `if test -f 'fprintf.c'; then $(CYGPATH_W) 'fprintf.c'; else $(CYGPATH_W) '$(srcdir)/fprintf.c'; fi`
|
||||
|
||||
+lib_a-fprintf_chk.o: fprintf_chk.c
|
||||
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf_chk.o `test -f 'fprintf_chk.c' || echo '$(srcdir)/'`fprintf_chk.c
|
||||
+
|
||||
+lib_a-fprintf_chk.obj: fprintf_chk.c
|
||||
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf_chk.obj `if test -f 'fprintf_chk.c'; then $(CYGPATH_W) 'fprintf_chk.c'; else $(CYGPATH_W) '$(srcdir)/fprintf_chk.c'; fi`
|
||||
+
|
||||
lib_a-fputc.o: fputc.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc.o `test -f 'fputc.c' || echo '$(srcdir)/'`fputc.c
|
||||
|
||||
@@ -948,6 +959,12 @@
|
||||
lib_a-sprintf.obj: sprintf.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf.obj `if test -f 'sprintf.c'; then $(CYGPATH_W) 'sprintf.c'; else $(CYGPATH_W) '$(srcdir)/sprintf.c'; fi`
|
||||
|
||||
+lib_a-sprintf_chk.o: sprintf_chk.c
|
||||
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf_chk.o `test -f 'sprintf_chk.c' || echo '$(srcdir)/'`sprintf_chk.c
|
||||
+
|
||||
+lib_a-sprintf_chk.obj: sprintf_chk.c
|
||||
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf_chk.obj `if test -f 'sprintf_chk.c'; then $(CYGPATH_W) 'sprintf_chk.c'; else $(CYGPATH_W) '$(srcdir)/sprintf_chk.c'; fi`
|
||||
+
|
||||
lib_a-sscanf.o: sscanf.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sscanf.o `test -f 'sscanf.c' || echo '$(srcdir)/'`sscanf.c
|
||||
|
||||
--- a/newlib/libc/stdio/sprintf_chk.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ b/newlib/libc/stdio/sprintf_chk.c 2009-02-26 19:02:26.000000000 -0500
|
||||
@@ -0,0 +1,21 @@
|
||||
+#include <stdarg.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+/*
|
||||
+ * Stub implementation of __sprintf_chk adapted from glibc 2.7. This
|
||||
+ * doesn't actually implement any buffer overflow protection. It just makes
|
||||
+ * the linker happy :)
|
||||
+*/
|
||||
+int
|
||||
+__sprintf_chk (char *s, int flags, size_t slen, const char *format, ...)
|
||||
+{
|
||||
+ va_list arg;
|
||||
+ int done;
|
||||
+
|
||||
+ va_start (arg, format);
|
||||
+ done = vsprintf (s, format, arg);
|
||||
+ va_end (arg);
|
||||
+
|
||||
+ return done;
|
||||
+}
|
||||
+
|
|
@ -1,16 +0,0 @@
|
|||
--- a/newlib/libc/include/stdint.h.orig 2006-08-17 00:39:43.000000000 +0300
|
||||
+++ b/newlib/libc/include/stdint.h 2009-08-25 17:33:23.000000000 +0300
|
||||
@@ -348,8 +348,11 @@
|
||||
#endif
|
||||
|
||||
/* This must match size_t in stddef.h, currently long unsigned int */
|
||||
-#define SIZE_MIN (-__STDINT_EXP(LONG_MAX) - 1L)
|
||||
-#define SIZE_MAX __STDINT_EXP(LONG_MAX)
|
||||
+#ifdef __SIZE_MAX__
|
||||
+#define SIZE_MAX __SIZE_MAX__
|
||||
+#else
|
||||
+#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
|
||||
+#endif
|
||||
|
||||
/* This must match sig_atomic_t in <signal.h> (currently int) */
|
||||
#define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)
|
|
@ -1,727 +0,0 @@
|
|||
There is a mix between longs and long longs.
|
||||
|
||||
Index: newlib/libc/include/inttypes.h
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/newlib/libc/include/inttypes.h,v
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.3 inttypes.h
|
||||
--- a/newlib/libc/include/inttypes.h 16 Dec 2005 19:03:12 -0000 1.3
|
||||
+++ b/newlib/libc/include/inttypes.h 8 Nov 2007 16:32:44 -0000
|
||||
@@ -163,12 +163,12 @@
|
||||
|
||||
|
||||
/* 64-bit types */
|
||||
-#if __have_longlong64
|
||||
-#define __PRI64(x) __STRINGIFY(ll##x)
|
||||
-#define __SCN64(x) __STRINGIFY(ll##x)
|
||||
-#elif __have_long64
|
||||
+#if __have_long64
|
||||
#define __PRI64(x) __STRINGIFY(l##x)
|
||||
#define __SCN64(x) __STRINGIFY(l##x)
|
||||
+#elif __have_longlong64
|
||||
+#define __PRI64(x) __STRINGIFY(ll##x)
|
||||
+#define __SCN64(x) __STRINGIFY(ll##x)
|
||||
#else
|
||||
#define __PRI64(x) __STRINGIFY(x)
|
||||
#define __SCN64(x) __STRINGIFY(x)
|
||||
@@ -217,12 +217,12 @@
|
||||
#endif
|
||||
|
||||
/* max-bit types */
|
||||
-#if __have_longlong64
|
||||
-#define __PRIMAX(x) __STRINGIFY(ll##x)
|
||||
-#define __SCNMAX(x) __STRINGIFY(ll##x)
|
||||
-#elif __have_long64
|
||||
+#if __have_long64
|
||||
#define __PRIMAX(x) __STRINGIFY(l##x)
|
||||
#define __SCNMAX(x) __STRINGIFY(l##x)
|
||||
+#elif __have_longlong64
|
||||
+#define __PRIMAX(x) __STRINGIFY(ll##x)
|
||||
+#define __SCNMAX(x) __STRINGIFY(ll##x)
|
||||
#else
|
||||
#define __PRIMAX(x) __STRINGIFY(x)
|
||||
#define __SCNMAX(x) __STRINGIFY(x)
|
||||
@@ -242,12 +242,12 @@
|
||||
#define SCNxMAX __SCNMAX(x)
|
||||
|
||||
/* ptr types */
|
||||
-#if __have_longlong64
|
||||
-#define __PRIPTR(x) __STRINGIFY(ll##x)
|
||||
-#define __SCNPTR(x) __STRINGIFY(ll##x)
|
||||
-#elif __have_long64
|
||||
+#if __have_long64
|
||||
#define __PRIPTR(x) __STRINGIFY(l##x)
|
||||
#define __SCNPTR(x) __STRINGIFY(l##x)
|
||||
+#elif __have_longlong64
|
||||
+#define __PRIPTR(x) __STRINGIFY(ll##x)
|
||||
+#define __SCNPTR(x) __STRINGIFY(ll##x)
|
||||
#else
|
||||
#define __PRIPTR(x) __STRINGIFY(x)
|
||||
#define __SCNPTR(x) __STRINGIFY(x)
|
||||
|
||||
We don't want u?int32_t to be long as our code assume in a lot of places to be
|
||||
int.
|
||||
|
||||
Index: newlib/libc/include/stdint.h
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/newlib/libc/include/stdint.h,v
|
||||
retrieving revision 1.10
|
||||
diff -u -p -r1.10 stdint.h
|
||||
--- a/newlib/libc/include/stdint.h 16 Aug 2006 21:39:43 -0000 1.10
|
||||
+++ b/newlib/libc/include/stdint.h 12 Feb 2008 13:07:52 -0000
|
||||
@@ -38,7 +38,7 @@ extern "C" {
|
||||
#if __STDINT_EXP(LONG_MAX) > 0x7fffffff
|
||||
#define __have_long64 1
|
||||
#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
|
||||
-#define __have_long32 1
|
||||
+/* #define __have_long32 1 */
|
||||
#endif
|
||||
|
||||
#if __STDINT_EXP(SCHAR_MAX) == 0x7f
|
||||
|
||||
Define the basic ia64 jump buffer
|
||||
|
||||
Index: newlib/libc/include/sys/config.h
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v
|
||||
retrieving revision 1.47
|
||||
diff -u -p -r1.47 config.h
|
||||
--- a/newlib/libc/include/sys/config.h 15 Mar 2007 21:32:12 -0000 1.47
|
||||
+++ b/newlib/libc/include/sys/config.h 8 Nov 2007 16:32:44 -0000
|
||||
@@ -71,6 +71,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifndef __DYNAMIC_REENT__
|
||||
+#define __DYNAMIC_REENT__
|
||||
+#endif
|
||||
+
|
||||
#ifdef __mn10200__
|
||||
#define __SMALL_BITFIELDS
|
||||
#endif
|
||||
|
||||
Dynamic pointer to our reentrancy zone
|
||||
|
||||
Index: newlib/libc/reent/getreent.c
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/newlib/libc/reent/getreent.c,v
|
||||
retrieving revision 1.2
|
||||
diff -u -p -r1.2 getreent.c
|
||||
--- a/newlib/libc/reent/getreent.c 7 Sep 2007 00:45:55 -0000 1.2
|
||||
+++ b/newlib/libc/reent/getreent.c 8 Nov 2007 16:32:44 -0000
|
||||
@@ -3,12 +3,20 @@
|
||||
#include <_ansi.h>
|
||||
#include <reent.h>
|
||||
|
||||
+#define weak_alias(name, aliasname) \
|
||||
+ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
|
||||
+
|
||||
#ifdef __getreent
|
||||
#undef __getreent
|
||||
#endif
|
||||
+#ifdef __libc_getreent
|
||||
+#undef __libc_getreent
|
||||
+#endif
|
||||
|
||||
struct _reent *
|
||||
-_DEFUN_VOID(__getreent)
|
||||
+__libc_getreent (void)
|
||||
{
|
||||
return _impure_ptr;
|
||||
}
|
||||
+weak_alias(__libc_getreent,__getreent)
|
||||
+
|
||||
|
||||
We can't provide a red zone in mini-os.
|
||||
|
||||
Index: newlib/libc/machine/x86_64/memcpy.S
|
||||
===================================================================
|
||||
RCS file: /cvs/src/src/newlib/libc/machine/x86_64/memcpy.S,v
|
||||
retrieving revision 1.1
|
||||
diff -u -p -r1.1 memcpy.S
|
||||
--- a/newlib/libc/machine/x86_64/memcpy.S 28 Aug 2007 21:56:49 -0000 1.1
|
||||
+++ b/newlib/libc/machine/x86_64/memcpy.S 8 Nov 2007 16:32:44 -0000
|
||||
@@ -30,10 +30,18 @@ quadword_aligned:
|
||||
cmpq $256, rdx
|
||||
jb quadword_copy
|
||||
|
||||
+#if 1
|
||||
+ subq $32, rsp
|
||||
+ movq rax, 24 (rsp)
|
||||
+ movq r12, 16 (rsp)
|
||||
+ movq r13, 8 (rsp)
|
||||
+ movq r14, 0 (rsp)
|
||||
+#else
|
||||
movq rax, -8 (rsp)
|
||||
movq r12, -16 (rsp)
|
||||
movq r13, -24 (rsp)
|
||||
movq r14, -32 (rsp)
|
||||
+#endif
|
||||
|
||||
movq rdx, rcx /* Copy 128 bytes at a time with minimum cache polution */
|
||||
shrq $7, rcx
|
||||
@@ -89,10 +97,18 @@ loop:
|
||||
movq rdx, rcx
|
||||
andq $127, rcx
|
||||
rep movsb
|
||||
+#if 1
|
||||
+ movq 24 (rsp), rax
|
||||
+ movq 16 (rsp), r12
|
||||
+ movq 8 (rsp), r13
|
||||
+ movq 0 (rsp), r14
|
||||
+ addq $32, rsp
|
||||
+#else
|
||||
movq -8 (rsp), rax
|
||||
movq -16 (rsp), r12
|
||||
movq -24 (rsp), r13
|
||||
movq -32 (rsp), r14
|
||||
+#endif
|
||||
ret
|
||||
|
||||
|
||||
--- a/newlib/libc/machine/x86_64/x86_64mach.h.orig 2008-07-11 14:57:23.062269000 +0100
|
||||
+++ b/newlib/libc/machine/x86_64/x86_64mach.h 2008-07-11 14:58:01.262503000 +0100
|
||||
@@ -22,81 +22,81 @@
|
||||
|
||||
#define REG(x) CONCAT1(__REG_PREFIX__, x)
|
||||
|
||||
-#define rax REG(rax)
|
||||
-#define rbx REG(rbx)
|
||||
-#define rcx REG(rcx)
|
||||
-#define rdx REG(rdx)
|
||||
-#define rsi REG(rsi)
|
||||
-#define rdi REG(rdi)
|
||||
-#define rbp REG(rbp)
|
||||
-#define rsp REG(rsp)
|
||||
-
|
||||
-#define r8 REG(r8)
|
||||
-#define r9 REG(r9)
|
||||
-#define r10 REG(r10)
|
||||
-#define r11 REG(r11)
|
||||
-#define r12 REG(r12)
|
||||
-#define r13 REG(r13)
|
||||
-#define r14 REG(r14)
|
||||
-#define r15 REG(r15)
|
||||
-
|
||||
-#define eax REG(eax)
|
||||
-#define ebx REG(ebx)
|
||||
-#define ecx REG(ecx)
|
||||
-#define edx REG(edx)
|
||||
-#define esi REG(esi)
|
||||
-#define edi REG(edi)
|
||||
-#define ebp REG(ebp)
|
||||
-#define esp REG(esp)
|
||||
-
|
||||
-#define st0 REG(st)
|
||||
-#define st1 REG(st(1))
|
||||
-#define st2 REG(st(2))
|
||||
-#define st3 REG(st(3))
|
||||
-#define st4 REG(st(4))
|
||||
-#define st5 REG(st(5))
|
||||
-#define st6 REG(st(6))
|
||||
-#define st7 REG(st(7))
|
||||
-
|
||||
-#define ax REG(ax)
|
||||
-#define bx REG(bx)
|
||||
-#define cx REG(cx)
|
||||
-#define dx REG(dx)
|
||||
-
|
||||
-#define ah REG(ah)
|
||||
-#define bh REG(bh)
|
||||
-#define ch REG(ch)
|
||||
-#define dh REG(dh)
|
||||
-
|
||||
-#define al REG(al)
|
||||
-#define bl REG(bl)
|
||||
-#define cl REG(cl)
|
||||
-#define dl REG(dl)
|
||||
-
|
||||
-#define sil REG(sil)
|
||||
-
|
||||
-#define mm1 REG(mm1)
|
||||
-#define mm2 REG(mm2)
|
||||
-#define mm3 REG(mm3)
|
||||
-#define mm4 REG(mm4)
|
||||
-#define mm5 REG(mm5)
|
||||
-#define mm6 REG(mm6)
|
||||
-#define mm7 REG(mm7)
|
||||
-
|
||||
-#define xmm0 REG(xmm0)
|
||||
-#define xmm1 REG(xmm1)
|
||||
-#define xmm2 REG(xmm2)
|
||||
-#define xmm3 REG(xmm3)
|
||||
-#define xmm4 REG(xmm4)
|
||||
-#define xmm5 REG(xmm5)
|
||||
-#define xmm6 REG(xmm6)
|
||||
-#define xmm7 REG(xmm7)
|
||||
-
|
||||
-#define cr0 REG(cr0)
|
||||
-#define cr1 REG(cr1)
|
||||
-#define cr2 REG(cr2)
|
||||
-#define cr3 REG(cr3)
|
||||
-#define cr4 REG(cr4)
|
||||
+#define rax %rax
|
||||
+#define rbx %rbx
|
||||
+#define rcx %rcx
|
||||
+#define rdx %rdx
|
||||
+#define rsi %rsi
|
||||
+#define rdi %rdi
|
||||
+#define rbp %rbp
|
||||
+#define rsp %rsp
|
||||
+
|
||||
+#define r8 %r8
|
||||
+#define r9 %r9
|
||||
+#define r10 %r10
|
||||
+#define r11 %r11
|
||||
+#define r12 %r12
|
||||
+#define r13 %r13
|
||||
+#define r14 %r14
|
||||
+#define r15 %r15
|
||||
+
|
||||
+#define eax %eax
|
||||
+#define ebx %ebx
|
||||
+#define ecx %ecx
|
||||
+#define edx %edx
|
||||
+#define esi %esi
|
||||
+#define edi %edi
|
||||
+#define ebp %ebp
|
||||
+#define esp %esp
|
||||
+
|
||||
+#define st0 %st
|
||||
+#define st1 %st(1)
|
||||
+#define st2 %st(2)
|
||||
+#define st3 %st(3)
|
||||
+#define st4 %st(4)
|
||||
+#define st5 %st(5)
|
||||
+#define st6 %st(6)
|
||||
+#define st7 %st(7)
|
||||
+
|
||||
+#define ax %ax
|
||||
+#define bx %bx
|
||||
+#define cx %cx
|
||||
+#define dx %dx
|
||||
+
|
||||
+#define ah %ah
|
||||
+#define bh %bh
|
||||
+#define ch %ch
|
||||
+#define dh %dh
|
||||
+
|
||||
+#define al %al
|
||||
+#define bl %bl
|
||||
+#define cl %cl
|
||||
+#define dl %dl
|
||||
+
|
||||
+#define sil %sil
|
||||
+
|
||||
+#define mm1 %mm1
|
||||
+#define mm2 %mm2
|
||||
+#define mm3 %mm3
|
||||
+#define mm4 %mm4
|
||||
+#define mm5 %mm5
|
||||
+#define mm6 %mm6
|
||||
+#define mm7 %mm7
|
||||
+
|
||||
+#define xmm0 %xmm0
|
||||
+#define xmm1 %xmm1
|
||||
+#define xmm2 %xmm2
|
||||
+#define xmm3 %xmm3
|
||||
+#define xmm4 %xmm4
|
||||
+#define xmm5 %xmm5
|
||||
+#define xmm6 %xmm6
|
||||
+#define xmm7 %xmm7
|
||||
+
|
||||
+#define cr0 %cr0
|
||||
+#define cr1 %cr1
|
||||
+#define cr2 %cr2
|
||||
+#define cr3 %cr3
|
||||
+#define cr4 %cr4
|
||||
|
||||
#ifdef _I386MACH_NEED_SOTYPE_FUNCTION
|
||||
#define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
|
||||
--- a/newlib/libc/machine/x86_64/memcpy.S.orig 2008-07-11 15:12:27.494693000 +0100
|
||||
+++ b/newlib/libc/machine/x86_64/memcpy.S 2008-07-11 15:12:29.448706000 +0100
|
||||
@@ -60,14 +60,14 @@
|
||||
movq 48 (rsi), r13
|
||||
movq 56 (rsi), r14
|
||||
|
||||
- movntiq rax, (rdi)
|
||||
- movntiq r8 , 8 (rdi)
|
||||
- movntiq r9 , 16 (rdi)
|
||||
- movntiq r10, 24 (rdi)
|
||||
- movntiq r11, 32 (rdi)
|
||||
- movntiq r12, 40 (rdi)
|
||||
- movntiq r13, 48 (rdi)
|
||||
- movntiq r14, 56 (rdi)
|
||||
+ movnti rax, (rdi)
|
||||
+ movnti r8 , 8 (rdi)
|
||||
+ movnti r9 , 16 (rdi)
|
||||
+ movnti r10, 24 (rdi)
|
||||
+ movnti r11, 32 (rdi)
|
||||
+ movnti r12, 40 (rdi)
|
||||
+ movnti r13, 48 (rdi)
|
||||
+ movnti r14, 56 (rdi)
|
||||
|
||||
movq 64 (rsi), rax
|
||||
movq 72 (rsi), r8
|
||||
@@ -78,14 +78,14 @@
|
||||
movq 112 (rsi), r13
|
||||
movq 120 (rsi), r14
|
||||
|
||||
- movntiq rax, 64 (rdi)
|
||||
- movntiq r8 , 72 (rdi)
|
||||
- movntiq r9 , 80 (rdi)
|
||||
- movntiq r10, 88 (rdi)
|
||||
- movntiq r11, 96 (rdi)
|
||||
- movntiq r12, 104 (rdi)
|
||||
- movntiq r13, 112 (rdi)
|
||||
- movntiq r14, 120 (rdi)
|
||||
+ movnti rax, 64 (rdi)
|
||||
+ movnti r8 , 72 (rdi)
|
||||
+ movnti r9 , 80 (rdi)
|
||||
+ movnti r10, 88 (rdi)
|
||||
+ movnti r11, 96 (rdi)
|
||||
+ movnti r12, 104 (rdi)
|
||||
+ movnti r13, 112 (rdi)
|
||||
+ movnti r14, 120 (rdi)
|
||||
|
||||
leaq 128 (rsi), rsi
|
||||
leaq 128 (rdi), rdi
|
||||
--- a/newlib/libc/machine/i386/i386mach.h 2000-08-28 18:50:06.000000000 +0100
|
||||
+++ b/newlib/libc/machine/i386/i386mach.h 2008-07-11 15:17:13.874409000 +0100
|
||||
@@ -27,46 +27,46 @@
|
||||
|
||||
#define REG(x) CONCAT1(__REG_PREFIX__, x)
|
||||
|
||||
-#define eax REG(eax)
|
||||
-#define ebx REG(ebx)
|
||||
-#define ecx REG(ecx)
|
||||
-#define edx REG(edx)
|
||||
-#define esi REG(esi)
|
||||
-#define edi REG(edi)
|
||||
-#define ebp REG(ebp)
|
||||
-#define esp REG(esp)
|
||||
-
|
||||
-#define st0 REG(st)
|
||||
-#define st1 REG(st(1))
|
||||
-#define st2 REG(st(2))
|
||||
-#define st3 REG(st(3))
|
||||
-#define st4 REG(st(4))
|
||||
-#define st5 REG(st(5))
|
||||
-#define st6 REG(st(6))
|
||||
-#define st7 REG(st(7))
|
||||
-
|
||||
-#define ax REG(ax)
|
||||
-#define bx REG(bx)
|
||||
-#define cx REG(cx)
|
||||
-#define dx REG(dx)
|
||||
-
|
||||
-#define ah REG(ah)
|
||||
-#define bh REG(bh)
|
||||
-#define ch REG(ch)
|
||||
-#define dh REG(dh)
|
||||
-
|
||||
-#define al REG(al)
|
||||
-#define bl REG(bl)
|
||||
-#define cl REG(cl)
|
||||
-#define dl REG(dl)
|
||||
-
|
||||
-#define mm1 REG(mm1)
|
||||
-#define mm2 REG(mm2)
|
||||
-#define mm3 REG(mm3)
|
||||
-#define mm4 REG(mm4)
|
||||
-#define mm5 REG(mm5)
|
||||
-#define mm6 REG(mm6)
|
||||
-#define mm7 REG(mm7)
|
||||
+#define eax %eax
|
||||
+#define ebx %ebx
|
||||
+#define ecx %ecx
|
||||
+#define edx %edx
|
||||
+#define esi %esi
|
||||
+#define edi %edi
|
||||
+#define ebp %ebp
|
||||
+#define esp %esp
|
||||
+
|
||||
+#define st0 %st
|
||||
+#define st1 %st(1)
|
||||
+#define st2 %st(2)
|
||||
+#define st3 %st(3)
|
||||
+#define st4 %st(4)
|
||||
+#define st5 %st(5)
|
||||
+#define st6 %st(6)
|
||||
+#define st7 %st(7)
|
||||
+
|
||||
+#define ax %ax
|
||||
+#define bx %bx
|
||||
+#define cx %cx
|
||||
+#define dx %dx
|
||||
+
|
||||
+#define ah %ah
|
||||
+#define bh %bh
|
||||
+#define ch %ch
|
||||
+#define dh %dh
|
||||
+
|
||||
+#define al %al
|
||||
+#define bl %bl
|
||||
+#define cl %cl
|
||||
+#define dl %dl
|
||||
+
|
||||
+#define mm1 %mm1
|
||||
+#define mm2 %mm2
|
||||
+#define mm3 %mm3
|
||||
+#define mm4 %mm4
|
||||
+#define mm5 %mm5
|
||||
+#define mm6 %mm6
|
||||
+#define mm7 %mm7
|
||||
|
||||
#ifdef _I386MACH_NEED_SOTYPE_FUNCTION
|
||||
#define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
|
||||
--- a/newlib/libc/machine/x86_64/memset.S 2007-08-28 22:56:49.000000000 +0100
|
||||
+++ b/newlib/libc/machine/x86_64/memset.S 2008-07-11 15:16:59.098320000 +0100
|
||||
@@ -40,22 +40,22 @@
|
||||
|
||||
.p2align 4
|
||||
loop:
|
||||
- movntiq rax, (rdi)
|
||||
- movntiq rax, 8 (rdi)
|
||||
- movntiq rax, 16 (rdi)
|
||||
- movntiq rax, 24 (rdi)
|
||||
- movntiq rax, 32 (rdi)
|
||||
- movntiq rax, 40 (rdi)
|
||||
- movntiq rax, 48 (rdi)
|
||||
- movntiq rax, 56 (rdi)
|
||||
- movntiq rax, 64 (rdi)
|
||||
- movntiq rax, 72 (rdi)
|
||||
- movntiq rax, 80 (rdi)
|
||||
- movntiq rax, 88 (rdi)
|
||||
- movntiq rax, 96 (rdi)
|
||||
- movntiq rax, 104 (rdi)
|
||||
- movntiq rax, 112 (rdi)
|
||||
- movntiq rax, 120 (rdi)
|
||||
+ movnti rax, (rdi)
|
||||
+ movnti rax, 8 (rdi)
|
||||
+ movnti rax, 16 (rdi)
|
||||
+ movnti rax, 24 (rdi)
|
||||
+ movnti rax, 32 (rdi)
|
||||
+ movnti rax, 40 (rdi)
|
||||
+ movnti rax, 48 (rdi)
|
||||
+ movnti rax, 56 (rdi)
|
||||
+ movnti rax, 64 (rdi)
|
||||
+ movnti rax, 72 (rdi)
|
||||
+ movnti rax, 80 (rdi)
|
||||
+ movnti rax, 88 (rdi)
|
||||
+ movnti rax, 96 (rdi)
|
||||
+ movnti rax, 104 (rdi)
|
||||
+ movnti rax, 112 (rdi)
|
||||
+ movnti rax, 120 (rdi)
|
||||
|
||||
leaq 128 (rdi), rdi
|
||||
|
||||
--- a/newlib/libm/machine/i386/i386mach.h.orig 2008-07-11 15:30:37.367227000 +0100
|
||||
+++ b/newlib/libm/machine/i386/i386mach.h 2008-07-11 15:30:55.232337000 +0100
|
||||
@@ -27,46 +27,46 @@
|
||||
|
||||
#define REG(x) CONCAT1(__REG_PREFIX__, x)
|
||||
|
||||
-#define eax REG(eax)
|
||||
-#define ebx REG(ebx)
|
||||
-#define ecx REG(ecx)
|
||||
-#define edx REG(edx)
|
||||
-#define esi REG(esi)
|
||||
-#define edi REG(edi)
|
||||
-#define ebp REG(ebp)
|
||||
-#define esp REG(esp)
|
||||
-
|
||||
-#define st0 REG(st)
|
||||
-#define st1 REG(st(1))
|
||||
-#define st2 REG(st(2))
|
||||
-#define st3 REG(st(3))
|
||||
-#define st4 REG(st(4))
|
||||
-#define st5 REG(st(5))
|
||||
-#define st6 REG(st(6))
|
||||
-#define st7 REG(st(7))
|
||||
-
|
||||
-#define ax REG(ax)
|
||||
-#define bx REG(bx)
|
||||
-#define cx REG(cx)
|
||||
-#define dx REG(dx)
|
||||
-
|
||||
-#define ah REG(ah)
|
||||
-#define bh REG(bh)
|
||||
-#define ch REG(ch)
|
||||
-#define dh REG(dh)
|
||||
-
|
||||
-#define al REG(al)
|
||||
-#define bl REG(bl)
|
||||
-#define cl REG(cl)
|
||||
-#define dl REG(dl)
|
||||
-
|
||||
-#define mm1 REG(mm1)
|
||||
-#define mm2 REG(mm2)
|
||||
-#define mm3 REG(mm3)
|
||||
-#define mm4 REG(mm4)
|
||||
-#define mm5 REG(mm5)
|
||||
-#define mm6 REG(mm6)
|
||||
-#define mm7 REG(mm7)
|
||||
+#define eax %eax
|
||||
+#define ebx %ebx
|
||||
+#define ecx %ecx
|
||||
+#define edx %edx
|
||||
+#define esi %esi
|
||||
+#define edi %edi
|
||||
+#define ebp %ebp
|
||||
+#define esp %esp
|
||||
+
|
||||
+#define st0 %st
|
||||
+#define st1 %st(1)
|
||||
+#define st2 %st(2)
|
||||
+#define st3 %st(3)
|
||||
+#define st4 %st(4)
|
||||
+#define st5 %st(5)
|
||||
+#define st6 %st(6)
|
||||
+#define st7 %st(7)
|
||||
+
|
||||
+#define ax %ax
|
||||
+#define bx %bx
|
||||
+#define cx %cx
|
||||
+#define dx %dx
|
||||
+
|
||||
+#define ah %ah
|
||||
+#define bh %bh
|
||||
+#define ch %ch
|
||||
+#define dh %dh
|
||||
+
|
||||
+#define al %al
|
||||
+#define bl %bl
|
||||
+#define cl %cl
|
||||
+#define dl %dl
|
||||
+
|
||||
+#define mm1 %mm1
|
||||
+#define mm2 %mm2
|
||||
+#define mm3 %mm3
|
||||
+#define mm4 %mm4
|
||||
+#define mm5 %mm5
|
||||
+#define mm6 %mm6
|
||||
+#define mm7 %mm7
|
||||
|
||||
#ifdef _I386MACH_NEED_SOTYPE_FUNCTION
|
||||
#define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
|
||||
|
||||
|
||||
We want to have a 64bit offsets libc even on 32bit platforms.
|
||||
|
||||
--- ./newlib/configure.host.orig 2008-08-07 16:01:17.801946000 +0100
|
||||
+++ ./newlib/configure.host 2008-08-07 16:01:34.181064000 +0100
|
||||
@@ -317,6 +317,8 @@
|
||||
oext=lo
|
||||
lpfx=
|
||||
aext=la ;;
|
||||
+ i[34567]86-xen-elf)
|
||||
+ stdio64_dir=stdio64 ;;
|
||||
*) ;; #shared library not supported for ${host}
|
||||
esac
|
||||
|
||||
--- a/newlib/libc/include/sys/_types.h.orig 2008-08-07 15:22:44.925008000 +0100
|
||||
+++ b/newlib/libc/include/sys/_types.h 2008-08-07 15:22:50.824044000 +0100
|
||||
@@ -13,8 +13,12 @@
|
||||
#include <sys/lock.h>
|
||||
|
||||
#ifndef __off_t_defined
|
||||
+#ifdef __MINIOS__
|
||||
+typedef long long _off_t;
|
||||
+#else
|
||||
typedef long _off_t;
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(__rtems__)
|
||||
/* device numbers are 32-bit major and and 32-bit minor */
|
||||
--- ./newlib/libc/include/sys/config.h.orig 2008-08-07 14:43:25.915866000 +0100
|
||||
+++ ./newlib/libc/include/sys/config.h 2008-08-07 14:44:13.508154000 +0100
|
||||
@@ -69,6 +69,10 @@
|
||||
/* we use some glibc header files so turn on glibc large file feature */
|
||||
#define _LARGEFILE64_SOURCE 1
|
||||
#endif
|
||||
+#ifdef __MINIOS__
|
||||
+#define __LARGE64_FILES 1
|
||||
+#define _LARGEFILE64_SOURCE 1
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifndef __DYNAMIC_REENT__
|
||||
--- ./newlib/libc/include/sys/_default_fcntl.h.orig 2008-08-07 15:08:22.377836000 +0100
|
||||
+++ ./newlib/libc/include/sys/_default_fcntl.h 2008-08-07 15:08:31.651890000 +0100
|
||||
@@ -170,7 +170,11 @@
|
||||
/* Provide _<systemcall> prototypes for functions provided by some versions
|
||||
of newlib. */
|
||||
#ifdef _COMPILING_NEWLIB
|
||||
-extern int _open _PARAMS ((const char *, int, ...));
|
||||
+extern int _open _PARAMS ((const char *, int, ...))
|
||||
+#ifdef __MINIOS__
|
||||
+ asm("open64")
|
||||
+#endif
|
||||
+ ;
|
||||
extern int _fcntl _PARAMS ((int, int, ...));
|
||||
#ifdef __LARGE64_FILES
|
||||
extern int _open64 _PARAMS ((const char *, int, ...));
|
||||
--- ./newlib/libc/include/sys/unistd.h.orig 2008-08-07 15:09:36.449280000 +0100
|
||||
+++ ./newlib/libc/include/sys/unistd.h 2008-08-07 15:09:51.210370000 +0100
|
||||
@@ -101,7 +101,11 @@
|
||||
int _EXFUN(link, (const char *__path1, const char *__path2 ));
|
||||
int _EXFUN(nice, (int __nice_value ));
|
||||
#if !defined(__INSIDE_CYGWIN__)
|
||||
-off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
|
||||
+off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ))
|
||||
+#ifdef __MINIOS__
|
||||
+ asm("lseek64")
|
||||
+#endif
|
||||
+ ;
|
||||
#endif
|
||||
#if defined(__SPU__)
|
||||
#define F_ULOCK 0
|
||||
--- ./newlib/libc/include/sys/stat.h.orig 2008-08-07 16:08:50.495116000 +0100
|
||||
+++ ./newlib/libc/include/sys/stat.h 2008-08-07 16:10:21.799753000 +0100
|
||||
@@ -49,6 +49,9 @@
|
||||
long st_spare4[2];
|
||||
#endif
|
||||
};
|
||||
+#ifdef __MINIOS__
|
||||
+#define stat64 stat
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#define _IFMT 0170000 /* type of file */
|
||||
@@ -132,7 +135,11 @@
|
||||
/* Provide prototypes for most of the _<systemcall> names that are
|
||||
provided in newlib for some compilers. */
|
||||
#ifdef _COMPILING_NEWLIB
|
||||
-int _EXFUN(_fstat,( int __fd, struct stat *__sbuf ));
|
||||
+int _EXFUN(_fstat,( int __fd, struct stat *__sbuf ))
|
||||
+#ifdef __MINIOS__
|
||||
+ asm("fstat64")
|
||||
+#endif
|
||||
+ ;
|
||||
int _EXFUN(_stat,( const char *__path, struct stat *__sbuf ));
|
||||
#ifdef __LARGE64_FILES
|
||||
struct stat64;
|
||||
--- ./newlib/libc/include/_syslist.h.orig 2008-08-07 16:24:19.122605000 +0100
|
||||
+++ ./newlib/libc/include/_syslist.h 2008-08-07 16:24:21.548628000 +0100
|
||||
@@ -14,6 +14,7 @@
|
||||
#define _kill kill
|
||||
#define _link link
|
||||
#define _lseek lseek
|
||||
+#define _lseek64 lseek64
|
||||
#define _open open
|
||||
#define _read read
|
||||
#define _sbrk sbrk
|
||||
--- a/newlib/libc/include/reent.h.orig 2008-08-07 16:28:49.846502000 +0100
|
||||
+++ b/newlib/libc/include/reent.h 2008-08-07 16:29:02.096586000 +0100
|
||||
@@ -87,6 +87,9 @@
|
||||
#if defined(__CYGWIN__) && defined(_COMPILING_NEWLIB)
|
||||
#define stat64 __stat64
|
||||
#endif
|
||||
+#if defined(__MINIOS__)
|
||||
+#define stat64 stat
|
||||
+#endif
|
||||
|
||||
struct stat64;
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
diff -Naur polarssl-1.1.4/include/polarssl/config.h polarssl-x86_64/include/polarssl/config.h
|
||||
--- a/include/polarssl/config.h 2011-12-22 05:06:27.000000000 -0500
|
||||
+++ b/include/polarssl/config.h 2012-10-30 17:18:07.567001000 -0400
|
||||
@@ -164,8 +164,8 @@
|
||||
* application.
|
||||
*
|
||||
* Uncomment this macro to prevent loading of default entropy functions.
|
||||
-#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
|
||||
*/
|
||||
+#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
|
||||
|
||||
/**
|
||||
* \def POLARSSL_NO_PLATFORM_ENTROPY
|
||||
@@ -175,8 +175,8 @@
|
||||
* standards like the /dev/urandom or Windows CryptoAPI.
|
||||
*
|
||||
* Uncomment this macro to disable the built-in platform entropy functions.
|
||||
-#define POLARSSL_NO_PLATFORM_ENTROPY
|
||||
*/
|
||||
+#define POLARSSL_NO_PLATFORM_ENTROPY
|
||||
|
||||
/**
|
||||
* \def POLARSSL_PKCS1_V21
|
||||
@@ -426,8 +426,8 @@
|
||||
* Requires: POLARSSL_TIMING_C
|
||||
*
|
||||
* This module enables the HAVEGE random number generator.
|
||||
- */
|
||||
#define POLARSSL_HAVEGE_C
|
||||
+ */
|
||||
|
||||
/**
|
||||
* \def POLARSSL_MD_C
|
||||
@@ -490,7 +490,7 @@
|
||||
*
|
||||
* This module provides TCP/IP networking routines.
|
||||
*/
|
||||
-#define POLARSSL_NET_C
|
||||
+//#define POLARSSL_NET_C
|
||||
|
||||
/**
|
||||
* \def POLARSSL_PADLOCK_C
|
||||
@@ -644,8 +644,8 @@
|
||||
* Caller: library/havege.c
|
||||
*
|
||||
* This module is used by the HAVEGE random number generator.
|
||||
- */
|
||||
#define POLARSSL_TIMING_C
|
||||
+ */
|
||||
|
||||
/**
|
||||
* \def POLARSSL_VERSION_C
|
||||
diff -Naur polarssl-1.1.4/library/bignum.c polarssl-x86_64/library/bignum.c
|
||||
--- a/library/bignum.c 2012-04-29 16:15:55.000000000 -0400
|
||||
+++ b/library/bignum.c 2012-10-30 17:21:52.135000999 -0400
|
||||
@@ -1101,7 +1101,7 @@
|
||||
Z.p[i - t - 1] = ~0;
|
||||
else
|
||||
{
|
||||
-#if defined(POLARSSL_HAVE_LONGLONG)
|
||||
+#if 0 //defined(POLARSSL_HAVE_LONGLONG)
|
||||
t_udbl r;
|
||||
|
||||
r = (t_udbl) X.p[i] << biL;
|
|
@ -1,12 +0,0 @@
|
|||
diff -Naur tpm_emulator-x86_64-back/tpm/tpm_emulator_extern.c tpm_emulator-x86_64/tpm/tpm_emulator_extern.c
|
||||
--- a/tpm/tpm_emulator_extern.c 2012-04-27 10:55:46.581963398 -0400
|
||||
+++ b/tpm/tpm_emulator_extern.c 2012-04-27 10:56:02.193034152 -0400
|
||||
@@ -249,7 +249,7 @@
|
||||
#else /* TPM_NO_EXTERN */
|
||||
|
||||
int (*tpm_extern_init)(void) = NULL;
|
||||
-int (*tpm_extern_release)(void) = NULL;
|
||||
+void (*tpm_extern_release)(void) = NULL;
|
||||
void* (*tpm_malloc)(size_t size) = NULL;
|
||||
void (*tpm_free)(/*const*/ void *ptr) = NULL;
|
||||
void (*tpm_log)(int priority, const char *fmt, ...) = NULL;
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/config.h.in b/config.h.in
|
||||
index d16a997..8088a2a 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -27,7 +27,7 @@
|
||||
#define TPM_STORAGE_NAME "${TPM_STORAGE_NAME}"
|
||||
#define TPM_DEVICE_NAME "${TPM_DEVICE_NAME}"
|
||||
#define TPM_LOG_FILE "${TPM_LOG_FILE}"
|
||||
-#define TPM_CMD_BUF_SIZE 4096
|
||||
+#define TPM_CMD_BUF_SIZE 4088
|
||||
|
||||
#endif /* _CONFIG_H_ */
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
CMakeLists.txt | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: tpm_emulator-x86_64/CMakeLists.txt
|
||||
===================================================================
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -40,10 +40,11 @@ set(TPM_STORAGE_NAME "/var/lib/tpm/tpm_e
|
||||
set(TPM_DEVICE_NAME "/dev/tpm")
|
||||
endif()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
-add_definitions(-Wall -Werror -Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings)
|
||||
+add_definitions(-Wall -Werror)
|
||||
if("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
add_definitions(-Wextra)
|
||||
endif()
|
||||
+add_definitions(-Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings)
|
||||
if(USE_OPENSSL)
|
||||
add_definitions(-DUSE_OPENSSL)
|
||||
endif()
|
|
@ -1,127 +0,0 @@
|
|||
diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
|
||||
index 69511d1..7545d51 100644
|
||||
--- a/tpm/tpm_cmd_handler.c
|
||||
+++ b/tpm/tpm_cmd_handler.c
|
||||
@@ -3347,12 +3347,13 @@ static TPM_RESULT execute_TPM_DeepQuote(TPM_REQUEST *req, TPM_RESPONSE *rsp)
|
||||
{
|
||||
TPM_NONCE nonce;
|
||||
TPM_RESULT res;
|
||||
- UINT32 sigSize;
|
||||
- BYTE *sig;
|
||||
+ UINT32 quote_blob_size;
|
||||
+ BYTE *quote_blob;
|
||||
BYTE *ptr;
|
||||
UINT32 len;
|
||||
TPM_PCR_SELECTION myPCR;
|
||||
TPM_PCR_SELECTION ptPCR;
|
||||
+ UINT32 extraInfoFlags = 0;
|
||||
|
||||
tpm_compute_in_param_digest(req);
|
||||
|
||||
@@ -3361,17 +3362,19 @@ static TPM_RESULT execute_TPM_DeepQuote(TPM_REQUEST *req, TPM_RESPONSE *rsp)
|
||||
if (tpm_unmarshal_TPM_NONCE(&ptr, &len, &nonce)
|
||||
|| tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &myPCR)
|
||||
|| tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &ptPCR)
|
||||
+ || tpm_unmarshal_TPM_DEEP_QUOTE_INFO(&ptr, &len, &extraInfoFlags)
|
||||
|| len != 0) return TPM_BAD_PARAMETER;
|
||||
|
||||
- res = TPM_DeepQuote(&nonce, &myPCR, &ptPCR, &req->auth1, &sigSize, &sig);
|
||||
+ res = TPM_DeepQuote(&nonce, &myPCR, &ptPCR, &req->auth1, extraInfoFlags,
|
||||
+ "e_blob_size, "e_blob);
|
||||
if (res != TPM_SUCCESS) return res;
|
||||
- rsp->paramSize = len = sigSize;
|
||||
+ rsp->paramSize = len = quote_blob_size;
|
||||
rsp->param = ptr = tpm_malloc(len);
|
||||
- if (ptr == NULL || tpm_marshal_BLOB(&ptr, &len, sig, sigSize)) {
|
||||
+ if (ptr == NULL || tpm_marshal_BLOB(&ptr, &len, quote_blob, quote_blob_size)) {
|
||||
tpm_free(rsp->param);
|
||||
res = TPM_FAIL;
|
||||
}
|
||||
- tpm_free(sig);
|
||||
+ tpm_free(quote_blob);
|
||||
|
||||
return res;
|
||||
}
|
||||
diff --git a/tpm/tpm_commands.h b/tpm/tpm_commands.h
|
||||
index 328d1be..a56dd5f 100644
|
||||
--- a/tpm/tpm_commands.h
|
||||
+++ b/tpm/tpm_commands.h
|
||||
@@ -3077,6 +3077,7 @@ TPM_RESULT TPM_ParentSignEK(
|
||||
* @myPCR: [in] PCR selection for the virtual TPM
|
||||
* @ptPCR: [in] PCR selection for the hardware TPM
|
||||
* @auth1: [in, out] Authorization protocol parameters
|
||||
+ * @extraInfoFlags [in] Flags for including, kernel hash, group info, etc
|
||||
* @sigSize: [out] The length of the returned digital signature
|
||||
* @sig: [out] The resulting digital signature and PCR values
|
||||
* Returns: TPM_SUCCESS on success, a TPM error code otherwise.
|
||||
@@ -3086,6 +3087,7 @@ TPM_RESULT TPM_DeepQuote(
|
||||
TPM_PCR_SELECTION *myPCR,
|
||||
TPM_PCR_SELECTION *ptPCR,
|
||||
TPM_AUTH *auth1,
|
||||
+ UINT32 extraInfoFlags,
|
||||
UINT32 *sigSize,
|
||||
BYTE **sig
|
||||
);
|
||||
diff --git a/tpm/tpm_credentials.c b/tpm/tpm_credentials.c
|
||||
index c0d62e7..6586c22 100644
|
||||
--- a/tpm/tpm_credentials.c
|
||||
+++ b/tpm/tpm_credentials.c
|
||||
@@ -183,7 +183,8 @@ TPM_RESULT TPM_OwnerReadInternalPub(TPM_KEY_HANDLE keyHandle, TPM_AUTH *auth1,
|
||||
|
||||
int endorsementKeyFresh = 0;
|
||||
|
||||
-TPM_RESULT VTPM_GetParentQuote(TPM_DIGEST* data, TPM_PCR_SELECTION *sel, UINT32 *sigSize, BYTE **sig);
|
||||
+TPM_RESULT VTPM_GetParentQuote(TPM_NONCE *data, TPM_PCR_SELECTION *sel,
|
||||
+ UINT32 extraInfoFlags, UINT32 *sigSize, BYTE **sig);
|
||||
|
||||
TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
|
||||
TPM_AUTH *auth1, UINT32 *sigSize, BYTE **sig)
|
||||
@@ -191,7 +192,7 @@ TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
|
||||
TPM_PUBKEY pubKey;
|
||||
TPM_RESULT res;
|
||||
TPM_DIGEST hres;
|
||||
-
|
||||
+ UINT32 extraInfoFlags = 0;
|
||||
info("TPM_ParentSignEK()");
|
||||
|
||||
res = tpm_verify_auth(auth1, tpmData.permanent.data.ownerAuth, TPM_KH_OWNER);
|
||||
@@ -206,7 +207,7 @@ TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
|
||||
res = TPM_FAIL;
|
||||
|
||||
if (res == TPM_SUCCESS)
|
||||
- res = VTPM_GetParentQuote(&hres, sel, sigSize, sig);
|
||||
+ res = VTPM_GetParentQuote((TPM_NONCE*)&hres, sel, extraInfoFlags, sigSize, sig);
|
||||
|
||||
free_TPM_PUBKEY(pubKey);
|
||||
return res;
|
||||
@@ -218,7 +219,7 @@ static const BYTE dquot_hdr[] = {
|
||||
|
||||
TPM_RESULT TPM_DeepQuote(TPM_NONCE *externalData, TPM_PCR_SELECTION *myPCR,
|
||||
TPM_PCR_SELECTION *ptPCR, TPM_AUTH *auth1,
|
||||
- UINT32 *sigSize, BYTE **sig)
|
||||
+ UINT32 extraInfoFlags, UINT32 *quote_blob_size, BYTE **quote_blob)
|
||||
{
|
||||
TPM_RESULT res;
|
||||
TPM_DIGEST hres;
|
||||
@@ -253,7 +254,7 @@ TPM_RESULT TPM_DeepQuote(TPM_NONCE *externalData, TPM_PCR_SELECTION *myPCR,
|
||||
|
||||
tpm_free(buf);
|
||||
|
||||
- res = VTPM_GetParentQuote(&hres, ptPCR, sigSize, sig);
|
||||
+ res = VTPM_GetParentQuote((TPM_NONCE*)&hres, ptPCR, extraInfoFlags, quote_blob_size, quote_blob);
|
||||
|
||||
return res;
|
||||
}
|
||||
diff --git a/tpm/tpm_marshalling.h b/tpm/tpm_marshalling.h
|
||||
index d510ebe..2e0c008 100644
|
||||
--- a/tpm/tpm_marshalling.h
|
||||
+++ b/tpm/tpm_marshalling.h
|
||||
@@ -268,6 +268,8 @@ static inline int tpm_unmarshal_BOOL(BYTE **ptr, UINT32 *length, BOOL *v)
|
||||
#define tpm_unmarshal_TPM_REDIR_COMMAND tpm_unmarshal_UINT32
|
||||
#define tpm_marshal_DAAHANDLE tpm_marshal_UINT32
|
||||
#define tpm_unmarshal_DAAHANDLE tpm_unmarshal_UINT32
|
||||
+#define tpm_marshal_TPM_DEEP_QUOTE_INFO tpm_marshal_UINT32
|
||||
+#define tpm_unmarshal_TPM_DEEP_QUOTE_INFO tpm_unmarshal_UINT32
|
||||
|
||||
int tpm_marshal_UINT32_ARRAY(BYTE **ptr, UINT32 *length, UINT32 *v, UINT32 n);
|
||||
int tpm_unmarshal_UINT32_ARRAY(BYTE **ptr, UINT32 *length, UINT32 *v, UINT32 n);
|
|
@ -1,187 +0,0 @@
|
|||
diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
|
||||
index 0fabf98..69511d1 100644
|
||||
--- a/tpm/tpm_cmd_handler.c
|
||||
+++ b/tpm/tpm_cmd_handler.c
|
||||
@@ -3343,6 +3343,39 @@ static TPM_RESULT execute_TPM_ParentSignEK(TPM_REQUEST *req, TPM_RESPONSE *rsp)
|
||||
return res;
|
||||
}
|
||||
|
||||
+static TPM_RESULT execute_TPM_DeepQuote(TPM_REQUEST *req, TPM_RESPONSE *rsp)
|
||||
+{
|
||||
+ TPM_NONCE nonce;
|
||||
+ TPM_RESULT res;
|
||||
+ UINT32 sigSize;
|
||||
+ BYTE *sig;
|
||||
+ BYTE *ptr;
|
||||
+ UINT32 len;
|
||||
+ TPM_PCR_SELECTION myPCR;
|
||||
+ TPM_PCR_SELECTION ptPCR;
|
||||
+
|
||||
+ tpm_compute_in_param_digest(req);
|
||||
+
|
||||
+ ptr = req->param;
|
||||
+ len = req->paramSize;
|
||||
+ if (tpm_unmarshal_TPM_NONCE(&ptr, &len, &nonce)
|
||||
+ || tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &myPCR)
|
||||
+ || tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &ptPCR)
|
||||
+ || len != 0) return TPM_BAD_PARAMETER;
|
||||
+
|
||||
+ res = TPM_DeepQuote(&nonce, &myPCR, &ptPCR, &req->auth1, &sigSize, &sig);
|
||||
+ if (res != TPM_SUCCESS) return res;
|
||||
+ rsp->paramSize = len = sigSize;
|
||||
+ rsp->param = ptr = tpm_malloc(len);
|
||||
+ if (ptr == NULL || tpm_marshal_BLOB(&ptr, &len, sig, sigSize)) {
|
||||
+ tpm_free(rsp->param);
|
||||
+ res = TPM_FAIL;
|
||||
+ }
|
||||
+ tpm_free(sig);
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
static void tpm_setup_rsp_auth(TPM_COMMAND_CODE ordinal, TPM_RESPONSE *rsp)
|
||||
{
|
||||
tpm_hmac_ctx_t hmac;
|
||||
@@ -4098,6 +4131,11 @@ void tpm_execute_command(TPM_REQUEST *req, TPM_RESPONSE *rsp)
|
||||
res = execute_TPM_ParentSignEK(req, rsp);
|
||||
break;
|
||||
|
||||
+ case TPM_ORD_DeepQuote:
|
||||
+ debug("[TPM_ORD_DeepQuote]");
|
||||
+ res = execute_TPM_DeepQuote(req, rsp);
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
#ifdef MTM_EMULATOR
|
||||
res = mtm_execute_command(req, rsp);
|
||||
diff --git a/tpm/tpm_commands.h b/tpm/tpm_commands.h
|
||||
index 7fef934..328d1be 100644
|
||||
--- a/tpm/tpm_commands.h
|
||||
+++ b/tpm/tpm_commands.h
|
||||
@@ -3071,6 +3071,25 @@ TPM_RESULT TPM_ParentSignEK(
|
||||
BYTE **sig
|
||||
);
|
||||
|
||||
+/**
|
||||
+ * TPM_DeepQuote - gets a hardware TPM quote of a vTPM's PCRs
|
||||
+ * @externalData: [in] AntiReplay nonce to prevent replay of messages
|
||||
+ * @myPCR: [in] PCR selection for the virtual TPM
|
||||
+ * @ptPCR: [in] PCR selection for the hardware TPM
|
||||
+ * @auth1: [in, out] Authorization protocol parameters
|
||||
+ * @sigSize: [out] The length of the returned digital signature
|
||||
+ * @sig: [out] The resulting digital signature and PCR values
|
||||
+ * Returns: TPM_SUCCESS on success, a TPM error code otherwise.
|
||||
+ */
|
||||
+TPM_RESULT TPM_DeepQuote(
|
||||
+ TPM_NONCE *externalData,
|
||||
+ TPM_PCR_SELECTION *myPCR,
|
||||
+ TPM_PCR_SELECTION *ptPCR,
|
||||
+ TPM_AUTH *auth1,
|
||||
+ UINT32 *sigSize,
|
||||
+ BYTE **sig
|
||||
+);
|
||||
+
|
||||
/*
|
||||
* Error handling
|
||||
* [tpm_error.c]
|
||||
diff --git a/tpm/tpm_credentials.c b/tpm/tpm_credentials.c
|
||||
index 01f29e6..c0d62e7 100644
|
||||
--- a/tpm/tpm_credentials.c
|
||||
+++ b/tpm/tpm_credentials.c
|
||||
@@ -211,3 +211,49 @@ TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
|
||||
free_TPM_PUBKEY(pubKey);
|
||||
return res;
|
||||
}
|
||||
+
|
||||
+static const BYTE dquot_hdr[] = {
|
||||
+ 0, 0, 0, 0, 'D', 'Q', 'U', 'T'
|
||||
+};
|
||||
+
|
||||
+TPM_RESULT TPM_DeepQuote(TPM_NONCE *externalData, TPM_PCR_SELECTION *myPCR,
|
||||
+ TPM_PCR_SELECTION *ptPCR, TPM_AUTH *auth1,
|
||||
+ UINT32 *sigSize, BYTE **sig)
|
||||
+{
|
||||
+ TPM_RESULT res;
|
||||
+ TPM_DIGEST hres;
|
||||
+ TPM_PCR_INFO_SHORT pcrData;
|
||||
+ tpm_sha1_ctx_t ctx;
|
||||
+ BYTE *buf, *ptr;
|
||||
+ UINT32 size, len;
|
||||
+
|
||||
+ info("TPM_DeepQuote()");
|
||||
+
|
||||
+ res = tpm_verify_auth(auth1, tpmData.permanent.data.ownerAuth, TPM_KH_OWNER);
|
||||
+ if (res != TPM_SUCCESS) return res;
|
||||
+
|
||||
+ res = tpm_compute_pcr_digest(myPCR, &pcrData.digestAtRelease, NULL);
|
||||
+ if (res != TPM_SUCCESS) return res;
|
||||
+
|
||||
+ pcrData.pcrSelection.sizeOfSelect = myPCR->sizeOfSelect;
|
||||
+ memcpy(pcrData.pcrSelection.pcrSelect, myPCR->pcrSelect, myPCR->sizeOfSelect);
|
||||
+ pcrData.localityAtRelease = 1 << tpmData.stany.flags.localityModifier;
|
||||
+
|
||||
+ size = len = sizeof_TPM_PCR_INFO_SHORT(pcrData);
|
||||
+ buf = ptr = tpm_malloc(size);
|
||||
+ if (buf == NULL) return TPM_NOSPACE;
|
||||
+ if (tpm_marshal_TPM_PCR_INFO_SHORT(&ptr, &len, &pcrData))
|
||||
+ return TPM_FAIL;
|
||||
+
|
||||
+ tpm_sha1_init(&ctx);
|
||||
+ tpm_sha1_update(&ctx, dquot_hdr, 8);
|
||||
+ tpm_sha1_update(&ctx, externalData->nonce, 20);
|
||||
+ tpm_sha1_update(&ctx, buf, size);
|
||||
+ tpm_sha1_final(&ctx, hres.digest);
|
||||
+
|
||||
+ tpm_free(buf);
|
||||
+
|
||||
+ res = VTPM_GetParentQuote(&hres, ptPCR, sigSize, sig);
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
diff --git a/tpm/tpm_structures.h b/tpm/tpm_structures.h
|
||||
index b0f4625..dfb1894 100644
|
||||
--- a/tpm/tpm_structures.h
|
||||
+++ b/tpm/tpm_structures.h
|
||||
@@ -660,6 +660,42 @@ typedef struct tdTPM_CMK_MA_APPROVAL {
|
||||
|
||||
/* VTPM-only commands: */
|
||||
/*
|
||||
+ * Deep Quote - Create quote of PCRs
|
||||
+ * Input:
|
||||
+ * TPM_TAG tag TPM_TAG_RQU_AUTH1_COMMAND
|
||||
+ * UINT32 paramSize Total size of request
|
||||
+ * TPM_COMMAND_CODE ordinal TPM_ORD_DeepQuote
|
||||
+ * TPM_NONCE externData 20 bytes of external data
|
||||
+ * TPM_PCR_SELECTION vtSel PCR selection for virtual TPM
|
||||
+ * TPM_PCR_SELECTION ptSel PCR selection for physical TPM
|
||||
+ * ---
|
||||
+ * UINT32 authHandle Owner authorization session (OIAP)
|
||||
+ * TPM_NONCE nonceOdd Nonce for authHandle
|
||||
+ * BOOL continueAuth Continue flag for authHandle
|
||||
+ * TPM_AUTHDATA privAuth Authorization digest for command
|
||||
+ *
|
||||
+ * Output:
|
||||
+ * TPM_TAG tag TPM_TAG_RSP_AUTH1_COMMAND
|
||||
+ * UINT32 paramSize Total size of response
|
||||
+ * TPM_RESULT returnCode Return code of the operation
|
||||
+ * BYTE[] sig Signature provided by physical TPM
|
||||
+ * TPM_PCRVALUE[] pcrValue Values of hardware PCRs used in the quote
|
||||
+ * ---
|
||||
+ * TPM_NONCE nonceEven Nonce for authHandle
|
||||
+ * BOOL continueAuth Continue flag for authHandle
|
||||
+ * TPM_AUTHDATA resAuth Authorization digest for response
|
||||
+ *
|
||||
+ * The values of the virutal TPM's PCRs are not included in the response.
|
||||
+ * The signature is a standard TPM_Quote response from the physical TPM; its
|
||||
+ * externalData is the SHA1 hash of the following structure:
|
||||
+ * TPM_STRUCT_VER version MUST be 0.0.0.0
|
||||
+ * BYTE[4] fixed MUST be the string "DQUT"
|
||||
+ * TPM_NONCE externData From input to the deep quote
|
||||
+ * TPM_PCR_INFO_SHORT pcrData Virtual TPM's PCRs
|
||||
+ */
|
||||
+#define TPM_ORD_DeepQuote (TPM_VENDOR_COMMAND | TPM_ORD_Quote)
|
||||
+
|
||||
+/*
|
||||
* ParentSignEK - Proof of fresh provisioning and EK value
|
||||
*
|
||||
* Input:
|
|
@ -1,10 +0,0 @@
|
|||
--- a/tpm/tpm_cmd_handler.c.orig 2017-04-27 13:37:14.408000000 +0200
|
||||
+++ b/tpm/tpm_cmd_handler.c 2017-04-27 13:39:53.585000000 +0200
|
||||
@@ -3397,6 +3397,7 @@
|
||||
sizeof(rsp->auth2->nonceOdd.nonce));
|
||||
tpm_hmac_update(&hmac, (BYTE*)&rsp->auth2->continueAuthSession, 1);
|
||||
tpm_hmac_final(&hmac, rsp->auth2->auth);
|
||||
+ /* fall-thru */
|
||||
case TPM_TAG_RSP_AUTH1_COMMAND:
|
||||
tpm_hmac_init(&hmac, rsp->auth1->secret, sizeof(rsp->auth1->secret));
|
||||
tpm_hmac_update(&hmac, rsp->auth1->digest, sizeof(rsp->auth1->digest));
|
|
@ -1,50 +0,0 @@
|
|||
diff --git a/tpm/tpm_capability.c b/tpm/tpm_capability.c
|
||||
index 60bbb90..f8f7f0f 100644
|
||||
--- a/tpm/tpm_capability.c
|
||||
+++ b/tpm/tpm_capability.c
|
||||
@@ -949,6 +949,8 @@ static TPM_RESULT set_vendor(UINT32 subCap, BYTE *setValue,
|
||||
UINT32 setValueSize, BOOL ownerAuth,
|
||||
BOOL deactivated, BOOL disabled)
|
||||
{
|
||||
+ if (tpmData.stany.flags.localityModifier != 8)
|
||||
+ return TPM_BAD_PARAMETER;
|
||||
/* set the capability area with the specified data, on failure
|
||||
deactivate the TPM */
|
||||
switch (subCap) {
|
||||
diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
|
||||
index 288d1ce..9e1cfb4 100644
|
||||
--- a/tpm/tpm_cmd_handler.c
|
||||
+++ b/tpm/tpm_cmd_handler.c
|
||||
@@ -4132,7 +4132,7 @@ void tpm_emulator_shutdown()
|
||||
tpm_extern_release();
|
||||
}
|
||||
|
||||
-int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint32_t *out_size)
|
||||
+int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint32_t *out_size, int locality)
|
||||
{
|
||||
TPM_REQUEST req;
|
||||
TPM_RESPONSE rsp;
|
||||
@@ -4140,7 +4140,9 @@ int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint3
|
||||
UINT32 len;
|
||||
BOOL free_out;
|
||||
|
||||
- debug("tpm_handle_command()");
|
||||
+ debug("tpm_handle_command(%d)", locality);
|
||||
+ if (locality != -1)
|
||||
+ tpmData.stany.flags.localityModifier = locality;
|
||||
|
||||
/* we need the whole packet at once, otherwise unmarshalling will fail */
|
||||
if (tpm_unmarshal_TPM_REQUEST((uint8_t**)&in, &in_size, &req) != 0) {
|
||||
diff --git a/tpm/tpm_emulator.h b/tpm/tpm_emulator.h
|
||||
index eed749e..4c228bd 100644
|
||||
--- a/tpm/tpm_emulator.h
|
||||
+++ b/tpm/tpm_emulator.h
|
||||
@@ -59,7 +59,7 @@ void tpm_emulator_shutdown(void);
|
||||
* its usage. In case of an error, all internally allocated memory
|
||||
* is released and the the state of out and out_size is unspecified.
|
||||
*/
|
||||
-int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint32_t *out_size);
|
||||
+int tpm_handle_command(const uint8_t *in, uint32_t in_size, uint8_t **out, uint32_t *out_size, int locality);
|
||||
|
||||
#endif /* _TPM_EMULATOR_H_ */
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
|
||||
index 9e1cfb4..0fabf98 100644
|
||||
--- a/tpm/tpm_cmd_handler.c
|
||||
+++ b/tpm/tpm_cmd_handler.c
|
||||
@@ -3312,6 +3312,37 @@ static TPM_RESULT execute_TPM_OwnerReadPubek(TPM_REQUEST *req, TPM_RESPONSE *rsp
|
||||
return res;
|
||||
}
|
||||
|
||||
+static TPM_RESULT execute_TPM_ParentSignEK(TPM_REQUEST *req, TPM_RESPONSE *rsp)
|
||||
+{
|
||||
+ TPM_NONCE nonce;
|
||||
+ TPM_RESULT res;
|
||||
+ UINT32 sigSize;
|
||||
+ BYTE *sig;
|
||||
+ BYTE *ptr;
|
||||
+ UINT32 len;
|
||||
+ TPM_PCR_SELECTION targetPCR;
|
||||
+
|
||||
+ tpm_compute_in_param_digest(req);
|
||||
+
|
||||
+ ptr = req->param;
|
||||
+ len = req->paramSize;
|
||||
+ if (tpm_unmarshal_TPM_NONCE(&ptr, &len, &nonce)
|
||||
+ || tpm_unmarshal_TPM_PCR_SELECTION(&ptr, &len, &targetPCR)
|
||||
+ || len != 0) return TPM_BAD_PARAMETER;
|
||||
+
|
||||
+ res = TPM_ParentSignEK(&nonce, &targetPCR, &req->auth1, &sigSize, &sig);
|
||||
+ if (res != TPM_SUCCESS) return res;
|
||||
+ rsp->paramSize = len = sigSize;
|
||||
+ rsp->param = ptr = tpm_malloc(len);
|
||||
+ if (ptr == NULL || tpm_marshal_BLOB(&ptr, &len, sig, sigSize)) {
|
||||
+ tpm_free(rsp->param);
|
||||
+ res = TPM_FAIL;
|
||||
+ }
|
||||
+ tpm_free(sig);
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
static void tpm_setup_rsp_auth(TPM_COMMAND_CODE ordinal, TPM_RESPONSE *rsp)
|
||||
{
|
||||
tpm_hmac_ctx_t hmac;
|
||||
@@ -4062,6 +4093,11 @@ void tpm_execute_command(TPM_REQUEST *req, TPM_RESPONSE *rsp)
|
||||
res = execute_TPM_OwnerReadPubek(req, rsp);
|
||||
break;
|
||||
|
||||
+ case TPM_ORD_ParentSignEK:
|
||||
+ debug("[TPM_ORD_ParentSignEK]");
|
||||
+ res = execute_TPM_ParentSignEK(req, rsp);
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
#ifdef MTM_EMULATOR
|
||||
res = mtm_execute_command(req, rsp);
|
||||
diff --git a/tpm/tpm_commands.h b/tpm/tpm_commands.h
|
||||
index a7666f6..7fef934 100644
|
||||
--- a/tpm/tpm_commands.h
|
||||
+++ b/tpm/tpm_commands.h
|
||||
@@ -3054,6 +3054,23 @@ TPM_RESULT TPM_OwnerReadPubek(
|
||||
TPM_PUBKEY *pubEndorsementKey
|
||||
);
|
||||
|
||||
+/**
|
||||
+ * TPM_ParentSignEK - gets a hardware TPM quote of a vTPM's EK
|
||||
+ * @externalData: [in] AntiReplay nonce to prevent replay of messages
|
||||
+ * @sel: [in] PCR selection for the hardware TPM's quote
|
||||
+ * @auth1: [in, out] Authorization protocol parameters
|
||||
+ * @sigSize: [out] The length of the returned digital signature
|
||||
+ * @sig: [out] The resulting digital signature and PCR values
|
||||
+ * Returns: TPM_SUCCESS on success, a TPM error code otherwise.
|
||||
+ */
|
||||
+TPM_RESULT TPM_ParentSignEK(
|
||||
+ TPM_NONCE *externalData,
|
||||
+ TPM_PCR_SELECTION *sel,
|
||||
+ TPM_AUTH *auth1,
|
||||
+ UINT32 *sigSize,
|
||||
+ BYTE **sig
|
||||
+);
|
||||
+
|
||||
/*
|
||||
* Error handling
|
||||
* [tpm_error.c]
|
||||
diff --git a/tpm/tpm_credentials.c b/tpm/tpm_credentials.c
|
||||
index 9cd64af..01f29e6 100644
|
||||
--- a/tpm/tpm_credentials.c
|
||||
+++ b/tpm/tpm_credentials.c
|
||||
@@ -180,3 +180,34 @@ TPM_RESULT TPM_OwnerReadInternalPub(TPM_KEY_HANDLE keyHandle, TPM_AUTH *auth1,
|
||||
return TPM_BAD_PARAMETER;
|
||||
}
|
||||
}
|
||||
+
|
||||
+int endorsementKeyFresh = 0;
|
||||
+
|
||||
+TPM_RESULT VTPM_GetParentQuote(TPM_DIGEST* data, TPM_PCR_SELECTION *sel, UINT32 *sigSize, BYTE **sig);
|
||||
+
|
||||
+TPM_RESULT TPM_ParentSignEK(TPM_NONCE *externalData, TPM_PCR_SELECTION *sel,
|
||||
+ TPM_AUTH *auth1, UINT32 *sigSize, BYTE **sig)
|
||||
+{
|
||||
+ TPM_PUBKEY pubKey;
|
||||
+ TPM_RESULT res;
|
||||
+ TPM_DIGEST hres;
|
||||
+
|
||||
+ info("TPM_ParentSignEK()");
|
||||
+
|
||||
+ res = tpm_verify_auth(auth1, tpmData.permanent.data.ownerAuth, TPM_KH_OWNER);
|
||||
+ if (res != TPM_SUCCESS) return res;
|
||||
+
|
||||
+ if (!endorsementKeyFresh) return TPM_DISABLED_CMD;
|
||||
+
|
||||
+ res = tpm_get_pubek(&pubKey);
|
||||
+ if (res != TPM_SUCCESS) return res;
|
||||
+
|
||||
+ if (tpm_compute_pubkey_checksum(externalData, &pubKey, &hres))
|
||||
+ res = TPM_FAIL;
|
||||
+
|
||||
+ if (res == TPM_SUCCESS)
|
||||
+ res = VTPM_GetParentQuote(&hres, sel, sigSize, sig);
|
||||
+
|
||||
+ free_TPM_PUBKEY(pubKey);
|
||||
+ return res;
|
||||
+}
|
||||
diff --git a/tpm/tpm_data.c b/tpm/tpm_data.c
|
||||
index 50c9697..6a0c499 100644
|
||||
--- a/tpm/tpm_data.c
|
||||
+++ b/tpm/tpm_data.c
|
||||
@@ -76,6 +76,8 @@ static void init_timeouts(void)
|
||||
tpmData.permanent.data.cmd_durations[2] = 1000;
|
||||
}
|
||||
|
||||
+extern int endorsementKeyFresh;
|
||||
+
|
||||
void tpm_init_data(void)
|
||||
{
|
||||
/* endorsement key */
|
||||
@@ -157,6 +159,7 @@ void tpm_init_data(void)
|
||||
if (tpmConf & TPM_CONF_GENERATE_EK) {
|
||||
/* generate a new endorsement key */
|
||||
tpm_rsa_generate_key(&tpmData.permanent.data.endorsementKey, 2048);
|
||||
+ endorsementKeyFresh = 1;
|
||||
} else {
|
||||
/* setup endorsement key */
|
||||
tpm_rsa_import_key(&tpmData.permanent.data.endorsementKey,
|
||||
diff --git a/tpm/tpm_structures.h b/tpm/tpm_structures.h
|
||||
index f746c05..b0f4625 100644
|
||||
--- a/tpm/tpm_structures.h
|
||||
+++ b/tpm/tpm_structures.h
|
||||
@@ -658,6 +658,49 @@ typedef struct tdTPM_CMK_MA_APPROVAL {
|
||||
#define TPM_ORD_TickStampBlob 242
|
||||
#define TPM_ORD_MAX 256
|
||||
|
||||
+/* VTPM-only commands: */
|
||||
+/*
|
||||
+ * ParentSignEK - Proof of fresh provisioning and EK value
|
||||
+ *
|
||||
+ * Input:
|
||||
+ * TPM_TAG tag TPM_TAG_RQU_AUTH1_COMMAND
|
||||
+ * UINT32 paramSize Total size of request
|
||||
+ * TPM_COMMAND_CODE ordinal TPM_ORD_ParentSignEK
|
||||
+ * TPM_NONCE externData 20 bytes of external data
|
||||
+ * TPM_PCR_SELECTION ptSel PCR selection for physical TPM
|
||||
+ * ---
|
||||
+ * UINT32 authHandle Owner authorization session (OIAP)
|
||||
+ * TPM_NONCE nonceOdd Nonce for authHandle
|
||||
+ * BOOL continueAuth Continue flag for authHandle
|
||||
+ * TPM_AUTHDATA privAuth Authorization digest for command
|
||||
+ *
|
||||
+ * Output:
|
||||
+ * TPM_TAG tag TPM_TAG_RSP_AUTH1_COMMAND
|
||||
+ * UINT32 paramSize Total size of response
|
||||
+ * TPM_RESULT returnCode Return code of the operation
|
||||
+ * BYTE[] sig Signature provided by physical TPM
|
||||
+ * TPM_PCRVALUE[] pcrValue Values of hardware PCRs used in the quote
|
||||
+ * ---
|
||||
+ * TPM_NONCE nonceEven Nonce for authHandle
|
||||
+ * BOOL continueAuth Continue flag for authHandle
|
||||
+ * TPM_AUTHDATA resAuth Authorization digest for response
|
||||
+ *
|
||||
+ * This command is only valid on the first boot of a vTPM; on any subsequent
|
||||
+ * boot, the command returns TPM_DISABLED_CMD. It is intended to be used to
|
||||
+ * provide evidence of proper platform configuration to the verifier/CA which is
|
||||
+ * responsible for the creation of the vTPM's endorsement credential, which will
|
||||
+ * be used on subsequent boots to certify AIKs via the usual Privacy CA protocol.
|
||||
+ *
|
||||
+ * The values of the virtual TPM's PCRs are not included in the response.
|
||||
+ * The signature is a standard TPM_Quote response from the physical TPM; its
|
||||
+ * externalData is the SHA1 hash of the following structure:
|
||||
+ * TPM_PUBKEY pubEK The vTPM's public EK
|
||||
+ * TPM_NONCE externData From input to the deep quote
|
||||
+ *
|
||||
+ * This structure was chosen to match the return of TPM_ReadPubek
|
||||
+ */
|
||||
+#define TPM_ORD_ParentSignEK (TPM_VENDOR_COMMAND | TPM_ORD_ReadPubek)
|
||||
+
|
||||
/*
|
||||
* TCS Ordinals ([TPM_Part2], Section 17.1)
|
||||
*
|
|
@ -1,28 +0,0 @@
|
|||
Patch derived from below Xen changeset.
|
||||
Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
|
||||
|
||||
commit 22bf5be3237cb482a2ffd772ffd20ce37285eebf
|
||||
Author: Olaf Hering <olaf@aepfle.de>
|
||||
Date: Mon Jun 18 14:55:36 2018 +0200
|
||||
|
||||
stubdom/vtpm: fix memcmp in TPM_ChangeAuthAsymFinish
|
||||
|
||||
gcc8 spotted this error:
|
||||
error: 'memcmp' reading 20 bytes from a region of size 8 [-Werror=stringop-overflow=]
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
diff --git a/tpm/tpm_deprecated.c b/tpm/tpm_deprecated.c
|
||||
index c362b56..4c49f54 100644
|
||||
--- a/tpm/tpm_deprecated.c
|
||||
+++ b/tpm/tpm_deprecated.c
|
||||
@@ -434,7 +434,7 @@ TPM_RESULT TPM_ChangeAuthAsymFinish(TPM_KEY_HANDLE parentHandle,
|
||||
tpm_hmac_final(&hmac_ctx, b1.digest);
|
||||
/* 6. The TPM SHALL compare b1 with newAuthLink. The TPM SHALL
|
||||
indicate a failure if the values do not match. */
|
||||
- if (memcmp(&b1, &newAuthLink, sizeof(TPM_HMAC))) {
|
||||
+ if (memcmp(&b1, newAuthLink, sizeof(TPM_HMAC))) {
|
||||
debug("TPM_ChangeAuthAsymFinish(): newAuthLink value does not match.");
|
||||
return TPM_FAIL;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
# Copyright (C) 2018 kebodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
require stubdom.inc
|
||||
|
||||
# clear this out to break dependency circle
|
||||
DEPENDS = ""
|
||||
|
||||
# Nothing to configure or compile
|
||||
# For stubdoms, lwip is basically a source package with a couple of patches applied.
|
||||
do_configure[noexec] = "1"
|
||||
do_compile[noexec] = "1"
|
||||
|
||||
# needed because this directory isn't typically part of a sysroot
|
||||
SYSROOT_DIRS += "${prefix}/lwip"
|
||||
|
||||
FILES_${PN} = "\
|
||||
${prefix} \
|
||||
"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${prefix}/lwip
|
||||
cp -r -t ${D}${prefix}/lwip ${S}/src/*
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
# Copyright (C) 2018 kebodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
DESCRIPTION = "LWIP"
|
||||
HOMEPAGE = "https://savannah.nongnu.org/projects/lwip"
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=59a383b05013356e0c9899b06dc5da3f"
|
||||
|
||||
SRCREV_lwip = "bcb4afa886408bf0a1dde9c2a4a00323c8b07eb1"
|
||||
SRC_URI = "\
|
||||
git://git.savannah.gnu.org/lwip.git;protocol=git;nobranch=1;destsuffix=lwip;name=lwip \
|
||||
file://lwip.patch-cvs \
|
||||
file://lwip.dhcp_create_request-hwaddr_len.patch \
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${PN}"
|
||||
B="${S}"
|
||||
|
||||
require lwip.inc
|
|
@ -1,28 +0,0 @@
|
|||
# Copyright (C) 2018 kebodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
require stubdom.inc
|
||||
|
||||
# clear this out to break dependency circle
|
||||
DEPENDS = ""
|
||||
|
||||
do_configure() {
|
||||
${MAKE} -C ${WORKDIR}/mini-os links
|
||||
}
|
||||
|
||||
# Nothing to configure or compile
|
||||
do_compile[noexec] = "1"
|
||||
|
||||
# needed because this directory isn't typically part of a sysroot
|
||||
SYSROOT_DIRS += "${prefix}/mini-os"
|
||||
RDEPENDS_${PN}-dev = "perl"
|
||||
|
||||
FILES_${PN}-dev = "\
|
||||
${prefix} \
|
||||
"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${prefix}/mini-os
|
||||
cp -r -t ${D}${prefix}/mini-os ${S}/*
|
||||
rm -rf ${D}${prefix}/mini-os/scripts
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
DESCRIPTION = "Mini-OS is a tiny OS kernel distributed with the Xen Project"
|
||||
HOMEPAGE = "https://wiki.xenproject.org/wiki/Mini-OS"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=8a437231894440a8f7629caa372243d0"
|
||||
|
||||
# git commit hash for: xen-RELEASE-4.11.0
|
||||
SRCREV_minios = "0b4b7897e08b967a09bed2028a79fabff82342dd"
|
||||
SRC_URI = "\
|
||||
git://xenbits.xen.org/mini-os.git;protocol=git;nobranch=1;destsuffix=mini-os;name=minios \
|
||||
"
|
||||
S="${WORKDIR}/mini-os"
|
||||
B="${S}"
|
||||
|
||||
require mini-os.inc
|
|
@ -1,64 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
require stubdom.inc
|
||||
|
||||
CPPFLAGS_INCLUDE_DIR = "-isystem `${HOST_PREFIX}gcc -print-file-name=include`"
|
||||
STUBDOM_CFLAGS += "-D_I386MACH_ALLOW_HW_INTERRUPTS"
|
||||
|
||||
export ac_cv_path_CC_FOR_TARGET="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT} ${STUBDOM_CPPFLAGS} ${STUBDOM_CFLAGS}"
|
||||
export CC_FOR_TARGET="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT} ${STUBDOM_CPPFLAGS} ${STUBDOM_CFLAGS}"
|
||||
|
||||
export ac_cv_path_CXX_FOR_TARGET="${HOST_PREFIX}g++ --sysroot=${RECIPE_SYSROOT}"
|
||||
export CXX_FOR_TARGET="${HOST_PREFIX}g++ --sysroot=${RECIPE_SYSROOT}"
|
||||
|
||||
export ac_cv_path_CPP_FOR_TARGET="${HOST_PREFIX}gcc -E --sysroot=${RECIPE_SYSROOT}"
|
||||
export CPP_FOR_TARGET="${HOST_PREFIX}gcc -E --sysroot=${RECIPE_SYSROOT}"
|
||||
|
||||
export ac_cv_path_LD_FOR_TARGET="${HOST_PREFIX}ld --sysroot=${RECIPE_SYSROOT}"
|
||||
export LD_FOR_TARGET="${HOST_PREFIX}ld --sysroot=${RECIPE_SYSROOT}"
|
||||
|
||||
export ac_cv_path_AS_FOR_TARGET="${HOST_PREFIX}as"
|
||||
export AS_FOR_TARGET="${HOST_PREFIX}as"
|
||||
|
||||
export ac_cv_path_AR_FOR_TARGET="${HOST_PREFIX}ar"
|
||||
export AR_FOR_TARGET="${HOST_PREFIX}ar"
|
||||
|
||||
export ac_cv_path_NM_FOR_TARGET="${HOST_PREFIX}nm"
|
||||
export NM_FOR_TARGET="${HOST_PREFIX}nm"
|
||||
|
||||
export ac_cv_path_RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
|
||||
export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
|
||||
|
||||
export ac_cv_path_OBJDUMP_FOR_TARGET="${HOST_PREFIX}objdump"
|
||||
export OBJDUMP_FOR_TARGET="${HOST_PREFIX}objdump"
|
||||
|
||||
export ac_cv_path_OBJCOPY_FOR_TARGET="${HOST_PREFIX}objcopy"
|
||||
export OBJCOPY_FOR_TARGET="${HOST_PREFIX}objcopy"
|
||||
|
||||
export ac_cv_path_STRIP_FOR_TARGET="${HOST_PREFIX}strip"
|
||||
export STRIP_FOR_TARGET="${HOST_PREFIX}strip"
|
||||
|
||||
export ac_cv_path_STRINGS_FOR_TARGET="${HOST_PREFIX}strings"
|
||||
export STRINGS_FOR_TARGET="${HOST_PREFIX}strings"
|
||||
|
||||
export ac_cv_path_READELF_FOR_TARGET="${HOST_PREFIX}readelf"
|
||||
export READELF_FOR_TARGET="${HOST_PREFIX}readelf"
|
||||
|
||||
do_configure() {
|
||||
${S}/configure --verbose --prefix=${prefix} --target=${GNU_TARGET_ARCH}-xen-elf --enable-newlib-io-long-long --disable-multilib
|
||||
find ${S} -type f | xargs perl -i.bak -pe 's/\b_(tzname|daylight|timezone)\b/$1/g'
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
${MAKE}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
${MAKE} DESTDIR=${D} install
|
||||
rm -rf ${D}/cross-root-${GNU_TARGET_ARCH}/share
|
||||
rm -rf ${D}/cross-root-${GNU_TARGET_ARCH}/info
|
||||
install -m 644 `${HOST_PREFIX}gcc -print-file-name=include`/stdarg.h -t ${D}/${includedir}
|
||||
install -m 644 `${HOST_PREFIX}gcc -print-file-name=include`/stddef.h -t ${D}/${includedir}
|
||||
install -m 644 `${HOST_PREFIX}gcc -print-file-name=include`/stdbool.h -t ${D}/${includedir}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
DESCRIPTION = "Newlib is a C library intended for use on embedded systems."
|
||||
HOMEPAGE = "http://sourceware.org/newlib"
|
||||
LICENSE = "GPLv2 & LGPLv3 & GPLv3 & LGPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING.NEWLIB;md5=950f50b290e8fcf7a2d3fff61775de9b"
|
||||
|
||||
# this is the hash of version tag 1_16_0
|
||||
SRCREV_newlib = "07b4b67a88f386ce4716a14e0ff2c2bce992b985"
|
||||
SRC_URI = "\
|
||||
git://sourceware.org/git/newlib-cygwin.git;protocol=git;nobranch=1;destsuffix=newlib;name=newlib \
|
||||
file://newlib.patch \
|
||||
file://newlib-chk.patch \
|
||||
file://newlib-stdint-size_max-fix-from-1.17.0.patch \
|
||||
"
|
||||
|
||||
S="${WORKDIR}/newlib"
|
||||
B="${WORKDIR}/build"
|
||||
|
||||
require newlib.inc
|
|
@ -1,27 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
require stubdom.inc
|
||||
|
||||
DEPENDS += "\
|
||||
newlib \
|
||||
"
|
||||
STUBDOM_CFLAGS += "\
|
||||
-Wno-memset-elt-size \
|
||||
-Wno-implicit-fallthrough \
|
||||
"
|
||||
|
||||
# nothing to configure
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
do_compile() {
|
||||
${MAKE} CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT} ${STUBDOM_CPPFLAGS} ${STUBDOM_CFLAGS}"
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${includedir}
|
||||
cp -r -t ${D}${includedir} ${S}/include/polarssl
|
||||
|
||||
install -d ${D}/${libdir}
|
||||
install -m 644 -t ${D}/${libdir} ${S}/library/libpolarssl.a
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
DESCRIPTION = "PolarSSL (now 'mbed TLS') is an open source, portable, easy to use, readable and flexible SSL library."
|
||||
HOMEPAGE = "https://tls.mbed.org"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
|
||||
|
||||
# git hash for release tag polarssl-1.1.4
|
||||
SRCREV_polarssl = "d36da11125a9c85c572a4fdf63e0a25e76d7bb18"
|
||||
SRC_URI = "\
|
||||
git://github.com/ARMmbed/mbedtls.git;protocol=https;nobranch=1;destsuffix=polarssl;name=polarssl \
|
||||
file://polarssl.patch; \
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${PN}"
|
||||
B="${S}/library"
|
||||
|
||||
require polarssl.inc
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
require stubdom.inc
|
||||
|
||||
DEPENDS += "\
|
||||
newlib \
|
||||
"
|
||||
|
||||
do_configure() {
|
||||
# need to modify prefix here during configure otherwise OE-level variables
|
||||
# (prefix, libdir, includedir, etc...) defined in stubdom.inc get messed up
|
||||
CPPFLAGS="-isystem ${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include ${STUBDOM_CPPFLAGS}" \
|
||||
CFLAGS="${STUBDOM_CFLAGS}" \
|
||||
CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}" \
|
||||
${S}/configure \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
--disable-fft \
|
||||
--without-readline \
|
||||
--with-gnu-ld \
|
||||
--prefix=${prefix}/${GNU_TARGET_ARCH}-xen-elf \
|
||||
--libdir=${libdir} \
|
||||
--build=`${HOST_PREFIX}gcc -dumpmachine` \
|
||||
--host=${GNU_TARGET_ARCH}-xen-elf
|
||||
|
||||
sed -i 's/#define HAVE_OBSTACK_VPRINTF 1/\/\/#define HAVE_OBSTACK_VPRINTF 1/' ${S}/config.h
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
${MAKE}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
${MAKE} DESTDIR=${D} install
|
||||
rm -rf ${D}${prefix}/${GNU_TARGET_ARCH}-xen-elf/share
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
DESCRIPTION = "GMP library for Xen vTPM's."
|
||||
HOMEPAGE = "http://gmp"
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
|
||||
file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
|
||||
"
|
||||
|
||||
SRC_URI = "\
|
||||
https://gmplib.org/download/gmp/archive/gmp-${PV}.tar.bz2 \
|
||||
"
|
||||
SRC_URI[md5sum] = "dd60683d7057917e34630b4a787932e8"
|
||||
SRC_URI[sha256sum] = "936162c0312886c21581002b79932829aa048cfaf9937c6265aeaa14f1cd1775"
|
||||
|
||||
S="${WORKDIR}/gmp-${PV}"
|
||||
B="${S}"
|
||||
|
||||
require stubdom-gmp.inc
|
|
@ -1,152 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
COMPATIBLE_HOST = '(x86_64.*).*-linux'
|
||||
|
||||
require xen-arch.inc
|
||||
|
||||
# many of the xen stubdom related recipes build and package static instead of shared libraries
|
||||
EXCLUDE_FROM_SHLIBS = "1"
|
||||
|
||||
# base set of dependencies to be used for xen stubdom recipes
|
||||
DEPENDS += "\
|
||||
lwip \
|
||||
mini-os \
|
||||
"
|
||||
|
||||
# unset EVERYTHING from the OE environment.
|
||||
# Weird things happen when these are exported into the environment.
|
||||
unset CFLAGS
|
||||
unset BUILD_CFLAGS
|
||||
unset TARGET_CFLAGS
|
||||
unset CFLAGS_FOR_BUILD
|
||||
|
||||
unset CPPFLAGS
|
||||
unset BUILD_CPPFLAGS
|
||||
unset TARGET_CPPFLAGS
|
||||
unset CPPFLAGS_FOR_BUILD
|
||||
|
||||
unset LDFLAGS
|
||||
unset BUILD_LDFLAGS
|
||||
unset TARGET_LDFLAGS
|
||||
unset LDFLAGS_FOR_BUILD
|
||||
|
||||
unset CXXFLAGS
|
||||
unset TARGET_CXXFLAGS
|
||||
unset BUILD_CXXFLAGS
|
||||
unset CXXFLAGS_FOR_BUILD
|
||||
|
||||
unset BUILD_CC
|
||||
unset BUILD_CPP
|
||||
unset BUILD_CXX
|
||||
unset BUILD_LD
|
||||
unset BUILD_AR
|
||||
unset BUILD_AS
|
||||
unset BUILD_CCLD
|
||||
unset BUILD_FC
|
||||
unset BUILD_RANLIB
|
||||
unset BUILD_NM
|
||||
unset BUILD_STRIP
|
||||
unset BUILD_READELF
|
||||
unset BUILD_OBJCOPY
|
||||
unset BUILD_OBJDUMP
|
||||
unset CC
|
||||
unset CPP
|
||||
unset CXX
|
||||
unset LD
|
||||
unset AR
|
||||
unset AS
|
||||
unset NM
|
||||
unset RANLIB
|
||||
unset STRIP
|
||||
unset STRINGS
|
||||
unset READELF
|
||||
unset OBJCOPY
|
||||
unset OBJDUMP
|
||||
unset READELF
|
||||
unset CCLD
|
||||
unset FC
|
||||
|
||||
# Provide support to build both 32-bit and 64-bit stubdoms
|
||||
python () {
|
||||
gnu_dict = {
|
||||
'x86_32': 'i686',
|
||||
'x86_64': 'x86_64',
|
||||
}
|
||||
|
||||
if d.expand('${XEN_TARGET_ARCH}') == 'x86_32':
|
||||
d.setVar("GNU_TARGET_ARCH",gnu_dict[d.expand('${XEN_TARGET_ARCH}')])
|
||||
d.setVar("PACKAGE_ARCH","core2-32")
|
||||
elif d.expand('${XEN_TARGET_ARCH}') == 'x86_64':
|
||||
d.setVar("GNU_TARGET_ARCH",gnu_dict[d.expand('${XEN_TARGET_ARCH}')])
|
||||
}
|
||||
|
||||
export GNU_TARGET_ARCH
|
||||
export XEN_TARGET_ARCH="${@map_xen_arch(d.getVar('TARGET_ARCH'), d)}"
|
||||
export XEN_COMPILE_ARCH="${@map_xen_arch(d.getVar('BUILD_ARCH'), d)}"
|
||||
|
||||
LWIP_SRCDIR = "${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/lwip"
|
||||
MINIOS_SRCDIR = "${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/mini-os"
|
||||
|
||||
# Base set of CPPFLAGS, CFLAGS needed for each component used to build MiniOS-based stubdoms
|
||||
# LDFLAGS are only used when building stubdoms, so only used in stubdom recipes
|
||||
# Generic name given because each library uses DEF_, BUILD_, TARGET_, and xxxFLAGS differently
|
||||
CPPFLAGS_INCLUDE_DIR = "-isystem ${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include"
|
||||
|
||||
STUBDOM_CPPFLAGS += "\
|
||||
-isystem ${MINIOS_SRCDIR}/include \
|
||||
-D__MINIOS__ \
|
||||
-DHAVE_LIBC \
|
||||
-isystem ${MINIOS_SRCDIR}/include/posix \
|
||||
-isystem ${MINIOS_SRCDIR}/include/xen \
|
||||
-isystem ${MINIOS_SRCDIR}/include/x86 \
|
||||
-isystem ${MINIOS_SRCDIR}/include/x86/${XEN_TARGET_ARCH} \
|
||||
-U __linux__ \
|
||||
-U __FreeBSD__ \
|
||||
-U __sun__ \
|
||||
-nostdinc \
|
||||
${CPPFLAGS_INCLUDE_DIR} \
|
||||
-isystem ${LWIP_SRCDIR}/include \
|
||||
-isystem ${LWIP_SRCDIR}/include/ipv4 \
|
||||
"
|
||||
|
||||
STUBDOM_CFLAGS += "\
|
||||
-mno-red-zone \
|
||||
-O1 \
|
||||
-fno-omit-frame-pointer \
|
||||
-m64 \
|
||||
-fno-reorder-blocks \
|
||||
-fno-asynchronous-unwind-tables \
|
||||
-DBUILD_ID \
|
||||
-fno-strict-aliasing \
|
||||
-std=gnu99 \
|
||||
-Wall \
|
||||
-Wstrict-prototypes \
|
||||
-Wdeclaration-after-statement \
|
||||
-Wno-unused-but-set-variable \
|
||||
-Wno-unused-local-typedefs \
|
||||
-fno-stack-protector \
|
||||
-fno-exceptions \
|
||||
"
|
||||
|
||||
STUBDOM_LDFLAGS = "\
|
||||
-nostdlib \
|
||||
-L${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/lib \
|
||||
"
|
||||
|
||||
# Need to redefine these for stubdom-related builds. It all starts because of
|
||||
# the prefix used in newlib and then continues because we don't want to
|
||||
# cross-contaminate stubdom-related recipes with headers and libraries found in
|
||||
# the OE-defined locations
|
||||
export prefix="/cross-root-${GNU_TARGET_ARCH}"
|
||||
export includedir="${prefix}/${GNU_TARGET_ARCH}-xen-elf/include"
|
||||
export libdir="${prefix}/${GNU_TARGET_ARCH}-xen-elf/lib"
|
||||
export libexecdir="${libdir}"
|
||||
export STAGING_INCDIR
|
||||
export STAGING_LIBDIR
|
||||
|
||||
# Typically defined in Xen and Minios .mk files that aren't sourced/read,
|
||||
# defined to trigger some values and paths in Makefiles
|
||||
export debug="y"
|
||||
export stubdom="y"
|
||||
export XEN_OS="MiniOS"
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
require stubdom.inc
|
||||
|
||||
DEPENDS += "\
|
||||
cmake-native \
|
||||
newlib \
|
||||
stubdom-gmp \
|
||||
"
|
||||
|
||||
# nothing to configure
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
export CMAKE_C_FLAGS = "\
|
||||
-std=c99 \
|
||||
-DTPM_NO_EXTERN \
|
||||
${STUBDOM_CPPFLAGS} \
|
||||
${STUBDOM_CFLAGS} \
|
||||
-Wno-declaration-after-statement \
|
||||
-Wno-implicit-fallthrough \
|
||||
"
|
||||
|
||||
do_compile() {
|
||||
CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}" cmake .. -DCMAKE_C_FLAGS:STRING="${CMAKE_C_FLAGS}"
|
||||
${MAKE} VERBOSE=1 tpm_crypto tpm
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}/${libdir}
|
||||
install -m 644 -t ${D}/${libdir} ${B}/crypto/libtpm_crypto.a
|
||||
install -m 644 -t ${D}/${libdir} ${B}/tpm/libtpm.a
|
||||
|
||||
install -D -m 644 -t ${D}/${includedir}/tpm-emulator/build ${S}/build/config.h
|
||||
install -D -m 644 -t ${D}/${includedir}/tpm-emulator/crypto ${S}/crypto/*.h
|
||||
install -D -m 644 -t ${D}/${includedir}/tpm-emulator/tpm ${S}/tpm/*.h
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
DESCRIPTION = "TPM Emulator"
|
||||
HOMEPAGE = "http://xenbits.xen.org/xen-extfiles"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://README;md5=eeabd77cf8fd8a8bc42983884cb09863"
|
||||
|
||||
SRC_URI = "\
|
||||
http://xenbits.xen.org/xen-extfiles/tpm_emulator-${PV}.tar.gz;name=tpm-emulator \
|
||||
file://tpmemu-0.7.4.patch \
|
||||
file://vtpm-bufsize.patch \
|
||||
file://vtpm-locality.patch \
|
||||
file://vtpm-parent-sign-ek.patch \
|
||||
file://vtpm-deepquote.patch \
|
||||
file://vtpm-deepquote-anyloc.patch \
|
||||
file://vtpm-cmake-Wextra.patch \
|
||||
file://vtpm-implicit-fallthrough.patch \
|
||||
file://vtpm_TPM_ChangeAuthAsymFinish.patch \
|
||||
"
|
||||
SRC_URI[tpm-emulator.md5sum] = "e26becb8a6a2b6695f6b3e8097593db8"
|
||||
SRC_URI[tpm-emulator.sha256sum] = "4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459"
|
||||
|
||||
S="${WORKDIR}/tpm_emulator-${PV}"
|
||||
B="${S}/build"
|
||||
|
||||
require tpm-emulator.inc
|
|
@ -1,111 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
require stubdom.inc
|
||||
|
||||
DEPENDS = "\
|
||||
newlib \
|
||||
lwip \
|
||||
mini-os \
|
||||
polarssl \
|
||||
stubdom-gmp \
|
||||
tpm-emulator \
|
||||
"
|
||||
# These were unset by stubdom.inc to allow us to scope them per recipe
|
||||
export CC="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}"
|
||||
export CCLD="${HOST_PREFIX}gcc --sysroot=${RECIPE_SYSROOT}"
|
||||
export CXX="${HOST_PREFIX}g++ --sysroot=${RECIPE_SYSROOT}"
|
||||
export CPP="${HOST_PREFIX}gcc -E --sysroot=${RECIPE_SYSROOT}"
|
||||
export LD="${HOST_PREFIX}ld --sysroot=${RECIPE_SYSROOT}"
|
||||
export LD_LTO="${HOST_PREFIX}ld --sysroot=${RECIPE_SYSROOT}"
|
||||
export AS="${HOST_PREFIX}as"
|
||||
export AR="${HOST_PREFIX}ar"
|
||||
export NM="${HOST_PREFIX}nm"
|
||||
export RANLIB="${HOST_PREFIX}ranlib"
|
||||
export OBJDUMP="${HOST_PREFIX}objdump"
|
||||
export OBJCOPY="${HOST_PREFIX}objcopy"
|
||||
export STRIP="${HOST_PREFIX}strip"
|
||||
export STRINGS="${HOST_PREFIX}strings"
|
||||
export READELF="${HOST_PREFIX}readelf"
|
||||
|
||||
|
||||
# Required for some of the config stuff
|
||||
export STUBDOM_TARGETS="vtpm vtpmmgr"
|
||||
|
||||
VTPM_CPPFLAGS = "\
|
||||
-I${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include/tpm-emulator/build \
|
||||
-I${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include/tpm-emulator/crypto \
|
||||
-I${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include/tpm-emulator/tpm \
|
||||
-I${RECIPE_SYSROOT}/cross-root-${GNU_TARGET_ARCH}/${GNU_TARGET_ARCH}-xen-elf/include/tpm-emulator \
|
||||
"
|
||||
|
||||
# The includes from this Xen directory are not in the MiniOS repo, although they probably should be.
|
||||
STUBDOM_CPPFLAGS += "-isystem ${B}/include/"
|
||||
|
||||
do_configure() {
|
||||
|
||||
# GCC 7 fails linking header defined inlines if not declared 'static' or 'extern'
|
||||
# This appears to be fixed in Xen 4.10.0+, so let's look at version of Xen source
|
||||
# to determine if we need to modify inline declarations.
|
||||
#
|
||||
# 'echo -e' to enable interpretation of backslashes
|
||||
# 'sort -V' to natural sort version numbers
|
||||
# 'head -n1' to capture the first line of output from sort command
|
||||
|
||||
if [ "${PV}" = "$(echo "${PV};4.9.999" | sed 's/;/\n/' | sort -V | head -n1)" ]; then
|
||||
sed -i "s/^inline/static inline/g" ${B}/vtpmmgr/*.h
|
||||
fi
|
||||
|
||||
for i in AR AS NM RANLIB OBJDUMP OBJCOPY STRIP STRINGS READELF CXX LD LD_LTO CC CPP; do
|
||||
sed -i "s/^\($i\s\s*\).*=/\1?=/" ${MINIOS_SRCDIR}/Config.mk
|
||||
done
|
||||
|
||||
# replicate the TARGETS_MINIOS target in xen/stubdom/Makefile
|
||||
for i in ${STUBDOM_TARGETS}; do
|
||||
[ -d ${B}/mini-os-${XEN_TARGET_ARCH}-$i ] ||
|
||||
for j in $(cd ${MINIOS_SRCDIR} ; find . -type d) ; do \
|
||||
mkdir -p ${B}/mini-os-${XEN_TARGET_ARCH}-$i/$j; \
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
${MAKE} MINIOS_CONFIG="${B}/vtpm/minios.cfg" CONFIG_FILE="${B}/vtpm-minios-config.mk" DESTDIR= -C ${MINIOS_SRCDIR} config
|
||||
CPPFLAGS="`cat ${B}/vtpm-minios-config.mk` ${STUBDOM_CPPFLAGS} ${VTPM_CPPFLAGS}" CFLAGS="${STUBDOM_CFLAGS}" ${MAKE} -C ${B}/vtpm
|
||||
DEF_CPPFLAGS="${STUBDOM_CPPFLAGS}" \
|
||||
DEF_CFLAGS="${STUBDOM_CFLAGS}" \
|
||||
DEF_LDFLAGS="${STUBDOM_LDFLAGS}" \
|
||||
MINIOS_CONFIG="${B}/vtpm/minios.cfg" \
|
||||
${MAKE} -C ${MINIOS_SRCDIR} \
|
||||
OBJ_DIR=${B}/mini-os-${XEN_TARGET_ARCH}-vtpm \
|
||||
APP_OBJS="${B}/vtpm/vtpm.a" \
|
||||
APP_LDLIBS="-ltpm -ltpm_crypto -lgmp -lpolarssl"
|
||||
|
||||
${MAKE} MINIOS_CONFIG="${B}/vtpmmgr/minios.cfg" CONFIG_FILE="${B}/vtpmmgr-minios-config.mk" DESTDIR= -C ${MINIOS_SRCDIR} config
|
||||
CPPFLAGS="`cat ${B}/vtpmmgr-minios-config.mk` ${STUBDOM_CPPFLAGS}" CFLAGS="${STUBDOM_CFLAGS}" ${MAKE} -C ${B}/vtpmmgr
|
||||
DEF_CPPFLAGS="${STUBDOM_CPPFLAGS}" \
|
||||
DEF_CFLAGS="${STUBDOM_CFLAGS}" \
|
||||
DEF_LDFLAGS="${STUBDOM_LDFLAGS}" \
|
||||
MINIOS_CONFIG="${B}/vtpmmgr/minios.cfg" \
|
||||
${MAKE} -C ${MINIOS_SRCDIR} \
|
||||
OBJ_DIR=${B}/mini-os-${XEN_TARGET_ARCH}-vtpmmgr \
|
||||
APP_OBJS="${B}/vtpmmgr/vtpmmgr.a" \
|
||||
APP_LDLIBS="-lm -lpolarssl"
|
||||
}
|
||||
|
||||
PACKAGES = "\
|
||||
${PN}-vtpm-stubdom \
|
||||
${PN}-vtpmmgr-stubdom \
|
||||
"
|
||||
FILES_${PN}-vtpm-stubdom="\
|
||||
${libdir}/xen/boot/vtpm-stubdom.gz \
|
||||
"
|
||||
|
||||
FILES_${PN}-vtpmmgr-stubdom="\
|
||||
${libdir}/xen/boot/vtpmmgr-stubdom.gz \
|
||||
"
|
||||
|
||||
do_install() {
|
||||
install -m 644 -D ${B}/mini-os-${XEN_TARGET_ARCH}-vtpm/mini-os.gz ${D}${libdir}/xen/boot/vtpm-stubdom.gz
|
||||
install -m 644 -D ${B}/mini-os-${XEN_TARGET_ARCH}-vtpmmgr/mini-os.gz ${D}${libdir}/xen/boot/vtpmmgr-stubdom.gz
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
# Copyright (C) 2017 Kurt Bodiker <kurt.bodiker@braintrust-us.com>
|
||||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
DESCRIPTION = "MiniOS-based vTPMs for Xen"
|
||||
HOMEPAGE = "https://www.xenproject.org"
|
||||
LICENSE = "GPLv2 & BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b1ceb1b03a49b202ee6f41ffd1ed0155 \
|
||||
file://vtpm/COPYING;md5=75a98062ab0322ded060d9026a1bda61 \
|
||||
"
|
||||
|
||||
# git commit hash for Xen's RELEASE-4.11.0 tag
|
||||
SRCREV_xen = "1eb6544a567e3e5133fafe0c4ef3545c5138d0e4"
|
||||
SRC_URI = "\
|
||||
git://xenbits.xen.org/xen.git;protocol=git;nobranch=1;name=xen;subpath=stubdom \
|
||||
git://xenbits.xen.org/xen.git;protocol=git;nobranch=1;name=xen;destsuffix=stubdom/include;subpath=tools/xenstore/include \
|
||||
"
|
||||
|
||||
S="${WORKDIR}/stubdom"
|
||||
B="${S}"
|
||||
|
||||
require xen-vtpm.inc
|
Loading…
Reference in New Issue
Block a user