porting in updated changes from bash branch (master)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
--- a/src/usr/autoboot.c 2015-06-29 04:18:17.055394598 -0400
|
||||
+++ b/src/usr/autoboot.c 2015-06-29 22:04:28.692916217 -0400
|
||||
@@ -71,6 +71,7 @@
|
||||
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c
|
||||
index e93b015..758e187 100644
|
||||
--- a/src/usr/autoboot.c
|
||||
+++ b/src/usr/autoboot.c
|
||||
@@ -71,6 +71,7 @@ static int ( * is_autoboot_device ) ( struct net_device *netdev );
|
||||
#define NORMAL "\033[0m"
|
||||
#define BOLD "\033[1m"
|
||||
#define CYAN "\033[36m"
|
||||
@@ -8,16 +10,27 @@
|
||||
|
||||
/** The "scriptlet" setting */
|
||||
const struct setting scriptlet_setting __setting ( SETTING_MISC, scriptlet ) = {
|
||||
@@ -560,9 +561,9 @@
|
||||
@@ -521,7 +522,6 @@ static int shell_banner ( void ) {
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int ipxe ( struct net_device *netdev ) {
|
||||
- struct feature *feature;
|
||||
struct image *image;
|
||||
char *scriptlet;
|
||||
int rc;
|
||||
@@ -538,11 +538,11 @@ int ipxe ( struct net_device *netdev ) {
|
||||
* do so.
|
||||
*
|
||||
*/
|
||||
- printf ( NORMAL "\n\n" PRODUCT_NAME "\n" BOLD PRODUCT_SHORT_NAME " %s"
|
||||
- NORMAL " -- " PRODUCT_TAG_LINE " -- "
|
||||
+ printf ( NORMAL "\n\n" PRODUCT_NAME "\n" BOLD PRODUCT_SHORT_NAME
|
||||
NORMAL " -- " PRODUCT_TAG_LINE " -- "
|
||||
- CYAN PRODUCT_URI NORMAL "\nFeatures:", product_version );
|
||||
+ printf ( NORMAL "\n\n" PRODUCT_NAME "\n" BOLD PRODUCT_SHORT_NAME
|
||||
+ CYAN PRODUCT_URI NORMAL "\n"
|
||||
+ BOLD BLUE "http://bdisk.square-r00t.net/" NORMAL "\n" );
|
||||
for_each_table_entry ( feature, FEATURES )
|
||||
printf ( " %s", feature->name );
|
||||
- for_each_table_entry ( feature, FEATURES )
|
||||
- printf ( " %s", feature->name );
|
||||
+ CYAN PRODUCT_URI NORMAL "\n"
|
||||
+ BOLD "BDisk" BLUE "LiveDistro" NORMAL " -- Welp, Yer Boned!(TM) -- "
|
||||
+ BOLD BLUE "https://bdisk.square-r00t.net/" NORMAL "\n" );
|
||||
printf ( "\n" );
|
||||
|
||||
/* Boot system */
|
||||
|
||||
120
src/ipxe_local/patches/ipxe-0004-eiso.patch
Normal file
120
src/ipxe_local/patches/ipxe-0004-eiso.patch
Normal file
@@ -0,0 +1,120 @@
|
||||
From 189652b03032305a2db860e76fb58e81e3420c4d Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Wed, 24 Feb 2016 09:16:51 +0100
|
||||
Subject: [PATCH] allow to build ISO image with EFI support (ipxe.eiso)
|
||||
|
||||
---
|
||||
src/arch/x86/Makefile.pcbios | 6 +++++
|
||||
src/util/geniso | 52 ++++++++++++++++++++++++++++++++++----------
|
||||
2 files changed, 46 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/arch/x86/Makefile.pcbios b/src/arch/x86/Makefile.pcbios
|
||||
index f8c2253..1e01636 100644
|
||||
--- a/src/arch/x86/Makefile.pcbios
|
||||
+++ b/src/arch/x86/Makefile.pcbios
|
||||
@@ -86,6 +86,12 @@ NON_AUTO_MEDIA += iso
|
||||
$(Q)ISOLINUX_BIN=$(ISOLINUX_BIN) LDLINUX_C32=$(LDLINUX_C32) \
|
||||
VERSION="$(VERSION)" bash util/geniso -o $@ $<
|
||||
|
||||
+# rule to make a non-emulation ISO boot image with EFI support
|
||||
+NON_AUTO_MEDIA += eiso
|
||||
+%eiso: %lkrn bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi util/geniso
|
||||
+ $(QM)$(ECHO) " [GENISO] $@"
|
||||
+ $(Q)ISOLINUX_BIN=$(ISOLINUX_BIN) VERSION="$(VERSION)" bash util/geniso -e -o $@ $<
|
||||
+
|
||||
# rule to make a floppy emulation ISO boot image
|
||||
NON_AUTO_MEDIA += liso
|
||||
%liso: %lkrn util/geniso
|
||||
diff --git a/src/util/geniso b/src/util/geniso
|
||||
index ff090d4..7694036 100755
|
||||
--- a/src/util/geniso
|
||||
+++ b/src/util/geniso
|
||||
@@ -6,16 +6,21 @@ function help() {
|
||||
echo "usage: ${0} [OPTIONS] foo.lkrn [bar.lkrn,...]"
|
||||
echo
|
||||
echo "where OPTIONS are:"
|
||||
+ echo " -e build image with EFI support"
|
||||
echo " -h show this help"
|
||||
echo " -l build legacy image with floppy emulation"
|
||||
echo " -o FILE save iso image to file"
|
||||
}
|
||||
|
||||
+EFI=0
|
||||
LEGACY=0
|
||||
FIRST=""
|
||||
|
||||
-while getopts "hlo:" opt; do
|
||||
+while getopts "ehlo:" opt; do
|
||||
case ${opt} in
|
||||
+ e)
|
||||
+ EFI=1
|
||||
+ ;;
|
||||
h)
|
||||
help
|
||||
exit 0
|
||||
@@ -37,17 +42,25 @@ if [ -z "${OUT}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
-# There should either be mkisofs or the compatible genisoimage program
|
||||
-for command in genisoimage mkisofs; do
|
||||
- if ${command} --version >/dev/null 2>/dev/null; then
|
||||
- mkisofs=(${command})
|
||||
- break
|
||||
- fi
|
||||
-done
|
||||
-
|
||||
-if [ -z "${mkisofs}" ]; then
|
||||
- echo "${0}: mkisofs or genisoimage not found, please install or set PATH" >&2
|
||||
+# We need xorriso (from libisoburn) for EFI support, so try that first.
|
||||
+if xorriso --version >/dev/null 2>/dev/null; then
|
||||
+ mkisofs=(xorriso -as mkisofs)
|
||||
+elif [ ${EFI} -eq 1 ]; then
|
||||
+ echo "${0}: xorriso not found, but required for EFI support. Please install." >&2
|
||||
exit 1
|
||||
+else
|
||||
+ # fall back to mkisofs or the compatible genisoimage program
|
||||
+ for command in genisoimage mkisofs; do
|
||||
+ if ${command} --version >/dev/null 2>/dev/null; then
|
||||
+ mkisofs=(${command})
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ if [ -z "${mkisofs}" ]; then
|
||||
+ echo "${0}: mkisofs or genisoimage not found, please install or set PATH" >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
fi
|
||||
|
||||
dir=$(mktemp -d bin/iso.dir.XXXXXX)
|
||||
@@ -122,13 +135,28 @@ case "${LEGACY}" in
|
||||
# copy isolinux bootloader
|
||||
cp ${ISOLINUX_BIN} ${dir}
|
||||
|
||||
+ mkisofs+=(-b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table)
|
||||
+
|
||||
+ if [ "${EFI}" -eq 1 ]; then
|
||||
+ # generate EFI image
|
||||
+ img=${dir}/efiboot.img
|
||||
+
|
||||
+ mformat -f 2880 -C -i ${img} ::
|
||||
+ mmd -i ${img} "::/EFI"
|
||||
+ mmd -i ${img} "::/EFI/BOOT"
|
||||
+ mcopy -m -i ${img} bin-x86_64-efi/ipxe.efi "::EFI/BOOT/BOOTX64.EFI"
|
||||
+ mcopy -m -i ${img} bin-i386-efi/ipxe.efi "::EFI/BOOT/BOOTIA32.EFI"
|
||||
+
|
||||
+ mkisofs+=(-eltorito-alt-boot -e efiboot.img -isohybrid-gpt-basdat -no-emul-boot)
|
||||
+ fi
|
||||
+
|
||||
# syslinux 6.x needs a file called ldlinux.c32
|
||||
if [ -n "${LDLINUX_C32}" -a -s "${LDLINUX_C32}" ]; then
|
||||
cp ${LDLINUX_C32} ${dir}
|
||||
fi
|
||||
|
||||
# generate the iso image
|
||||
- "${mkisofs[@]}" -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -output ${OUT} ${dir}
|
||||
+ "${mkisofs[@]}" -output ${OUT} ${dir}
|
||||
|
||||
# isohybrid will be used if available
|
||||
if isohybrid --version >/dev/null 2>/dev/null; then
|
||||
Reference in New Issue
Block a user