13 Jul 2012 09:00

## Raspberry PI

Hi,

I thought I'd share the fact that I'm making good progress with Raspberry PI.

Nick

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012
Copyright (c) 1982, 1986, 1989, 1991, 1993

NetBSD 6.99.7 (RPI) #10: Fri Jul 13 07:48:33 BST 2012
nick <at> kenny:/home/nick/work/netbsd/src-rpi/sys/arch/evbarm/compile/RPI
total memory = 192 MB
avail memory = 184 MB
cprng kernel: WARNING insufficient entropy at creation.
mainbus0 (root)
cpu0 at mainbus0: ARM1176JZ-S r0p7 (ARM11J core)
cpu0: DC enabled IC enabled WB enabled LABT
cpu0: 16KB/32B 4-way Instruction cache
cpu0: 16KB/32B 4-way write-back-locking-C Data cache
obio0 at mainbus0
bcmtmr0 at obio0 addr 0x20003000-0x2000301b intr 3: VC System Timer
bcmpm0 at obio0 addr 0x20100000-0x20100fff: Power management, Reset controller
and Watchdog registers
plcom0 at obio0 addr 0x20201000-0x20201fff intr 57
plcom0: txfifo disabled
plcom0: console


13 Jul 2012 10:34

### Re: Raspberry PI

On Fri, Jul 13, 2012 at 8:00 AM, Nick Hudson
<nicholas.a.hudson <at> gmail.com> wrote:
> Hi,
>
> I thought I'd share the fact that I'm making good progress with Raspberry PI.

Hello Nick,

I also have one of this boards, is there anyway we could try the code?

Thanks, Roger.


13 Jul 2012 11:00

### Re: Raspberry PI

On 13 July 2012 08:00, Nick Hudson <nicholas.a.hudson <at> gmail.com> wrote:
> Hi,
>
> I thought I'd share the fact that I'm making good progress with Raspberry PI.
>
> [Shiny dmesg]
>
> NetBSD/evbarm (rpi) (console)
>

Very cool, very cool indeed :)


13 Jul 2012 23:11

### Re: Raspberry PI


On 13/07/2012, at 7:00 PM, Nick Hudson wrote:

> Hi,
>
> I thought I'd share the fact that I'm making good progress with Raspberry PI.
> … [boot messages deleted]

That looks awesome.

It might be time to replace my ageing TS7200s. I now have an idea floating around to remove the video, audio
and microUSB connectors and then add a power connector and a mezzanine card with an RTC and RS-232.

Cheers,
Lloyd


14 Jul 2012 20:18

### Re: Raspberry PI

On 7/13/12 9:00 AM, Nick Hudson wrote:
> Hi,
>
> I thought I'd share the fact that I'm making good progress with Raspberry PI.

Nick,
Were you able to compile in hard-float bits too for ARMv6?
Is the video working?

--

--

Marcin M. Jessa


16 Jul 2012 21:15

### Re: Raspberry PI

On Saturday 14 July 2012 19:18:17 Marcin M. Jessa wrote:
> On 7/13/12 9:00 AM, Nick Hudson wrote:
> > Hi,
> >
> > I thought I'd share the fact that I'm making good progress with Raspberry
> > PI.
>
> Nick,
> Were you able to compile in hard-float bits too for ARMv6?

Not really paid any attention to hardfloat other than getting the VFP
detected.

> Is the video working?

Not yet.

Nick


26 Sep 2012 08:49

### Re: Raspberry PI

On Fri, 13 Jul 2012, Nick Hudson wrote:

> Hi,
>
> I thought I'd share the fact that I'm making good progress with Raspberry PI.
>
> Nick

Looks good

I have tiny Raspberry PI -like devkit which has SMSC LAN9512 chip, the same
RPI uses. LAN9512 is USB HUB and ethernet controller in the same chip.

Do you (or anyone) have plan to introduce support for that chip?
Quick look at sys/dev/ic and I didn't find any support from -current.

Petri


26 Sep 2012 20:02

### Re: Raspberry PI

On Wed, 26 Sep 2012 09:49:29 +0300 (EEST)
Petri Laakso <petri.laakso <at> asd.fi> wrote:

> I have tiny Raspberry PI -like devkit which has SMSC LAN9512 chip,
OLinuXino?

> Do you (or anyone) have plan to introduce support for that chip?
> Or is it supported already?
> Quick look at sys/dev/ic and I didn't find any support from -current.
I had a look and didn't find anything besides an entry for the
VID / PID. So I am interrested too, as the OLinuXino Maxi features a
LAN9512.
--

--

\end{Jochen}

\ref{http://www.unixag-kl.fh-kl.de/~jkunz/}


26 Sep 2012 20:27

### Re: Raspberry PI

On Wed, 26 Sep 2012 20:02:24 +0200
Jochen Kunz <jkunz <at> unixag-kl.fh-kl.de> wrote:

> On Wed, 26 Sep 2012 09:49:29 +0300 (EEST)
> Petri Laakso <petri.laakso <at> asd.fi> wrote:
>
> > I have tiny Raspberry PI -like devkit which has SMSC LAN9512 chip,
> OLinuXino?

Yup. I've managed to initialize system to the point where I should start to write
drivers. Like for interrupt controller and clock module, to get clock interrupts running.
And sure, simple boot loader also, please have a look if you are interested:

http://zomg.asd.fi/cgi-bin/netbsd-imx23_olinuxino.cgi/dir?ci=tip

> > Do you (or anyone) have plan to introduce support for that chip?
> > Or is it supported already?
> > Quick look at sys/dev/ic and I didn't find any support from -current.
> I had a look and didn't find anything besides an entry for the
> VID / PID. So I am interrested too, as the OLinuXino Maxi features a
> LAN9512.

Have on worked on some code for this SoC, or are just planning?

Petri


26 Sep 2012 23:00

### Re: Raspberry PI

On Wed, 26 Sep 2012 21:27:06 +0300
Petri Laakso <petri.laakso <at> asd.fi> wrote:

> > OLinuXino?
> Yup. I've managed to initialize system to the point where I should
> start to write drivers. Like for interrupt controller and clock module,
> to get clock interrupts running.
I have some experience in device driver hacking. So I can offer my help.

> And sure, simple boot loader also,
How do you boot the system at the moment?
How to compile a kernel from your code and boot it?
(kernel config file, how to prepare a "sb"-file, ...)

> please have a look if you are interested:
I am interrested and I have a commit bit set in the NetBSD CVS
repository. So I can get your code into -current once it reaches some
level of usefullness.

> Have on worked on some code for this SoC, or are just planning?
I am just planing / researching where and how to start. You already did
a lot more then I. i.e. I have not written a single line of code.

What I've done up to now:

- Got Debian running as described here:

- Compiled Linux 3.6, barebox bootloader and imx-bootlets:
https://github.com/koliqi/imx23-olinuxino


27 Sep 2012 09:59

### Re: Raspberry PI

On Wed, 26 Sep 2012 23:00:26 +0200
Jochen Kunz <jkunz <at> unixag-kl.fh-kl.de> wrote:

> > And sure, simple boot loader also,
> How do you boot the system at the moment?
> How to compile a kernel from your code and boot it?
> (kernel config file, how to prepare a "sb"-file, ...)

I made simple stand alone binary which initializes clocks, power,
DRAM etc. Sort of a boot loader. sys/arch/evbarm/stand/bootimx23
on my fossil repo.

Then, using elftosb I baked bootimx23.elf and NetBSD kernel in to a sb image
and wrote it to a SD card.

I am doing this against netbsd-6 tree. Should I change to -current and prepare patch for that?
I also can do little writeup how to prepare SD card, partitions and generally how to get things going.

Nice to hear you compiled elftosb2 for NetBSD. We will need that

This is how it looks at the moment:

Booting...done.

NetBSD/evbarm (OLinuXino) booting ...
pmap_postinit: Allocated 9 static L1 descriptor tables
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012
Copyright (c) 1982, 1986, 1989, 1991, 1993


27 Sep 2012 21:20

### OLinuXino (was: Re: Raspberry PI)

On Thu, 27 Sep 2012 10:59:41 +0300
Petri Laakso <petri.laakso <at> asd.fi> wrote:

> I made simple stand alone binary which initializes clocks, power,
> DRAM etc. Sort of a boot loader. sys/arch/evbarm/stand/bootimx23
> on my fossil repo.
Ahh, OK. I missd that at first sight. So you don't use the Freescale
bootlets and do the stuff yourself. That's good because it creats no

> Then, using elftosb I baked bootimx23.elf and NetBSD kernel in to
> a sb image and wrote it to a SD card.
Can you supply a NetBSD sb-image to me? I'd like to try this with the
mxsldr USB bootstraper.

> I am doing this against netbsd-6 tree. Should I change to -current
> and prepare patch for that?
Yes. Such new things go into -current and are not allowed in a release
branch.

> I also can do little writeup how to prepare SD card, partitions and
> generally how to get things going.

> Nice to hear you compiled elftosb2 for NetBSD. We will need that
Well. I badly hacked it to mimic a Linux-host to the source. This needs
to be done in a much cleaner fashion. Did you use a Linux binary?

> This is how it looks at the moment:
[...]


28 Sep 2012 10:26

### Re: OLinuXino (was: Re: Raspberry PI)

Few thoughts about future developements. And hey, thank you for your feedback.
I really appreciate it

On Thu, 27 Sep 2012 21:20:06 +0200
Jochen Kunz <jkunz <at> unixag-kl.fh-kl.de> wrote:

> On Thu, 27 Sep 2012 10:59:41 +0300
> Petri Laakso <petri.laakso <at> asd.fi> wrote:
>
> > I made simple stand alone binary which initializes clocks, power,
> > DRAM etc. Sort of a boot loader. sys/arch/evbarm/stand/bootimx23
> > on my fossil repo.
> Ahh, OK. I missd that at first sight. So you don't use the Freescale
> bootlets and do the stuff yourself. That's good because it creats no

I'd like see some day that bootimx23 is able to load kernel from the NetBSD partition
on the SD card. Would make kernel upgrades very easy as user doesn't need
to learn about elftosb. It could be possible after we learn how actually to use MMC/SD
interface in the kernel (to mount root for example)
Armed with that experience, it would be easier to work on same stuff in bootloader.

Once in a while bootloader gets stuck. Possibly because some brownouts on SoC power
lines or whatever reasons. Bootloader most likely needs an another look, but for now
it does its job.

> You have done all the nasty low level stuff (that I don't like

After nasty stuff was done and I'd look into -current I saw this arm32/arm32_kvminit.c


28 Sep 2012 23:11

### Re: OLinuXino (was: Re: Raspberry PI)

On Fri, 28 Sep 2012 11:26:37 +0300
Petri Laakso <petri.laakso <at> asd.fi> wrote:

> I'd like see some day that bootimx23 is able to load kernel from the NetBSD partition
> on the SD card. Would make kernel upgrades very easy as user doesn't need
> to learn about elftosb. It could be possible after we learn how actually to use MMC/SD
> interface in the kernel (to mount root for example)
> Armed with that experience, it would be easier to work on same stuff in bootloader.
Sure. A bootloader, that reads an ELF kernel image from a FFS
partition, is the way to go - in the future. It also needs a way to
pass boot parameters like -s to the kernel. But I would like to keep
the possibility to combine bootloader and kernel into a single
sb-image. This is required for booting via USB. At the current state of
the affair booting a sb-image with an embedded kernel from a dedicated
sd-card partition is perfectely OK.

> Once in a while bootloader gets stuck. Possibly because some brownouts on SoC power
> lines or whatever reasons. Bootloader most likely needs an another look, but for now
> it does its job.
Yes. I am sure things will shake out when more people get involved.

> After nasty stuff was done and I'd look into -current I saw this arm32/arm32_kvminit.c
> which seems to provide an interface to do that all nasty stuff which all these evbarm/*/*_machdep.c
> usually do. I like the idea.
Well. Just use it.

> > I sugest this as the next steps:
> > - You keep hacking on the kernel stuff.
> Yup, next step is to integrate *spl() stuff with interrupt controller to
> make clocks tick.


27 Sep 2012 09:15

### SMSC95XX [was Re: Raspberry PI]

On Wednesday 26 September 2012 07:49:29 Petri Laakso wrote:
> On Fri, 13 Jul 2012, Nick Hudson wrote:
> > Hi,
> >
> > I thought I'd share the fact that I'm making good progress with Raspberry
> > PI.
> >
> > Nick
>
> Looks good
>
> I have tiny Raspberry PI -like devkit which has SMSC LAN9512 chip, the same
> RPI uses. LAN9512 is USB HUB and ethernet controller in the same chip.
>
> Do you (or anyone) have plan to introduce support for that chip?
> Or is it supported already?
> Quick look at sys/dev/ic and I didn't find any support from -current.

Hi,

Others expressed an interest in helping write a driver for this, but I don't
think that anyone has started in earnest.

There is a FreeBSD driver here

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb//net/if_smsc.c

>
> Petri



3 Oct 2012 14:00

### Re: SMSC95XX [was Re: Raspberry PI]

On Thursday 27 September 2012 08:15:52 Nick Hudson wrote:
> On Wednesday 26 September 2012 07:49:29 Petri Laakso wrote:
> > On Fri, 13 Jul 2012, Nick Hudson wrote:
> > > Hi,
> > >
> > > I thought I'd share the fact that I'm making good progress with
> > > Raspberry PI.
> > >
> > > Nick
> >
> > Looks good
> >
> > I have tiny Raspberry PI -like devkit which has SMSC LAN9512 chip, the
> > same RPI uses. LAN9512 is USB HUB and ethernet controller in the same
> > chip.
> >
> > Do you (or anyone) have plan to introduce support for that chip?
> > Or is it supported already?
> > Quick look at sys/dev/ic and I didn't find any support from -current.
>
> Hi,
>
> Others expressed an interest in helping write a driver for this, but I
> don't think that anyone has started in earnest.

OK, I have if_smsc compiling. No idea if it works.

Nick



4 Oct 2012 06:31

### Re: SMSC95XX [was Re: Raspberry PI]


On Wed, 3 Oct 2012, Nick Hudson wrote:

> On Thursday 27 September 2012 08:15:52 Nick Hudson wrote:
>> On Wednesday 26 September 2012 07:49:29 Petri Laakso wrote:
>>> On Fri, 13 Jul 2012, Nick Hudson wrote:
>>>> Hi,
>>>>
>>>> I thought I'd share the fact that I'm making good progress with
>>>> Raspberry PI.
>>>>
>>>> Nick
>>>
>>> Looks good
>>>
>>> I have tiny Raspberry PI -like devkit which has SMSC LAN9512 chip, the
>>> same RPI uses. LAN9512 is USB HUB and ethernet controller in the same
>>> chip.
>>>
>>> Do you (or anyone) have plan to introduce support for that chip?
>>> Or is it supported already?
>>> Quick look at sys/dev/ic and I didn't find any support from -current.
>>
>> Hi,
>>
>> Others expressed an interest in helping write a driver for this, but I
>> don't think that anyone has started in earnest.
>
> OK, I have if_smsc compiling. No idea if it works.
>