Index: branches/meklort/i386/boot2/boot2.s =================================================================== --- branches/meklort/i386/boot2/boot2.s (revision 576) +++ branches/meklort/i386/boot2/boot2.s (revision 577) @@ -129,7 +129,7 @@ data32 ljmp $0, $0x7c00 # Jump to boot code already in memory -/*if 0 +/**/ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Multiboot support added by David F. Elliott on 2007/06/26 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -343,4 +343,4 @@ .word GDTLIMIT .long vtop(_Gdt + OFFSET_1MEG) -endif */ +/**/ Index: branches/meklort/i386/boot2/drivers.c =================================================================== --- branches/meklort/i386/boot2/drivers.c (revision 576) +++ branches/meklort/i386/boot2/drivers.c (revision 577) @@ -151,17 +151,13 @@ { // First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0). #ifndef OPTION_ROM - if (gRAMDiskVolume && !gRAMDiskBTAliased) - { - // First try a specfic OS version folder ie 10.5 - sprintf(dirSpecExtra, "rd(0,0)/Extra/%s/", &gMacOSVersion); - if (FileLoadDrivers(dirSpecExtra, 0) != 0) - { - // Next we'll try the base - strcpy(dirSpecExtra, "rd(0,0)/Extra/"); - FileLoadDrivers(dirSpecExtra, 0); - } - + // First try a specfic OS version folder ie 10.5 + sprintf(dirSpecExtra, "rd(0,0)/Extra/%s/", &gMacOSVersion); + if (FileLoadDrivers(dirSpecExtra, 0) != 0) + { + // Next we'll try the base + strcpy(dirSpecExtra, "rd(0,0)/Extra/"); + FileLoadDrivers(dirSpecExtra, 0); } #endif // Next try to load Extra extensions from the selected root partition. Index: branches/meklort/i386/boot2/mboot.c =================================================================== --- branches/meklort/i386/boot2/mboot.c (revision 576) +++ branches/meklort/i386/boot2/mboot.c (revision 577) @@ -11,8 +11,9 @@ #define OFFSET_1MEG 0x100000 #define BAD_BOOT_DEVICE 0xffffffff +struct multiboot_info *gMI; -#ifdef UNUSED +//#ifdef UNUSED int multiboot_timeout=0; int multiboot_timeout_set=0; @@ -20,7 +21,6 @@ int multiboot_partition_set=0; // Global multiboot info, if using multiboot. -struct multiboot_info *gMI; extern void continue_at_low_address(void); @@ -349,13 +349,6 @@ return bootdevice; } -enum { - kReturnKey = 0x0d, - kEscapeKey = 0x1b, - kBackspaceKey = 0x08, - kASCIIKeyMask = 0x7f -}; - // This is the meat of our implementation. It grabs the boot device from // the multiboot_info and returns it as is. If it fails it returns // BAD_BOOT_DEVICE. We can call an awful lot of libsa and libsaio but @@ -431,10 +424,12 @@ } } } +#if UNUSED if(doSelectDevice) { bootdevice = selectAlternateBootDevice(bootdevice); } +#endif if(bootdevice == BAD_BOOT_DEVICE) sleep(2); // pause for a second before halting return bootdevice; @@ -507,4 +502,4 @@ } return 0; } -#endif \ No newline at end of file +//#endif \ No newline at end of file Index: branches/meklort/i386/boot2/ramdisk.c =================================================================== --- branches/meklort/i386/boot2/ramdisk.c (revision 576) +++ branches/meklort/i386/boot2/ramdisk.c (revision 577) @@ -111,10 +111,11 @@ if (gRAMDiskMI != NULL) free(gRAMDiskMI); // Reset multiboot structures. -#ifdef UNUSED - gMI = -#endif gRAMDiskMI = NULL; + //#ifdef UNUSED + gMI = gRAMDiskMI; + //#endif + *gRAMDiskFile = '\0'; // Release ramdisk driver hooks. @@ -136,7 +137,7 @@ fh = open(param, 0); if (fh != -1) { - printf("\nreading ramdisk image: %s", param); + verbose("\nreading ramdisk image: %s", param); ramDiskSize = file_size(fh); if (ramDiskSize > 0) @@ -159,10 +160,10 @@ strcpy(gRAMDiskFile, param); // Set gMI as well for the multiboot ramdisk driver hook. -#ifdef UNUSED - gMI = -#endif gRAMDiskMI = malloc(sizeof(multiboot_info)); + //#ifdef UNUSED + gMI = gRAMDiskMI; + //#endif struct multiboot_module * ramdisk_module = malloc(sizeof(multiboot_module)); // Fill in multiboot info and module structures. @@ -173,18 +174,20 @@ ramdisk_module->mm_mod_start = PREBOOT_DATA; ramdisk_module->mm_mod_end = PREBOOT_DATA + ramDiskSize; -#ifdef UNUSED + //#ifdef UNUSED // Set ramdisk driver hooks. p_get_ramdisk_info = &multiboot_get_ramdisk_info; p_ramdiskReadBytes = &multibootRamdiskReadBytes; -#endif + //#endif int partCount; // unused // Save bvr of the mounted image. gRAMDiskVolume = diskScanBootVolumes(0x100, &partCount); if(gRAMDiskVolume == NULL) { umountRAMDisk(); - printf("\nRamdisk contains no partitions."); + printf("\nRamdisk contains no partitions.\n"); + pause(); + } else { @@ -199,14 +202,13 @@ } else { - printf("\nno ramdisk config...\n"); + verbose("\nno ramdisk config...\n"); } - printf("\nmounting: done"); + verbose("\nmounting: done"); } } } - return error; }