mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-20 00:27:27 +00:00
Split base/ into base/ and tools/
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
This commit is contained in:
45
tools/mkimage-iso-bios/make-iso
Executable file
45
tools/mkimage-iso-bios/make-iso
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p /tmp/iso
|
||||
cd /tmp/iso
|
||||
|
||||
# input is a tarball of vmlinuz64 and initrd.img on stdin
|
||||
# output is an iso on stdout
|
||||
|
||||
# extract. BSD tar auto recognises compression, unlike GNU tar
|
||||
# only if stdin is a tty, if so need files volume mounted...
|
||||
[ -t 0 ] || bsdtar xzf -
|
||||
|
||||
INITRD="$(find . -name '*.img')"
|
||||
KERNEL="$(find . -name vmlinuz64 -or -name bzImage)"
|
||||
|
||||
[ "$KERNEL" = "vmlinuz64" ] || mv "$KERNEL" vmlinuz64
|
||||
[ "$INITRD" = "initrd.img" ] || mv "$INITRD" initrd.img
|
||||
|
||||
# clean up subdirectories
|
||||
find . -mindepth 1 -maxdepth 1 -type d | xargs rm -rf
|
||||
|
||||
mkdir -p isolinux
|
||||
cp /usr/share/syslinux/isolinux.bin ./isolinux/
|
||||
cp /usr/share/syslinux/ldlinux.c32 ./isolinux/
|
||||
|
||||
CFG="DEFAULT linux
|
||||
LABEL linux
|
||||
KERNEL /vmlinuz64
|
||||
INITRD /initrd.img
|
||||
APPEND earlyprintk=serial console=ttyS0 console=tty1 $*
|
||||
"
|
||||
|
||||
printf "$CFG" > isolinux/isolinux.cfg
|
||||
|
||||
genisoimage -o ../mobylinux-bios.iso -l -J -R \
|
||||
-c isolinux/boot.cat \
|
||||
-b isolinux/isolinux.bin \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
-V MobyLinux .
|
||||
|
||||
isohybrid ../mobylinux-bios.iso
|
||||
|
||||
cat ../mobylinux-bios.iso
|
Reference in New Issue
Block a user