Skip to content

Commit

Permalink
libstb: move drivers/sha512.* to mbedtls directory
Browse files Browse the repository at this point in the history
The drivers/sha512.c file is a SHA512 hash implementation imported from
the mbed TLS project.

As a matter of semantics, this moves drivers/sha512.* to the mbedtls
directory.

Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
Claudio Carvalho authored and stewartsmith committed Dec 19, 2017
1 parent b7b7b84 commit 4fb528b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion libstb/Makefile.inc
Expand Up @@ -8,10 +8,11 @@ LIBSTB_SRCS = container.c rom.c tpm_chip.c stb.c
LIBSTB_OBJS = $(LIBSTB_SRCS:%.c=%.o)
LIBSTB = $(LIBSTB_DIR)/built-in.o

include $(SRC)/$(LIBSTB_DIR)/mbedtls/Makefile.inc
include $(SRC)/$(LIBSTB_DIR)/drivers/Makefile.inc
include $(SRC)/$(LIBSTB_DIR)/tss/Makefile.inc

$(LIBSTB): $(LIBSTB_OBJS:%=$(LIBSTB_DIR)/%) $(DRIVERS) $(TSS)
$(LIBSTB): $(LIBSTB_OBJS:%=$(LIBSTB_DIR)/%) $(DRIVERS) $(TSS) $(MBEDTLS)

libstb/create-container: libstb/create-container.c
$(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) \
Expand Down
2 changes: 1 addition & 1 deletion libstb/drivers/Makefile.inc
Expand Up @@ -4,7 +4,7 @@ DRIVERS_DIR = libstb/drivers

SUBDIRS += $(DRIVERS_DIR)

DRIVERS_SRCS = romcode.c tpm_i2c_interface.c tpm_i2c_nuvoton.c sw_driver.c sha512.c
DRIVERS_SRCS = romcode.c tpm_i2c_interface.c tpm_i2c_nuvoton.c sw_driver.c
DRIVERS_OBJS = $(DRIVERS_SRCS:%.c=%.o)
DRIVERS = $(DRIVERS_DIR)/built-in.o

Expand Down
2 changes: 1 addition & 1 deletion libstb/drivers/sw_driver.c
Expand Up @@ -17,8 +17,8 @@
#include <chip.h>
#include <string.h>
#include <skiboot.h>
#include <libstb/mbedtls/sha512.h>
#include "../rom.h"
#include "sha512.h"
#include "sw_driver.h"

static sha2_hash_t *hw_key_hash = NULL;
Expand Down
11 changes: 11 additions & 0 deletions libstb/mbedtls/Makefile.inc
@@ -0,0 +1,11 @@
# -*-Makefile-*-

MBEDTLS_DIR = libstb/mbedtls

SUBDIRS += $(MBEDTLS_DIR)

MBEDTLS_SRCS = sha512.c
MBEDTLS_OBJS = $(MBEDTLS_SRCS:%.c=%.o)
MBEDTLS = $(MBEDTLS_DIR)/built-in.o

$(MBEDTLS): $(MBEDTLS_OBJS:%=$(MBEDTLS_DIR)/%)
File renamed without changes.
File renamed without changes.

0 comments on commit 4fb528b

Please sign in to comment.