TCCBOOT is a software that can boot a Linux kernel directly from the source code, without the need for prior compilation.
TCCBOOT is based on the TinyCC compiler, assembler, and linker. TinyCC is a simple and compact C compiler that's compatible with the GNU C compiler and binary utilities. It's an experiment that aims to produce a small C compiler that can perform basic functions without any hassles.
The TCCBOOT program boots in the same way as a Linux kernel, meaning that any boot loader that can run a 'bzImage' Linux kernel image can run TCCBOOT. The most commonly tested boot loaders are LiLo, ISOLINUX, and GRUB.
TCCBOOT reads C or assembly sources from a gzipped ROMFS filesystem stored in an Initial Ram Disk (initrd). It first reads the file 'boot/tccargs', which contains the TinyCC command-line syntax executable. The TinyCC invocation should output one binary image 'kernel.' This image is loaded at address 0x00100000. TCCBOOT then does a jump to the address 0x00100000 in 32-bit flat mode. This is compatible with the ABI of the 'vmlinux' kernel image.
To compile TCCBOOT, users must first have a pre-existing 2.4.26 Linux kernel because TCCBOOT uses some binary files and headers from the Linux kernel. Users must also have the source code of TinyCC (tested with TinyCC version 0.9.21). If needed, users can modify the Makefile to give the necessary paths.
An "Hello World" ROMFS partition is included (initrd.img) in the TCCBOOT software. Users can rebuild it from the example/ directory and test it with the QEMU PC emulator with the 'qemu-tccboot' script.
For your information, the patch 'linux-2.4.26-tcc.patch' gives the necessary modifications to build a Linux kernel with TCCBOOT (NOTE: It is not sufficient to build the kernel with its own Makefiles - I never tried). The corresponding kernel configuration is in file linux-2.4.26-config. To address the various unsupported assembly directivities, syntax problems, and preprocessor bugs within the software, patches are necessary.
While it's true that there may still be many bugs in the kernel generated by TinyCC/TCCBOOT, it's important to note that at least it can boot and launch a shell. Overall, TCCBOOT is an excellent choice for developers seeking a smaller, simpler solution for their bootloader needs.
Version 0.1: N/A