Gujin: Difference between revisions

125 bytes added ,  14 years ago
[unchecked revision][unchecked revision]
Line 35:
To have increased chances of success, we will ask the Gujin installer to reformat completely this USB disk or SD card, so first backup any interresting file you have in some other place.
 
Then, download this [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/install/2.8.12/install-2.8.12.tar.gz/install/gujin?extract=true gujin executable] if you are using a 32 bits Linux, and that [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/install/2.8.12/install-2.8.12.tar.gz/install/gujin64?extract=true gujin64 executable] if you are using a 64 bits Linux:
 
If you do not trust anybody, download the source file [http://sourceforge.net/projects/gujin/files/gujin/2.8.12/gujin-2.8.12.tar.gz/download gujin-*.tar.gz], extract it in a directory and type "make" - that will produce an executable named "gujin" (even on a 64 bits Linux).
 
Remember to visit [http://gujin.org http://gujin.org] to check if there is a newer version of Gujin, and to increase Gujin author counters and keep him happy.
Line 97:
You just need to copy that hello.kgz file into the USB stick, and reboot with this USB stick, you will get a menu with "hello.kgz" displayed.
 
If you click on this filename, you will have "Hello protected-mode text world! please reboot ..." displayed (Because this hello-world do not manage graphic modes, you have to "force start kernel in text mode" in Gujin configuration).
 
If you want a bit more complex "hello world" applications, you should download Gujin [http://sourceforge.net/projects/gujin/files/install/2.8.12/install-2.8.12.tar.gz/download install*.tar.gz] pack .
 
you will find there few KGZ files, like previous example but with some addresses displayed to show the exact position of the application in memory.
 
You will see [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/install/2.8.12/install-2.8.12.tar.gz/install/hello_32bits.kgz?extract=true hello_32bits.kgz] and [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/install/2.8.12/install-2.8.12.tar.gz/install/hello_32bits_r.kgz?extract=true hello_32bits_r.kgz] to show the effect of relocation, and [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/install/2.8.12/install-2.8.12.tar.gz/install/hello_64bits.kgz?extract=true hello_64bits.kgz] and [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/install/2.8.12/install-2.8.12.tar.gz/install/hello_64bits_r.kgz?extract=true hello_64bits_r.kgz] to show 64 bits applications.
 
To get the source code, just download the file [http://sourceforge.net/projects/gujin/files/gujin/2.8.12/gujin-2.8.12.tar.gz/download gujin*.tar.gz], and extract the corresponding c files.
 
To see the command used to compile them, just search the string "hello_32bits.kgz:" (with semicolon) in the file [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/gujin/2.8.12/gujin-2.8.12.tar.gz/gujin/Makefile?extract=true Makefile].
 
If you just want a real mode "hello world", you can do that too with an ELF file where the load address is null for the code segment.
Line 113:
There is a limit of 64 Kbytes for real mode ELF file.
 
Just create a file which [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/gujin/2.8.12/gujin-2.8.12.tar.gz/gujin/hello_bios.c?extract=true contains]:
 
/* hello_bios.c - public domain - no support whatsoever */
Line 217:
you can copy this hello_bios.kgz to the USB stick and run it, I hope the different functions of the source file are obvious.
 
The Gujin bootloader is willing to let the real mode and protected mode kernel to access the bootloader internal data (like what is the current video mode, how to display strings...) as long as the kernel is licensed under the GPL license - i.e. when the GZIP kernel contains a GZIP comment describing its license. That is illustrated by [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/install/2.8.12/install-2.8.12.tar.gz/install/cleandisk.kgz?extract=true cleandisk.kgz] compiled form this [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/gujin/2.8.12/gujin-2.8.12.tar.gz/gujin/cleandisk.c?extract=true cleandisk.c] source code and linked with this [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/gujin/2.8.12/gujin-2.8.12.tar.gz/gujin/cleandisk.ld?extract=true linker file].
 
The main point about the GPL license is that it is not possible to draw a line in between Gujin possible bug and a closed source application: it is no allowed to modify Gujin data while in real mode - but there isn't any enforcement by hardware.
 
Obviously, Gujin will enable you to run an ELF file with a real mode part AND a protected mode part, just have a look at the example [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/install/2.8.12/install-2.8.12.tar.gz/install/hello_gpl.kgz?extract=true hello_gpl.kgz] and its source code [http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/g/project/gu/gujin/gujin/2.8.12/gujin-2.8.12.tar.gz/gujin/hello_gpl.c?extract=true hello_gpl.c].
 
== See Also ==
Anonymous user