Is there detailed documentation for how to compile and use TCCBoot ?
I wish to write an x86/x86_64 kerne in C source and have the compiler compile it and run it at bootup. How practical is this goal ?
Is the project still maintained ?
TCCBoot , How-To
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: TCCBoot , How-To
Just to be clear, I assume you mean this project? I don't know if it is maintained anywhere, though there are at least two GitHub here and here, both of which are over five years old. The main project itself dates to 2004, which makes it unlikely that Bellard ever added support for x86-64 to TinyCC.
Perhaps someone else here is more familiar with TinyCC and TCCBoot.
Perhaps someone else here is more familiar with TinyCC and TCCBoot.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Re: TCCBoot , How-To
Tinycc development is still active here: https://repo.or.cz/w/tinycc.gitSchol-R-LEA wrote:The main project itself dates to 2004, which makes it unlikely that Bellard ever added support for x86-64 to TinyCC.
It's probably doable for your own OS, as long as you target C89 or tcc specifically from the beginning. You'll need a bootstrap C library and some form of initramfs for the compiler to find its libraries and headers, or patch it so that the files are supplied from memory. Doing this from UEFI may be an interesting project...
I wouldn't recommend updating TCCBoot to a modern (x86-64) kernel. You'll need to re-do most of the patches of the kernel and have a good grasp of both C and the Linux kernel to make it work.
Re: TCCBoot , How-To
While tccboot itself isn't really maintained, tcc has seen very active development since then and has backends for x86-64, arm (32 and 64), and riscv64.Schol-R-LEA wrote:Perhaps someone else here is more familiar with TinyCC and TCCBoot.
Re: TCCBoot , How-To
I may be missing something, but can anyone explain to me what the point of this project is?
I think I understand what it does, but I don't understand why.
I think I understand what it does, but I don't understand why.
-
- Member
- Posts: 426
- Joined: Tue Apr 03, 2018 2:44 am
Re: TCCBoot , How-To
Just because?iansjack wrote:I may be missing something, but can anyone explain to me what the point of this project is?
I think I understand what it does, but I don't understand why.
I think the original point was to demonstrate how fast TCC is at compiling. What better demonstration than compiling and running a linux kernel at boot?
Re: TCCBoot , How-To
TCCBoot was mostly to show off Tinycc. It's tiny, fast, versatile and complete enough to compile Linux in a very restricted environment. (I once used tcc inside a Java process to create very specific Linux ELF executables on a variety of platforms. Yes, it's a strange application of both Java and tcc, but it beats shipping Docker-like containers or a bunch of Binutils+GCC builds for the same set of platforms.)iansjack wrote:I may be missing something, but can anyone explain to me what the point of this project is?
I think I understand what it does, but I don't understand why.
It's also just a neat project. You effectively turn the kernel into a boot-time script. I think a lot of the projects on this site don't really have a point (mine at least doesn't) and that the question should rather be "why not".
Edit: clarify "shipping containers"
Re: TCCBoot , How-To
Ah. I understand that, and I guess it's the same reasoning that makes many want to write their own boot loader rather than using one of the tried and tested ones.thewrongchristian wrote:Just because?
I'd rather hoped their might be more to it than that. But it probably explains why it hasn't been developed further.
I'd say this was a General Programming question rather than OS Design & Theory.