summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-12-15 00:12:33 -0500
committerBill Nottingham <notting@redhat.com>2007-12-19 15:03:03 -0500
commit7cd51453fe00fdc2498f3ff2d1b22d8891871bc6 (patch)
tree5543137e8c856976974dc01909426fb142fbdf0f /loader2
parentc893c7849173cc7890bd9e4b9bb62e83296c9aa7 (diff)
downloadanaconda-7cd51453fe00fdc2498f3ff2d1b22d8891871bc6.tar.gz
anaconda-7cd51453fe00fdc2498f3ff2d1b22d8891871bc6.tar.xz
anaconda-7cd51453fe00fdc2498f3ff2d1b22d8891871bc6.zip
Adjust to removal of moduleDeps and moduleList.
Diffstat (limited to 'loader2')
-rw-r--r--loader2/cdinstall.c14
-rw-r--r--loader2/cdinstall.h8
-rw-r--r--loader2/driverdisk.c14
-rw-r--r--loader2/driverdisk.h1
-rw-r--r--loader2/driverselect.c9
-rw-r--r--loader2/hardware.c78
-rw-r--r--loader2/hardware.h22
-rw-r--r--loader2/hdinstall.c20
-rw-r--r--loader2/hdinstall.h4
-rw-r--r--loader2/loader.c136
-rw-r--r--loader2/loader.h3
-rw-r--r--loader2/method.h5
-rw-r--r--loader2/nfsinstall.c8
-rw-r--r--loader2/nfsinstall.h4
-rw-r--r--loader2/telnetd.c4
-rw-r--r--loader2/telnetd.h4
-rw-r--r--loader2/urlinstall.c7
-rw-r--r--loader2/urlinstall.h4
18 files changed, 70 insertions, 275 deletions
diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c
index 4fb64283c..54598b0fc 100644
--- a/loader2/cdinstall.c
+++ b/loader2/cdinstall.c
@@ -227,8 +227,7 @@ static void queryCDMediaCheck(char *dev, char *location) {
* as /mnt/runtime.
*/
char * setupCdrom(char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps modDeps, int interactive, int requirepkgs) {
+ int interactive, int requirepkgs) {
int i, r, rc;
int foundinvalid = 0;
int stage2inram = 0;
@@ -350,20 +349,15 @@ char * setupCdrom(char * location, struct loaderData_s * loaderData,
/* try to find a install CD non-interactively */
char * findAnacondaCD(char * location,
- moduleInfoSet modInfo,
- moduleList modLoaded,
- moduleDeps modDeps,
int requirepkgs) {
- return setupCdrom(location, NULL, modInfo, modLoaded, modDeps, 0, requirepkgs);
+ return setupCdrom(location, NULL, 0, requirepkgs);
}
/* look for a CD and mount it. if we have problems, ask */
char * mountCdromImage(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+ char * location, struct loaderData_s * loaderData) {
- return setupCdrom(location, loaderData, modInfo, modLoaded, *modDepsPtr, 1, 1);
+ return setupCdrom(location, loaderData, 1, 1);
}
void setKickstartCD(struct loaderData_s * loaderData, int argc, char ** argv) {
diff --git a/loader2/cdinstall.h b/loader2/cdinstall.h
index 76ca8f177..5248d5114 100644
--- a/loader2/cdinstall.h
+++ b/loader2/cdinstall.h
@@ -23,13 +23,9 @@
#include "method.h"
char * mountCdromImage(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr);
+ char * location, struct loaderData_s * loaderData);
-char * findAnacondaCD(char * location, moduleInfoSet modInfo,
- moduleList modLoaded, moduleDeps modDeps,
- int requirepkgs);
+char * findAnacondaCD(char * location, int requirepkgs);
void setKickstartCD(struct loaderData_s * loaderData, int argc,
diff --git a/loader2/driverdisk.c b/loader2/driverdisk.c
index d28b61395..f19efcff6 100644
--- a/loader2/driverdisk.c
+++ b/loader2/driverdisk.c
@@ -39,7 +39,6 @@
#include "fwloader.h"
#include "method.h"
#include "modules.h"
-#include "moduledeps.h"
#include "moduleinfo.h"
#include "windows.h"
#include "hardware.h"
@@ -103,7 +102,6 @@ static void copyErrorFn (char *msg) {
/* this copies the contents of the driver disk to a ramdisk and loads
* the moduleinfo, etc. assumes a "valid" driver disk mounted at mntpt */
static int loadDriverDisk(struct loaderData_s *loaderData, char *mntpt) {
- moduleDeps *modDepsPtr = loaderData->modDepsPtr;
moduleInfoSet modInfo = loaderData->modInfo;
char file[200], dest[200];
char * title;
@@ -161,9 +159,6 @@ static int loadDriverDisk(struct loaderData_s *loaderData, char *mntpt) {
sprintf(file, "%s/modinfo", mntpt);
readModuleInfo(file, modInfo, location, 1);
- sprintf(file, "%s/modules.dep", mntpt);
- mlLoadDeps(modDepsPtr, file);
-
sprintf(file, "%s/modules.alias", mntpt);
pciReadDrivers(file);
@@ -248,10 +243,6 @@ int getRemovableDevices(char *** devNames) {
*/
int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
int usecancel, int noprobe) {
- moduleList modLoaded = loaderData->modLoaded;
- moduleDeps *modDepsPtr = loaderData->modDepsPtr;
- moduleInfoSet modInfo = loaderData->modInfo;
-
char * device = NULL, * part = NULL, * ddfile = NULL;
char ** devNames = NULL;
enum { DEV_DEVICE, DEV_PART, DEV_CHOOSEFILE, DEV_LOADFILE,
@@ -477,7 +468,7 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
break;
}
- busProbe(modInfo, modLoaded, *modDepsPtr, 0);
+ busProbe(0);
devices = probeDevices(class, BUS_UNSPEC, PROBE_LOADED);
if (devices)
@@ -557,8 +548,7 @@ static void loadFromLocation(struct loaderData_s * loaderData, char * dir) {
}
loadDriverDisk(loaderData, dir);
- busProbe(loaderData->modInfo, loaderData->modLoaded, *
- loaderData->modDepsPtr, 0);
+ busProbe(0);
}
void getDDFromSource(struct loaderData_s * loaderData, char * src) {
diff --git a/loader2/driverdisk.h b/loader2/driverdisk.h
index 4bb9597b5..25a446e88 100644
--- a/loader2/driverdisk.h
+++ b/loader2/driverdisk.h
@@ -22,7 +22,6 @@
#include "loader.h"
#include "modules.h"
-#include "moduledeps.h"
#include "moduleinfo.h"
int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
diff --git a/loader2/driverselect.c b/loader2/driverselect.c
index 05a2b1a98..0c87481c0 100644
--- a/loader2/driverselect.c
+++ b/loader2/driverselect.c
@@ -148,7 +148,6 @@ int chooseManualDriver(int class, struct loaderData_s *loaderData) {
struct sortModuleList * sortedOrder;
char giveArgs = ' ';
char ** moduleArgs = NULL;
- moduleDeps modDeps = *loaderData->modDepsPtr;
moduleInfoSet modInfo = loaderData->modInfo;
newtComponent text, f, ok, back, argcheckbox, listbox;
@@ -174,11 +173,6 @@ int chooseManualDriver(int class, struct loaderData_s *loaderData) {
numSorted = 0;
for (i = 0; i < modInfo->numModules; i++) {
- if (mlModuleInList(modInfo->moduleList[i].moduleName, loaderData->modLoaded) ||
- !modInfo->moduleList[i].description ||
- ((type != DRIVER_ANY) &&
- (type != modInfo->moduleList[i].major)))
- continue;
sortedOrder[numSorted].index = i;
sortedOrder[numSorted++].modInfo = modInfo;
}
@@ -281,8 +275,7 @@ int chooseManualDriver(int class, struct loaderData_s *loaderData) {
return chooseManualDriver(class, loaderData);
}
- mlLoadModule(modInfo->moduleList[num].moduleName, loaderData->modLoaded, modDeps,
- modInfo, moduleArgs);
+ mlLoadModule(modInfo->moduleList[num].moduleName, moduleArgs);
free(sortedOrder);
return LOADER_OK;
diff --git a/loader2/hardware.c b/loader2/hardware.c
index 4b7f92166..466f01bbe 100644
--- a/loader2/hardware.c
+++ b/loader2/hardware.c
@@ -163,8 +163,7 @@ int probeiSeries(moduleInfoSet modInfo, moduleList modLoaded,
* FIXME: this syntax is likely to change in a future release
* but is done as a quick hack for the present.
*/
-int earlyModuleLoad(moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps modDeps, int justProbe) {
+int earlyModuleLoad(int justProbe) {
int fd, len, i;
char buf[1024], *cmdLine;
int argc;
@@ -188,77 +187,31 @@ int earlyModuleLoad(moduleInfoSet modInfo, moduleList modLoaded,
for (i=0; i < argc; i++) {
if (!strncasecmp(argv[i], "driverload=", 11)) {
logMessage(INFO, "loading %s early", argv[i] + 11);
- mlLoadModuleSet(argv[i] + 11, modLoaded, modDeps, modInfo);
+ mlLoadModuleSet(argv[i] + 11);
}
}
return 0;
}
-int busProbe(moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps,
- int justProbe) {
- int i;
- char ** modList;
- char modules[1024];
-
- /* we always want to try to find out about pcmcia controllers even
- * if using noprobe */
- initializePcmciaController(modLoaded, modDeps, modInfo);
-
- /* we can't really *probe* on iSeries, but we can pretend */
- probeiSeries(modInfo, modLoaded, modDeps);
-
+int busProbe(int justProbe) {
/* autodetect whatever we can */
- if (detectHardware(modInfo, &modList)) {
- logMessage(ERROR, "failed to scan pci bus!");
+ if (justProbe)
return 0;
- } else if (modList && justProbe) {
- for (i = 0; modList[i]; i++)
- printf("%s\n", modList[i]);
- } else if (modList) {
- *modules = '\0';
-
- for (i = 0; modList[i]; i++) {
- if (i) strcat(modules, ":");
- strcat(modules, modList[i]);
- }
-
- mlLoadModuleSet(modules, modLoaded, modDeps, modInfo);
- } else
- logMessage(INFO, "found nothing");
-
- return 0;
+ return detectHardware(NULL);
}
-void ipv6Setup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
+void ipv6Setup() {
if (!FL_NOIPV6(flags))
- mlLoadModule("ipv6", modLoaded, modDeps, modInfo, NULL);
-}
-
-
-void scsiSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
- mlLoadModuleSet("scsi_mod:sd_mod:sr_mod", modLoaded, modDeps, modInfo);
-#if defined(__s390__) || defined(__s390x__)
- mlLoadModule("zfcp", modLoaded, modDeps, modInfo, NULL);
-#endif
- mlLoadModule("iscsi_tcp", modLoaded, modDeps, modInfo, NULL);
-}
-
-void ideSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
- mlLoadModuleSet("cdrom:ide-cd", modLoaded, modDeps, modInfo);
+ mlLoadModule("ipv6", NULL);
}
-
/* check if the system has been booted with dasd parameters */
/* These parameters define the order in which the DASDs */
/* are visible to Linux. Otherwise load dasd modules probeonly, */
/* then parse proc to find active DASDs */
/* Reload dasd_mod with correct range of DASD ports */
-void dasdSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
+void dasdSetup() {
#if !defined(__s390__) && !defined(__s390x__)
return;
#else
@@ -290,24 +243,21 @@ void dasdSetup(moduleList modLoaded, moduleDeps modDeps,
free(line);
}
if(dasd_parms[0]) {
- mlLoadModule("dasd_mod", modLoaded, modDeps, modInfo, dasd_parms);
+ mlLoadModule("dasd_mod", dasd_parms);
- mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_eckd_mod",
- modLoaded, modDeps, modInfo);
+ mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_eckd_mod");
free(dasd_parms);
return;
} else {
dasd_parms[0] = "dasd=autodetect";
- mlLoadModule("dasd_mod", modLoaded, modDeps, modInfo, dasd_parms);
- mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_eckd_mod",
- modLoaded, modDeps, modInfo);
+ mlLoadModule("dasd_mod", dasd_parms);
+ mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_eckd_mod");
free(dasd_parms);
}
#endif
}
-void spufsSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
+void spufsSetup() {
#if !defined(__powerpc__)
return;
#else
@@ -318,7 +268,7 @@ void spufsSetup(moduleList modLoaded, moduleDeps modDeps,
while (fgets(buf, 1024, fd) != NULL) {
if(!strncmp(buf, "cpu\t\t:", 5)) {
if(strstr(buf, "Cell")) {
- mlLoadModule("spufs", modLoaded, modDeps, modInfo, NULL);
+ mlLoadModule("spufs", NULL);
break;
}
}
diff --git a/loader2/hardware.h b/loader2/hardware.h
index 735148b56..e69fa2ab2 100644
--- a/loader2/hardware.h
+++ b/loader2/hardware.h
@@ -22,24 +22,12 @@
#include "modules.h"
-int scsiTapeInitialize(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
+int earlyModuleLoad(int justProbe);
+int busProbe(int justProbe);
-int earlyModuleLoad(moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps modDeps, int justProbe);
-int busProbe(moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps,
- int justProbe);
+void dasdSetup();
-void scsiSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
-void ideSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
-void dasdSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
+void ipv6Setup();
-void ipv6Setup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
-
-void spufsSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
+void spufsSetup();
#endif
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index a3178632a..d98a350a9 100644
--- a/loader2/hdinstall.c
+++ b/loader2/hdinstall.c
@@ -57,9 +57,7 @@ extern uint64_t flags;
/* pull in second stage image for hard drive install */
static int loadHDImages(char * prefix, char * dir,
char * device, char * mntpoint,
- char * location,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+ char * location) {
int fd = 0, rc, idx;
char *path, *target = NULL, *dest, *cdurl;
char *stg2list[] = {"stage2.img", "minstg2.img", NULL};
@@ -72,7 +70,7 @@ static int loadHDImages(char * prefix, char * dir,
idx = 0;
/* try to see if we're booted off of a CD with stage2 */
- cdurl = findAnacondaCD(location, modInfo, modLoaded, *modDepsPtr, 0);
+ cdurl = findAnacondaCD(location, 0);
if (cdurl) {
logMessage(INFO, "Detected stage 2 image on CD");
winStatus(50, 3, _("Media Detected"),
@@ -139,9 +137,7 @@ static int loadHDImages(char * prefix, char * dir,
}
/* given a partition device and directory, tries to mount hd install image */
-static char * setupIsoImages(char * device, char * dirName, char * location,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+static char * setupIsoImages(char * device, char * dirName, char * location) {
int rc;
char * url;
char filespec[1024];
@@ -179,7 +175,7 @@ static char * setupIsoImages(char * device, char * dirName, char * location,
/* This code is for copying small stage2 into ram */
/* and mounting */
rc = loadHDImages("/tmp/loopimage", "/", "/dev/loop1",
- "/mnt/runtime", location, modInfo, modLoaded, modDepsPtr);
+ "/mnt/runtime", location);
if (rc) {
newtWinMessage(_("Error"), _("OK"),
_("An error occured reading the install "
@@ -216,9 +212,7 @@ static char * setupIsoImages(char * device, char * dirName, char * location,
* ISO images on that filesystem
*/
char * mountHardDrive(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+ char * location, struct loaderData_s * loaderData) {
int rc;
int i;
@@ -258,7 +252,7 @@ char * mountHardDrive(struct installMethod * method,
if (!strncmp(kspart, "/dev/", 5))
kspart = kspart + 5;
- url = setupIsoImages(kspart, ksdirectory, location, modInfo, modLoaded, modDepsPtr);
+ url = setupIsoImages(kspart, ksdirectory, location);
if (!url) {
logMessage(ERROR, "unable to find %s installation images on hd",
getProductName());
@@ -391,7 +385,7 @@ char * mountHardDrive(struct installMethod * method,
logMessage(INFO, "partition %s selected", selpart);
- url = setupIsoImages(selpart + 5, dir, location, modInfo, modLoaded, modDepsPtr);
+ url = setupIsoImages(selpart + 5, dir, location);
if (!url) {
newtWinMessage(_("Error"), _("OK"),
_("Device %s does not appear to contain "
diff --git a/loader2/hdinstall.h b/loader2/hdinstall.h
index c6d3ff07c..44351a312 100644
--- a/loader2/hdinstall.h
+++ b/loader2/hdinstall.h
@@ -31,9 +31,7 @@ struct hdInstallData {
void setKickstartHD(struct loaderData_s * loaderData, int argc,
char ** argv);
char * mountHardDrive(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr);
+ char * location, struct loaderData_s * loaderData);
int kickstartFromHD(char *kssrc);
int kickstartFromBD(char *kssrc);
diff --git a/loader2/loader.c b/loader2/loader.c
index d4fffbf37..f64843c63 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -70,16 +70,11 @@
/* module stuff */
#include "modules.h"
#include "moduleinfo.h"
-#include "moduledeps.h"
-#include "modstubs.h"
#include "driverdisk.h"
/* hardware stuff */
#include "hardware.h"
-#include "firewire.h"
-#include "pcmcia.h"
-#include "usb.h"
/* install method stuff */
#include "method.h"
@@ -251,8 +246,7 @@ char * getProductPath(void) {
return productPath;
}
-void initializeConsole(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
+void initializeConsole() {
/* enable UTF-8 console */
printf("\033%%G");
fflush(stdout);
@@ -935,7 +929,7 @@ static void checkForRam(void) {
}
}
-static int haveDeviceOfType(int type, moduleList modLoaded) {
+static int haveDeviceOfType(int type) {
struct device ** devices;
devices = probeDevices(type, BUS_UNSPEC, PROBE_LOADED);
@@ -948,9 +942,7 @@ static int haveDeviceOfType(int type, moduleList modLoaded) {
/* fsm for the basics of the loader. */
static char *doLoaderMain(char * location,
struct loaderData_s * loaderData,
- moduleInfoSet modInfo,
- moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+ moduleInfoSet modInfo) {
enum { STEP_LANG, STEP_KBD, STEP_METHOD, STEP_DRIVER,
STEP_DRIVERDISK, STEP_NETWORK, STEP_IFACE,
STEP_IP, STEP_URL, STEP_DONE } step;
@@ -991,7 +983,7 @@ static char *doLoaderMain(char * location,
* we can fast-path the CD and not make people answer questions in
* text mode. */
if (!FL_ASKMETHOD(flags) && !FL_KICKSTART(flags)) {
- url = findAnacondaCD(location, modInfo, modLoaded, * modDepsPtr, !FL_RESCUE(flags));
+ url = findAnacondaCD(location, !FL_RESCUE(flags));
/* if we found a CD and we're not in rescue or vnc mode return */
/* so we can short circuit straight to stage 2 from CD */
if (url && (!FL_RESCUE(flags) && !hasGraphicalOverride()))
@@ -1106,7 +1098,7 @@ static char *doLoaderMain(char * location,
break;
case STEP_DRIVER: {
- if (needed == -1 || haveDeviceOfType(needed, modLoaded)) {
+ if (needed == -1 || haveDeviceOfType(needed)) {
step = STEP_NETWORK;
dir = 1;
needed = -1;
@@ -1164,7 +1156,7 @@ static char *doLoaderMain(char * location,
}
needsNetwork = 1;
- if (!haveDeviceOfType(CLASS_NETWORK, modLoaded)) {
+ if (!haveDeviceOfType(CLASS_NETWORK)) {
needed = CLASS_NETWORK;
step = STEP_DRIVER;
break;
@@ -1300,8 +1292,7 @@ static char *doLoaderMain(char * location,
url = installMethods[validMethods[methodNum]].mountImage(
installMethods + validMethods[methodNum],
- location, loaderData, modInfo, modLoaded,
- modDepsPtr);
+ location, loaderData);
if (!url) {
step = STEP_IP ;
loaderData->ipinfo_set = 0;
@@ -1324,29 +1315,13 @@ static char *doLoaderMain(char * location,
static int manualDeviceCheck(struct loaderData_s *loaderData) {
char ** devices;
int i, j, rc, num = 0;
- struct moduleInfo * mi;
unsigned int width = 40;
char * buf;
- moduleInfoSet modInfo = loaderData->modInfo;
- moduleList modLoaded = loaderData->modLoaded;
-
do {
- devices = malloc((modLoaded->numModules + 1) * sizeof(*devices));
- for (i = 0, j = 0; i < modLoaded->numModules; i++) {
- if (!modLoaded->mods[i].weLoaded) continue;
-
- if (!(mi = findModuleInfo(modInfo, modLoaded->mods[i].name)) ||
- (!mi->description))
- continue;
-
- rc = asprintf(&devices[j], "%s (%s)", mi->description,
- modLoaded->mods[i].name);
- if (strlen(devices[j]) > width)
- width = strlen(devices[j]);
- j++;
- }
-
+ /* FIXME */
+ devices = malloc(1 * sizeof(*devices));
+ j = 0;
devices[j] = NULL;
if (width > 70)
@@ -1467,15 +1442,12 @@ int main(int argc, char ** argv) {
struct stat sb;
struct serial_struct si;
- int i;
char * arg;
FILE *f;
char twelve = 12;
moduleInfoSet modInfo;
- moduleList modLoaded;
- moduleDeps modDeps;
char *url = NULL;
@@ -1503,13 +1475,6 @@ int main(int argc, char ** argv) {
/* Make sure sort order is right. */
setenv ("LC_COLLATE", "C", 1);
- if (!strcmp(argv[0] + strlen(argv[0]) - 6, "insmod"))
- return ourInsmodCommand(argc, argv);
- if (!strcmp(argv[0] + strlen(argv[0]) - 8, "modprobe"))
- return ourInsmodCommand(argc, argv);
- if (!strcmp(argv[0] + strlen(argv[0]) - 5, "rmmod"))
- return ourRmmodCommand(argc, argv);
-
/* Very first thing, set up tracebacks and debug features. */
rc = anaconda_trace_init();
@@ -1578,10 +1543,10 @@ int main(int argc, char ** argv) {
logMessage(INFO, "text mode forced due to serial/virtpconsole");
flags |= LOADER_FLAGS_TEXT;
}
- set_fw_search_path(&loaderData, "/firmware:/modules/firmware");
+ set_fw_search_path(&loaderData, "/firmware:/lib/firmware");
start_fw_loader(&loaderData);
- arg = FL_TESTING(flags) ? "./module-info" : "/modules/module-info";
+ arg = FL_TESTING(flags) ? "./module-info" : "/lib/modules/module-info";
modInfo = newModuleInfoSet();
if (readModuleInfo(arg, modInfo, NULL, 0)) {
fprintf(stderr, "failed to read %s\n", arg);
@@ -1589,11 +1554,7 @@ int main(int argc, char ** argv) {
stop_fw_loader(&loaderData);
exit(1);
}
- mlReadLoadedList(&modLoaded);
- modDeps = mlNewDeps();
- mlLoadDeps(&modDeps, "/modules/modules.dep");
-
- initializeConsole(modLoaded, modDeps, modInfo);
+ initializeConsole();
checkForRam();
@@ -1603,40 +1564,23 @@ int main(int argc, char ** argv) {
setenv("TERM", "vt100", 1);
#if defined(__powerpc__) /* hack for pcspkr breaking ppc right now */
- mlLoadModuleSet("cramfs:vfat:nfs:loop:isofs:floppy:edd:squashfs:ext3:ext4dev:ext2",
- modLoaded, modDeps, modInfo);
+ mlLoadModuleSet("cramfs:vfat:nfs:loop:isofs:floppy:edd:squashfs:ext3:ext4dev:ext2");
#else
- mlLoadModuleSet("cramfs:vfat:nfs:loop:isofs:floppy:edd:pcspkr:squashfs:ext4dev:ext3:ext2",
- modLoaded, modDeps, modInfo);
+ mlLoadModuleSet("cramfs:vfat:nfs:loop:isofs:floppy:edd:pcspkr:squashfs:ext4dev:ext3:ext2");
#endif
/* IPv6 support is conditional */
- ipv6Setup(modLoaded, modDeps, modInfo);
+ ipv6Setup();
/* now let's do some initial hardware-type setup */
- ideSetup(modLoaded, modDeps, modInfo);
- scsiSetup(modLoaded, modDeps, modInfo);
- dasdSetup(modLoaded, modDeps, modInfo);
- spufsSetup(modLoaded, modDeps, modInfo);
-
- /* Note we *always* do this. If you could avoid this you could get
- a system w/o USB keyboard support, which would be bad. */
- usbInitialize(modLoaded, modDeps, modInfo);
-
- /* now let's initialize any possible firewire. fun */
- firewireInitialize(modLoaded, modDeps, modInfo);
-
- /* explicitly read this to let libkudzu know we want to merge
- * in future tables rather than replace the initial one */
- pciReadDrivers("/modules/modules.alias");
+ dasdSetup();
+ spufsSetup();
if (loaderData.lang && (loaderData.lang_set == 1)) {
setLanguage(loaderData.lang);
}
/* FIXME: this is a bit of a hack */
- loaderData.modLoaded = modLoaded;
- loaderData.modDepsPtr = &modDeps;
loaderData.modInfo = modInfo;
if (FL_MODDISK(flags)) {
@@ -1656,9 +1600,10 @@ int main(int argc, char ** argv) {
* FIXME: this syntax is likely to change in a future release
* but is done as a quick hack for the present.
*/
- earlyModuleLoad(modInfo, modLoaded, modDeps, 0);
+ mlInitModuleConfig();
+ earlyModuleLoad(0);
- busProbe(modInfo, modLoaded, modDeps, 0);
+ busProbe(FL_NOPROBE(flags));
/* JKFIXME: we'd really like to do this before the busprobe, but then
* we won't have network devices available (and that's the only thing
@@ -1682,9 +1627,9 @@ int main(int argc, char ** argv) {
}
if (FL_TELNETD(flags))
- startTelnetd(&loaderData, modInfo, modLoaded, modDeps);
+ startTelnetd(&loaderData);
- url = doLoaderMain("/mnt/source", &loaderData, modInfo, modLoaded, &modDeps);
+ url = doLoaderMain("/mnt/source", &loaderData, modInfo);
if (!FL_TESTING(flags)) {
int ret;
@@ -1718,14 +1663,6 @@ int main(int argc, char ** argv) {
spawnShell(); /* we can attach gdb now :-) */
- /* JKFIXME: kickstart devices crap... probably kind of bogus now though */
-
-
- /* we might have already loaded these, but trying again doesn't hurt */
- ideSetup(modLoaded, modDeps, modInfo);
- scsiSetup(modLoaded, modDeps, modInfo);
- busProbe(modInfo, modLoaded, modDeps, 0);
-
if (FL_NOPROBE(flags) && !loaderData.ksFile) {
startNewt();
manualDeviceCheck(&loaderData);
@@ -1736,17 +1673,7 @@ int main(int argc, char ** argv) {
else if (FL_UPDATES(flags))
loadUpdates(&loaderData);
- mlLoadModuleSet("md:raid0:raid1:raid5:raid6:raid456:raid10:linear:fat:msdos:jbd:lock_nolock:gfs2:reiserfs:jfs:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-emc:dm-crypt:blkcipher:cbc:aes_generic:sha256_generic", modLoaded, modDeps, modInfo);
-
- usbInitializeMouse(modLoaded, modDeps, modInfo);
-
- /* we've loaded all the modules we're going to. write out a file
- * describing which scsi disks go with which scsi adapters */
- writeScsiDisks(modLoaded);
-
- /* if we are in rescue mode lets load st.ko for tape support */
- if (FL_RESCUE(flags))
- scsiTapeInitialize(modLoaded, modDeps, modInfo);
+ mlLoadModuleSet("md:raid0:raid1:raid5:raid6:raid456:raid10:linear:fat:msdos:jbd:lock_nolock:gfs2:reiserfs:jfs:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-emc:dm-crypt:blkcipher:cbc:aes:sha256");
/* we only want to use RHupdates on nfs installs. otherwise, we'll
* use files on the first iso image and not be able to umount it */
@@ -1888,21 +1815,6 @@ int main(int argc, char ** argv) {
*argptr++ = "--loglevel";
*argptr++ = loaderData.logLevel;
}
-
- for (i = 0; i < modLoaded->numModules; i++) {
- if (!modLoaded->mods[i].path) continue;
- if (!strcmp(modLoaded->mods[i].path,
- "/mnt/runtime/modules/modules.cgz")) {
- continue;
- }
-
- *argptr++ = "--module";
- *argptr = alloca(80);
- sprintf(*argptr, "%s:%s", modLoaded->mods[i].path,
- modLoaded->mods[i].name);
-
- argptr++;
- }
}
*argptr = NULL;
diff --git a/loader2/loader.h b/loader2/loader.h
index 4dc739577..6e14c69fd 100644
--- a/loader2/loader.h
+++ b/loader2/loader.h
@@ -115,7 +115,6 @@ char * getProductPath(void);
char * getProductArch(void);
#include "modules.h"
-#include "moduledeps.h"
/* JKFIXME: I don't like all of the _set attribs, but without them,
* we can't tell if it was explicitly set by kickstart/cmdline or
* if we just got it going through the install. */
@@ -146,8 +145,6 @@ struct loaderData_s {
char *fw_search_pathz;
size_t fw_search_pathz_len;
- moduleList modLoaded;
- moduleDeps * modDepsPtr;
moduleInfoSet modInfo;
};
diff --git a/loader2/method.h b/loader2/method.h
index 182043744..4f1f295af 100644
--- a/loader2/method.h
+++ b/loader2/method.h
@@ -21,7 +21,6 @@
#define H_METHOD
#include "modules.h"
-#include "moduledeps.h"
#include "loader.h"
#include <kudzu/kudzu.h>
@@ -40,9 +39,7 @@ struct installMethod {
int network;
enum deviceClass deviceType; /* for pcmcia */
char * (*mountImage)(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr);
+ char * location, struct loaderData_s * loaderData);
};
int umountLoopback(char * mntpoint, char * device);
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index 6eed1bcf3..18fb67e43 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -83,9 +83,7 @@ int nfsGetSetup(char ** hostptr, char ** dirptr) {
}
char * mountNfsImage(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+ char * location, struct loaderData_s * loaderData) {
char * host = NULL;
char * directory = NULL;
char * mountOpts = NULL;
@@ -160,7 +158,7 @@ char * mountNfsImage(struct installMethod * method,
if (!access("/mnt/source/images/stage2.img", R_OK)) {
logMessage(INFO, "can access /mnt/source/images/stage2.img");
/* try to see if we're booted off of a CD with stage2 */
- cdurl = findAnacondaCD("/mnt/stage2", modInfo, modLoaded, *modDepsPtr, 0);
+ cdurl = findAnacondaCD("/mnt/stage2", 0);
if (cdurl) {
logMessage(INFO, "Detected stage 2 image on CD");
winStatus(50, 3, _("Media Detected"),
@@ -212,7 +210,7 @@ char * mountNfsImage(struct installMethod * method,
logMessage(WARNING, "failed to mount iso %s loopback", path);
else {
/* try to see if we're booted off of a CD with stage2 */
- cdurl = findAnacondaCD("/mnt/stage2", modInfo, modLoaded, *modDepsPtr, 0);
+ cdurl = findAnacondaCD("/mnt/stage2", 0);
if (cdurl) {
logMessage(INFO, "Detected stage 2 image on CD");
winStatus(50, 3, _("Media Detected"),
diff --git a/loader2/nfsinstall.h b/loader2/nfsinstall.h
index 678099234..95d76d659 100644
--- a/loader2/nfsinstall.h
+++ b/loader2/nfsinstall.h
@@ -33,9 +33,7 @@ void setKickstartNfs(struct loaderData_s * loaderData, int argc,
char ** argv);
int kickstartFromNfs(char * url, struct loaderData_s * loaderData);
char * mountNfsImage(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr);
+ char * location, struct loaderData_s * loaderData);
int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData);
#endif
diff --git a/loader2/telnetd.c b/loader2/telnetd.c
index 09e9d026c..d5850f4af 100644
--- a/loader2/telnetd.c
+++ b/loader2/telnetd.c
@@ -234,9 +234,7 @@ int beTelnet(void) {
return 0;
}
-void startTelnetd(struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps modDeps) {
+void startTelnetd(struct loaderData_s * loaderData) {
char ret[47];
struct networkDeviceConfig netCfg;
ip_addr_t *tip;
diff --git a/loader2/telnetd.h b/loader2/telnetd.h
index 2e87b1661..fedb0fae6 100644
--- a/loader2/telnetd.h
+++ b/loader2/telnetd.h
@@ -20,8 +20,6 @@
#ifndef TELNETD_H
#define TELNETD_H
-void startTelnetd(struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps modDeps);
+void startTelnetd(struct loaderData_s * loaderData);
#endif
diff --git a/loader2/urlinstall.c b/loader2/urlinstall.c
index d3646b7d1..54a1b2689 100644
--- a/loader2/urlinstall.c
+++ b/loader2/urlinstall.c
@@ -176,9 +176,7 @@ static int loadUrlImages(struct iurlinfo * ui) {
}
char * mountUrlImage(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDeps) {
+ char * location, struct loaderData_s * loaderData) {
int rc;
char * url;
struct iurlinfo ui;
@@ -243,8 +241,7 @@ char * mountUrlImage(struct installMethod * method,
/* ok messy - see if we have a stage2 on local CD */
/* before trying to pull one over network */
- cdurl = findAnacondaCD(location, modInfo, modLoaded,
- *modDeps, 0);
+ cdurl = findAnacondaCD(location, 0);
if (cdurl) {
/* verify that our URL is specifying the correct tree */
/* we do this by attempting to pull a .discinfo file */
diff --git a/loader2/urlinstall.h b/loader2/urlinstall.h
index 4848eec43..586d462ca 100644
--- a/loader2/urlinstall.h
+++ b/loader2/urlinstall.h
@@ -31,9 +31,7 @@ void setKickstartUrl(struct loaderData_s * loaderData, int argc,
char ** argv);
int kickstartFromUrl(char * url, struct loaderData_s * loaderData);
char * mountUrlImage(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr);
+ char * location, struct loaderData_s * loaderData);
int getFileFromUrl(char * url, char * dest, struct loaderData_s * loaderData);