Subject: Re: booting from solaris
To: Andrei Petrov <and@genesyslab.com>
From: Eduardo Horvath <eeh@turbolinux.com>
List: port-sparc64
Date: 07/11/2000 12:02:37
On Tue, 11 Jul 2000, Andrei Petrov wrote:

> On Tue, 11 Jul 2000, John Hay wrote:
> 
> > > 
> > > > I strongly recommend generating an /ofwboot and using that to load the
> > > > kernel.  However, even with that there may be filesystem issues on newer
> > > > versions of solaris.
> > > I think it may destroy my solaris. What do you think?
> > > 
> > > I saw the guy was able to netboot, so I'm trying to built ofwboot for
> > > that purpose,
> > > currently I lack crt0.o what kind of surprise me.
> > > 
> > > Should standalone program have crt0? Is my environment screwd?
> > 
> > Hehehe, I also had that problem and thought it was because of my cross
> > build environment so I didn't even mention it. (I'm building on a PC
> > running FreeBSD.) What I did was to add:
> > 
> > LIBCRT0=        ${CURDIR}/srt0.o
> > 
> 
> I found that including bsd.prog.mk pulls dependancies from LIBCRT..
> for (PROG). So I need to add:
> 
> LIBCRT0=
> LIBCRTBEGIN=
> LIBCRTEND=
> 
> > to the Makefile. Maybe also for the record, I build ofwboot as a 64bit
> > elf binary.
> 
> Also, I tried 32bit ofwboot and it said '15400 unaligned memory access'.

Make sure your definition of _LP64 is correct.  srt0.o uses this to
determine whether it is calling 32-bit C code or 64-bit C code.  If there
is a mismatch then the C code will get unaligned accesses when accessing
data on the stack.

Eduardo Horvath