Skip to content

Commit

Permalink
Resolved .sbatlevel issue caused by Binutils before 2.36. Applied pat…
Browse files Browse the repository at this point in the history
…ch from 'rhboot/shim#535'
  • Loading branch information
vden-irm committed Apr 21, 2023
1 parent a2e18d8 commit e652f5a
Show file tree
Hide file tree
Showing 5 changed files with 2,300 additions and 2,184 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ WORKDIR /build/shim

COPY itrenew-ev.cer /build/shim
COPY sbat.csv /build/shim/data
COPY sbat_var.S.patch /build/shim

# Apply the patch 'Make sbat_var.S parse right with buggy gcc/binutils'
# from the commit 657b2483ca6e9fcf2ad8ac7ee577ff546d24c3aa
RUN patch -Np1 -i sbat_var.S.patch

RUN mkdir -p build-x86_64/data build-ia32/data
RUN cp /build/shim/data/sbat.csv build-x86_64/data && \
Expand All @@ -37,6 +42,8 @@ RUN objcopy -j .sbat -O binary /build/target/shimx64.efi shimx64.sbat && \
objcopy -j .sbat -O binary /build/target/shimia32.efi shimia32.sbat
RUN cat shimx64.sbat
RUN cat shimia32.sbat
RUN objdump -s -j .sbatlevel /build/target/shimx64.efi && \
objdump -s -j .sbatlevel /build/target/shimia32.efi
RUN diff shimx64.sbat /build/shim/data/sbat.csv && \
diff shimia32.sbat /build/shim/data/sbat.csv || ( >&2 echo "Bad SBAT"; exit 1 )

Expand Down
Loading

0 comments on commit e652f5a

Please sign in to comment.