Re: OpenBSD on the Zaurus

"Justin Patrin" <[email protected]> Wed, 20 Dec 2006 15:50:07 -0800
Newsgroups gmane.comp.handhelds.openzaurus.user
Message-ID <[email protected]>
On 12/20/06, Kevin <lists-rlw6wC9k61x8UrSeD/[email protected]> wrote:
> This looks very interesting to me for many reasons, but even more
> interesting still is the notion of having a true boot loader like grub or
> lilo and being able to use it on the zaurus to boot into either OZ or OBSD.

No, you can't use any kind of boot loader of your own on the Z, at
least AFAIK. It uses its own bootloader and no work has been done to
reverse engineer it or build a new one.

>
> I do this routinely with desktops and laptops, but is this feasible with the
> zaurus?  If not, what would be required to make it feasible?

Creating one.

>
> I just read the-altboot-faq and noticed that altboot apparently cannot act
> as a true boot loader as do grub and lilo, but the justification didn't seem
> quite correct to me:
>
> =======
> Can I dual-boot between Cacko / $Some-other-distribution and OZ?
>
> Please keep in mind that while altboot does enable you to use multiple root
> partitions / installations it does (currently) not allow you to boot another
> kernel. To load a different kernel than the one flashed, the kexec tools are
> required. Currently this is only possible with kernel 2.6 so your device
> must support this kernel.
>
> Also, since I am coding altboot on an Akita / SL-C1000 (on which kernel 2.6
> makes the flash unreadable for kernel 2.4 without reflashing - nope I am not
> kidding) kexec has not been implemented in altboot, yet. That shouldn't be
> too difficult tho.
>
> =======
>
> So the kexec tools might allow booting a different kernel... ok.  Is it
> still true that kexec has not been implemented in altboot?  The 'yet' in the
> FAQ sort-of begs the question, but my apologies if I shouldn't ask.

altboot is a set of shell scripts which run on a minimal boot of
Linux, so it is not a true bootloader. It can easily boot into
different "installations" on the same machine, but can't just load
other kernels.

...except if you use kexec. Kexec support is in altboot, but I can't
attest to kexec's usability with anything other than a Linux kernel. I
have successfully used altboot-with-kexec to boot 2.6 and 2.4 kernels
(remember that altboot/kexec must be run on a 2.6 kernel, so 2.6 must
be flashed).

Note: kexec on arm does not support passing in command-line options to
your kernel, even though altboot *seems* to have this support. The
command-line must be compiled into the kernel.

> The
> last thread on this subject in the list archive is a few months old:
> "altboot and /dev/hdaX (spitz)", so I just wanted to check the latest
> status.  I did learn some important details from that thread, though, that
> seem to imply some important differences between the various zaurii
> regarding this question, in particular, the microdrive zaurii (like my 3200)
> don't store the kernel in flash, but rather, on /dev/hda1.  Did I understand
> that correctly?  If so, then it seems that's a step in the right direction
> towards implementing a true boot loader that allows one to boot up any
> kernel and have it use any partition as the root filesystem.

No. The main kernel is always in flash on the Zaurus. kexec allows you
to load a kernel from any medium that can be mounted (such as the md)
but the real boot kernel is *always* in flash (unless you built and
flashed a new bootloader somehow).

>
> ==============
> But why is booting another kernel such a big deal for dual-boot?
>
> Because each and every distribution out there requires you to run the exact
> same kernel, including commandline options, configuration and exact same
> version as the kernel it was shipped with. You simply can't run a kernel 2.4
> based OS with a kernel 2.6 and vice-versa.
>
> <...>
> ==============
>
> While it may be mostly or totally true that one can't run a 2.4 kernel with
> a root filesystem and libraries and utilities that were meant to be run with
> a 2.6 kernel (or vice versa), it is most definitely *not* true that each and
> every distribution requires one to run the exact same kernel as it was
> shipped with.  I have first-hand experience to the contrary with Debian,
> Gentoo, SuSE, Slackware, and maybe a few others.
>
> grub and lilo allow one to (in the most general sense and for most desktops
> and laptops), choose any combination of kernel and root filesystem at boot
> time.  I realize that the zaurus has many constraints that undoubtedly make
> it more complex for it to do the same thing, but I get the impression from
> all my reading that it should be feasible.
>
> Can anyone comment on this, in particular for the microdrive zaurii?

For "embedded" distros, especially such as small as we are, we can't
support more than 1 combination. If you try a different kernel you
have to deal with any issues yourself. Remember that you need the
drivers all installed for the right kernel version too.

We have also changed floating point libraries to mixing old and new
binaries is a bad idea, especially if they're Sharp ROM binaries. You
*should* be able to set up Sharp ROM to boot beside OZ by installing
OZ and using altboot/kexec to boot the 2.4 kernel but it would take
either changing the flash boot scripts for Sharp to point to different
partitions or recompiling your OZ kernel to point to a different
partition.

>
> As I said, I'd love to be able to boot my 3200 into OBSD or OZ depending on
> the circumstances, and I certainly have adequate room on the microdrive to
> allow me to have entirely different partitions (both for root and other
> filesystems too -- and this is required for OBSD which uses a disk
> partition/slice scheme that is quite different from the strict partition
> scheme that linux uses) for each OS.
>
> Anyway, I'd really appreciate seeing some replies to this post.
>
> Thanks for all the other replies from list members to my many other
> questions and posts.
>
> -Kevin
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Openzaurus-users mailing list
> Openzaurus-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/openzaurus-users
>


-- 
Justin Patrin

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV