Date: Thu, 2 Mar 1995 11:32:43 -0700 (MST) From: Don Yuniskis <dgy@seagull.rtd.com> To: freebsd-hackers@freefall.cdrom.com (FreeBSD hackers) Subject: Re: Got the new build tools to work with Mach4 (fwd) Message-ID: <199503021832.LAA19698@seagull.rtd.com>
next in thread | raw e-mail | index | archive | help
Greetings! Thought this might be of interest in light of recent discussions... Forwarded message: > From mach4-request@schirf.cs.utah.edu Thu Mar 2 10:31:04 1995 > Message-Id: <199503021654.IAA11079@uruk.org> > X-Authentication-Warning: uruk.org: Host loopback didn't use HELO protocol > To: Krisda Eaksrun <mole@mail.car.chula.ac.th> > Cc: mach4-users@cs.utah.edu > Subject: Re: Got the new build tools to work with Mach4 > In-Reply-To: Your message of "Thu, 02 Mar 1995 17:38:02 +0700." > <Pine.OSF.3.91.950302173002.15372A-100000@mail.car.chula.ac.th> > Date: Thu, 02 Mar 1995 08:54:21 -0800 > From: Erich Stefan Boleyn <erich@uruk.org> > > > so won't gas 2.3 work anymore ? i follow the way in www at utah > > that, i have to patch gas a little bite (yeah i got gas 2.3 and patch it) > > i, currently, compile it on freebsd 2.0 (release), also i have set target > > for that gas to i386-gnu too, then..everything goes fine, until it > > start to ranlib the libmach_sa.a , and it refuse to do so coz' the file > > is in inapprpriate format.., any suggestion ? > > There are 2 build environments from FreeBSD 2.0 that you can use that will > build "mach4-UK02p8": > > 1) FreeBSD build tools: If you use the FreeBSD build tools, you > have to patch the assembler it comes with (or I understand you > can use a patched version of gas-2.3, but I haven't gone that > route myself). Here is the relevant info (after patching, > just type make, though make sure it is the BSD make, I think): > > ------------------------(start info here)------------------ > spam: <{275} (as)> pwd > /usr/src/gnu/usr.bin/as > spam: <{276} (as)> diff -u subsegs.c subsegs.c.orig > --- subsegs.c Thu Feb 16 07:29:19 1995 > +++ subsegs.c.orig Thu Feb 16 07:23:48 1995 > @@ -140,9 +140,6 @@ > if (seg == SEG_DATA) { > seg_fix_rootP = &data_fix_root; > seg_fix_tailP = &data_fix_tail; > - } else if (seg == SEG_BSS) { > - seg_fix_rootP = &bss_fix_root; > - seg_fix_tailP = &bss_fix_tail; > } else { > know (seg == SEG_TEXT); > seg_fix_rootP = &text_fix_root; > @@ -174,7 +171,7 @@ > { > long tmp; /* JF for obstack alignment hacking */ > #ifndef MANY_SEGMENTS > - know(seg == SEG_DATA || seg == SEG_TEXT || seg == SEG_BSS); > + know(seg == SEG_DATA || seg == SEG_TEXT); > #endif > if (seg != now_seg || subseg != now_subseg) > { /* we just changed sub-segments */ > -------------------------(finish)------------------------ > > Now, you have to change "Makeconf" (after running "configure", I think) > to use "ar -T" instead of "ar". If the "AR" variable isn't in the > file, add a line with "AR = ar -T", but I think it is there. > > It should then build fine. It will *not* boot from the standard > boot block without either zeroing the 21st byte in the file, or > patching the boot block to ignore the lower component of the > load address. It appears to be a bug in the BSD build tools. > > 2) GNU cross-compile tools: Using a recent gas/binutils snapshot > from Cygnus (950221 is the one I'm using right now, but it works > with all I've tried in the last 3-4 weeks) and gcc-2.6.3, build > the cross-compile environment that Bryan mentions in his installation > WWW pages (gas/binutils first, then gcc) for target "i386-gnu". > To get gcc-2.6.3 to compile, I had to add a "-Dbsd4_4" > to the compiler flags, since the FreeBSD configuration is set > up for the pre-2.0 BSD 4.3 versions, and FreeBSD 2.0 is BSD 4.4 based. > Now patch the mkubmod script. Here's the relevant info (do this > before running "configure" in the object directory!): > > -----------------(start info here)---------------------- > spam: <{267} (boot)> pwd > /usr/local_build/mach/mach4-i386/boot > spam: <{268} (boot)> diff -u mkubmod.sh mkubmod.sh.orig > --- mkubmod.sh Fri Feb 24 22:03:26 1995 > +++ mkubmod.sh.orig Fri Feb 24 21:56:40 1995 > @@ -62,7 +62,4 @@ > rm -f $infile.tmp.o > fi > > -# kludge to fix unstripped symbol problems > -i386-gnu-objcopy -N _mach_bmod_text -N _mach_bmod_data -N _mach_bmod_bss -N _mach_bmod_init -N _mach_bmod_etext -N _mach_bmod_edata -N _mach_bmod_ebss -N _etext -N _edata -N _ebss $outfile > - > exit 0 > ------------------------(finish)----------------------- > > At his point, run Bryan's "configure" with the "--target=i386-gnu" > option, then run the make command. It should build the entire kernel > and produce a bootable image that works with no binary patching > or bootblock patches. > > (one note: my patches are backward, but I hope that's obvious :-) > > A final note, #2 above, being a cross-compile environment, should work > from other OS's as well. I haven't tested this on other OS's myself, > so interaction bugs could certainly creep in. > > ...and this is going to change for newer versions of mach4, but updated > info will be provided. > > Question, etc. are welcome (I don't want to give people wrong info). > > Erich > -- > Erich Stefan Boleyn \__ E-mail (preferred): <erich@uruk.org> > WWW site: "http://www.uruk.org/" \__ home #: +1 (503) 226-0741 > Mad Genius wanna-be, CyberMuffin \_ U-Snail: 924 S.W. 16th Ave, #202 > Motto: "I'll live forever or die trying" \ Portland, OR, USA 97205 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503021832.LAA19698>