diff options
-rwxr-xr-x | anaconda | 4 | ||||
-rw-r--r-- | anaconda_log.py | 11 | ||||
-rw-r--r-- | comps.py | 5 | ||||
-rw-r--r-- | floppy.py | 2 | ||||
-rw-r--r-- | fonts/Makefile | 6 | ||||
-rw-r--r-- | installclass.py | 15 | ||||
-rw-r--r-- | isys/devnodes.c | 14 | ||||
-rw-r--r-- | isys/isys.c | 10 | ||||
-rw-r--r-- | isys/isys.py | 1 | ||||
-rw-r--r-- | isys/probe.c | 37 | ||||
-rw-r--r-- | isys/smp.c | 29 | ||||
-rw-r--r-- | keymaps/Makefile | 6 | ||||
-rw-r--r-- | loader/Makefile | 10 | ||||
-rw-r--r-- | loader/loader.c | 7 | ||||
-rw-r--r-- | loader/net.c | 46 | ||||
-rw-r--r-- | log.py | 11 | ||||
-rw-r--r-- | packages.py | 63 | ||||
-rw-r--r-- | textw/complete_text.py | 19 | ||||
-rw-r--r-- | textw/partition_text.py | 6 |
19 files changed, 268 insertions, 34 deletions
@@ -309,6 +309,10 @@ if (not flags.test): "Starting text mode.") display_mode = 't' time.sleep(2) + +# Force text mode on IBM s390/s390x +if iutil.getArch() == "s390" or iutil.getArch() == "s390x": + display_mode = 't' if iutil.memInstalled() < isys.MIN_RAM: diff --git a/anaconda_log.py b/anaconda_log.py index f599dbbb3..27e08a4ee 100644 --- a/anaconda_log.py +++ b/anaconda_log.py @@ -14,6 +14,7 @@ # import sys +import iutil class LogFile: def __init__ (self): @@ -27,11 +28,17 @@ class LogFile: try: self.logFile = open(file, "w") except: - self.logFile = sys.stderr + if iutil.getArch() != "s390" and iutil.getArch() != "s390x": + self.logFile = sys.stderr + else: + self.logFile = open("/tmp/anaconda-s390.log", "w") elif file: self.logFile = file else: - self.logFile = open("/dev/tty3", "w") + if iutil.getArch() != "s390" and iutil.getArch() != "s390x": + self.logFile = open("/dev/tty3", "w") + else: + self.logFile = open("/tmp/anaconda-s390.log", "w") def __call__ (self, format, *args): if not self.logFile: @@ -33,6 +33,8 @@ ExcludePackages = { 'XFree86-3DLabs' : None, 'XFree86-8514' : None, 'kernel' : None, 'kernel-BOOT' : None, 'kernel-smp' : None, 'kernel-enterprise' : None, + 'kernel-vrdr' : None, 'kernel-tape' : None, + 'kernel-BOOTtape' : None, 'kernel-BOOTvrdr' : None, 'kinput2-canna' : None, 'kinput-canna-wnn4' : None, 'kinput2-wnn4' : None, 'kinput2-wnn6' : None } @@ -731,7 +733,8 @@ class ComponentSet: # nick is used to generate the lilo name for (ktag, nick) in [ ('kernel-enterprise', 'nick'), - ('kernel-smp', 'smp') ]: + ('kernel-smp', 'smp'), + ('kernel-tape', 'tape') ]: tag = split(ktag, '-')[1] if (self.packages.has_key(ktag) and self.packages[ktag].selected): @@ -36,6 +36,8 @@ def probeFloppyDevice(): f.close() elif iutil.getArch() == "alpha": pass + elif iutil.getArch() == "s390" or iutil.getArch() == "s390x": + pass elif iutil.getArch() == "i386" or iutil.getArch() == "ia64": # Look for the first IDE floppy device drives = isys.floppyDriveDict() diff --git a/fonts/Makefile b/fonts/Makefile index d4da8d7ca..2fb0ffa8d 100644 --- a/fonts/Makefile +++ b/fonts/Makefile @@ -20,3 +20,9 @@ sparc: ia64: ./updfonts ia64 + +s390: + ./updfonts s390 + +s390x: + ./updfonts s390x diff --git a/installclass.py b/installclass.py index a64a3dfbf..63a88a60b 100644 --- a/installclass.py +++ b/installclass.py @@ -112,6 +112,21 @@ class BaseInstallClass: dispatch.skipStep("bootloader") dispatch.skipStep("bootloaderpassword") + if iutil.getArch() == "s390" or iutil.getArch() == "s390x": + dispatch.skipStep("bootdisk") + dispatch.skipStep("lilo") + dispatch.skipStep("partition") + dispatch.skipStep("format") + dispatch.skipStep("mouse") + dispatch.skipStep("network") + dispatch.skipStep("firewall") + dispatch.skipStep("authentication") + # dispatch.skipStep("accounts") + dispatch.skipStep("language") + dispatch.skipStep("keyboard") + dispatch.skipStep("xconfig") + dispatch.skipStep("lba32warning") + # This is called after the hdlist is read in. def setPackageSelection(self, hdlist): pass diff --git a/isys/devnodes.c b/isys/devnodes.c index 4e72d3b25..a04e5e2b2 100644 --- a/isys/devnodes.c +++ b/isys/devnodes.c @@ -162,6 +162,20 @@ int devMakeInode(char * devName, char * path) { minor = 1; if (devName[3]) minor += devName[3] - '1'; +#if defined (__s390__) || defined (__s390x__) + } else if (!strncmp(devName, "dasd", 4)) { + /* IBM Dasd Drives */ + type = S_IFBLK; + major = 94; + minor = ( devName[4] - 'a' ) * 4; + if (devName[5]) + minor += devName[5] - '0'; + } else if (!strncmp(devName, "mnd", 4)) { + /* IBM MiniDisk Drives */ + type = S_IFBLK; + major = 95; + minor = devName[3] - 'a'; +#endif } else if (!strncmp(devName, "rd/", 3)) { /* dac 960 "/rd/c0d0{p1}" */ int c, d, p; diff --git a/isys/isys.c b/isys/isys.c index 1db81b8ab..17b48c72b 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -157,6 +157,7 @@ static void probedListDealloc (probedListObject * o); static PyObject * probedListNet(probedListObject * s, PyObject * args); static PyObject * probedListScsi(probedListObject * s, PyObject * args); static PyObject * probedListIde(probedListObject * s, PyObject * args); +static PyObject * probedListDasd(probedListObject * s, PyObject * args); static int probedListLength(PyObject * o); static PyObject * probedListSubscript(probedListObject * o, int item); @@ -164,6 +165,7 @@ static PyMethodDef probedListObjectMethods[] = { { "updateNet", (PyCFunction) probedListNet, METH_VARARGS, NULL }, { "updateScsi", (PyCFunction) probedListScsi, METH_VARARGS, NULL }, { "updateIde", (PyCFunction) probedListIde, METH_VARARGS, NULL }, + { "updateDasd", (PyCFunction) probedListDasd, METH_VARARGS, NULL }, { NULL }, }; @@ -858,6 +860,14 @@ static PyObject * probedListScsi(probedListObject * o, PyObject * args) { return Py_None; } +static PyObject * probedListDasd(probedListObject * o, PyObject * args) { + if (!PyArg_ParseTuple(args, "")) return NULL; + kdFindDasdList(&o->list, 0); + + Py_INCREF(Py_None); + return Py_None; +} + int pdc_dev_running_raid(int fd); #ifdef __i386__ diff --git a/isys/isys.py b/isys/isys.py index 7c3193f75..a923d67d7 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -183,6 +183,7 @@ def driveDict(klassArg): probedList = _isys.ProbedList() probedList.updateIde() probedList.updateScsi() + probedList.updateDasd() dict = {} for (klass, dev, descr) in probedList: diff --git a/isys/probe.c b/isys/probe.c index 0ec53a278..149a73a3b 100644 --- a/isys/probe.c +++ b/isys/probe.c @@ -403,6 +403,43 @@ bye: return val; } +int kdFindDasdList(struct knownDevices * devices, int code) { + /* patch for s390 by Oliver Paukstadt <oliver.paukstadt@millenux.com> */ + /* based upon code by Erik Tews <erik.tews@gmx.net> */ + FILE * fd; + struct kddevice device; + char line[200]; + char name[10]; + char status[10]; + char model[30]; + + if (access("/proc/dasd/devices", R_OK)) return 0; + /* a system without /proc/dasd/devices is nothing to worry about */ + + fd = fopen ("/proc/dasd/devices", "r"); + if (fd == NULL) return 1; + + /* Every line in this file is a harddisk */ + while ((fgets(line, 190, fd)) != NULL) { + sscanf(line, "%*X %*[(A-Z)] at (%*d:%*d) is %[a-z0-9]:%s ", name, status); + /* Take every dasd, formated and unformated */ + + if (!deviceKnown(devices, name)) { + snprintf(model, sizeof(model), "IBM DASD (%s)", status); + device.class = CLASS_HD; + device.name = strdup(name); + device.model = strdup(model); + device.code = code; + addDevice(devices, device); + } + } + fclose (fd); + + qsort(devices->known, devices->numKnown, sizeof(*devices->known), + sortDevices); + return 0; +} + struct knownDevices kdInit(void) { struct knownDevices kd; diff --git a/isys/smp.c b/isys/smp.c index c7b467b1e..aed7bbefa 100644 --- a/isys/smp.c +++ b/isys/smp.c @@ -40,6 +40,31 @@ int alphaDetectSMP(void) #endif /* __alpha__ */ +#if defined (__s390__) || defined (__s390x__) +int s390DetectSMP(void) +{ + int issmp = 0; + FILE *f; + + f = fopen("/proc/cpuinfo", "r"); + if (f) { + char buff[1024]; + + while (fgets (buff, 1024, f) != NULL) { + if (!strncmp (buff, "# processors : ", 18)) { + if (strtoul (buff + 18, NULL, 0) > 1) + issmp = 1; + break; + } + } + fclose(f); + } else + return -1; + + return issmp; +} +#endif /* __s390__ */ + #ifdef __sparc__ int sparcDetectSMP(void) { @@ -459,6 +484,10 @@ int detectSMP(void) return isSMP = sparcDetectSMP(); #elif __alpha__ return isSMP = alphaDetectSMP(); +#elif __s390__ + return isSMP = s390DetectSMP(); +#elif __s390x__ + return isSMP = s390DetectSMP(); #elif __ia64__ return isSMP = 1; #else diff --git a/keymaps/Makefile b/keymaps/Makefile index ff6a4b78f..f7902709d 100644 --- a/keymaps/Makefile +++ b/keymaps/Makefile @@ -17,3 +17,9 @@ alpha: sparc: ./updkmaps sparc + +s390: + ./updkmaps s390 + +s390x: + ./updkmaps s390 diff --git a/loader/Makefile b/loader/Makefile index 7ab4fdae7..f72c7e6c1 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -53,6 +53,16 @@ BINS += loader OBJS += stubs.o endif +ifeq (s390, $(ARCH)) +BINS += loader loader-local +OBJS += stubs.o +endif + +ifeq (s390x, $(ARCH)) +BINS += loader loader-local +OBJS += stubs.o +endif + ifeq (sparc, $(ARCH)) BINS += loader loader-local OBJS += stubs.o diff --git a/loader/loader.c b/loader/loader.c index 953d935bb..b24b4670e 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -1445,13 +1445,16 @@ static char * doMountImage(char * location, while (step != STEP_DONE) { switch (step) { case STEP_LANG: +#if !defined (__s390__) && !defined (__s390x__) chooseLanguage(lang, flags); +#endif defaultLang = 0; step = STEP_KBD; dir = 1; break; case STEP_KBD: +#if !defined (__s390__) && !defined (__s390x__) rc = chooseKeyboard (keymap, kbdtype, flags); if (rc == LOADER_NOOP) { @@ -1469,6 +1472,10 @@ static char * doMountImage(char * location, step = STEP_METHOD; dir = 1; } +#else + step = STEP_METHOD; + dir = 1; +#endif break; case STEP_METHOD: diff --git a/loader/net.c b/loader/net.c index 352b073d4..211621c12 100644 --- a/loader/net.c +++ b/loader/net.c @@ -296,7 +296,9 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) { struct in_addr addr; char dhcpChoice; char * chptr; + char * env; +#if !defined(__s390__) && !defined(__s390x__) text = newtTextboxReflowed(-1, -1, _("Please enter the IP configuration for this machine. Each " "item should be entered as an IP address in dotted-decimal " @@ -437,6 +439,47 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) { } } while (i != 2); +#else /* s390 now */ + /* quick and dirty hack by opaukstadt@millenux.com for s390 */ + /* ctc stores remoteip in broadcast-field until pump.h is changed */ + memset(&newCfg, 0, sizeof(newCfg)); + strcpy(newCfg.dev.device, device); + newCfg.isDynamic = 0; + env = getenv("IPADDR"); + if (env) { + inet_aton(env, &newCfg.dev.ip); + newCfg.dev.set |= PUMP_INTFINFO_HAS_IP; + } + env = getenv("NETMASK"); + if (env) { + inet_aton(env, &newCfg.dev.netmask); + newCfg.dev.set |= PUMP_INTFINFO_HAS_NETMASK; + } + env = getenv("GATEWAY"); + if (env) { + inet_aton(env, &newCfg.dev.gateway); + newCfg.dev.set |= PUMP_NETINFO_HAS_GATEWAY; + } + env = getenv("NETWORK"); + if (env) { + inet_aton(env, &newCfg.dev.network); + newCfg.dev.set |= PUMP_INTFINFO_HAS_NETWORK; + } + if (!strncmp(newCfg.dev.device, "ctc", 3)) { + env = getenv("REMIP"); + if (env) { + inet_aton(env, &newCfg.dev.broadcast); + newCfg.dev.set |= PUMP_INTFINFO_HAS_BROADCAST; + } + } else { + env = getenv("BROADCAST"); + if (env) { + inet_aton(env, &newCfg.dev.broadcast); + newCfg.dev.set |= PUMP_INTFINFO_HAS_BROADCAST; + } + } +#endif /* s390 */ + #ifdef __STANDALONE__ if (!newCfg.isDynamic) #endif @@ -459,8 +502,9 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg, int flags) { } } +#if !defined(__s390__) && !defined(__s390x__) newtPopWindow(); - +#endif if (!FL_TESTING(flags)) { configureNetwork(cfg); findHostAndDomain(cfg, flags); @@ -14,6 +14,7 @@ # import sys +import iutil class LogFile: def __init__ (self): @@ -27,11 +28,17 @@ class LogFile: try: self.logFile = open(file, "w") except: - self.logFile = sys.stderr + if iutil.getArch() != "s390" and iutil.getArch() != "s390x": + self.logFile = sys.stderr + else: + self.logFile = open("/tmp/anaconda-s390.log", "w") elif file: self.logFile = file else: - self.logFile = open("/dev/tty3", "w") + if iutil.getArch() != "s390" and iutil.getArch() != "s390x": + self.logFile = open("/dev/tty3", "w") + else: + self.logFile = open("/tmp/anaconda-s390.log", "w") def __call__ (self, format, *args): if not self.logFile: diff --git a/packages.py b/packages.py index 1582ae98a..e0d88dc98 100644 --- a/packages.py +++ b/packages.py @@ -354,7 +354,12 @@ def doPreInstall(method, id, intf, instPath, dir): if not upgrade: # this is NICE and LATE. It lets kickstart/server/workstation # installs detect this properly - if isys.smpAvailable(): + if arch == "s390" or arch == "s390x": + if (string.find(os.uname()[2], "vrdr") > -1): + select(id.hdList, 'kernel-vrdr') + if (string.find(os.uname()[2], "tape") > -1): + select(id.hdList, 'kernel-tape') + elif isys.smpAvailable(): select(id.hdList, 'kernel-smp') if (id.hdList.has_key('kernel-enterprise')): @@ -664,7 +669,8 @@ def doPostInstall(method, id, intf, instPath): # XXX currently Bad Things (X async reply) happen when doing # Mouse Magic on Sparc (Mach64, specificly) - if os.environ.has_key ("DISPLAY") and not arch == "sparc": + # The s390 doesn't even have a mouse! + if os.environ.has_key ("DISPLAY") and not (arch == "sparc" or arch == "s390" or arch == "s390x"): import xmouse try: mousedev = xmouse.get()[0] @@ -681,32 +687,33 @@ def doPostInstall(method, id, intf, instPath): except RuntimeError: pass - unmountUSB = 0 - try: - isys.mount('/usbdevfs', instPath+'/proc/bus/usb', 'usbdevfs') - unmountUSB = 1 - except: - log("Mount of /proc/bus/usb failed") - pass - - - argv = [ "/usr/sbin/kudzu", "-q" ] - devnull = os.open("/dev/null", os.O_RDWR) - iutil.execWithRedirect(argv[0], argv, root = instPath, - stdout = devnull) - # turn it back on - if mousedev: - try: - os.rename ("/dev/disablemouse", mousedev) - except OSError: - pass - try: - xmouse.reopen() - except RuntimeError: - pass - - if unmountUSB: - isys.umount(instPath + '/proc/bus/usb', removeDir = 0) + if arch != "s390" and arch != "s390x": + unmountUSB = 0 + try: + isys.mount('/usbdevfs', instPath+'/proc/bus/usb', 'usbdevfs') + unmountUSB = 1 + except: + log("Mount of /proc/bus/usb failed") + pass + + + argv = [ "/usr/sbin/kudzu", "-q" ] + devnull = os.open("/dev/null", os.O_RDWR) + iutil.execWithRedirect(argv[0], argv, root = instPath, + stdout = devnull) + # turn it back on + if mousedev: + try: + os.rename ("/dev/disablemouse", mousedev) + except OSError: + pass + try: + xmouse.reopen() + except RuntimeError: + pass + + if unmountUSB: + isys.umount(instPath + '/proc/bus/usb', removeDir = 0) w.set(4) diff --git a/textw/complete_text.py b/textw/complete_text.py index ae0efa5ad..eb76eca5f 100644 --- a/textw/complete_text.py +++ b/textw/complete_text.py @@ -14,8 +14,13 @@ from snack import * from constants_text import * from translate import _ +import iutil + class FinishedWindow: + + if (iutil.getArch() != "s390" and iutil.getArch() != "s390x"): + def __call__ (self, screen): screen.pushHelpLine (string.center(_("<Return> to reboot"), screen.width)) @@ -37,6 +42,20 @@ class FinishedWindow: return INSTALL_OK + else: + + def __call__ (self, screen): + screen.pushHelpLine (string.center(_("<Return> to continue"), + screen.width)) + rc = ButtonChoiceWindow (screen, _("Complete"), + _("Congratulations, package installation is complete.\n\n" + "Press return to continue.\n\n" + "Information on configuring and using your Red Hat " + "Linux system is contained in the Red Hat Linux " + "manuals."), + [ _("OK") ], help = "finished") + return INSTALL_OK + class ReconfigFinishedWindow: def __call__ (self, screen): diff --git a/textw/partition_text.py b/textw/partition_text.py index 086bf086b..110682526 100644 --- a/textw/partition_text.py +++ b/textw/partition_text.py @@ -1026,3 +1026,9 @@ class AutoPartitionWindow: screen.popWindow() return INSTALL_OK + +class DasdPreparation: + def __call__(self, screen, todo): + todo.skipFdisk = 1 + return INSTALL_NOOP + |