grub, hdt: Add hdt support for grub-pc (memdisk + floppy image)
Note: syslinux --install needed /proc, so: @$(call set,GLOBAL_HSH_PROC,1) See-also: mkimage/doc/README.ru
This commit is contained in:
parent
09d751fcc0
commit
2b6c37afcd
6
features.in/grub/cfg.in/90hdt_bios.cfg
Normal file
6
features.in/grub/cfg.in/90hdt_bios.cfg
Normal file
@ -0,0 +1,6 @@
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
menuentry "Hardware Info" {
|
||||
linux16 /boot/memdisk
|
||||
initrd16 /boot/hdt.img
|
||||
}
|
||||
fi
|
@ -1,9 +1,12 @@
|
||||
# optimized out use/syslinux due to use/memtest
|
||||
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
|
||||
use/hdt: use/memtest
|
||||
use/hdt: use/syslinux use/memtest
|
||||
@$(call add_feature)
|
||||
@$(call add,STAGE1_PACKAGES,pciids)
|
||||
@$(call add,STAGE1_PACKAGES,dosfstools)
|
||||
@$(call add,SYSLINUX_MODULES,hdt)
|
||||
@$(call add,GRUB_CFG,hdt_bios)
|
||||
@$(call set,GLOBAL_HSH_PROC,1)
|
||||
else
|
||||
use/hdt: ; @:
|
||||
endif
|
||||
|
27
features.in/hdt/stage1/scripts.d/10-hdt-img
Executable file
27
features.in/hdt/stage1/scripts.d/10-hdt-img
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh -efu
|
||||
|
||||
[ "$GLOBAL_BOOTLOADER" = grubpcboot ] || exit 0
|
||||
|
||||
cd "$WORKDIR"
|
||||
|
||||
mkdir -p boot syslinux
|
||||
cp /usr/lib/syslinux/hdt.c32 "$WORKDIR"/syslinux/
|
||||
|
||||
cat > syslinux/syslinux.cfg << EOF
|
||||
default hdt
|
||||
label hdt
|
||||
menu label ^Hardware info
|
||||
com32 hdt.c32
|
||||
append quiet
|
||||
EOF
|
||||
|
||||
# floppy disk 720 KiB
|
||||
dd if=/dev/zero of=boot/hdt.img bs=512 count="1440"
|
||||
mkfs.fat -n HDT -F 12 boot/hdt.img
|
||||
mcopy -i boot/hdt.img -s syslinux ::
|
||||
|
||||
#dd if=/usr/lib/syslinux/ldlinux.bss of=boot/hdt.img conv=notrunc
|
||||
syslinux -d /syslinux --install boot/hdt.img
|
||||
|
||||
rm -r syslinux
|
||||
cp /usr/lib/syslinux/memdisk boot
|
Loading…
Reference in New Issue
Block a user