Gujin: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
Line 4: Line 4:
It can read FAT12, FAT16, FAT32, ext2, ext3, ext4 (with constant inode size) and ISO 9660 filesystems.
It can read FAT12, FAT16, FAT32, ext2, ext3, ext4 (with constant inode size) and ISO 9660 filesystems.


It has a graphical user interface with mouse support, and can be installed on any media: floppy, hard/USB disk partitions, hard/USB disk MBR, CD/DVDROM, DVD-ram (i.e. FAT with 2048 bytes/sectors). It can also use a serial port as input/ouput instead of the screen and keyboard.
It has a graphical user interface with mouse support, and can be installed on any media: floppy, hard/USB disk partitions, hard/USB disk MBR, CD/DVD-ROM, DVD-RAM (i.e. FAT with 2048 bytes/sectors). It can also use a serial port as input/ouput instead of the screen and keyboard.


Gujin can chain-load other bootloader, load Linux kernel, has an unfinished loader of multiboot specification, but more importantly for our current interest it can load standard ELF files (more exactly GZIP compressed ELF files).
Gujin can chain-load other bootloader, load Linux kernel, has an unfinished loader of Multiboot specification, but more importantly for our current interest it can load standard ELF files (more exactly GZIP compressed ELF files).


There is two major ELF variant on the PC: ELF32 (with 32 bits load address, sizes and entry point) and ELF64 (with 64 bits fields), gujin loads any of them and switch the processor in protected mode to jump to the ELF entry point.
There is two major ELF variant on the PC: ELF32 (with 32 bits load address, sizes and entry point) and ELF64 (with 64 bits fields), Gujin loads any of them and switch the processor in protected mode to jump to the ELF entry point.


Gujin will not try to set-up memory paging at all, that is the job of the kernel to select which kind of paging it wants - so even the 64 bits ELF files will have to handle the transition from 32 bits to 64 bits themselves (because you need paging to go to 64 bits mode).
Gujin will not try to set-up memory paging at all, that is the job of the kernel to select which kind of paging it wants - so even the 64 bits ELF files will have to handle the transition from 32 bits to 64 bits themselves (because you need paging to go to 64 bits mode).
Line 20: Line 20:
Moreover, in most cases the kernel can decide to return to the Gujin bootloader (if it did not erased it from memory), without forcing a reboot.
Moreover, in most cases the kernel can decide to return to the Gujin bootloader (if it did not erased it from memory), without forcing a reboot.


The Gujin bootloader is built using standard Linux tools, it does not need Linux to run (only a not-too-buggy BIOS) - but we have to assume you are running Linux to use the GNU toolchain: GCC, binutils, GZIP... to produce the ELF file for the kernel.
The Gujin bootloader is built using standard Linux tools, it does not need Linux to run (only a not-too-buggy BIOS) - but we have to assume you are running Linux to use the GNU toolchain: GCC, Binutils, GZIP... to produce the ELF file for the kernel.
Also, Gujin installer needs either Linux 32 bits or Linux 64 bits to run and install the Gujin bootloader on a device.
Also, Gujin installer needs either Linux 32 bits or Linux 64 bits to run and install the Gujin bootloader on a device.


Because Windows uses another executable format, you cannot install cygwin/MinGW on windows and use the compilation toolchain directly, in this case you would have to generate a cross compiler toolchain to produce ELF files, and that is out of scope for this description (but not that difficult).
Because Windows uses another executable format, you cannot install Cygwin/MinGW on windows and use the compilation toolchain directly, in this case you would have to generate a cross compiler toolchain to produce ELF files, and that is out of scope for this description (but not that difficult).


----
----