Re: Porting to my custom 030 board
Jason Thorpe <[email protected]> Wed, 1 Oct 2025 07:26:28 -0700
| Newsgroups | gmane.os.netbsd.ports.m68k |
|---|---|
| Message-ID | <[email protected]> |
> On Oct 1, 2025, at 3:59=E2=80=AFAM, Lawrence Manning = <[email protected]> wrote: >=20 > Hi Chris, >=20 > Thanks for the mail and your interest in my board, and desire to get > NetBSD working on it. I've had a very brief look at 11 but still can't > really figure out how to begin my own porting effort. Do you have a > set of changes which just add support for a new machine? Ideally > something m68k, but I might glean some knowledge looking at another > machine type. >=20 > FWIW my offer is still open, but I can gather from the lack of > interest that either not enough skilled people are interested in such > a board, or that they know it would be a reasonable amount of work > even for them? Not a lack of interest on my part, certainly (just had other life stuff = going on and it=E2=80=99s not always easy to have time for hobbies). = I=E2=80=99m also working on a home-brew 68030 system (the board design = is basically done; I=E2=80=99m still working on test cases for all of = the Verilog for the 3 CPLDs on the board). I=E2=80=99ve been involved with the m68k ports in NetBSD since the = early-90s, and I will be the first to admit that it=E2=80=99s a bit of a = mess in terms of =E2=80=9Chow much code is duplicated=E2=80=9D. I=E2=80=99= ve been working on that, slowly, over the years. The arc of the = universe, etc. etc. etc. Almost 2 years ago, as a fun project over the Christmas holiday, I did = the =E2=80=9Cvirt68k=E2=80=9D port. I don=E2=80=99t recall exactly how = long it took me, but I=E2=80=99m pretty sure it was less than 2 weeks. = Sure, it=E2=80=99s a =E2=80=9Cvirt=E2=80=9D port, but it=E2=80=99s a = pretty decent example. It clearly shows machine-specific attachments to = generic drivers. For my own home-brew machine, I decided to take a step back and examine = the landscape. There are a fair number of 68030 home-brew systems out = there in the wild, and so for my own machine I decided to try and make = it easier for others to port NetBSD to their boards. My plan is to use = Flattened Device Tree, like NetBSD=E2=80=99s ARM SoC ports use. This = will make is SUPER easy to support additional home-brew machine with = very few code changes because the device tree describes the hardware in = a generic way, and the hardware that home-brewers use is all fairly = common. In my case, my system=E2=80=99s firmware has the device tree = compiled in to the ROM, and it passes a pointer to it to the kernel = using the standard m68k ABI. But it=E2=80=99s not necessary to do it = that way; it=E2=80=99s also possible to embed the device tree into a = kernel binary or some auxiliary loader. There are plenty of options. Anyway, I=E2=80=99d suggest you poke around in sys/arch/virt68k as a = starting point to get a feel for how a light-weight m68k port is put = together. I=E2=80=99m happy to answer any specific questions you have, = and happy to discuss your board in more detail! -- thorpej