Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Aug 2003 10:51:59 -0600
From:      Greg Lewis <glewis@misty.eyesbeyond.com>
To:        freebsd-alpha@FreeBSD.org
Subject:   Netboot cross-compiled kernel
Message-ID:  <20030809165159.GA26726@misty.eyesbeyond.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I have a couple of Alphas at home, and I'd like to get at least one booting
FreeBSD.  One is a BX/UX without SRM, so that appears to be stuck with
Linux.  The other is an EB164 which looks to me like it should work.  It
currently has Digital UNIX on it (4.x).  As I didn't want to blow that
away I decided to try netbooting.

I grabbed the 4.8 miniiso and unpacked it in a suitable directory and
put in an fstab with just a root NFS mount (for now).  After setting up
bootp and tftp the machine does boot, only to have the GENERIC kernel
panic trying to mount root:

Mounting root from nfs:10.0.0.1:/diskless/FreeBSD/alpha/4.8
missing device name
setrootbyname failed
panic: nfs_mountroot: socreate(0000): 43

Looking through the archives, I saw a post from Drew which mentions I
need the following options in my kernel:

options         BOOTP
options         BOOTP_NFSROOT
options         BOOTP_WIRED_TO=de0

Since I haven't got an Alpha running FreeBSD, I cross built the kernel
(after copying the GENERIC config and adding those lines) on my x86 box
(running 4.8):

make TARGET_ARCH=alpha buildworld
make TARGET_ARCH=alpha buildkernel KERNCONF=OMEGA
make TARGET_ARCH=alpha DESTDIR=/diskless/FreeBSD/alpha/4.8 installkernel KERNCONF=OMEGA

This appears to work and produce an Alpha kernel:

file /usr/obj/alpha/usr/src/sys/OMEGA/kernel /usr/obj/alpha/usr/src/sys/OMEGA/kernel: ELF 64-bit LSB executable, Alpha (unofficial), version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped

However, if I try and boot this new kernel it panics immediately after
printing the copyright with:

fatal kernel trap:

    trap entry = 0x2 (memory management fault)
    a0         = 0x0
    a1         = 0x1
    a2         = 0x0
    pc         = 0xfffffc000041d07c
    ra         = 0xfffffc000041d9fc
    curproc    = 0
    
panic: trap

Is there something else I need to do when cross building, or does it not
work in 4.x?  I did notice the cross-build compiles code with -mcpu=ev4
where the CPU identifies during boot as:

CPU: EV56 (21164A)

Is this a problem?  I.e. should I do the build with -mcpu=ev56?

If its pertinent the machine identifies itself as:

Digital AlphaPC 164 432 Mhz

Its running SRM 4.8, although that seems to be working fine in terms of
the netbooting getting going and I'm loathe to upgrade unless I need to
after having bad experience trying to get SRM working on an LX board.

Any help appreciated :).

-- 
Greg Lewis                          Email   : glewis@eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030809165159.GA26726>