mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Finn Thain <fthain@linux-m68k.org>
To: Daniel Palmer <daniel@0x0f.com>
Cc: geert@linux-m68k.org, linux-m68k@lists.linux-m68k.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] m68k goes DT
Date: Mon, 6 Jan 2025 14:28:26 +1100 (AEDT)	[thread overview]
Message-ID: <4eb796cc-b178-8394-0149-03600f1caaed@linux-m68k.org> (raw)
In-Reply-To: <CAFr9PXm4kTWF27GPMNDb5=W8vZRQia418xOQDF_X1yo0vwn6hA@mail.gmail.com>


On Sun, 5 Jan 2025, Daniel Palmer wrote:

> 
> I have u-boot working on DragonBall (68000), my MVME147, QEMU Virt etc.
> So the u-boot could be made to work for almost anything as long as
> there is a serial port and a timer driver.
> On virt I take the bootinfo QEMU creates, turn that into a devicetree
> in u-boot and then pass the bootinfo and FDT into the kernel. :)
> 

I suppose the benefit of integrating FDT into bootinfo is that you can 
have a new bootloader that's backwards compatible with existing binaries.

I think the embedded FDT option brings a similar result for old 
bootloaders, but can't support a multi-platform vmlinux.

So I see some benefit to keeping bootinfo support and device tree support 
independent. A minimal kernel build is going to omit bootinfo support. In 
the long run, I'm not sure you'd want the FDT stored in a bootinfo record.

> 
> I think adding FDT support to some old crusty bootloader for the Amiga
> or something might be a lot of hassle.
> Like I'm not sure if I'd even be able to setup a system that could
> build it if it needs some old Amiga C compiler.
> That's why I think embedded FDTs might be needed in some places and
> leaving the bootinfo part as-is.
> 

Right. Bootloaders for old platforms are difficult code bases to 
contribute to. You need a lot of old hardware to test with, and a variety 
of operating system releases.

In the case of Penguin, you also need to know MacOS internals. In the case 
of EMILE, you need to deal with the early execution environment, which is 
not well documented AFAIK.

But these bootloaders have bugs, like any other program, and someone has 
to maintain them...

> 
> If you can write some code that loads the u-boot binary into memory
> and jumps to it, getting u-boot working on the mac shouldn't be too
> difficult.
> I might even have serial, ethernet, scsi drivers you can use. I'd
> rather port u-boot than fix up a bootloader unless the bootloader has
> some special hardware setup magic that can't be reproduced.
> 

Those hardware quirks are a given, I think, being that Penguin and EMILE 
need to support dozens of different Mac models. Porting u-boot is not a 
very attractive option.

> 
> The platform drivers should be easy to make work. I need to look at
> macfb.c but if it's anything like the DragonBall one it'll have 
> hardcoded addresses and stuff in there that need to be cleaned up but 
> it's not impossible.
> And if we do this the headers with the MMIO addresses can go away and
> a lot of junk can be removed from arch/m68k.
> 

At that point, bootinfo support can also be omitted. Maybe it's doable for 
a platform like MVME (?)

It seems that a multi-platform vmlinux binary would have to handle the 
case where some plaforms will use bootinfo and others will use the device 
tree.

I wonder whether there are implications for kexec support...

> 
> mmm so have a different head.S for a generic FDT machine and just pass 
> the FDT via a register like I'm doing on nommu. I don't mind either way 
> so if a maintainer decides which they'd be willing to merge I'll get 
> that going..
> 

Yes, I think we've touched on several questions for senior maintainers to 
ponder.

  reply	other threads:[~2025-01-06  3:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-05  7:14 Daniel Palmer
2025-01-05  7:14 ` [RFC PATCH 1/3] m68k: bootinfo: Add tag for FDT address Daniel Palmer
2025-01-05  7:14 ` [RFC PATCH 2/3] m68k: bootinfo: Add generic machine type Daniel Palmer
2025-01-05  7:14 ` [RFC PATCH 3/3] m68k: Add dt support (proof of concept) Daniel Palmer
2025-01-05  9:40 ` [RFC PATCH 0/3] m68k goes DT Finn Thain
2025-01-05 11:00   ` Daniel Palmer
2025-01-06  3:28     ` Finn Thain [this message]
2025-01-06 15:51       ` Josh Juran
2025-01-07  0:57         ` Bootloaders, was " Finn Thain
2025-03-04 10:43           ` Daniel Palmer
2025-03-05  3:42             ` Finn Thain
2025-01-09 10:06       ` Geert Uytterhoeven
2025-01-05 14:59 ` Greg Ungerer
2025-01-06  2:10   ` Daniel Palmer
2025-01-06 11:37   ` Brad Boyer
2025-01-06 22:14     ` Finn Thain
2025-01-09 10:29       ` Geert Uytterhoeven
2025-01-14  0:42         ` Finn Thain
2025-01-09 10:31 ` Geert Uytterhoeven
2025-01-09 14:08   ` Daniel Palmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4eb796cc-b178-8394-0149-03600f1caaed@linux-m68k.org \
    --to=fthain@linux-m68k.org \
    --cc=daniel@0x0f.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®