Subject: Re: NetBSD booting NetBSD on a TS-7xxx
To: Toru Nishimura <locore64@alkyltechnology.com>
From: Jesse Off <joff@embeddedARM.com>
List: port-arm
Date: 12/05/2006 11:33:15
It really shouldn't matter if its NetBSD or Linux as long as its ELF.  I'm 
just glad I don't have to compose up something like Linux's ATAG structures 
when booting NetBSD.  Right now, I can just unconditionally create Linux's 
ATAGs as long as page 0x0 (where the ATAGs are stored) is not in the 
destination address range.  The preconditions (various ATAGS and register 
args) Linux needs from its bootloader are a pain-- I'm glad NetBSD doesn't 
have anything like them and hope it never will.

//Jesse Off

----- Original Message ----- 
From: "Richard Earnshaw" <Richard.Earnshaw@buzzard.freeserve.co.uk>
To: "Toru Nishimura" <locore64@alkyltechnology.com>
Cc: <port-arm@NetBSD.org>; <Richard.Earnshaw@buzzard.freeserve.co.uk>
Sent: Tuesday, December 05, 2006 1:44 AM
Subject: Re: NetBSD booting NetBSD on a TS-7xxx


> On Tue, 05 Dec 2006 12:28:58 +0900, "Toru Nishimura" wrote:
>> Jesse Off wrote;
>>
>> > I recently wrote a program to allow NetBSD to boot other OS' from 
>> > within
>> > NetBSD itself.
>>
>> [ ... snip ... ]
>>
>> > I'll probably implement arbitrary ELF file loading sometime this month
>> > (right now it only works with raw images)
>>
>> As a side note, it's possible to distinguish NetBSD ELF from Linux 2.4 or 
>> 2.6
>> looking at ELF "private flags" field.
>>
>> In Little Endian short, offset 0x24 of kernel ELF header differs as;
>> - NetBSD    0x0602
>> - Linux 2.4  0x0002
>> - Linux 2.6  0x0202
>
> This isn't a reliable test.  Linux objects and executables built to the
> EABI will show a completely different value here (in e_flags) and that
> field doesn't contain enough information to determine the OS.
>
> R.
>
>
>