Date: Wed, 1 Nov 2000 18:16:58 +1030 From: "Martin Minkus" <diskiller@diskiller.net> To: "Gerald Heinig" <Gerald.Heinig@post.rwth-aachen.de>, <freebsd-sparc@freebsd.org> Subject: Re: Anyone out there ? Message-ID: <002c01c043d7$eab6c4d0$0200000a@lan.diskiller.net> References: <016a01c03d9d$eb2c6950$0200000a@lan.diskiller.net> <39F5BD2D.2F978990@post.rwth-aachen.de> <009801c04336$7e45ea20$0200000a@lan.diskiller.net> <39FF5BA1.13A26A16@post.rwth-aachen.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > b) A few weeks ago someone posted the OpenBoot specification, which we'll > > need to write a boot loader and to understand > > > what the NetBSDers are doing. This is very useful, as the original > > document from http://www.ieee.org costs about US$ 160 > > > - one reason I didn't start on the project when I did have the time > > (unlike now). > > > > Where can i find this? I've found only general documentation on OpenBoot, > > It's at ftp://playground.sun.com > I believe it's in the 1275/ Directory. I don't know whether that's enough info, but it looks interesting. I found it. Interestingly, i checked a few days before and that site was down, which is why i asked. > > and in layman terms what happens in the boot sequence. The OpenBSD > > sparc_boot (?) man page also describes the boot procedure. > > Essentially, the OpenBoot bios loads the 1st stage bootloader from a certain > > location within the beggining of the ufs filesystem. It has harcoded in, the > > location and block numbers for the 2nd stage boot loader, that is larger in > > size. The 2nd stage bootloader has support for ufs, and can therefore locate > > and load the kernel (and preload kernel modules, in the case of FreeBSD?). > > Interesting stuff. Funnily enough, I was under the impression that OpenBoot understoof ufs and loaded the kernel > directly. It's been a while since I read up the boot process under Solaris. Urm ... hrm. Well, this is what OpenBSD does, and, one or two other websites on OpenBoot and Solaris explained. So i don't know. > > I've modified the bootloader on OpenBSD already, changing the text to read > > FreeBSD/sparc boot, etc, and installed the new bootblocks just fine. It > > works and boots OpenBSD as normal. > > > > > c) You (or whoever) start with locore.s and port that over. > > > > I've been studying this file on OpenBSD/sparc. > > > > > My own thoughts on the matter are: (I'm not a FreeBSD kernel hacker, > > though I do have Solaris kernel experience) > > > > > > a) Sit down with a copy of the FreeBSD i386 and Alpha versions of locore.s > > and try to find out what it exactly *does*. > > > You'll need to pester several people either on this list or on > > freebsd-hackers (another reason, incidentally, which > > > stopped me: freebsd-hackers has a phenomenal mail volume - more or less > > 150 mails a day, IIRC). > > > > Haven't gotten this far yet :). > > > > I've been studying the OpenBSD/sparc locore.s, and alot of the stuff in the > > file makes sense, but i'm no kernel hacker, so i have a long way to go. I'm > > picking up sparc asm as i go (its not hard) as i've had experience with MIPS > > asm, which is just a fairly simliar RISC load/store architecture. > > > > > b) Compare with the NetBSD SPARC version and spot the diffs/similarities. > > > > I've been studying the OpenBSD SPARC locore.s like i stated, but haven't > > compared with FreeBSD's i386 or Alpha locore.s yet. Infact, i don't know x86 > > or alpha asm ... > > My main goal atm. is to get familiar with the OpenBSD kernel code, make > > useful changes, *then* comparing it to the existing code in the FBSD kernel, > > and working on implementing its locore.s > > > > > c) Write some small programs that can be loaded and executed by the > > OpenBoot firmware. > > > > That is the idea. Make the OpenBoot firmware use the bootloaders to be able > > to run some basic binaries on the filesystem and execute them (rather then > > the /kernel). These basic binaries are, of course, ones written to run from > > OpenBoot, not unix utilities obviously :). So i can't make systemcalls, or > > use library functions. > > > > > d) Trace the execution thread from locore.s onwards, translating code as > > you go and seeing whether the file executes OK. > > > > > > OK. Those are my thoughts/observations. If you've got free time and really > > want to try on this, it's a cool project to > > > do. There are a number of smart people subscribed to the list, so fire > > away any amount of technical questions you want. > > > My guess is that if you start asking lots of questions, people will see > > things are moving and start contributing > > > themselves. Herd instinct, basically :-) > > > > We'll see how it goes :) > > > > > That's all from me. Good luck and have fun > > > > Some of you at this point might be wondering ... WHY???? > > > > Well, simple. A sparc10 is all i have (as well as an IPX), so i have to make > > do. So i'm doing a 32bit sparc port. That, and Net and Open already have > > working Sparc32 ports i can study and learn from. > > > > This may end up being more of a learning excercise then anything, and if so, > > it will at least give me the experience i need to be able to do the Sparc64 > > port. And hopefully at that time i can score a U1 from David O'Brien :). > > Actually, that's exactly my motivation for it as well. I'm almost certainly not going to *use* FreeBSD-Sparc32, if and > when it finally does materialise, even if I wrote it myself. I have too many things working just fine under Solaris for > that to be worthwhile. > The learning experience is something I'm very interested in, though. At the moment I'm busy implementing an ISDN stack > for Solaris x86 and I'm determined to finish it and release it reasonably soon. Hence the lack of time. > When I've finished, however, I hope to have a few weeks spare, so please keep in touch and let me know how things are > rolling. If I have time, I'll be more than willing to lend a hand. I'm busy atm myself ... just finished my last week at university for the year, and still have exams ahead of me. (2 or 3 weeks). After that, i'll have plenty of time over the summer break to work on this. martin. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002c01c043d7$eab6c4d0$0200000a>