summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <kim.sidney@gmail.com>2018-11-12 10:07:52 +0100
committerKim Hagen <kim.sidney@gmail.com>2018-11-12 10:07:52 +0100
commit8dcda0e05b0109e12280c446070b1fa94d0a6b4b (patch)
tree3229cfed4504037f0d141ec9a6625cdb8708880c
parenta48a22a8113c0e98ed019c60b1f4c182550d3979 (diff)
downloadvyos-build-8dcda0e05b0109e12280c446070b1fa94d0a6b4b.tar.gz
vyos-build-8dcda0e05b0109e12280c446070b1fa94d0a6b4b.zip
Add uefi to vyos-build
-rw-r--r--Dockerfile11
-rw-r--r--Makefile2
-rw-r--r--data/live-build-config/bootloaders/grub-pc/dejavu-bold-14.pf2bin0 -> 191158 bytes
-rw-r--r--data/live-build-config/bootloaders/grub-pc/dejavu-bold-16.pf2bin0 -> 212142 bytes
-rw-r--r--data/live-build-config/bootloaders/grub-pc/grub.cfg59
-rw-r--r--data/live-build-config/bootloaders/grub-pc/live-theme/theme.txt51
-rw-r--r--data/live-build-config/bootloaders/grub-pc/splash.pngbin0 -> 19557 bytes
-rwxr-xr-xdata/live-build-config/hooks/live/00-manifest.binary (renamed from data/live-build-config/hooks/00-manifest.binary)0
-rwxr-xr-xdata/live-build-config/hooks/live/00-mk_buildid.chroot (renamed from data/live-build-config/hooks/00-mk_buildid.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/01-interfaces.chroot (renamed from data/live-build-config/hooks/01-interfaces.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/02-issue.chroot (renamed from data/live-build-config/hooks/02-issue.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/03-root_bash_completion.chroot (renamed from data/live-build-config/hooks/03-root_bash_completion.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/04-locale.chroot (renamed from data/live-build-config/hooks/04-locale.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/05-event_tty.chroot (renamed from data/live-build-config/hooks/05-event_tty.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/07-apt.chroot (renamed from data/live-build-config/hooks/07-apt.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/08-sysconf.chroot (renamed from data/live-build-config/hooks/08-sysconf.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/09-live.chroot (renamed from data/live-build-config/hooks/09-live.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/10-unmountfs.chroot (renamed from data/live-build-config/hooks/10-unmountfs.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/11-busybox.chroot (renamed from data/live-build-config/hooks/11-busybox.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/12-udev-initramfs.chroot (renamed from data/live-build-config/hooks/12-udev-initramfs.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/13-vyos_replace.chroot (renamed from data/live-build-config/hooks/13-vyos_replace.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/14-firmware-linux-nonfree.chroot (renamed from data/live-build-config/hooks/14-firmware-linux-nonfree.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/15-sources_list.chroot (renamed from data/live-build-config/hooks/15-sources_list.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/16-fuse.chroot (renamed from data/live-build-config/hooks/16-fuse.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/17-gen_initramfs.chroot (renamed from data/live-build-config/hooks/17-gen_initramfs.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/18-enable-disable_services.chroot (renamed from data/live-build-config/hooks/18-enable-disable_services.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/19-kernel_symlinks.chroot (renamed from data/live-build-config/hooks/19-kernel_symlinks.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/20-rm_ddclient_hook.chroot (renamed from data/live-build-config/hooks/20-rm_ddclient_hook.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/21-pam_mkhomedir.chroot (renamed from data/live-build-config/hooks/21-pam_mkhomedir.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/24-efi_packages.chroot8
-rwxr-xr-xdata/live-build-config/hooks/live/30-frr-configs.chroot (renamed from data/live-build-config/hooks/30-frr-configs.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/30-strongswan-configs.chroot (renamed from data/live-build-config/hooks/30-strongswan-configs.chroot)0
-rwxr-xr-xdata/live-build-config/hooks/live/99-cleanup-packages.chroot (renamed from data/live-build-config/hooks/99-cleanup-packages.chroot)0
-rw-r--r--data/live-build-config/includes.binary/isolinux/splash.pngbin234763 -> 10061 bytes
-rwxr-xr-xscripts/live-build-config2
35 files changed, 129 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 3f44b976..2cfc826d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -39,8 +39,15 @@ RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' | tee -a /etc/
python3-lxml \
python3-setuptools \
python3-nose \
- python3-coverage \
- && rm -rf /var/lib/apt/lists/*
+ python3-coverage
+
+# Update live-build
+RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list &&\
+ apt-get update &&\
+ apt-get install -y -t stretch live-build &&\
+ rm -f /etc/apt/sources.list.d/stretch.list &&\
+ apt-get update &&\
+ rm -rf /var/lib/apt/lists/*
#install packer
RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \
diff --git a/Makefile b/Makefile
index 92160ee6..17ee4e65 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,7 @@ clearfog: clean prepare
azure: clean prepare
@set -e
@echo "It's not like I'm building this specially for you or anything!"
- cp tools/cloud-init/azure/99-walinuxagent.chroot build/config/hooks/
+ cp tools/cloud-init/azure/99-walinuxagent.chroot build/config/hooks/live/
cp tools/cloud-init/azure/vyos-azure.list.chroot build/config/package-lists/
cp -f tools/cloud-init/azure/config.boot.default build/config/includes.chroot/opt/vyatta/etc/
cd $(build_dir)
diff --git a/data/live-build-config/bootloaders/grub-pc/dejavu-bold-14.pf2 b/data/live-build-config/bootloaders/grub-pc/dejavu-bold-14.pf2
new file mode 100644
index 00000000..9b093b20
--- /dev/null
+++ b/data/live-build-config/bootloaders/grub-pc/dejavu-bold-14.pf2
Binary files differ
diff --git a/data/live-build-config/bootloaders/grub-pc/dejavu-bold-16.pf2 b/data/live-build-config/bootloaders/grub-pc/dejavu-bold-16.pf2
new file mode 100644
index 00000000..11e7f7ab
--- /dev/null
+++ b/data/live-build-config/bootloaders/grub-pc/dejavu-bold-16.pf2
Binary files differ
diff --git a/data/live-build-config/bootloaders/grub-pc/grub.cfg b/data/live-build-config/bootloaders/grub-pc/grub.cfg
new file mode 100644
index 00000000..edf2a823
--- /dev/null
+++ b/data/live-build-config/bootloaders/grub-pc/grub.cfg
@@ -0,0 +1,59 @@
+set default=0
+set timeout=10
+
+loadfont $prefix/dejavu-bold-16.pf2
+loadfont $prefix/dejavu-bold-14.pf2
+loadfont $prefix/unicode.pf2
+set gfxmode=auto
+insmod all_video
+insmod gfxterm
+insmod png
+
+set color_normal=light-gray/black
+set color_highlight=white/black
+
+if [ -e /isolinux/splash.png ]; then
+ # binary_syslinux modifies the theme file to point to the correct
+ # background picture
+ set theme=/boot/grub/live-theme/theme.txt
+elif [ -e /boot/grub/splash.png ]; then
+ set theme=/boot/grub/live-theme/theme.txt
+else
+ set menu_color_normal=cyan/blue
+ set menu_color_highlight=white/blue
+fi
+
+terminal_output gfxterm
+
+insmod play
+play 960 440 1 0 4 440 1
+
+# Live boot
+LINUX_LIVE
+
+# You can add more entries like this
+# menuentry "Alternate live boot" {
+# linux KERNEL_LIVE APPEND_LIVE custom options here
+# initrd INITRD_LIVE
+# }
+# menuentry "Alternate graphical installer" {
+# linux KERNEL_GI APPEND_GI custom options here
+# initrd INITRD_GI
+# }
+# menuentry "Alternate textual installer" {
+# linux KERNEL_DI APPEND_DI custom options here
+# initrd INITRD_DI
+# }
+
+# Installer (if any)
+LINUX_INSTALL
+
+submenu 'Advanced options...' {
+
+# More installer entries (if any)
+LINUX_ADVANCED_INSTALL
+
+# Memtest (if any)
+MEMTEST
+
+}
diff --git a/data/live-build-config/bootloaders/grub-pc/live-theme/theme.txt b/data/live-build-config/bootloaders/grub-pc/live-theme/theme.txt
new file mode 100644
index 00000000..4ceef4b2
--- /dev/null
+++ b/data/live-build-config/bootloaders/grub-pc/live-theme/theme.txt
@@ -0,0 +1,51 @@
+desktop-image: "../splash.png"
+title-color: "#ffffff"
+title-font: "DejaVu Sans Bold 16"
+title-text: "Live Boot Menu with GRUB"
+message-font: "Unifont Regular 16"
+terminal-font: "Unifont Regular 16"
+
+#help bar at the bottom
++ label {
+ top = 100%-50
+ left = 0
+ width = 100%
+ height = 20
+ text = "@KEYMAP_SHORT@"
+ align = "center"
+ color = "#ffffff"
+ font = "DejaVu Sans Bold 14"
+}
+
+#boot menu
++ boot_menu {
+ left = 10%
+ width = 80%
+ top = 52%
+ height = 48%-80
+ item_color = "#a8a8a8"
+ item_font = "DejaVu Sans Bold 14"
+ selected_item_color= "#ffffff"
+ selected_item_font = "DejaVu Sans Bold 14"
+ item_height = 16
+ item_padding = 0
+ item_spacing = 4
+ icon_width = 0
+ icon_heigh = 0
+ item_icon_space = 0
+}
+
+#progress bar
++ progress_bar {
+ id = "__timeout__"
+ left = 15%
+ top = 100%-80
+ height = 16
+ width = 70%
+ font = "DejaVu Sans Regular 14"
+ text_color = "#000000"
+ fg_color = "#ffffff"
+ bg_color = "#a8a8a8"
+ border_color = "#ffffff"
+ text = "@TIMEOUT_NOTIFICATION_LONG@"
+}
diff --git a/data/live-build-config/bootloaders/grub-pc/splash.png b/data/live-build-config/bootloaders/grub-pc/splash.png
new file mode 100644
index 00000000..96e538a4
--- /dev/null
+++ b/data/live-build-config/bootloaders/grub-pc/splash.png
Binary files differ
diff --git a/data/live-build-config/hooks/00-manifest.binary b/data/live-build-config/hooks/live/00-manifest.binary
index 6db8b6f3..6db8b6f3 100755
--- a/data/live-build-config/hooks/00-manifest.binary
+++ b/data/live-build-config/hooks/live/00-manifest.binary
diff --git a/data/live-build-config/hooks/00-mk_buildid.chroot b/data/live-build-config/hooks/live/00-mk_buildid.chroot
index 087addad..087addad 100755
--- a/data/live-build-config/hooks/00-mk_buildid.chroot
+++ b/data/live-build-config/hooks/live/00-mk_buildid.chroot
diff --git a/data/live-build-config/hooks/01-interfaces.chroot b/data/live-build-config/hooks/live/01-interfaces.chroot
index 8d218ea4..8d218ea4 100755
--- a/data/live-build-config/hooks/01-interfaces.chroot
+++ b/data/live-build-config/hooks/live/01-interfaces.chroot
diff --git a/data/live-build-config/hooks/02-issue.chroot b/data/live-build-config/hooks/live/02-issue.chroot
index 732ebeb0..732ebeb0 100755
--- a/data/live-build-config/hooks/02-issue.chroot
+++ b/data/live-build-config/hooks/live/02-issue.chroot
diff --git a/data/live-build-config/hooks/03-root_bash_completion.chroot b/data/live-build-config/hooks/live/03-root_bash_completion.chroot
index b7ea8f52..b7ea8f52 100755
--- a/data/live-build-config/hooks/03-root_bash_completion.chroot
+++ b/data/live-build-config/hooks/live/03-root_bash_completion.chroot
diff --git a/data/live-build-config/hooks/04-locale.chroot b/data/live-build-config/hooks/live/04-locale.chroot
index 89a5f954..89a5f954 100755
--- a/data/live-build-config/hooks/04-locale.chroot
+++ b/data/live-build-config/hooks/live/04-locale.chroot
diff --git a/data/live-build-config/hooks/05-event_tty.chroot b/data/live-build-config/hooks/live/05-event_tty.chroot
index a00167f7..a00167f7 100755
--- a/data/live-build-config/hooks/05-event_tty.chroot
+++ b/data/live-build-config/hooks/live/05-event_tty.chroot
diff --git a/data/live-build-config/hooks/07-apt.chroot b/data/live-build-config/hooks/live/07-apt.chroot
index 8db33a78..8db33a78 100755
--- a/data/live-build-config/hooks/07-apt.chroot
+++ b/data/live-build-config/hooks/live/07-apt.chroot
diff --git a/data/live-build-config/hooks/08-sysconf.chroot b/data/live-build-config/hooks/live/08-sysconf.chroot
index 8d1616c0..8d1616c0 100755
--- a/data/live-build-config/hooks/08-sysconf.chroot
+++ b/data/live-build-config/hooks/live/08-sysconf.chroot
diff --git a/data/live-build-config/hooks/09-live.chroot b/data/live-build-config/hooks/live/09-live.chroot
index f19f0ae6..f19f0ae6 100755
--- a/data/live-build-config/hooks/09-live.chroot
+++ b/data/live-build-config/hooks/live/09-live.chroot
diff --git a/data/live-build-config/hooks/10-unmountfs.chroot b/data/live-build-config/hooks/live/10-unmountfs.chroot
index 7992a4d2..7992a4d2 100755
--- a/data/live-build-config/hooks/10-unmountfs.chroot
+++ b/data/live-build-config/hooks/live/10-unmountfs.chroot
diff --git a/data/live-build-config/hooks/11-busybox.chroot b/data/live-build-config/hooks/live/11-busybox.chroot
index fecce616..fecce616 100755
--- a/data/live-build-config/hooks/11-busybox.chroot
+++ b/data/live-build-config/hooks/live/11-busybox.chroot
diff --git a/data/live-build-config/hooks/12-udev-initramfs.chroot b/data/live-build-config/hooks/live/12-udev-initramfs.chroot
index 13bdfb89..13bdfb89 100755
--- a/data/live-build-config/hooks/12-udev-initramfs.chroot
+++ b/data/live-build-config/hooks/live/12-udev-initramfs.chroot
diff --git a/data/live-build-config/hooks/13-vyos_replace.chroot b/data/live-build-config/hooks/live/13-vyos_replace.chroot
index dcb00ff6..dcb00ff6 100755
--- a/data/live-build-config/hooks/13-vyos_replace.chroot
+++ b/data/live-build-config/hooks/live/13-vyos_replace.chroot
diff --git a/data/live-build-config/hooks/14-firmware-linux-nonfree.chroot b/data/live-build-config/hooks/live/14-firmware-linux-nonfree.chroot
index 887831cc..887831cc 100755
--- a/data/live-build-config/hooks/14-firmware-linux-nonfree.chroot
+++ b/data/live-build-config/hooks/live/14-firmware-linux-nonfree.chroot
diff --git a/data/live-build-config/hooks/15-sources_list.chroot b/data/live-build-config/hooks/live/15-sources_list.chroot
index 956f9bba..956f9bba 100755
--- a/data/live-build-config/hooks/15-sources_list.chroot
+++ b/data/live-build-config/hooks/live/15-sources_list.chroot
diff --git a/data/live-build-config/hooks/16-fuse.chroot b/data/live-build-config/hooks/live/16-fuse.chroot
index 126dc626..126dc626 100755
--- a/data/live-build-config/hooks/16-fuse.chroot
+++ b/data/live-build-config/hooks/live/16-fuse.chroot
diff --git a/data/live-build-config/hooks/17-gen_initramfs.chroot b/data/live-build-config/hooks/live/17-gen_initramfs.chroot
index aced728a..aced728a 100755
--- a/data/live-build-config/hooks/17-gen_initramfs.chroot
+++ b/data/live-build-config/hooks/live/17-gen_initramfs.chroot
diff --git a/data/live-build-config/hooks/18-enable-disable_services.chroot b/data/live-build-config/hooks/live/18-enable-disable_services.chroot
index d4d89ba8..d4d89ba8 100755
--- a/data/live-build-config/hooks/18-enable-disable_services.chroot
+++ b/data/live-build-config/hooks/live/18-enable-disable_services.chroot
diff --git a/data/live-build-config/hooks/19-kernel_symlinks.chroot b/data/live-build-config/hooks/live/19-kernel_symlinks.chroot
index e63ca263..e63ca263 100755
--- a/data/live-build-config/hooks/19-kernel_symlinks.chroot
+++ b/data/live-build-config/hooks/live/19-kernel_symlinks.chroot
diff --git a/data/live-build-config/hooks/20-rm_ddclient_hook.chroot b/data/live-build-config/hooks/live/20-rm_ddclient_hook.chroot
index 173b4e5c..173b4e5c 100755
--- a/data/live-build-config/hooks/20-rm_ddclient_hook.chroot
+++ b/data/live-build-config/hooks/live/20-rm_ddclient_hook.chroot
diff --git a/data/live-build-config/hooks/21-pam_mkhomedir.chroot b/data/live-build-config/hooks/live/21-pam_mkhomedir.chroot
index af155ba4..af155ba4 100755
--- a/data/live-build-config/hooks/21-pam_mkhomedir.chroot
+++ b/data/live-build-config/hooks/live/21-pam_mkhomedir.chroot
diff --git a/data/live-build-config/hooks/live/24-efi_packages.chroot b/data/live-build-config/hooks/live/24-efi_packages.chroot
new file mode 100755
index 00000000..c2b1ff11
--- /dev/null
+++ b/data/live-build-config/hooks/live/24-efi_packages.chroot
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo I: Download grub-efi packages.
+
+mkdir -p /usr/share/vyos/packages
+cd /usr/share/vyos/packages
+aptitude download grub-efi
+aptitude download grub-efi-amd64
diff --git a/data/live-build-config/hooks/30-frr-configs.chroot b/data/live-build-config/hooks/live/30-frr-configs.chroot
index cc169fb5..cc169fb5 100755
--- a/data/live-build-config/hooks/30-frr-configs.chroot
+++ b/data/live-build-config/hooks/live/30-frr-configs.chroot
diff --git a/data/live-build-config/hooks/30-strongswan-configs.chroot b/data/live-build-config/hooks/live/30-strongswan-configs.chroot
index 25562a65..25562a65 100755
--- a/data/live-build-config/hooks/30-strongswan-configs.chroot
+++ b/data/live-build-config/hooks/live/30-strongswan-configs.chroot
diff --git a/data/live-build-config/hooks/99-cleanup-packages.chroot b/data/live-build-config/hooks/live/99-cleanup-packages.chroot
index 63be7df6..63be7df6 100755
--- a/data/live-build-config/hooks/99-cleanup-packages.chroot
+++ b/data/live-build-config/hooks/live/99-cleanup-packages.chroot
diff --git a/data/live-build-config/includes.binary/isolinux/splash.png b/data/live-build-config/includes.binary/isolinux/splash.png
index e2c9bfa4..b9effe3b 100644
--- a/data/live-build-config/includes.binary/isolinux/splash.png
+++ b/data/live-build-config/includes.binary/isolinux/splash.png
Binary files differ
diff --git a/scripts/live-build-config b/scripts/live-build-config
index 232ae9d4..6efa0a8c 100755
--- a/scripts/live-build-config
+++ b/scripts/live-build-config
@@ -38,7 +38,7 @@ lb config noauto \
--bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay" \
--linux-flavours {{architecture}}-vyos \
--linux-packages linux-image-4.19.0 \
- --bootloader syslinux \
+ --bootloader syslinux,grub-efi \
--binary-images iso-hybrid \
--debian-installer false \
--distribution jessie \