From owner-freebsd-hackers Sun Nov 22 15:53:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA27904 for freebsd-hackers-outgoing; Sun, 22 Nov 1998 15:53:53 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA27883 for ; Sun, 22 Nov 1998 15:53:13 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.8.8/8.8.8) id AAA18256; Mon, 23 Nov 1998 00:51:59 +0100 (CET) (envelope-from olli) Date: Mon, 23 Nov 1998 00:51:59 +0100 (CET) From: Oliver Fromme Message-Id: <199811222351.AAA18256@dorifer.heim3.tu-clausthal.de> To: freebsd-hackers@FreeBSD.ORG Subject: Re: Changing the load address of the kernel? Cc: mike@smith.net.au Newsgroups: list.freebsd-hackers Organization: Administration Heim 3 Reply-To: freebsd-hackers@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: TIN [version 1.2 RZTUC(3) PL2] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Smith wrote in list.freebsd-hackers: > > [...] > > The bootloader (I'm using rawboot from a floppy) correctly > > loads the kernel to 00400000, but it hangs right after that. > > Did I miss anything? > > > > Any help would be greatly appreciated. > > Changing the kernel load address will require a great amount of effort. > There are almost certainly hardcoded copies of the value scattered > around. My experiments led me to the same conclusion. :-( > > Background of the problem: I'm trying to boot a diskless > > computer with a network boot ROM by LanWorks > > (www.lanworks.com). They require to make a bootable floppy > > first, then put an image of that floppy on a tftp server. > > The ROM loads that image, makes a RAM disk from it and boots > > it. The problem is: That RAM disks seems to overlap with the > > kernel at 00100000. There doesn't seem to be a way to change > > the location of the RAM disk. > > That's ugly. 8( Yes. Meanwhile I found out that the overlapping memory locations are only half of the problem. Thanks to Lanworks tech support, I got a new version of their image loader stub that relocates the RAM disk to a different location. But there's still the same problem. I tracked it down to some strange and subtl interference between the 2nd stage bootloader and the RAM disk's INT 0x13 interface. It occurs as soon as the bootloader switches to protected mode. After some dirty hacking, it works now -- I created a modified version of rawboot (I called it ramboot) which reads the kernel directly from the RAM disk in memory. Should I give the code to someone who can commit it? On the other hand, it's really ugly code, and (AFAIK) there will be a new ELF-based bootloader soon, so it might not be worth bothering. Anyway, if someone needs some code to boot his/her FreeBSD box with a Lanworks ROM, I've put the "ramboot" stuff on the web: http://dorifer.heim3.tu-clausthal.de/~olli/ramboot.tar.gz Regards Oliver PS: I'm not an employee of Lanworks, but a happy customer. :) -- Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message