u-boot and *BSD

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

u-boot and *BSD

Nick Guenther
I've got an Openmoko GTA vb04 (the "developer preview") and I'm
interested in running OpenBSD on it (not that I expect it to
work--that's for further work). I googled and found not much
information on it, but I did find this
http://ozlabs.org/pipermail/linuxppc-dev/2006-April/022447.html which
seems to suggest that u-boot and linux have special support (for *each
other*) that let things boot? Presumably u-boot cannot boot BSD
kernels, but what would it take to make it work?


(my next plan is to go the route used for zaurii, with letting linux
boot and then using a kernel module to trick it into booting OpenBSD.
I tried insmod zboot'ing but it said "wrong module format", probably
because zboot was compiled for a 2.4 linux kernel, so my next plan is
to get zboot compiled for a 2.6 kernel and try again)

Reply | Threaded
Open this post in threaded view
|

Re: u-boot and *BSD

Alexander Yurchenko
On Sun, Dec 16, 2007 at 02:16:12PM -0500, Nick Guenther wrote:
> I've got an Openmoko GTA vb04 (the "developer preview") and I'm
> interested in running OpenBSD on it (not that I expect it to
> work--that's for further work). I googled and found not much
> information on it, but I did find this
> http://ozlabs.org/pipermail/linuxppc-dev/2006-April/022447.html which
> seems to suggest that u-boot and linux have special support (for *each
> other*) that let things boot? Presumably u-boot cannot boot BSD
> kernels, but what would it take to make it work?

u-boot can run openbsd pretty well. just load the kernel via tftp and
run it with the 'go' command.

>
>
> (my next plan is to go the route used for zaurii, with letting linux
> boot and then using a kernel module to trick it into booting OpenBSD.
> I tried insmod zboot'ing but it said "wrong module format", probably
> because zboot was compiled for a 2.4 linux kernel, so my next plan is
> to get zboot compiled for a 2.6 kernel and try again)

--
   Alexander Yurchenko

Reply | Threaded
Open this post in threaded view
|

Re: u-boot and *BSD

Nick Guenther
On Dec 16, 2007 3:09 PM, Alexander Yurchenko <[hidden email]> wrote:

> On Sun, Dec 16, 2007 at 02:16:12PM -0500, Nick Guenther wrote:
> > I've got an Openmoko GTA vb04 (the "developer preview") and I'm
> > interested in running OpenBSD on it (not that I expect it to
> > work--that's for further work). I googled and found not much
> > information on it, but I did find this
> > http://ozlabs.org/pipermail/linuxppc-dev/2006-April/022447.html which
> > seems to suggest that u-boot and linux have special support (for *each
> > other*) that let things boot? Presumably u-boot cannot boot BSD
> > kernels, but what would it take to make it work?
>
> u-boot can run openbsd pretty well. just load the kernel via tftp and
> run it with the 'go' command.

I copied bsd.rd to the (ext2-formatted) flash card (over scp while the
moko was booted) and then went into the u-boot shell (shutdown the
moko, hold [AUX]+[POWER], plug in the USB cord) and did:

In: usbtty
Out: usbtty
Err:   usbtty
GTA01Bv4 # DEVICE_CONFIGURED: 1
Enabling automatic fast charge

GTA01Bv4 #
GTA01Bv4 #
GTA01Bv4 # mmcinit
trying to detect SD Card...
Manufacturer:       0x03, OEM "SD"
Product name:       "SU512", revision 8.0
Serial number:      281090113
Manufacturing date: 8/2007
CRC:                0x34, b0 = 1
READ_BL_LEN=15, C_SIZE_MULT=7, C_SIZE=3453
size = 2329935872
GTA01Bv4 # ext2load mmc 0 0x32000000 /bsd.rd   #load bsd.rd from the
expansion card (mmc:/0) to RAM addy 0x32000000

4373224 (0x42bae8) bytes read
GTA01Bv4 # bootelf 0x32000000
Loading .text @ 0xc0200000 (1500896 bytes)
Loading .data @ 0xc0370000 (2678036 bytes)
Clearing .bss @ 0xc05fdd14 (284192 bytes)
## Starting application at 0xa0200000 ...

It hangs here. Well, I don't know if it's hanging, or booted and
waiting for me but just not displaying on the neo1973 LCD. I don't
know how to change the BSD root filesystem from u-boot, if it's even
possible, or else I would be setting up a system on the mmc card (that
runs SSH of course) to ssh to and poke around in.

(n.b. If you're trying this with BSD, use "bootelf" do not use
"bootm"; that wants a u-boot image, which has some nice features like
CRC checking, but is a headache to get created. You have to use a
poorly documented "mkimage" tool from the u-boot toolchain, and the
u-boot toolchain seems to pretty much only want to work on fedora??)


> > (my next plan is to go the route used for zaurii, with letting linux
> > boot and then using a kernel module to trick it into booting OpenBSD.
> > I tried insmod zboot'ing but it said "wrong module format", probably
> > because zboot was compiled for a 2.4 linux kernel, so my next plan is
> > to get zboot compiled for a 2.6 kernel and try again)

Er, that should be zbsdmod.o, not zboot. It's been a while since I've
played with this.
Same result however:
root@fic-gta01:~$ insmod /mnt/card/zbsdmod.o
insmod: error inserting '/mnt/card/zbsdmod.o': -1 Invalid module format


-Nick

Reply | Threaded
Open this post in threaded view
|

Re: u-boot and *BSD

Alexander Yurchenko
On Mon, Dec 17, 2007 at 01:30:31AM -0500, Nick Guenther wrote:

> GTA01Bv4 # ext2load mmc 0 0x32000000 /bsd.rd   #load bsd.rd from the
> expansion card (mmc:/0) to RAM addy 0x32000000
>
> 4373224 (0x42bae8) bytes read
> GTA01Bv4 # bootelf 0x32000000
> Loading .text @ 0xc0200000 (1500896 bytes)
> Loading .data @ 0xc0370000 (2678036 bytes)
> Clearing .bss @ 0xc05fdd14 (284192 bytes)
> ## Starting application at 0xa0200000 ...
>
> It hangs here. Well, I don't know if it's hanging, or booted and

please stop booting random kernels on unsupported machine, it'll never
work. why haven't you try i386 bsd.rd?

>
>
> -Nick

--
   Alexander Yurchenko

Reply | Threaded
Open this post in threaded view
|

Re: u-boot and *BSD

Nickolay A. Burkov-2
In reply to this post by Nick Guenther
On Mon, Dec 17, 2007 at 01:30:31AM -0500, Nick Guenther wrote:

> On Dec 16, 2007 3:09 PM, Alexander Yurchenko <[hidden email]> wrote:
> > On Sun, Dec 16, 2007 at 02:16:12PM -0500, Nick Guenther wrote:
> > > I've got an Openmoko GTA vb04 (the "developer preview") and I'm
> > > interested in running OpenBSD on it (not that I expect it to
> > > work--that's for further work). I googled and found not much
> > > information on it, but I did find this
> > > http://ozlabs.org/pipermail/linuxppc-dev/2006-April/022447.html which
> > > seems to suggest that u-boot and linux have special support (for *each
> > > other*) that let things boot? Presumably u-boot cannot boot BSD
> > > kernels, but what would it take to make it work?
> >
> > u-boot can run openbsd pretty well. just load the kernel via tftp and
> > run it with the 'go' command.
>
> I copied bsd.rd to the (ext2-formatted) flash card (over scp while the
> moko was booted) and then went into the u-boot shell (shutdown the
> moko, hold [AUX]+[POWER], plug in the USB cord) and did:
If I recall correctly, there are Samsung S3C2410 SoC with plenty hardware onboard.
OpenBSD is not ported to that platform (yet).

>
> In: usbtty
> Out: usbtty
> Err:   usbtty
> GTA01Bv4 # DEVICE_CONFIGURED: 1
> Enabling automatic fast charge
>
> GTA01Bv4 #
> GTA01Bv4 #
> GTA01Bv4 # mmcinit
> trying to detect SD Card...
> Manufacturer:       0x03, OEM "SD"
> Product name:       "SU512", revision 8.0
> Serial number:      281090113
> Manufacturing date: 8/2007
> CRC:                0x34, b0 = 1
> READ_BL_LEN=15, C_SIZE_MULT=7, C_SIZE=3453
> size = 2329935872
> GTA01Bv4 # ext2load mmc 0 0x32000000 /bsd.rd   #load bsd.rd from the
> expansion card (mmc:/0) to RAM addy 0x32000000
>
> 4373224 (0x42bae8) bytes read
> GTA01Bv4 # bootelf 0x32000000
> Loading .text @ 0xc0200000 (1500896 bytes)
> Loading .data @ 0xc0370000 (2678036 bytes)
> Clearing .bss @ 0xc05fdd14 (284192 bytes)
> ## Starting application at 0xa0200000 ...
>
> It hangs here. Well, I don't know if it's hanging, or booted and
> waiting for me but just not displaying on the neo1973 LCD. I don't
> know how to change the BSD root filesystem from u-boot, if it's even
> possible, or else I would be setting up a system on the mmc card (that
> runs SSH of course) to ssh to and poke around in.
>
> (n.b. If you're trying this with BSD, use "bootelf" do not use
> "bootm"; that wants a u-boot image, which has some nice features like
> CRC checking, but is a headache to get created. You have to use a
> poorly documented "mkimage" tool from the u-boot toolchain, and the
> u-boot toolchain seems to pretty much only want to work on fedora??)
>
>
> > > (my next plan is to go the route used for zaurii, with letting linux
> > > boot and then using a kernel module to trick it into booting OpenBSD.
> > > I tried insmod zboot'ing but it said "wrong module format", probably
> > > because zboot was compiled for a 2.4 linux kernel, so my next plan is
> > > to get zboot compiled for a 2.6 kernel and try again)
>
> Er, that should be zbsdmod.o, not zboot. It's been a while since I've
> played with this.
> Same result however:
> root@fic-gta01:~$ insmod /mnt/card/zbsdmod.o
> insmod: error inserting '/mnt/card/zbsdmod.o': -1 Invalid module format
>
>
> -Nick
>

--
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

C programmers never die. They're just cast into void.

Reply | Threaded
Open this post in threaded view
|

Re: u-boot and *BSD

Nick Guenther
In reply to this post by Alexander Yurchenko
On Dec 17, 2007 4:29 AM, Alexander Yurchenko <[hidden email]> wrote:

> On Mon, Dec 17, 2007 at 01:30:31AM -0500, Nick Guenther wrote:
> > GTA01Bv4 # ext2load mmc 0 0x32000000 /bsd.rd   #load bsd.rd from the
> > expansion card (mmc:/0) to RAM addy 0x32000000
> >
> > 4373224 (0x42bae8) bytes read
> > GTA01Bv4 # bootelf 0x32000000
> > Loading .text @ 0xc0200000 (1500896 bytes)
> > Loading .data @ 0xc0370000 (2678036 bytes)
> > Clearing .bss @ 0xc05fdd14 (284192 bytes)
> > ## Starting application at 0xa0200000 ...
> >
> > It hangs here. Well, I don't know if it's hanging, or booted and
>
> please stop booting random kernels on unsupported machine, it'll never
> work. why haven't you try i386 bsd.rd?

Sorry, http://www.arm.com/markets/mobile_solutions/armpp/18266.html
says it has an ARM processor, I thought it was worth an hour of time
to try just in case.

Reply | Threaded
Open this post in threaded view
|

Re: u-boot and *BSD

ian@
In reply to this post by Alexander Yurchenko
> please stop booting random kernels on unsupported machine, it'll never
> work. why haven't you try i386 bsd.rd?


There are ports of Free- and NetBSD to the OpenMoko platform that should
be consulted as a starting point. Search the archives or the OM Wiki. It
won't be trivial, but we do already run on various Arm platforms (like
Thecus, err, armish).