From: Etienne Lorrain <etienne_lorrain@yahoo.fr>
To: linux-kernel@vger.kernel.org
Subject: [ANNOUNCE] Gujin GPL bootloader version 2.6
Date: Tue, 12 May 2009 22:01:08 +0000 (GMT) [thread overview]
Message-ID: <26299.12218.qm@web23602.mail.ird.yahoo.com> (raw)
There is a new version v2.6 of Gujin at http://gujin.sf.net with
bugfixes and improvement, like:
- Better PCI BIOS to detect IDE interfaces (SATA CDROM at non
conventional address)
- Better EDID BIOS support (screen definition detection)
- Fix modification of *.iso images, fix ELF32/64 handling by
tiny images.
- works with GCC-4.4, works with every distribution-provided
compiler I tested.
- Align by default the clusters of FAT16/32 filesystems even if
the start of the partition isn't aligned, generate FAT32 useable
by Windows.
- Completely remove the support for zImage and for locating
the ELF in the Linux kernel, now only the official way to boot a
bzImage Linux kernel is possible, and *.kgz files have to be
compressed ELF32/64 files.
- Gives few examples of ELF32 and ELF64 bootable kgz files,
with and without memory relocation by using ld option --emit-relocs:
see hello*.kgz in Makefile.
- Generate a "gujin" executable, which is "instboot + few embedded
boot images" for either 32 or 64 bits Linux, to use like (as root):
-> to install the way GRUB or LILO installs themselves:
./gujin /boot/gujin.ebios
-> to remove (and re-install previous bootloader)
./gujin --remove=/dev/sda && rm /boot/gujin.ebios
-> to initialise a "superfloppy" FAT filesystem on a USB drive:
umount /dev/sdz* # device /dev/sdz will be ERASED
./gujin --disk=BIOS:0x0,auto /dev/sdz
-> to transform a bootable ISO file and write it to a USB stick:
umount /dev/sdz* # device /dev/sdz will be ERASED
./gujin eeebuntu-2.0-standard.iso \\
&& cat eeebuntu-2.0-standard.iso > /dev/sdz && sync
-> for more example, use gujin without parameters,
or with --help parameter.
The simplest bootable "hello world" kgz file is:
/* To be compiled by:
$ gcc -m32 -Wall -O2 -s -static -nostartfiles -nodefaultlibs \
-Wl,-Ttext=0x110000 hello.c -o hello.elf
$ gzip -9 hello.elf -c > hello.kgz
*/
const char msg1[] = "Hello protected-mode text world! please reboot ...";
#define STACKSIZE 64 * 1024
static unsigned stack[STACKSIZE / 4] __attribute__ ((aligned(32)));
void _start (void)
{
/* We are flat non-paged memory and interrupt disabled */
asm (" mov %0,%%esp " : : "i" (&stack[STACKSIZE / 4]));
/* This work only in text modes (assumed mode 3), video
memory at real mode address 0xB800:0000. At this address,
we shall write two bytes per char, one containing the foreground
and background color, the other containing the letter: */
volatile unsigned short *video_array
= (volatile unsigned short *)0xB8000;
unsigned cpt1;
video_array += 10 * 80; /* few empty lines */
/* We want blue background color and lightgray foreground: */
for (cpt1 = 0; cpt1 < sizeof(msg1) - 1; cpt1++)
video_array[cpt1] = 0x1700 + msg1[cpt1];
while (1)
continue;
}
Downloads at:
http://sourceforge.net/project/showfiles.php?group_id=15465
Have fun,
Etienne.
reply other threads:[~2009-05-12 22:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26299.12218.qm@web23602.mail.ird.yahoo.com \
--to=etienne_lorrain@yahoo.fr \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®