hdt: Adding a menu for floppy & iso images
authorErwan Velu <erwan.velu@free.fr>
Thu, 26 Nov 2009 20:07:37 +0000 (21:07 +0100)
committerErwan Velu <erwan.velu@free.fr>
Fri, 4 Dec 2009 09:11:13 +0000 (10:11 +0100)
Impact: none

Floppy & ISO images are now featuring a menu mode.
Thx gert for this idea.

com32/hdt/Makefile
com32/hdt/floppy/hdt.cfg

index 716a722..3c02396 100644 (file)
@@ -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)
index 7db52a9..8a6f58c 100644 (file)
@@ -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