Re: [PATCH 1/3] Gujin linux.kgz boot format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> > 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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux