Subject: Using Etherboot ELF/FreeBSD loader to netboot ELF/NetBSD
To: None <tech-kern@netbsd.org>
From: Wojciech Puchar <wojtek@tensor.3miasto.net>
List: tech-kern
Date: 02/27/2003 19:25:35
tried to do so.
found that etherboot "recognizes" FreeBSD by checking if ELF entry address
is high (like >0xc0000000 in Net/FreeBSD).
so NetBSD GETS RECOGNIZED as FreeBSD, is successfully loaded and even
successfully executed, then first does
printf("WARNING: CAN'T ALLOCATE EXTENDED MEMORY FROM IOMEM
EXTENT MAP!\n");
and then panics with uvm message that start >= end!
the problem is that etherboot passes params to kernel in FreeBSD's way:
(*entry)(freebsd_howto, NODEV, 0, 0, 0, &info.bsdinfo, 0, 0, 0);
while it should be:
(*entry)(0,NODEV,&info.bsdinfo,0,meminfo.basememsize,meminfo.memsize);
so:
how to detect if ELF image is NetBSD or FreeBSD? (what to check in ELF
header)
i'm not good in ELFs ;)