summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/binary_grub-efi2
-rwxr-xr-xscripts/build/binary_grub-legacy2
-rwxr-xr-xscripts/build/binary_grub-pc2
-rwxr-xr-xscripts/build/binary_hdd21
-rwxr-xr-xscripts/build/binary_syslinux2
-rwxr-xr-xscripts/build/config8
-rwxr-xr-xscripts/build/source_debian9
7 files changed, 23 insertions, 23 deletions
diff --git a/scripts/build/binary_grub-efi b/scripts/build/binary_grub-efi
index 2fec81d63..2ee26f40d 100755
--- a/scripts/build/binary_grub-efi
+++ b/scripts/build/binary_grub-efi
@@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
# Processing arguments and configuration files
Init_config_data "${@}"
-if ! In_list "grub-efi" $LB_BOOTLOADERS; then
+if [ "${LB_BOOTLOADER_EFI}" != "grub-efi" ]; then
exit 0
fi
diff --git a/scripts/build/binary_grub-legacy b/scripts/build/binary_grub-legacy
index 6399b8e5f..4acbd2e50 100755
--- a/scripts/build/binary_grub-legacy
+++ b/scripts/build/binary_grub-legacy
@@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
# Processing arguments and configuration files
Init_config_data "${@}"
-if ! In_list "grub-legacy" $LB_BOOTLOADERS; then
+if [ "${LB_BOOTLOADER_BIOS}" != "grub-legacy" ]; then
exit 0
fi
diff --git a/scripts/build/binary_grub-pc b/scripts/build/binary_grub-pc
index ac6fd04a1..f639b1aa1 100755
--- a/scripts/build/binary_grub-pc
+++ b/scripts/build/binary_grub-pc
@@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
# Processing arguments and configuration files
Init_config_data "${@}"
-if ! In_list "grub-pc" $LB_BOOTLOADERS; then
+if [ "${LB_BOOTLOADER_BIOS}" != "grub-pc" ]; then
exit 0
fi
diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd
index beaff873d..c6aeedb15 100755
--- a/scripts/build/binary_hdd
+++ b/scripts/build/binary_hdd
@@ -52,15 +52,11 @@ Check_package chroot /sbin/parted parted
Check_package host /sbin/fdisk fdisk
Check_package host /sbin/losetup mount
-for BOOTLOADER in ${LB_BOOTLOADERS}; do
- case "${BOOTLOADER}" in
- grub-legacy)
- Check_package chroot /usr/sbin/grub grub
- ;;
- esac
-done
+case "${LB_BOOTLOADER_BIOS}" in
+ grub-legacy)
+ Check_package chroot /usr/sbin/grub grub
+ ;;
-case ${LB_FIRST_BOOTLOADER} in
syslinux)
case ${LB_BINARY_FILESYSTEM} in
fat*|ntfs)
@@ -189,8 +185,7 @@ case "${LB_BUILD_WITH_CHROOT}" in
Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
- if [ "${LB_FIRST_BOOTLOADER}" = "syslinux" ]
- then
+ if [ "${LB_BOOTLOADER_BIOS}" = "syslinux" ]; then
dd if=chroot/usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z])/mbr.bin of=${FREELO} bs=440 count=1
fi
;;
@@ -209,8 +204,7 @@ case "${LB_BUILD_WITH_CHROOT}" in
parted -s "${FREELO}" set 1 boot on || true
parted -s "${FREELO}" set 1 lba off || true
- if [ "${LB_FIRST_BOOTLOADER}" = "syslinux" ]
- then
+ if [ "${LB_BOOTLOADER_BIOS}" = "syslinux" ]; then
dd if=/usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z])/mbr.bin of=${FREELO} bs=440 count=1
fi
;;
@@ -275,8 +269,7 @@ cp -T ${CP_OPTIONS} binary/ chroot/binary.tmp
FIXME()
{
-if [ "${LB_FIRST_BOOTLOADER}" = "grub-legacy" ]
-then
+if [ "${LB_BOOTLOADER_BIOS}" = "grub-legacy" ]; then
cat > chroot/grub.sh << EOF
#!/bin/sh
diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux
index 2374d5c55..d4f4bf272 100755
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -21,7 +21,7 @@ USAGE="${PROGRAM} [--force]"
# Processing arguments and configuration files
Init_config_data "${@}"
-if ! In_list "syslinux" $LB_BOOTLOADERS; then
+if [ "${LB_BOOTLOADER_BIOS}" != "syslinux" ]; then
exit 0
fi
diff --git a/scripts/build/config b/scripts/build/config
index f8fd5ff89..2bd929bc1 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -364,6 +364,7 @@ Local_arguments ()
;;
--bootloaders|--bootloader)
+ # This will be split up into BIOS and EFI selections by `Prepare_config()`
LB_BOOTLOADERS="${2}"
shift 2
;;
@@ -1182,8 +1183,11 @@ LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL}"
# Set boot parameters
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE}"
-# Set bootloaders
-LB_BOOTLOADERS="${LB_BOOTLOADERS}"
+# Set BIOS bootloader
+LB_BOOTLOADER_BIOS="${LB_BOOTLOADER_BIOS}"
+
+# Set EFI bootloader
+LB_BOOTLOADER_EFI="${LB_BOOTLOADER_EFI}"
# Set checksums
LB_CHECKSUMS="${LB_CHECKSUMS}"
diff --git a/scripts/build/source_debian b/scripts/build/source_debian
index 2eed78861..ade03add9 100755
--- a/scripts/build/source_debian
+++ b/scripts/build/source_debian
@@ -54,9 +54,12 @@ Chroot chroot "sh source-selection.sh"
rm -f chroot/source-selection.sh
mv chroot/source-selection.txt ./
-for BOOTLOADER in ${LB_BOOTLOADERS}; do
- echo "${BOOTLOADER}" >> source-selection.txt
-done
+if [ -n "${LB_BOOTLOADER_BIOS}" ]; then
+ echo "${LB_BOOTLOADER_BIOS}" >> source-selection.txt
+fi
+if [ -n "${LB_BOOTLOADER_EFI}" ]; then
+ echo "${LB_BOOTLOADER_EFI}" >> source-selection.txt
+fi
echo "live-build" >> source-selection.txt