From: "Etienne Lorrain" <etienne.lorrain@masroudeau.com>
To: "Pavel Machek" <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] Gujin linux.kgz boot format
Date: Mon, 10 Oct 2005 15:31:28 +0100 (BST) [thread overview]
Message-ID: <3768.192.168.201.6.1128954688.squirrel@pc300> (raw)
In-Reply-To: <20051010131925.GA19256@atrey.karlin.mff.cuni.cz>
>> > It seems to work okay here. Now, rewriting current boot system into C
>> > may be good goal...
>>
>> At least that is a way which does not involve modifying assembler
>> files. Slowly everybody switches to the C version which continue
>> to evolve (i.e. removing old BIOS calls), then the tree under
>> arch/i386/boot is removed and we can begin to rearrange the mapping
>> of "struct linux_param".
>
> Will your C version work with lilo and grub?
Tricky question. In short no, it cannot.
It is in fact theoretically possible to boot the same way for LILO,
Grub and SYSLINUX to still work, and then call this linux_set_params()
function but involves a lot of assembler programming and linker setup.
I have done this exact work once with Gujin, but then I was in full
control of the bootloader, in a setup which was already in C, has the
stack setup, where I can free the first 4 Kbytes of data (located at
address 0) for use by this kernel function. It was far to be simple.
One of the problem I can see is that you currently have two link
being done by the linker, one in real mode and one in protected mode.
You cannot have cross references in between those two links, and for
instance with Gujin, you are filling the content of the LnxParam
pointer, which is transparently copied at its right position before
jumping to the Linux kernel code. You will need a seriously more
complex linker file to forbid cross references, and duplicate Gujin
treatment about memory setup (in this case that may involve HIMEM/EMM
primitive calling if starting under DOS).
Note that if this kernel function returns an error, Gujin will
display an error message and you can select another kernel to boot,
but you cannot return to LILO or Grub with an error...
Modifying the bootloader may be possible, but lately I had another
look at LILO source and I do not want to touch it. If you run Grub,
you loose the "BIOS information gathering before switching to
protected mode" advantage, BIOS environment may still be broken.
SYSLINUX is probably at lot more accessible, and Gujin still do
not support network booting (It can be added, but my TODO list is
long), but you will want to call a function which is curently at
the end of a still compressed image.
Sorry I cannot be compatible with them, please note that
Gujin is also GPL.
Etienne.
next prev parent reply other threads:[~2005-10-10 14:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-06 9:46 [PATCH 1/3] Gujin linux.kgz boot format Etienne Lorrain
2005-10-07 14:46 ` Pavel Machek
2005-10-10 11:23 ` Etienne Lorrain
2005-10-10 11:56 ` Pavel Machek
2005-10-10 13:09 ` Etienne Lorrain
2005-10-10 13:19 ` Pavel Machek
2005-10-10 14:31 ` Etienne Lorrain [this message]
2005-10-10 19:21 ` Pavel Machek
2005-10-10 19:35 ` Kalin KOZHUHAROV
2005-10-11 13:56 ` Denis Vlasenko
2005-10-11 15:23 ` Etienne Lorrain
-- strict thread matches above, loose matches on Subject: below --
2005-10-06 13:39 Etienne Lorrain
2005-10-11 13:16 Etienne Lorrain
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=3768.192.168.201.6.1128954688.squirrel@pc300 \
--to=etienne.lorrain@masroudeau.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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