Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -682,9 +682,18 @@ if [[ $SECURE_UPGRADE_MODE == 'dev' || $SECURE_UPGRADE_MODE == "prod" ]]; then
echo "Secure Boot support build stage: Starting .."

# debian secure boot dependecies
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
shim-unsigned \
grub-efi
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install grub-efi

# TEMP: Remove after merging SONiC 202311. Instead of that piece of code we
# must install shim-unsigned using apt-get
if [[ $CONFIGURED_ARCH == armhf ]]; then
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install shim-unsigned
else
wget http://ftp.debian.org/debian/pool/main/s/shim/shim-unsigned_15.8-1~deb11u1_$CONFIGURED_ARCH.deb -O shim-unsigned.deb
sudo mv shim-unsigned.deb $FILESYSTEM_ROOT/tmp/
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT dpkg -i /tmp/shim-unsigned.deb
sudo rm -f $FILESYSTEM_ROOT/tmp/shim-unsigned.deb
fi

if [ ! -f $SECURE_UPGRADE_SIGNING_CERT ]; then
echo "Error: SONiC SECURE_UPGRADE_SIGNING_CERT=$SECURE_UPGRADE_SIGNING_CERT key missing"
Expand Down