aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-02-25 17:40:33 +0100
committerH. Peter Anvin <hpa@zytor.com>2009-02-25 20:58:45 -0800
commit6d95a9c6ce277173f8cfbc70772fd93a2a41cd66 (patch)
tree9840a611a1666016a3cbff4ead72797a69bd73a6
parent0aff650fdd884ce464adc70d183e0ca09fa1bf6b (diff)
downloadsyslinux-elf-6d95a9c6ce277173f8cfbc70772fd93a2a41cd66.tar.gz
syslinux-elf-6d95a9c6ce277173f8cfbc70772fd93a2a41cd66.tar.xz
syslinux-elf-6d95a9c6ce277173f8cfbc70772fd93a2a41cd66.zip
hdt: Adding basic kernel support
-rw-r--r--com32/hdt/Makefile2
-rw-r--r--com32/hdt/hdt-cli.c13
-rw-r--r--com32/hdt/hdt-cli.h6
3 files changed, 20 insertions, 1 deletions
diff --git a/com32/hdt/Makefile b/com32/hdt/Makefile
index 81dc0060..15044d48 100644
--- a/com32/hdt/Makefile
+++ b/com32/hdt/Makefile
@@ -43,7 +43,7 @@ all: hdt.c32 $(LIB)
hdt.elf: hdt.o hdt-ata.o hdt-menu.o hdt-menu-pci.o hdt-menu-kernel.o \
hdt-menu-disk.o hdt-menu-dmi.o hdt-menu-processor.o hdt-menu-syslinux.o hdt-menu-about.o \
- hdt-cli.o hdt-common.o hdt-cli-pci.o hdt-cli-dmi.o hdt-cli-cpu.o hdt-cli-pxe.o\
+ hdt-cli.o hdt-common.o hdt-cli-pci.o hdt-cli-dmi.o hdt-cli-cpu.o hdt-cli-pxe.o hdt-cli-kernel.o\
$(com32)/modules/cpuid.o $(com32)/modules/dmi.o $(topdir)/menu/libmenu/libmenu.a $(LIB) $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c
index c0390a5d..5589c898 100644
--- a/com32/hdt/hdt-cli.c
+++ b/com32/hdt/hdt-cli.c
@@ -43,6 +43,15 @@ void set_mode(struct s_cli_mode *cli_mode, cli_mode_t mode, struct s_hardware *h
snprintf(cli_mode->prompt, sizeof(cli_mode->prompt), "%s> ", CLI_HDT);
break;
+ case PXE_MODE:
+ cli_mode->mode=mode;
+ snprintf(cli_mode->prompt, sizeof(cli_mode->prompt), "%s> ", CLI_PXE);
+ break;
+
+ case KERNEL_MODE:
+ cli_mode->mode=mode;
+ snprintf(cli_mode->prompt, sizeof(cli_mode->prompt), "%s> ", CLI_KERNEL);
+
case PCI_MODE:
cli_mode->mode=mode;
snprintf(cli_mode->prompt,sizeof(cli_mode->prompt),"%s> ", CLI_PCI);
@@ -141,6 +150,7 @@ void start_cli_mode(struct s_hardware *hardware, int argc, char *argv[]) {
int do_exit(struct s_cli_mode *cli_mode) {
switch (cli_mode->mode) {
case HDT_MODE: return EXIT_MODE;
+ case KERNEL_MODE:
case PXE_MODE:
case PCI_MODE:
case DMI_MODE:
@@ -155,6 +165,7 @@ switch (cli_mode->mode) {
case HDT_MODE:
printf("Available commands are : %s %s %s %s %s %s\n",CLI_CLEAR, CLI_EXIT,CLI_HELP,CLI_SHOW, CLI_PCI, CLI_DMI);
break;
+ case KERNEL_MODE:
case PXE_MODE:
case CPU_MODE:
case PCI_MODE:
@@ -185,6 +196,7 @@ void main_show_summary(struct s_hardware *hardware, struct s_cli_mode *cli_mode)
main_show_pci(hardware);
if (hardware->is_pxe_valid)
main_show_pxe(hardware,cli_mode);
+ main_show_kernel(hardware,cli_mode);
}
void main_show(char *item, struct s_hardware *hardware, struct s_cli_mode *cli_mode) {
@@ -193,4 +205,5 @@ void main_show(char *item, struct s_hardware *hardware, struct s_cli_mode *cli_m
if (!strncmp(item,CLI_DMI, sizeof (CLI_DMI))) main_show_dmi(hardware,cli_mode);
if (!strncmp(item,CLI_CPU, sizeof (CLI_CPU))) main_show_cpu(hardware,cli_mode);
if (!strncmp(item,CLI_PXE, sizeof (CLI_PXE))) main_show_pxe(hardware,cli_mode);
+ if (!strncmp(item,CLI_KERNEL, sizeof (CLI_KERNEL))) main_show_kernel(hardware,cli_mode);
}
diff --git a/com32/hdt/hdt-cli.h b/com32/hdt/hdt-cli.h
index 224a207e..80780b20 100644
--- a/com32/hdt/hdt-cli.h
+++ b/com32/hdt/hdt-cli.h
@@ -38,6 +38,7 @@
#define CLI_HDT "hdt"
#define CLI_PCI "pci"
#define CLI_PXE "pxe"
+#define CLI_KERNEL "kernel"
#define CLI_SUMMARY "summary"
#define CLI_COMMANDS "commands"
#define CLI_DMI "dmi"
@@ -51,6 +52,7 @@ typedef enum {
DMI_MODE,
CPU_MODE,
PXE_MODE,
+ KERNEL_MODE,
} cli_mode_t;
struct s_cli_mode {
@@ -100,4 +102,8 @@ void cpu_show(char *item, struct s_hardware *hardware);
//PXE STUFF
void main_show_pxe(struct s_hardware *hardware,struct s_cli_mode *cli_mode);
+
+//KERNEL STUFF
+void main_show_kernel(struct s_hardware *hardware,struct s_cli_mode *cli_mode);
+
#endif