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

Ady Ady ady-sf at hotmail.com
Sat Mar 4 00:40:14 PST 2017


 (snip) 

> 
> 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.
> 
 
 
 (snip) 
 
 
> 
> 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
 
 

* 2009Dec Reactos 0.3.11 - OK
* 2010Oct Reactos 0.3.12 - KO
* 2011Mar Reactos 0.3.13 - KO
* 2011Dec Syslinux 4.05 containing Shao's patch ("freeldr=")
* 2012Feb Reactos 0.3.14 - KO
* 2012Oct Syslinux 4.06 containing Michal Soltys' patch ("reactos=")
* 2013May Reactos 0.3.15 - KO

The above OK/KO results are from my own tests using chain.c32. 
There is always a chance that someone else might get different results.

Reactos is "alpha", so the only version of Reactos that its devs support 
is the "latest" at each time. Older versions of Reactos are not 
relevant / supported by Reactos' devs.

At the time the respective official release binaries were available, 
Syslinux's chain.c32 has never effectively supported chainloading 
(the "latest") Reactos with "built-in" options 
(neither "freeldr=" nor "reactos=", depending on Syslinux's version).

Below, I am re-posting my patch (and its comments and title) with a slightly 
different wording in comparison to the one I posted during 2017Feb.

Regards,
Ady.


Update the "seg=" value(s) corresponding to the "reactos=" option
for chain.c32, according to newer/current versions of Reactos.

The updated segment parameter should be "seg=0x0F80",
instead of the older 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.



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.

 --





More information about the Syslinux mailing list