Skip to content

Commit

Permalink
new shim/mokmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
hakuna-m committed Feb 26, 2018
1 parent 96fd3f5 commit fb9b0fc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ winboot2:
echo test configfile gzio normal sleep memdisk tar font gfxterm gettext true efi_gop efi_uga video_bochs video_cirrus probe efifwsetup \
all_video gfxterm_background png gfxmenu
cp /usr/lib/shim/shim.efi.signed build/winboot/EFI/shimx64.efi 2>/dev/null || \
cp shim/shim.efi.signed build/winboot/EFI/shimx64.efi 2>/dev/null || \
cp shim/shimx64.efi.signed build/winboot/EFI/shimx64.efi 2>/dev/null || \
cp /usr/lib/shim/shimx64.efi.signed build/winboot/EFI/shimx64.efi
cp /usr/lib/shim/MokManager.efi.signed build/winboot/EFI/MokManager.efi 2>/dev/null || \
cp shim/MokManager.efi.signed build/winboot/EFI/MokManager.efi 2>/dev/null || \
cp /usr/lib/shim/mmx64.efi.signed build/winboot/EFI/mmx64.efi
cp shim/mmx64.efi build/winboot/EFI/mmx64.efi 2>/dev/null || \
cp /usr/lib/shim/mmx64.efi build/winboot/EFI/mmx64.efi
sbsign --key .key/*.key --cert .key/*.crt --output build/winboot/EFI/grubx64.efi build/winboot/EFI/grubx64.efi
grub-mkimage -O i386-efi -c build/winboot/wubildr-bootstrap.cfg -m build/winboot/wubildr.tar -o build/winboot/EFI/grubia32.efi \
loadenv part_msdos part_gpt fat ntfs ext2 ntfscomp iso9660 loopback search linux linuxefi boot minicmd cat cpuid chain halt help ls reboot \
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wubi (16.04.4r329) xenial; urgency=low

[Hakuna Matata]

* Replace shim 0.9+1474479173.6c180c6 with newer version

wubi (16.04.4r327) xenial; urgency=low

[Hakuna Matata]
Expand Down
13 changes: 7 additions & 6 deletions tools/check_winboot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

shim_signed_url="http://archive.ubuntu.com/ubuntu/pool/main/s/shim-signed/shim-signed_1.21.3+0.9+1465500757.14a5905.is.0.8-0ubuntu3_amd64.deb"
shim_url="http://archive.ubuntu.com/ubuntu/pool/main/s/shim/shim_0.9+1465500757.14a5905.is.0.8-0ubuntu3_amd64.deb"
shim_signed_url="http://archive.ubuntu.com/ubuntu/pool/main/s/shim-signed/shim-signed_1.33.1~16.04.1+13-0ubuntu2_amd64.deb"
shim_url="http://archive.ubuntu.com/ubuntu/pool/main/s/shim/shim_13-0ubuntu2_amd64.deb"
shim_blacklist_md5="3aef9c72ad50faa8db576c01f85a0915"

if [ ! -e /usr/lib/grub/i386-pc/moddep.lst ]; then
Expand All @@ -22,14 +22,15 @@ if [ ! -e /usr/lib/shim/shim.efi.signed ] && [ ! -e /usr/lib/shim/shimx64.efi.si
fi
if [ -e /usr/lib/shim/shimx64.efi.signed ] &&
[ "$(md5sum /usr/lib/shim/shimx64.efi.signed | cut -d ' ' -f 1)" = "$shim_blacklist_md5" ] &&
[ ! -e shim/shim.efi.signed ]; then
echo "Installed shim is blacklisted, downloading previous version of shim"
([ ! -e shim/shimx64.efi.signed ] || [ ! -e shim/mmx64.efi ]); then
echo "Installed shim is blacklisted, downloading new version of shim"
mkdir -p shim
wget "$shim_signed_url" -P /tmp -O "/tmp/shim-signed.deb"
dpkg -x /tmp/shim-signed.deb /tmp/shim
wget "$shim_url" -P /tmp -O "/tmp/shim.deb"
dpkg -x /tmp/shim.deb /tmp/shim
cp /tmp/shim/usr/lib/shim/*.efi.signed shim/.
ar p /tmp/shim.deb data.tar.xz | tar xvfJ - -C /tmp/shim
cp /tmp/shim/usr/lib/shim/shimx64.efi.signed shim/.
cp /tmp/shim/usr/lib/shim/mmx64.efi shim/.
fi
if [ ! -e /usr/bin/sbsign ]; then
echo "Installing sbsigntool..."
Expand Down

0 comments on commit fb9b0fc

Please sign in to comment.