7 ms·
"To compile a kernel, you need a running kernel." Why? I guess it depends on how you define "kernel." But to be able to do a batch process like compilation, yo
by stcredzero 5y ago
"To compile a kernel, you need a running kernel."
Why? I guess it depends on how you define "kernel." But to be able to do a batch process like compilation, you can get away with a little.
- spicybright 5y agoI'm guessing by kernel he meant any program that can host other programs in some way. Can you clarify what batch process means in this case? I /think/ the authors definition of a kernel is a program that can host other programs in some way. A video game on a boot sector can't do that (even though it likely would have it's own kernel to function), but some kind of input loop to write memory could.
- stcredzero 5y agoThe old Apple II+ I had as a kid only did one process at a time. For an OS, it basically had what amounted to a REPL for Microsoft BASIC. You don't need to host another program to compile something. All you need to do is to read data off disk, then write other data back.
- Someone 5y agoAnd what would do that “read data off disk, then write other data back”, if not a program? Even if you use a monitor (https://en.wikipedia.org/wiki/Machine_code_monitor https://en.wikipedia.org/wiki/Machine_code_monitor) to write a program, that’s still a program. The only way to avoid that is to hand-punch a tape or something like that (with lots of practice and patience, it may be possible to program a small PROM or write an early floppy by hand)
- ronsor 5y agoI'm reminded of the manually-inputted Microsoft BASIC bootloader for the ALTAIR 8800: https://just8bits.blogspot.com/2017/03/doing-it-in-less-than-bill-gates.html https://just8bits.blogspot.com/2017/03/doing-it-in-less-than...
- SAI_Peregrinus 5y agoI've compiled some simple C (microcontroller blinky) by hand. Then assembled and linked the output, and written the machine code into a HEX (Intel format) file. Then tested it on the micro. It's a rather fun exercise (Type 2 fun).
- Something1234 5y agoWhat is type 2 fun?
- deleted 5y ago[deleted]
- kstrauser 5y agoOn a Commodore 64, the kernal [sic] was similar to the BIOS on a PC, with display and keyboard handlers, IO routines, etc. When you first turned on the machine, something had to say "** COMMODORE 64 BASIC V2 **", and that something was the kernal.
- edgyquant 5y agoI always kind of thought the kernel was, at its core, the thing that handles processes and hardware io. Even if you use one of those tiny micro kernels it has to handle processes and present an api through which to communicate with devices (even if it doesn’t handle the devices itself.) I think it’s true you need a kernel to compile a kernel in this sense.
- NieDzejkob 5y agoWorkarounds exist, like for every other example I mentioned. I am mostly referring to the commonly used dependency graph.
- musicale 5y agoAs the article demonstrates, all you really need is a boot loader. On early machines (large and small) with front panel hardware, you could use switches to manually enter the boot loader into memory and then start it.
- stan_rogers 5y ago...and the EDSAC crew decided that that sort of thing was a mug's game as far back as 1949, so they added what amounts to a machine to do that for you (the Initial Orders unit). (No, I don't really miss the Altair, no matter how ecstatic I was about it in high school. Toogle-booting is fun maybe twice.)
- dng88 5y agoTechnically not true. As all computer starts with hardware and only that so e input process is needed. Of course, it really depends on howto define kennel. But you do not need very high level. Some feedback is better. Otherwise just input something, computer can take on. The “software” on the hardware need not be complete.
- astrobe_ 5y agoThat's precisely the joke. "Kernel" here means the minimal feature set that let you compile a kernel. The sentence is tautological, except perhaps for the definition of "minimal", because there are various flavors of "minimal" (e.g. absolute minimum, practical minimum, ergonomic minimum...).