Skip to content

Commit

Permalink
Shim upgrade to version 15
Browse files Browse the repository at this point in the history
This updates the version of Shim from 13 to 15.

Signed-off-by: Andriy Dobush <[email protected]>
Signed-off-by: Alex Doyle <[email protected]>
  • Loading branch information
ehdoyle committed Feb 8, 2021
1 parent 6f24ddb commit c70552f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build-config/make/shim.make
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# This is a makefile fragment that defines the build of shim
#

SHIM_VERSION = 13
SHIM_VERSION = 15
SHIM_TARBALL = shim-$(SHIM_VERSION).tar.bz2
SHIM_TARBALL_URLS += $(ONIE_MIRROR) \
https://github.com/rhinstaller/shim/releases/download/$(SHIM_VERSION)
Expand Down
41 changes: 21 additions & 20 deletions patches/shim/update-makefile.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Update Makefiles
Modify the Makefiles slightly to mesh with the ONIE build environment.

diff --git a/Cryptlib/Makefile b/Cryptlib/Makefile
index bf9d0dc..76fd154 100644
index 2aa5695..c1f32b9 100644
--- a/Cryptlib/Makefile
+++ b/Cryptlib/Makefile
@@ -1,7 +1,11 @@
Expand All @@ -19,7 +19,7 @@ index bf9d0dc..76fd154 100644
-Wall $(EFI_INCLUDES) -std=gnu89 \
-ffreestanding -I$(shell $(CC) -print-file-name=include)

@@ -17,7 +21,7 @@ endif
@@ -19,7 +23,7 @@ endif
ifeq ($(ARCH),aarch64)
CFLAGS += -DMDE_CPU_AARCH64
endif
Expand All @@ -29,7 +29,7 @@ index bf9d0dc..76fd154 100644
TARGET = libcryptlib.a
OBJS = Hash/CryptMd4Null.o \
diff --git a/Cryptlib/OpenSSL/Makefile b/Cryptlib/OpenSSL/Makefile
index b61b66d..f5b1cca 100644
index 916feac..158ba5b 100644
--- a/Cryptlib/OpenSSL/Makefile
+++ b/Cryptlib/OpenSSL/Makefile
@@ -3,7 +3,11 @@ EFI_INCLUDES = -I$(TOPDIR)/../Include \
Expand All @@ -45,7 +45,7 @@ index b61b66d..f5b1cca 100644
-fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -nostdinc \
-ffreestanding -std=gnu89 -I$(shell $(CC) -print-file-name=include) \
-Wall $(EFI_INCLUDES) -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_SMALL_FOOTPRINT -DPEDANTIC
@@ -23,7 +27,7 @@ endif
@@ -25,7 +29,7 @@ endif
ifeq ($(ARCH),arm)
CFLAGS += -O2 -DMDE_CPU_ARM
endif
Expand All @@ -54,33 +54,34 @@ index b61b66d..f5b1cca 100644

TARGET = libopenssl.a
OBJS = crypto/cryptlib.o \
diff --git a/Makefile b/Makefile
index 0328737..fbe8bba 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,11 @@ EFI_LIBS = -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/
diff --git a/Make.defaults b/Make.defaults
index e11ab5a..768a3d1 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -39,7 +39,11 @@ EFI_LIBS = -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/
EFI_CRT_OBJS = $(EFI_PATH)/crt0-efi-$(ARCH).o
EFI_LDS = $(TOPDIR)/elf_$(ARCH)_efi.lds

-CFLAGS = -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic \
+# Seed compiler and linker flags ONIE build environment flags
+CFLAGS = $(ONIE_CFLAGS)
+LDFLAGS = $(ONIE_LDFLAGS)
+CFLAGS = $(ONIE_CFLAGS)
+LDFLAGS = $(ONIE_LDFLAGS)
+
+CFLAGS += -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic \
+CFLAGS += -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic \
-fshort-wchar -Wall -Wsign-compare -Werror -fno-builtin \
-Werror=sign-compare -ffreestanding -std=gnu89 \
-I$(shell $(CC) -print-file-name=include) \
@@ -131,7 +135,7 @@ ifneq ($(origin VENDOR_DBX_FILE), undefined)
@@ -126,4 +130,4 @@ ifneq ($(origin VENDOR_DBX_FILE), undefined)
CFLAGS += -DVENDOR_DBX_FILE=\"$(VENDOR_DBX_FILE)\"
endif

-LDFLAGS = --hash-style=sysv -nostdlib -znocombreloc -T $(EFI_LDS) -shared -Bsymbolic -L$(EFI_PATH) -L$(LIBDIR) -LCryptlib -LCryptlib/OpenSSL $(EFI_CRT_OBJS) --build-id=sha1 $(ARCH_LDFLAGS)
+LDFLAGS += --hash-style=sysv -nostdlib -znocombreloc -T $(EFI_LDS) -shared -Bsymbolic -L$(EFI_PATH) -L$(LIBDIR) -LCryptlib -LCryptlib/OpenSSL $(EFI_CRT_OBJS) --build-id=sha1 $(ARCH_LDFLAGS)

TARGETS = $(SHIMNAME)
TARGETS += $(SHIMNAME).debug $(MMNAME).debug $(FBNAME).debug
@@ -240,7 +244,7 @@ ifeq ($(origin EFIDIR),undefined)
-LDFLAGS = --hash-style=sysv -nostdlib -znocombreloc -T $(EFI_LDS) -shared -Bsymbolic -L$(EFI_PATH) -L$(LIBDIR) -LCryptlib -LCryptlib/OpenSSL $(EFI_CRT_OBJS) --build-id=sha1 $(ARCH_LDFLAGS) --no-undefined
+LDFLAGS += --hash-style=sysv -nostdlib -znocombreloc -T $(EFI_LDS) -shared -Bsymbolic -L$(EFI_PATH) -L$(LIBDIR) -LCryptlib -LCryptlib/OpenSSL $(EFI_CRT_OBJS) --build-id=sha1 $(ARCH_LDFLAGS) --no-undefined
diff --git a/Makefile b/Makefile
index 115e7f0..291d7d0 100644
--- a/Makefile
+++ b/Makefile
@@ -129,7 +129,7 @@ ifeq ($(origin EFIDIR),undefined)
endif

install-deps : $(TARGETS)
Expand All @@ -89,7 +90,7 @@ index 0328737..fbe8bba 100644
install-deps : $(BOOTCSVNAME)

install-debugsource : install-deps
@@ -251,7 +255,7 @@ install-debugsource : install-deps
@@ -140,7 +140,7 @@ install-debugsource : install-deps
$(INSTALL) -m 0644 $${file} $(DESTDIR)/$(DEBUGSOURCE)/$(PKGNAME)-$(VERSION)$(DASHRELEASE)/$${outfile} ; \
done

Expand Down
1 change: 1 addition & 0 deletions upstream/shim-15.tar.bz2.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2dc6308584187bf3ee88bf9b119938c72c5a5088 shim-15.tar.bz2

0 comments on commit c70552f

Please sign in to comment.