Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!wuarchive!uunet!mcsun!ukc!strath-cs!cs.glasgow.ac.uk!bru-cc!eesrajm From: eesrajm@cc.brunel.ac.uk (Andrew J Michael) Newsgroups: comp.os.minix Subject: Re: Building kernel under MINIX-386 Summary: Not easy Message-ID: <2002@Terra.cc.brunel.ac.uk> Date: 14 Feb 91 16:38:24 GMT References: <1991Feb12.175520.20681@ns.network.com> Organization: Brunel University, Uxbridge, UK Lines: 45 In article <1991Feb12.175520.20681@ns.network.com>, hgv@daphne.network.com (Harry G. Varnis) writes: > > I swear this is my last novice/startup posting! > > I've got MINIX-386 running (good stuff!) but am not setup to easily boot > a 16-bit operating environment now to use the regular cpp for kernel's .x > files. I've tried using GNU cpp but get something roughly like "unterminated > constant expression" for start.x, etc. > > Pointers/instruction on the cpp situation under MINIX-386 would be > appreciated. > > Much Thanks, > -- > Harry Varnis (612) 424-4888 I assume that you are trying to build a completely gcc-compiled kernel. I've currently got mm and fs running, but the kernel itself is more difficult. There are two problems here. The obvious one is that gcc (or more accurately, gas) uses the AT&T 386 assembler syntax rather than the Intel one. You will therefore need to convert all the statements in *.x to AT&T syntax. Secondly, and perhaps less obvious, gcc is a 32-bit compiler, and expects the code it produces to be running in 32-bit protected mode. On startup, the MINIX kernel isn't in protected mode; this change is made partway through the start.x file. You therefore have to be very careful what you actually tell the assembler to do, and in any case gas will insist on producing 32-bit addresses for jumps. In fact I'm not even sure if it is possible to get this all to work, but I'm still trying. My thanks at this point to Bruce Evans, who keeps holding my hand, and is probably laughing his head off at the idea of ME telling someone else about the wonders of the 386 ...... Andy Michael -- Andy Michael (eesrajm@cc.brunel.ac.uk) "You might think that. I 85 Hawthorne Crescent couldn't possibly comment." West Drayton Middlesex UB7 9PA