Re: Booter for 9.3 kernel not working

Rin Okuyama <[email protected]> Thu, 25 Jan 2024 12:54:15 +0900
Newsgroups gmane.os.netbsd.ports.mac68k
Message-ID <[email protected]>
Hi Matthew,

Can you please try to load kernel from Mac OS partition?
I usually boot kernels this way (Q850 and Q800), and have never
observed similar problems.

It's a just guess, but I suspect bugs in UFS support for Booter:

(1) The original kernel may be contiguous and have small offset
     from the top of partition, but,
(2) hand-compiled kernel may be fragmented and have large offset,
     which may trigger bugs in UFS codes.
(3) Or some new features of UFS may confuse Booter.

If this is the case, can you please provide dumpfs(8) of your
root partition?

Thanks,
rin

On 2024/01/25 12:40, Matthew Stock wrote:
> Ok, I did a simple comparison of a working and non-working kernel,
> both GENERICSBC, and looking at .rodata and .text segments, the only
> difference in terms of object size are in the sccs/version and config
> strings.  A little harder to analyze the symbol values, but some of
> the constants around the FPU seem different, though I don't know why
> that would be.
> 
> I think at this point, trying to better understand the Booter code is
> in order,  Can anyone point me to any of the code?  If needed I can
> create a build environment (hopefully), but right now I just want to
> understand how it is reading elf.  To the best of my knowledge, there
> is nothing different in terms of elf headers, etc that would confuse
> Booter.
> 
> Thanks,
> 
> Matt
> 
> On Wed, Jan 24, 2024 at 10:13 AM Martin Husemann <[email protected]> wrote:
>>
>> On Wed, Jan 24, 2024 at 06:49:48AM -0800, Jason Thorpe wrote:
>>> I was just about to ask about this? it?s somewhat distressing that the source code for such a critical portion of the boot process isn?t in the source tree.
>>
>> Yes, it is bad that it isn't somwhere in a public repository and also needs
>> an ancient MacOS (upto 8) only toolchain to build - this all makes improvements
>> very hard.
>>
>> We had this thread before and had folks trying to create a local working
>> build environment for it.
>>
>> We probably could throw in some porting effort, is there any cross-toolchain
>> nowadays that could generate MacOS 8 or earlier binaries?
>>
>> Martin
>