diff options
| author | Michael Brown | 2021-01-13 12:50:26 +0100 |
|---|---|---|
| committer | Michael Brown | 2021-01-13 18:58:02 +0100 |
| commit | 79c0173d6df8580ea2e35fc173a5281e65d5321f (patch) | |
| tree | 0320cc223756e5aa47426e4aeb6f586f9d995d96 /src/util/gensdsk | |
| parent | [xhci] Avoid false positive Coverity warning (diff) | |
| download | ipxe-79c0173d6df8580ea2e35fc173a5281e65d5321f.tar.gz ipxe-79c0173d6df8580ea2e35fc173a5281e65d5321f.tar.xz ipxe-79c0173d6df8580ea2e35fc173a5281e65d5321f.zip | |
[build] Create util/genfsimg for building filesystem-based images
Generalise util/geniso, util/gensdsk, and util/genefidsk to create a
single script util/genfsimg that can be used to build either FAT
filesystem images or ISO images.
Extend the functionality to allow for building multi-architecture UEFI
bootable ISO images and combined BIOS+UEFI images.
For example:
./util/genfsimg -o combined.iso \
bin-x86_64-efi/ipxe.efi \
bin-arm64-efi/ipxe.efi \
bin/ipxe.lkrn
would generate a hybrid image that could be used as a CDROM (or hard
disk or USB key) on legacy BIOS, x86_64 UEFI, or ARM64 UEFI.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/util/gensdsk')
| -rwxr-xr-x | src/util/gensdsk | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/util/gensdsk b/src/util/gensdsk deleted file mode 100755 index fe302d587..000000000 --- a/src/util/gensdsk +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# -# Generate a syslinux floppy that loads a iPXE image -# -# gensdsk foo.sdsk foo.lkrn -# -# the floppy image is the first argument -# followed by list of .lkrn images -# - -case $# in -0|1) - echo Usage: $0 foo.sdsk foo.lkrn ... - exit 1 - ;; -esac -case "`mtools -V`" in -Mtools\ version\ 3.9.9*|Mtools\ version\ 3.9.1[0-9]*|[mM]tools\ *\ [4-9].*) - ;; -*) - echo Mtools version 3.9.9 or later is required - exit 1 - ;; -esac -img=$1 -shift -dir=`mktemp -d bin/sdsk.dir.XXXXXX` - -mformat -f 1440 -C -i $img :: -cfg=$dir/syslinux.cfg -cat > $cfg <<EOF - -# These default options can be changed in the gensdsk script -TIMEOUT 30 -EOF -first= -for f -do - if [ ! -r $f ] - then - echo $f does not exist, skipping 1>&2 - continue - fi - # shorten name for 8.3 filesystem - b=$(basename $f) - g=${b%.lkrn} - g=${g//[^a-z0-9]} - g=${g:0:8}.krn - case "$first" in - "") - echo DEFAULT $b - ;; - esac - first=$g - echo LABEL $b - echo "" KERNEL $g - mcopy -m -i $img $f ::$g -done >> $cfg -mcopy -i $img $cfg ::syslinux.cfg -if ! syslinux $img -then - exit 1 -fi - -rm -fr $dir |
