Comment by jart

5 years ago

I'm just one woman. What Cosmopolitan does so far, it does really well. It was only as recently as a few days ago that I got mmap() and malloc() polyfilled on bare metal. It has serial uart i/o. It's going to have e1000/virtio sockets soon. You can help me will that future into existence. I need people who know o/s dev and can help me write code that does things like correctly set up pic controller.

Sorry, wasn't meant as a criticism, just as an explanation because people were assuming magic...

Taking on bare-metal is a significant job much greater than your original task and you may be better targeting something like buildroot instead, after all what is the Linux kernel but a hardware abstraction layer.

  • How hard could stdio/sockets on metal possibly be? So far bare metal has been a walk in the park. I love the fact that PML4T lets me do things like move memory without copying it. I want to be able to have that power without schlepping in the entire Linux world. I believe it should be possible for programs to be able to boot on metal as just programs which are tiny and auditable. Especially considering everything runs on hypervisors these days, which are in some respects the true operating system. Ring 0 is the new Ring 3. Who among you is willing to accept being pushed to the outer bounds of computing? If MINIX gets to run in Ring -3 then it should at least be easy for our programs to run in Ring0.

    • Its not the difficulty, but the scale.

      Working on one bare metal system is relatively easy as long as you're willing to dive into drivers. Getting 1001 I2C drivers or maybe writing a drivers for tens of different types of flash devices is a different matter.

      Your project will quickly become overrun with drivers for literally tens of thousands of devices... then comes maintenance.

      Look at the Linux source tree... Good drivers are not trivial either. Simple ones are of course.

      Basically, its a time-sink and it doesn't become useful for claiming "portability" until you're approaching the scale of something like Linux.

      2 replies →

    • As someone who knows programming in higher level languages well but has no experience with low level, bare metal, how can I get started with this stuff you're working with?

      > So far bare metal has been a walk in the park. I love the fact that PML4T lets me do things like move memory without copying it.

      > I believe it should be possible for programs to be able to boot on metal as just programs which are tiny and auditable.

      I would love to be able to learn more about this. Maybe even contribute to your project :) perhaps a good way to start would be to address some small tasks you might have laying around?!

      1 reply →