Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Sep 2013 17:13:42 +0200
From:      Mattia Rossi <mattia.rossi.mailinglists@gmail.com>
To:        Randall Stewart <rrs@lakerest.net>
Cc:        ARM <freebsd-arm@freebsd.org>
Subject:   Re: Trouble with a dream plug...
Message-ID:  <523B14A6.8070209@gmail.com>
In-Reply-To: <3D3276E2-7436-4E98-A37D-1529C1752158@lakerest.net>
References:  <3D3276E2-7436-4E98-A37D-1529C1752158@lakerest.net>

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

it's not on the FreeBSDMarvell wiki, but Ian (if I remember correctly) 
already added all the necessary tweaks to get FreeBSD on the DreamPlug. 
In fact, I'm running the most recent HEAD on it, compiled with Clang. 
Both ETH interfaces working, so far no trouble.
He has also created the Kernel for the NAND-Version of the Dreamplug, 
which supposedly has an N after the Version number. I'm not too sure 
which one you have.
But before getting old trying to fix the DB-* and SHEEVAPLUG Kernconfs 
and FDT's I'd suggest t compile using

KERNCONF=DREAMPLUG-1001

Then I'd suggest to use a FAT partition on the internal SDcard of the 
dreamplug to host/store the kernel and an additional partiion (or more) 
for the world.

If the FAT partition is your first partition on the SDcard it will be 
da0s1 so change the DREAMPLUG-1001 config file accordingly at the 
rootdevice option.

I'd also suggest to put the world/root on a USB Stick to boot the first 
time, and use that instead of the nfs root.
I usually tar and untar world on the stick using the -p option.
On upgrades just remember to do a 'chflags -R noschg *', but I guess 
you'd know that.
Remember to set the rc.conf and fstab files up properly. The device will 
be da1s1 (or da2s1 if you have an additional sdcard in the sdcard slot)

Boot the dreamplug with the usb stick attached, then:

in U-Boot  stop autoboot, then type:

set ipaddr <an available ipv4 address>
set serverip <tftp ipv4 server address>
usb start
tftpboot 0x900000 <location>/kernel.bin
go 900000

It should boot, and the kernel should fail to find the root, so just 
type ufs:/da1s1 (or da2s1 if you have an additional sdcard in the sdcard 
slot)

then go on booting. You should land in multiuser mode.

Partition the internal disk into a small msdosfs partition (da0s1) and a 
larger (or multiple) root (da0s2) partition(s) (I use ufs)
copy the kernel (tftp) into the msdosfs partition and the world onto the 
other partition(s).
If you fixed the kernel config before, the kernel will look for the root 
file system on the right spot (da0s2).
Next time you boot you just need to change the x_boot_cmd variable in 
u-boot to:

fatload usb 0 0x900000 kernel.bin

and the autoboot variable to go 900000 -> that's somewhat trickier and I 
can't remember how i did it...
Ask again once you got there.

 From there on, you should be able to autoboot your dreamplug into 
FreeBSD Multiuser without hassle.

Hope that helps,

Mat

Am 19.09.2013 14:24, schrieb Randall Stewart:
> Hi all:
>
> I am playing with a DreamPlug which has the marvell 88F6281 chip set
> in it:
>
> http://www.globalscaletechnologies.com/p-54-dreamplug-devkit.aspx
>
> The version number of this seems to be 3.
>
> When I first tried to bring it up following the wiki:
> https://wiki.freebsd.org/FreeBSDMarvell
>
> I had no joy, the system would boot up until it tried to find the ethernet and die…
>
> So with a bit of playing I figured out that the miiphy was incorrect, it was trying
> to use 8 and I found with a bit of poking that the two phys are on 0 and 1 (There are
> two Marvell Gig-E's on this critter).
>
> Now after I got it to boot, I wanted to find a way to get the second ethernet up. Linux
> (which comes with it of course) finds both of them so why can't I?
>
> So after digging some and learning about the flattened device tree, I find that the layout of this in respect
> to the ether-net is as follows (reported by a modified ofwdump.. I had to make it so that
> it did not exit when it sees a next-prop return an error, evidently this little arm just gives
> you an error, not a 0 back when you hit the end of the properties). Anyway here is my
> ethernet description:
> *********************************
>      Node 0x840: ethernet@72000
>        #address-cells:
>          00 00 00 01
>        #size-cells:
>          00 00 00 01
>        model:
>          56 32 00
>          'V2'
>        compatible:
>          6d 72 76 6c 2c 67 65 00
>          'mrvl,ge'
>        reg:
>          00 07 20 00 00 00 20 00
>        ranges:
>          00 00 00 00 00 07 20 00 00 00 20 00
>        local-mac-address:
>          00 00 00 00 00 00
>        interrupts:
>          00 00 00 0c 00 00 00 0d 00 00 00 0e 00 00 00 0b 00 00 00 2e
>        interrupt-parent:
>          00 00 00 01
>        phy-handle:
>          00 00 00 02
>        ------------Child of the E-net ------------
>        Node 0x918: mdio@0
>          #address-cells:
>            00 00 00 01
>          #size-cells:
>            00 00 00 00
>          compatible:
>            6d 72 76 6c 2c 6d 64 69 6f 00
>            'mrvl,mdio'
>          ---------Child of the mdio -----------
>          Node 0x95c: ethernet-phy@0
>            reg:
>              00 00 00 08
>            phandle:
>              00 00 00 02
> ****************************
>
>  From this you can see where the idea of the phy being at 8 is coming from. Its sure
> enough is in the ethernet-phy. Now I am *not* sure what an mdio is supposed to do
> for us, and even more strange is how does linux seem to be able to bring up both ports
> on this?
>
> The spec's say that the first port is at 72000 - 73fff and the second is at
> 76000 - 77fff. And of course with no FDT description we won't see it.
>
> Is our friend linux just assuming that its at those addresses? We end up with
> a list of IRQ's there as well 0xb, 0xc, 0xd, 0xe an 0x2e. Linux uses 0xb for eth0 and 0xf
> for eth1.
>
> Anyone out there familiar with why I can't see the second network? Is this a
> bad fdt that came from the vendor? or do we need to just have driver hacks in
> that "assume" the second one is there? If so I am not sure how to deal with the IRQ's
> can we just allocate one? Linux seems fine with doing that unless there is something
> I am missing in my limited understanding of the FDT stuff.
>
> Any pointers or hints would be appreciated.
>
>
> R
>
>
> ------------------------------
> Randall Stewart
> 803-317-4952 (cell)
>
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"




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