Commit afde4945 authored by Anton Midyukov's avatar Anton Midyukov

hdt: refactoring 10-hdt-img

The following problems are solved: - syslinux/isolinux.cfg should not be deleted - isolinux.cfg should not be in hdt.img - syslinux/pci.ids should not be in iso.
parent 592d6565
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
[ "${GLOBAL_BOOTLOADER-}" = grubpcboot ] || exit 0 [ "${GLOBAL_BOOTLOADER-}" = grubpcboot ] || exit 0
cd "$WORKDIR" cd /tmp
rm -fr syslinux
mkdir -p boot syslinux mkdir syslinux
cp /usr/lib/syslinux/hdt.c32 "$WORKDIR"/syslinux/ cp /usr/lib/syslinux/hdt.c32 syslinux/
mv "$WORKDIR"/syslinux/pci.ids syslinux/
cat > syslinux/syslinux.cfg << EOF cat > syslinux/syslinux.cfg << EOF
default hdt default hdt
...@@ -16,12 +17,15 @@ label hdt ...@@ -16,12 +17,15 @@ label hdt
EOF EOF
# floppy disk 720 KiB # floppy disk 720 KiB
dd if=/dev/zero of=boot/hdt.img bs=512 count="1440" mkdir -p "$WORKDIR"/boot
mkfs.fat -n HDT -F 12 boot/hdt.img dd if=/dev/zero of="$WORKDIR"/boot/hdt.img bs=512 count="1440"
mcopy -i boot/hdt.img -s syslinux :: mkfs.fat -n HDT -F 12 "$WORKDIR"/boot/hdt.img
mcopy -i "$WORKDIR"/boot/hdt.img -s syslinux ::
# clean /tmp
rm -r syslinux
#dd if=/usr/lib/syslinux/ldlinux.bss of=boot/hdt.img conv=notrunc #dd if=/usr/lib/syslinux/ldlinux.bss of=boot/hdt.img conv=notrunc
syslinux -d /syslinux --install boot/hdt.img syslinux -d /syslinux --install "$WORKDIR"/boot/hdt.img
rm -r syslinux cp /usr/lib/syslinux/memdisk "$WORKDIR"/boot
cp /usr/lib/syslinux/memdisk boot
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment