]> git.proxmox.com Git - efi-boot-shim.git/commitdiff
Make httpboot.c always get built.
authorPeter Jones <pjones@redhat.com>
Fri, 22 Nov 2019 20:14:22 +0000 (15:14 -0500)
committerJavier Martinez Canillas <javier@dowhile0.org>
Tue, 16 Feb 2021 08:12:48 +0000 (09:12 +0100)
This is a backport from devel of:

  commit 634fd72ac6a6c6c9010c32506d524586826a8637
  Author: Peter Jones <pjones@redhat.com>
  Date:   Fri Nov 22 15:14:22 2019 -0500

      Make httpboot.c always get built.

Signed-off-by: Peter Jones <pjones@redhat.com>
.github/workflows/pullrequest.yml
.github/workflows/push.yml
BUILDING
Make.defaults
Makefile
shim.c

index 3f68cbbfab045cb7ace0d7eaec1ed08bf90ebbdd..2821b2f4499fde1936ddd266282456fe92a2c7aa 100644 (file)
@@ -56,8 +56,8 @@ jobs:
       - name: Do the build on ${{ matrix.distro }} for ${{ matrix.efiarch }}
         id: build
         run: |
-          make -s ARCH=${{ matrix.makearch }} PREFIX=/usr LIBDIR=${{ matrix.libdir }} DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true clean all
-          make -s ARCH=${{ matrix.makearch }} PREFIX=/usr LIBDIR=${{ matrix.libdir }} DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true install
+          make -s ARCH=${{ matrix.makearch }} PREFIX=/usr LIBDIR=${{ matrix.libdir }} DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean all
+          make -s ARCH=${{ matrix.makearch }} PREFIX=/usr LIBDIR=${{ matrix.libdir }} DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install
           echo 'results:'
           find /destdir -type f
 #      - name: Archive production artifacts
index d3ebbbf80e4809f8d48bf892519dced74f9d8926..f4e59355889e3f9025b56fc4072d929e6401cc01 100644 (file)
@@ -16,10 +16,10 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v2
       - name: Do the build
-        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true clean all
+        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean all
         id: build
       - name: Install in /destdir
-        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true install
+        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install
         id: install
 #      - name: Archive production artifacts
 #        uses: actions/upload-artifact@v2
@@ -35,10 +35,10 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v2
       - name: Do the build
-        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true clean all
+        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean all
         id: build
       - name: Install in /destdir
-        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true install
+        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install
         id: install
 #      - name: Archive production artifacts
 #        uses: actions/upload-artifact@v2
@@ -54,10 +54,10 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v2
       - name: Do the build
-        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true clean all
+        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean all
         id: build
       - name: Install in /destdir
-        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true install
+        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install
         id: install
 #      - name: Archive production artifacts
 #        uses: actions/upload-artifact@v2
@@ -73,10 +73,10 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v2
       - name: Do the build
-        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true clean all
+        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean all
         id: build
       - name: Install in /destdir
-        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true install
+        run: make PREFIX=/usr LIBDIR=/usr/lib64 DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install
         id: install
 #      - name: Archive production artifacts
 #        uses: actions/upload-artifact@v2
index 5cc176beae908bc6b162b7d07cae4d20b6beda93..456c9b4ac6f2e824ad79ac8a048a7186faf18de0 100644 (file)
--- a/BUILDING
+++ b/BUILDING
@@ -31,8 +31,6 @@ Variables you could set to customize the build:
   generate keys during the build and sign MokManager and fallback with
   them, and the signed version will be what gets installed with the
   install targets
-- ENABLE_HTTPBOOT
-  build support for http booting
 - DISABLE_EBS_PROTECTION
   On systems where a second stage bootloader is not used, and the Linux
   Kernel is embedded in the same EFI image as shim and booted directly
index 8bfcf7e01dced8ee6b8961ee11811181c43318d6..e58a281078a1989240fe5fcf6aaab729b11a5b7e 100644 (file)
@@ -99,10 +99,6 @@ ifneq ($(origin OVERRIDE_SECURITY_POLICY), undefined)
        CFLAGS  += -DOVERRIDE_SECURITY_POLICY
 endif
 
-ifneq ($(origin ENABLE_HTTPBOOT), undefined)
-       CFLAGS  += -DENABLE_HTTPBOOT
-endif
-
 ifneq ($(origin REQUIRE_TPM), undefined)
        CFLAGS  += -DREQUIRE_TPM
 endif
index fe860e23315a10934a6558774ab2e2559b70fd25..226f08d3240d46236ea937bd6bb7acc394a5b2c5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,20 +33,15 @@ CFLAGS += -DENABLE_SHIM_CERT
 else
 TARGETS += $(MMNAME) $(FBNAME)
 endif
-OBJS   = shim.o mok.o netboot.o cert.o replacements.o tpm.o version.o errlog.o sbat.o sbat_data.o pe.o
+OBJS   = shim.o mok.o netboot.o cert.o replacements.o tpm.o version.o errlog.o sbat.o sbat_data.o pe.o httpboot.o
 KEYS   = shim_cert.h ocsp.* ca.* shim.crt shim.csr shim.p12 shim.pem shim.key shim.cer
-ORIG_SOURCES   = shim.c mok.c netboot.c replacements.c tpm.c errlog.c sbat.c pe.c shim.h version.h $(wildcard include/*.h)
+ORIG_SOURCES   = shim.c mok.c netboot.c replacements.c tpm.c errlog.c sbat.c pe.c httpboot.c shim.h version.h $(wildcard include/*.h)
 MOK_OBJS = MokManager.o PasswordCrypt.o crypt_blowfish.o errlog.o sbat_data.o
 ORIG_MOK_SOURCES = MokManager.c PasswordCrypt.c crypt_blowfish.c shim.h $(wildcard include/*.h)
 FALLBACK_OBJS = fallback.o tpm.o errlog.o sbat_data.o
 ORIG_FALLBACK_SRCS = fallback.c
 SBATPATH = data/sbat.csv
 
-ifneq ($(origin ENABLE_HTTPBOOT), undefined)
-       OBJS += httpboot.o
-       SOURCES += httpboot.c include/httpboot.h
-endif
-
 ifeq ($(SOURCE_DATE_EPOCH),)
        UNAME=$(shell uname -s -m -p -i -o)
 else
diff --git a/shim.c b/shim.c
index 1cd9584c124146da2ae8a58ab89b1ba02580976e..630550b5f7e03da16e7ffb990c1ad335171acfd5 100644 (file)
--- a/shim.c
+++ b/shim.c
@@ -1118,7 +1118,6 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath)
                }
                data = sourcebuffer;
                datasize = sourcesize;
-#if  defined(ENABLE_HTTPBOOT)
        } else if (find_httpboot(li->DeviceHandle)) {
                efi_status = httpboot_fetch_buffer (image_handle,
                                                    &sourcebuffer,
@@ -1130,7 +1129,6 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath)
                }
                data = sourcebuffer;
                datasize = sourcesize;
-#endif
        } else {
                /*
                 * Read the new executable off disk