3 ms·
A similar effect can be achieved with Newlib, which is mentioned on the post, and exemplified at: https://github.com/cirosantilli/linux-kernel-module-cheat/tree
by cirosantilli 8y ago
A similar effect can be achieved with Newlib, which is mentioned on the post, and exemplified at: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/54e15e04338c0fecc0be139a0da2d0d972c21419#baremetal-setup-getting-started https://github.com/cirosantilli/linux-kernel-module-cheat/tr... You might need to implement some syscalls though. Or similarly you can also use an open source embedded system like FreeRTOS or Zephyr which essentially implement the syscalls for you.
- cmroanirgo 8y agoThat was a spectacular SO answer btw. Thanks for writing it!
- perbu 8y agoIncludeOS is modeled much like FreeRTOS or Zephyr. The difference is mainly that it addresses CPUs and not microcontrollers as the primary platform. With paging, you have better security, typically.
- beached_whale 8y agoAlong those lines, a bit, I have always wanted to play with targeting linux but making ones program the init process. All the resources but the benefit of Linux's ability to run on a lot of platforms. Not micro controller though, well arm, but that is pretty large.
- cirosantilli 8y agoThis is trivial with Buildroot btw, see e.g.: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/54e15e04338c0fecc0be139a0da2d0d972c21419#init https://github.com/cirosantilli/linux-kernel-module-cheat/tr... And a minimal hello world at: https://unix.stackexchange.com/questions/122717/how-to-create-a-custom-linux-distro-that-runs-just-one-program-and-nothing-else/238579#238579 https://unix.stackexchange.com/questions/122717/how-to-creat...