Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Dec 2012 12:37:06 -0800
From:      Oleksandr Tymoshenko <gonzo@bluezbox.com>
To:        Ian Lepore <freebsd@damnhippie.dyndns.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Raspberry Pi questions
Message-ID:  <08125E73-C46A-4DDF-BFD8-59D5B86136B8@bluezbox.com>
In-Reply-To: <1356466883.1144.8.camel@revolution.hippie.lan>
References:  <1356466883.1144.8.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2012-12-25, at 12:21 PM, Ian Lepore <freebsd@damnhippie.dyndns.org> =
wrote:

> I got my RPi running this morning, more or less.  I used the boot
> partition from the latest image at =
http://www.peach.ne.jp/archives/rpi/
> but I'm loading my own custom built kernel and world.  I have a few
> questions...
>=20
> Can I get ubldr to load a kernel using tftp, bootp, etc? =20

    Yes. ubldr checks U-Boot devices (SD and net), then tries to locate
FFS partition on SD card and if fails - falls back to NFS/bootp. You can =
fetch
my image, boot partition there contains ubldr, FDT blob, config.txt and =
boot scripts:

http://people.freebsd.org/~gonzo/arm/rpi/freebsd-pi-r243778.img.gz

> Are there any
> docs on ubldr in general?  (Right now I'm skipping ubldr and using
> u-boot's DHCP command to load the kernel.)
No, there are BSDCan slides by raj@ but as far as I know that's the only =
bit of=20
documentation for ubldr.
=
http://www.bsdcan.org/2008/schedule/attachments/49_2008_uboot_freebsd.pdf


> My RPi comes up with a random ethernet mac address on every boot, but
> when I look at the driver code it seems that there should be an =
address
> stored in an eeprom.  Do I have to program that myself?
    SMSC might or might not have EEPROM. The one in RPI does not
have EEPROM so it's driver responsibility to set MAC address. There are =
two
options: get it from FDT blob or generate random. On Raspberry Pi it =
works like this:
firmware loads FDT blob at fixed address, fixes up board-specific info =
like memory sizes,
MAC address, board serial/revision. Then it loads u-boot, u-boot loads =
ubldr, ubldr
generates kernel meta-data, loads kernel and passes control to the =
kernel.=20
Kernel gets FDT blob from meta-data and uses it to determine MAC =
address.
In order to make ubldr recognize FDT blob you'll need  "fdt addr 0x100" =
in /boot/loader.rc
either on SD card FFS partition or on your NFS root.=20

>=20
> When I try to use an nfs-mounted root I get "Mounting from
> nfs:172.22.42.240:/rpi failed with error 19." but if I mount root from
> the sdcard then after it gets to multiuser mode I can manually =
nfs-mount
> the same directory.  Has anybody got an nfs-mounted root working?
    This is most likely due to NFS version mismatch. We have nfs and =
oldnfs
for NFSv4 and NFSv3.  I have working NFS root for raspberry pi. My =
kernel config:

options        NFSCL                   #Network Filesystem Client=20
options        NFS_ROOT                #NFS usable as /, requires =
NFSCLIENT
options        BOOTP_NFSROOT
options        BOOTP_COMPAT
options        BOOTP
options        BOOTP_NFSV3
options        BOOTP_WIRED_TO=3Due0

I use FreeBSD 9.0 as NFS server.=20





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?08125E73-C46A-4DDF-BFD8-59D5B86136B8>