[syslinux] [PATCH] Correct chain.c32 v. 6.04-pre1 for Reactos

Gene Cumm gene.cumm at gmail.com
Thu Feb 23 10:00:52 PST 2017


On Mon, Feb 20, 2017 at 2:17 PM, Ady Ady via Syslinux
<syslinux at zytor.com> wrote:
> Correct the "seg=" value(s) corresponding to the "reactos=" option
> for chain.c32.
>
> The correct segment parameter should be "seg=0x0F80",
> instead of the incorrect / failing ones "seg=0:0x8000:0x8100".
>
> References:
>  https://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/notes.txt?revision=73859&view=markup&pathrev=73859#l24
>
>  https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/boot/freeldr/notes.txt;hb=HEAD
>
>  https://git.reactos.org/?p=reactos.git&a=search&h=HEAD&st=grep&s=FREELDR_BASE
>
>  https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h;h=c747d145cb3b35f68caab5291dc65dcdca21f17d;hb=HEAD#l17
>
>  https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h;hb=HEAD
>
> At the time of writing this patch, the up-to-date bootsectors referring to
> the above 'define' ("FREELDR_BASE") have a filename extension ending with ".S".
>
> There is also "multiboot.S", FWIW.
>
> Regards,
> Ady.

It's a bit more complex.  At the time of writing, the data was perfect.

https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h;hb=28e58e6d01892c1f2f0e1d323745e6463cb9e6c9
dated 2011-06-14

https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h;hb=1dabbdfa6bbe244cd74bc912b94e514b85d63bbe

https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h;hb=0eb6daaf66127de803d36d45a4eea29d30a7ca36
dated 2011-06-18 finalized the shuffle.

> diff U3 com32/chain/options.c com32/chain/options.c
> --- com32/chain/options.c       Wed Mar 02 07:06:29 2016
> +++ com32/chain/options.c       Mon Feb 18 19:19:29 2017
> @@ -224,15 +224,9 @@
>             opt.setbpb = true;
>             opt.hand = false;
>         } else if (!strncmp(argv[i], "reactos=", 8)) {
> -           /*
> -            * settings based on commit
> -            *   ad4cf1470977f648ee1dd45e97939589ccb0393c
> -            * note, conflicts with:
> -            *   http://reactos.freedoors.org/Reactos%200.3.13/ReactOS-0.3.13-REL-src/boot/freeldr/notes.txt
> -            */
> -           opt.fseg = 0;
> -           opt.foff = 0x8000;
> -           opt.fip = 0x8100;
> +           opt.fseg = 0x0F80;
> +           opt.foff = 0;
> +           opt.fip = 0;
>             opt.file = argv[i] + 8;
>             opt.setbpb = true;
>             opt.hand = false;
> diff U3 doc/chain.txt doc/chain.txt
> --- doc/chain.txt       Wed Mar 02 07:06:02 2016
> +++ doc/chain.txt       Mon Feb 18 18:45:10 2017
> @@ -296,7 +296,7 @@
>  patched with "cmdcons\0". Remarks the same as in 'ntldr='.
>
>         reactos=<file>
> -       sets: file=<file> seg=0:0x8000:0x8100 setbpb nohand
> +       sets: file=<file> seg=0x0F80 setbpb nohand
>
>  Prepares to load ReactOS's freeldr directly. You might want to add 'save'
>  option to store corrected BPB values.

This should have been put in place years ago by the looks but it's
going to need a big glaring warning in the release notes.

-- 
-Gene


More information about the Syslinux mailing list