Skip to content

Commit 993b4f4

Browse files
authored
Merge pull request #744 from danielinux/update-submodules-2.8.0
Updated submodules to latest version
2 parents 084431b + c03d251 commit 993b4f4

File tree

8 files changed

+24
-15
lines changed

8 files changed

+24
-15
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ ifeq ($(TARGET),raspi3)
261261
endif
262262

263263
ifeq ($(TARGET),sim)
264+
CFLAGS+=-fno-pie
265+
LDFLAGS+=-no-pie
264266
MAIN_TARGET:=wolfboot.bin tools/bin-assemble/bin-assemble test-app/image_v1_signed.bin internal_flash.dd
265267
endif
266268

lib/wolfssl

Submodule wolfssl updated 300 files

src/xmalloc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@ struct xmalloc_slot {
171171
#define MP_CURVE_FIELD_COUNT_SIZE (380)
172172
#ifndef _LP64
173173
#define ECC_POINT_SIZE (232)
174+
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 6)
174175
#else
175176
#define ECC_POINT_SIZE (320)
176-
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 5)
177+
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 6)
177178
#endif
178179
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 6)
179180
#define MP_DIGIT_BUFFER_MONT_SIZE (sizeof(fp_digit)*(FP_SIZE + 1))
@@ -187,7 +188,7 @@ struct xmalloc_slot {
187188
#else
188189
#define ECC_POINT_SIZE (512)
189190
#endif
190-
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 5)
191+
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 6)
191192
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 6)
192193
#define MP_DIGIT_BUFFER_MONT_SIZE (sizeof(fp_digit)*(FP_SIZE + 1))
193194
#endif
@@ -200,7 +201,7 @@ struct xmalloc_slot {
200201
#else
201202
#define ECC_POINT_SIZE (608)
202203
#endif
203-
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 5)
204+
#define MP_INT_BUFFER_SIZE (MP_INT_TYPE_SIZE * 6)
204205
#define MP_INT_BUFFER_SIZE_1 (MP_INT_TYPE_SIZE * 6)
205206
#define MP_DIGIT_BUFFER_MONT_SIZE (sizeof(fp_digit)*(FP_SIZE + 1))
206207
#endif

test-app/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ ifeq ($(HASH),SHA3_384)
5353
CFLAGS+=-D"WOLFBOOT_HASH_SHA3_384"
5454
endif
5555

56-
56+
STACK_USAGE_LIMIT:=1024
57+
ifeq ($(TARGET),sim)
58+
STACK_USAGE_LIMIT:=4608
59+
endif
5760

5861
ifeq ($(TARGET),ti_hercules)
5962
APP_OBJS:=app_$(TARGET).o ../test-app/libwolfboot.o
@@ -63,7 +66,7 @@ else
6366
# Stack usage computation not supported on TriCore
6467
ifneq ($(ARCH),AURIX_TC3)
6568
ifneq ($(USE_CLANG),1)
66-
CFLAGS+=-Wstack-usage=1024
69+
CFLAGS+=-Wstack-usage=$(STACK_USAGE_LIMIT)
6770
endif
6871
endif
6972
CFLAGS+=-DTARGET_$(TARGET) -I../include
@@ -509,6 +512,8 @@ ifeq ($(TARGET),sim)
509512
# LD on MacOS does not support "-Map="
510513
LDMAPSUPPORTED=$(shell $(CC) -Wl,-Map=image.map 2>&1 | grep 'unknown option')
511514
LDFLAGS=
515+
CFLAGS+=-fno-pie
516+
LDFLAGS+=-no-pie
512517
ifeq ($(FORCE_32BIT),1)
513518
LDFLAGS+=-m32
514519
CFLAGS+=-m32

tools/keytools/Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# wolfBoot KeyGen and Signing Tool
22

3-
-include ../../.config
4-
53
V?=0
64
ifeq ($(V),0)
75
Q=@
@@ -18,6 +16,7 @@ LD = gcc
1816
WOLFBOOTDIR = ../..
1917
CFLAGS = -Wall -Wextra -Werror
2018
CFLAGS += -I. -DWOLFSSL_USER_SETTINGS -I$(WOLFBOOT_LIB_WOLFSSL) -I$(WOLFBOOTDIR)/include
19+
DEPFLAGS = -MMD -MP
2120
LDFLAGS =
2221
OBJDIR = ./
2322
LIBS =
@@ -112,6 +111,7 @@ OBJS_REAL+=\
112111
OBJS_REAL+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/dilithium.o
113112

114113
OBJS_VIRT=$(addprefix $(OBJDIR), $(notdir $(OBJS_REAL)))
114+
DEPS=$(OBJS_VIRT:.o=.d) sign.d keygen.d
115115
vpath %.c $(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/
116116
vpath %.c $(WOLFBOOTDIR)/src/
117117
vpath %.c ./
@@ -125,11 +125,11 @@ debug: all
125125

126126
# build objects
127127
$(OBJDIR)/%.o: %.c
128-
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
128+
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -c -o $@ $<
129129
$(OBJDIR)/%.o: $(WOLFBOOTDIR)/src/%.c
130-
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
130+
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -c -o $@ $<
131131
$(OBJDIR)/%.o: $(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/%.c
132-
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
132+
$(Q)$(CC) $(CFLAGS) $(DEPFLAGS) -c -o $@ $<
133133

134134
# build templates
135135
sign: $(OBJS_VIRT) $(LIBS) sign.o
@@ -141,5 +141,6 @@ keygen: $(OBJS_VIRT) $(LIBS) keygen.o
141141
$(Q)$(LD) -o $@ $@.o $(OBJS_VIRT) $(LIBS) $(LDFLAGS)
142142

143143
clean:
144-
rm -f sign keygen *.o
144+
rm -f sign keygen *.o *.d
145145

146+
-include $(DEPS)

0 commit comments

Comments
 (0)