[HN Gopher] Making NetBSD Multiboot-Compatible (2007)
___________________________________________________________________
Making NetBSD Multiboot-Compatible (2007)
Author : jmmv
Score : 45 points
Date : 2023-08-25 12:46 UTC (10 hours ago)
(HTM) web link (jmmv.dev)
(TXT) w3m dump (jmmv.dev)
| iJohnDoe wrote:
| Love NetBSD. It's how I learned UNIX and Linux. Owe a lot to the
| OS.
|
| Got NetBSD running on old SPARCs and old Mac PPC systems. Used
| them as servers. Lots of knowledge gained.
|
| Unfortunately, when I would want to try out cool new software or
| utilities, they were only for Linux. It forced me to embrace
| Linux and have used CentOS ever since.
|
| My knowledge and experience of iptables has also made me commit
| to Linux.
| snvzz wrote:
| Someday, Linux will too be compatible.
| yjftsjthsd-h wrote:
| Actually, that's an interesting questions - last I recall,
| Linux didn't use the multiboot specification, and mostly got
| away with it by being so popular that everything just _also_
| supports it directly? If that 's true, then it would be
| interesting to see what it took to make it compatible.
| 1vuio0pswjnm7 wrote:
| It's been a while but many years ago I was able to boot NetBSD
| kernels using the FreeBSD bootloader. The goal at the time was
| having both NetBSD and FreeBSD kernels on bootable USB stick,
| without GRUB.
| RuggedPineapple wrote:
| I feel bad because NetBSD is a stable, mature and well supported
| OS with a multitude of positives. Do I associate it with any of
| those things? Absolutely not. The sole thing that NetBSD sticks
| in my head for is its what you use when you want to port unix to
| something that has absolutely no business running unix.
| rjsw wrote:
| NetBSD doesn't have any support for running without a MMU, so
| by definition you can only port it to things designed to be
| able to run UNIX.
| jmmv wrote:
| Didn't Minix support running without a MMU? And there seems
| to be an option to disable MMU support in Linux too.
| Obviously you lose on memory protection... but does that make
| these setups "not Unix"?
| rollcat wrote:
| MMU is also responsible for translating between physical
| and virtual memory addresses. Making virtual memory support
| optional is a non-trivial design goal; you're not only
| allowing userspace to peek at (or straight up overwrite)
| kernel memory, you also need every executable to be a PIE,
| or to swap it out to disk as a part of a context switch.
|
| Check out RetroBSD <https://github.com/RetroBSD/retrobsd>
| and LiteBSD <https://github.com/sergev/LiteBSD>; there's a
| PID 0 (or 1? IIRC) that is called the "swapper" process,
| which is in charge of implementing the context switching.
| Fascinating stuff!
| jmmv wrote:
| Yes, of course, the MMU also does that. But I'm not sure
| what that has to do with Unix systems requiring an MMU
| _by definition_ as the post I was replying to claimed.
| Obviously running a Unix-like system without an MMU will
| lack certain functionality, but it could feel very much
| like "a real Unix".
| rollcat wrote:
| I agree. My comment was meant to supplement and support
| yours.
| numpad0 wrote:
| TIL there was a version of UNIX for PDP-7, and PDP-7 did
| not have MMU, therefore UNIX by definition do not require
| MMU, and that version of UNIX had been archeologied in a
| runnable form on GitHub[1]
|
| 1: https://github.com/DoctorWkt/pdp7-unix
| RuggedPineapple wrote:
| Have you looked through it's supported platforms list?
| There's current support for a handheld PDA from 1997, and
| several flavors of 16 bit Motorola 68k based system. Systems
| that haven't had an official Unix port in 30+ years if at
| all, have modern, supported releases from NetBSD.
| rjsw wrote:
| I am a NetBSD developer, I know exactly what it runs on.
| The 68k systems are all 32 bit, the supported PDAs can run
| Linux as well.
| RuggedPineapple wrote:
| You're not even a little bit tickled that NetBSD runs and
| supports the VAX, a computer released in the 70s? Get
| excited about your project, man.
|
| I'm sure you're a fantastic developer, but you're an
| absolutely terrible evangelist.
| rollcat wrote:
| Eh RIP OpenBSD/VAX.
|
| I do wonder if NetBSD/VAX actually boots on real
| hardware. The reason why these machines are/were
| supported for this long is because of how different they
| are (keeping your software portable is a good way of
| ensuring high quality/correctness); but they also suck
| power like mad, and do eventually just die.
| liveoneggs wrote:
| That is how NetBSD is and always has been.
| matrix12 wrote:
| NetBSD devs are like ants in a colony without a queen. As
| a former dev, I can attest to this.
| jmmv wrote:
| Hey folks. The excellent "FreeBSD on Firecraker" post from
| yesterday (https://news.ycombinator.com/item?id=37253035) made me
| remember the pain I went through many years ago to make NetBSD
| Multiboot-compliant (aka bootable natively via GRUB), so I dug
| this post of mine from the archives. I did not have to play the
| "hlt" trick that Colin describes--it wouldn't have made sense in
| my context anyway--but I did play have to play other tricks to
| debug issues. If I remember correctly, poking directly into video
| memory to draw a single character on the top-left corner of the
| screen was one of them. In any case, it was a fun experience!
| rjsw wrote:
| Doing the reverse, getting the native NetBSD bootloader to load
| a multiboot kernel, wasn't particularly hard, it worked first
| time.
| [deleted]
___________________________________________________________________
(page generated 2023-08-25 23:01 UTC)