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
+REBOOT_COM32 ?= $(com32)/modules/reboot.c32
+ART_DIR ?= art/
all: $(MODULES) $(TESTFILES)
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
+ MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(ART_DIR)/* a:
hdt.img.gz: hdt.img
rm -rf hdt.img.gz
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 -av $(ART_DIR)/* $(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)
-[ -f $(MODULES_ALIAS_FILE) ] && cp $(MODULES_ALIAS_FILE) $(ISO_DIR)/$(ISOLINUX_DIR)\
#include <disk/mbrs.h>
/* ISOlinux requires a 8.3 format */
-void convert_isolinux_filename(char *filename, struct s_hardware *hardware) {
+void *convert_isolinux_filename(char *filename, struct s_hardware *hardware) {
/* Exit if we are not running ISOLINUX */
if (hardware->sv->filesystem != SYSLINUX_FS_ISOLINUX) return;
/* Searching the dot */
char *dot=strchr(filename,'.');
- /* Exiting if not dot exists in that string */
+ /* Exiting if no dot exists in that string */
if (dot==NULL) return;
/* Exiting if the extension is 3 char or less */
if (strlen(dot)<=4) return;
void reset_more_printf() {
display_line_nb=0;
}
+
+int draw_background(const char *what)
+{
+ if (!what)
+ return vesacon_default_background();
+ else
+ return vesacon_load_background(what);
+}
+
+void init_console() {
+ if (vesamode) {
+ openconsole(&dev_rawcon_r, &dev_vesaserial_w);
+ draw_background(CLI_BACKGROUND);
+ }
+ else console_ansi_raw();
+}
#define DEFINE_HDT_COMMON_H
#include <stdio.h>
#include <syslinux/pxe.h>
+#include <console.h>
+#include <consoles.h>
+#include <syslinux/vesacon.h>
#include "sys/pci.h"
#include <disk/bootloaders.h>
/* The char that surround the list of commands */
#define AUTO_DELIMITER "'"
+/* Graphic to load in background when using the vesa mode */
+#define CLI_BACKGROUND "backgnd.png"
+
/* Defines if the cli is quiet*/
bool quiet;
void detect_parameters(const int argc, const char *argv[],
struct s_hardware *hardware);
int detect_vesa(struct s_hardware *hardware);
+void init_console();
#endif
*/
#include <stdio.h>
-#include <console.h>
-#include <consoles.h>
-#include <syslinux/vesacon.h>
#include "hdt.h"
#include "hdt-cli.h"
#include "hdt-menu.h"
snprintf(version_string, sizeof version_string, "%s %s (%s)",
PRODUCT_NAME,VERSION, CODENAME);
- /* Detecting parameters */
- detect_parameters(argc, argv, &hardware);
-
- /* Opening the Syslinux console */
- if (vesamode) openconsole(&dev_rawcon_r, &dev_vesaserial_w);
- else console_ansi_raw();
-
/* Cleaning structures */
init_hardware(&hardware);
/* Detecting Syslinux version */
detect_syslinux(&hardware);
-
+
+ /* Detecting parameters */
+ detect_parameters(argc, argv, &hardware);
+
+ /* Opening the Syslinux console */
+ init_console();
+
/* Clear the screen and reset position of the cursor */
clear_screen();
printf("\033[1;1H");
-
+
printf("%s\n", version_string);
if ((arg = find_argument(argv + 1, "nomenu")) || (find_argument(argv+1,"auto")))