Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ ifeq ($(TARGET),raspi3)
endif

ifeq ($(TARGET),sim)
CFLAGS+=-fno-pie
LDFLAGS+=-no-pie
Comment thread
danielinux marked this conversation as resolved.
MAIN_TARGET:=wolfboot.bin tools/bin-assemble/bin-assemble test-app/image_v1_signed.bin internal_flash.dd
endif

Expand Down
2 changes: 1 addition & 1 deletion lib/wolfTPM
2 changes: 1 addition & 1 deletion lib/wolfssl
Submodule wolfssl updated 300 files
7 changes: 4 additions & 3 deletions src/xmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ struct xmalloc_slot {
#define MP_CURVE_FIELD_COUNT_SIZE (380)
#ifndef _LP64
#define ECC_POINT_SIZE (232)
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 6)
#else
#define ECC_POINT_SIZE (320)
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 5)
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 6)
#endif
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 6)
#define MP_DIGIT_BUFFER_MONT_SIZE (sizeof(fp_digit)*(FP_SIZE + 1))
Expand All @@ -187,7 +188,7 @@ struct xmalloc_slot {
#else
#define ECC_POINT_SIZE (512)
#endif
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 5)
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 6)
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 6)
#define MP_DIGIT_BUFFER_MONT_SIZE (sizeof(fp_digit)*(FP_SIZE + 1))
#endif
Expand All @@ -200,7 +201,7 @@ struct xmalloc_slot {
#else
#define ECC_POINT_SIZE (608)
#endif
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 5)
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 6)
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 6)
#define MP_DIGIT_BUFFER_MONT_SIZE (sizeof(fp_digit)*(FP_SIZE + 1))
#endif
Expand Down
9 changes: 7 additions & 2 deletions test-app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ ifeq ($(HASH),SHA3_384)
CFLAGS+=-D"WOLFBOOT_HASH_SHA3_384"
endif


STACK_USAGE_LIMIT:=1024
ifeq ($(TARGET),sim)
STACK_USAGE_LIMIT:=4608
Comment thread
danielinux marked this conversation as resolved.
endif

ifeq ($(TARGET),ti_hercules)
APP_OBJS:=app_$(TARGET).o ../test-app/libwolfboot.o
Expand All @@ -63,7 +66,7 @@ else
# Stack usage computation not supported on TriCore
ifneq ($(ARCH),AURIX_TC3)
ifneq ($(USE_CLANG),1)
CFLAGS+=-Wstack-usage=1024
CFLAGS+=-Wstack-usage=$(STACK_USAGE_LIMIT)
Comment thread
danielinux marked this conversation as resolved.
endif
endif
CFLAGS+=-DTARGET_$(TARGET) -I../include
Expand Down Expand Up @@ -509,6 +512,8 @@ ifeq ($(TARGET),sim)
# LD on MacOS does not support "-Map="
LDMAPSUPPORTED=$(shell $(CC) -Wl,-Map=image.map 2>&1 | grep 'unknown option')
LDFLAGS=
CFLAGS+=-fno-pie
LDFLAGS+=-no-pie
Comment thread
danielinux marked this conversation as resolved.
ifeq ($(FORCE_32BIT),1)
LDFLAGS+=-m32
CFLAGS+=-m32
Expand Down
13 changes: 7 additions & 6 deletions tools/keytools/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# wolfBoot KeyGen and Signing Tool

-include ../../.config

V?=0
ifeq ($(V),0)
Q=@
Expand All @@ -18,6 +16,7 @@ LD = gcc
WOLFBOOTDIR = ../..
CFLAGS = -Wall -Wextra -Werror
CFLAGS += -I. -DWOLFSSL_USER_SETTINGS -I$(WOLFBOOT_LIB_WOLFSSL) -I$(WOLFBOOTDIR)/include
DEPFLAGS = -MMD -MP
Comment thread
danielinux marked this conversation as resolved.
LDFLAGS =
OBJDIR = ./
LIBS =
Expand Down Expand Up @@ -112,6 +111,7 @@ OBJS_REAL+=\
OBJS_REAL+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/dilithium.o

OBJS_VIRT=$(addprefix $(OBJDIR), $(notdir $(OBJS_REAL)))
DEPS=$(OBJS_VIRT:.o=.d) sign.d keygen.d
Comment thread
danielinux marked this conversation as resolved.
vpath %.c $(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/
vpath %.c $(WOLFBOOTDIR)/src/
vpath %.c ./
Expand All @@ -125,11 +125,11 @@ debug: all

# build objects
$(OBJDIR)/%.o: %.c
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -c -o $@ $<
$(OBJDIR)/%.o: $(WOLFBOOTDIR)/src/%.c
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -c -o $@ $<
$(OBJDIR)/%.o: $(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/%.c
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -c -o $@ $<
Comment thread
danielinux marked this conversation as resolved.

# build templates
sign: $(OBJS_VIRT) $(LIBS) sign.o
Expand All @@ -141,5 +141,6 @@ keygen: $(OBJS_VIRT) $(LIBS) keygen.o
$(Q)$(LD) -o $@ $@.o $(OBJS_VIRT) $(LIBS) $(LDFLAGS)

clean:
rm -f sign keygen *.o
rm -f sign keygen *.o *.d

-include $(DEPS)
Comment thread
danielinux marked this conversation as resolved.
Loading