From 7c4aff64cefd1f35ae4aa67315fbb5a1229e5fb3 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Thu, 26 Nov 2009 21:07:37 +0100 Subject: [PATCH] hdt: Adding a menu for floppy & iso images Impact: none Floppy & ISO images are now featuring a menu mode. Thx gert for this idea. --- com32/hdt/Makefile | 5 ++++- com32/hdt/floppy/hdt.cfg | 45 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/com32/hdt/Makefile b/com32/hdt/Makefile index 716a722..3c02396 100644 --- a/com32/hdt/Makefile +++ b/com32/hdt/Makefile @@ -38,6 +38,7 @@ FLOPPY_DIR ?= floppy PCI_IDS_FILE ?= $(PWD)/$(FLOPPY_DIR)/pci.ids GZ_PCI_IDS_FILE ?= $(PCI_IDS_FILE).gz REBOOT_COM32 ?= $(com32)/modules/reboot.c32 +MENU_COM32 ?= $(com32)/menu/menu.c32 ART_DIR ?= art/ all: $(MODULES) $(TESTFILES) @@ -45,7 +46,7 @@ all: $(MODULES) $(TESTFILES) hdt.elf : $(OBJS) $(LIBS) $(C_LIBS) $(LD) $(LDFLAGS) -o $@ $^ -hdt.img: hdt.c32 $(FLOPPY_DIR)/hdt.cfg $(FLOPPY_DIR)/mtools.conf $(topdir)/mtools/syslinux $(REBOOT_COM32) +hdt.img: hdt.c32 $(FLOPPY_DIR)/hdt.cfg $(FLOPPY_DIR)/mtools.conf $(topdir)/mtools/syslinux $(REBOOT_COM32) $(MENU_COM32) rm -f hdt.img MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MFORMAT) -v HDT -f 1440 -C a: $(topdir)/mtools/syslinux hdt.img @@ -54,6 +55,7 @@ hdt.img: hdt.c32 $(FLOPPY_DIR)/hdt.cfg $(FLOPPY_DIR)/mtools.conf $(topdir)/mtool -[ -f $(MODULES_ALIAS_FILE) ] && cat $(MODULES_ALIAS_FILE) | $(GZIPPROG) - -f | MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) - a:modules.alias -[ -f $(MODULES_PCIMAP_FILE) ] && cat $(MODULES_PCIMAP_FILE) | $(GZIPPROG) - -f | MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) - a:modules.pcimap MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) hdt.c32 a: + MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(MENU_COM32) a: MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(REBOOT_COM32) a: @ [ -f $(GZ_PCI_IDS_FILE) ] && MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(GZ_PCI_IDS_FILE) a:pci.ids || printf "\nThe $(GZ_PCI_IDS_FILE) file is missing and can be downloaded from http://pciids.sourceforge.net and gzipped in\nthe ./com32/hdt/$(FLOPPY_DIR) directory of the extracted Syslinux source.\n\n" MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(FLOPPY_DIR)/hdt.cfg a:syslinux.cfg @@ -71,6 +73,7 @@ hdt.iso: hdt.c32 $(topdir)/core/isolinux.bin $(FLOPPY_DIR)/hdt.cfg cp $(FLOPPY_DIR)/hdt.cfg $(ISO_DIR)/$(ISOLINUX_DIR)/isolinux.cfg cp hdt.c32 $(ISO_DIR)/$(ISOLINUX_DIR) cp $(REBOOT_COM32) $(ISO_DIR)/$(ISOLINUX_DIR) + cp $(MENU_COM32) $(ISO_DIR)/$(ISOLINUX_DIR) cp -av $(ART_DIR)/backgnd.png $(ISO_DIR)/$(ISOLINUX_DIR) -[ ! -f $(GZ_PCI_IDS_FILE) ] && cp /usr/share/hwdata/pci.ids $(PCI_IDS_FILE) && $(GZIP) $(PCI_IDS_FILE) -[ ! -f $(GZ_PCI_IDS_FILE) ] && cp /usr/share/pci.ids $(PCI_IDS_FILE) && $(GZIP) $(PCI_IDS_FILE) diff --git a/com32/hdt/floppy/hdt.cfg b/com32/hdt/floppy/hdt.cfg index 7db52a9..8a6f58c 100644 --- a/com32/hdt/floppy/hdt.cfg +++ b/com32/hdt/floppy/hdt.cfg @@ -1,6 +1,49 @@ -DEFAULT hdt +DEFAULT menu.c32 PROMPT 0 +TIMEOUT 50 +MENU TITLE Hardware Detection Tool (HDT) LABEL hdt +MENU LABEL Menu mode +MENU DEFAULT +TEXT HELP +Starts HDT using the MENU mode +ENDTEXT COM32 hdt.c32 APPEND modules_pcimap=modules.pcimap modules_alias=modules.alias pciids=pci.ids quiet + +LABEL cli +MENU LABEL CLI (VESA mode) +TEXT HELP +Starts HDT using the Command Line Interface (CLI) +VESA mode is enabled +ENDTEXT +COM32 hdt.c32 +APPEND modules_pcimap=modules.pcimap modules_alias=modules.alias pciids=pci.ids quiet nomenu vesa + +LABEL vesa +MENU LABEL CLI (Text mode) +TEXT HELP +Starts HDT using the Command Line Interface (CLI) +VESA mode is disabled +ENDTEXT +COM32 hdt.c32 +APPEND modules_pcimap=modules.pcimap modules_alias=modules.alias pciids=pci.ids quiet nomenu + +LABEL summary +MENU LABEL CLI (Auto summary) +TEXT HELP +Starts HDT using the Command Line Interface (CLI) and run 'show summary' +VESA mode is enabled +ENDTEXT +COM32 hdt.c32 +APPEND modules_pcimap=modules.pcimap modules_alias=modules.alias pciids=pci.ids quiet vesa nomenu auto='show summary' + +LABEL verbose +MENU LABEL CLI (Verbose) +TEXT HELP +Starts HDT using the Command Line Interface (CLI) using the verbose mode +VESA mode is enabled +ENDTEXT +COM32 hdt.c32 +APPEND modules_pcimap=modules.pcimap modules_alias=modules.alias pciids=pci.ids vesa nomenu -- 2.7.4