com32/chain: add support for ReactOS's freeldr.sys
authorMichal Soltys <soltys@ziu.info>
Tue, 10 May 2011 11:30:58 +0000 (13:30 +0200)
committerMichal Soltys <soltys@ziu.info>
Tue, 10 May 2011 11:54:05 +0000 (13:54 +0200)
Based on commit: ad4cf1470977f648ee1dd45e97939589ccb0393c

(might need address adjustments)

Signed-off-by: Michal Soltys <soltys@ziu.info>
com32/chain/options.c
doc/chain.txt

index 791bcbb..a897c32 100644 (file)
@@ -95,6 +95,7 @@ Usage:\n\
                          - ommited o/i values default to 0\n\
     isolinux=<loader>    Load another version of ISOLINUX\n\
     ntldr=<loader>       Load Windows NTLDR, SETUPLDR.BIN or BOOTMGR\n\
+    reactos=<loader>     Load ReactOS's loader\n\
     cmldr=<loader>       Load Recovery Console of Windows NT/2K/XP/2003\n\
     freedos=<loader>     Load FreeDOS KERNEL.SYS\n\
     msdos=<loader>       Load MS-DOS 2.xx - 6.xx IO.SYS\n\
@@ -169,6 +170,20 @@ int opt_parse_args(int argc, char *argv[])
            opt.setbpb = true;
            /* opt.save = 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.file = argv[i] + 8;
+           opt.setbpb = true;
+           /* opt.save = true; */
+           opt.hand = false;
        } else if (!strncmp(argv[i], "cmldr=", 6)) {
            opt.fseg = 0x2000;  /* CMLDR wants this address */
            opt.foff = 0;
index b655e94..f7826d4 100644 (file)
@@ -260,6 +260,12 @@ corrected BPB values.
 Prepares to load recovery console directly. In-memory copy of bootsector is
 patched with "cmdcons\0". Remarks the same as in 'ntldr='.
 
+       reactos=<file>
+       sets: file=<file> seg=0:0x8000:0x8100 setbpb nohand
+
+Prepares to load ReactOS's freeldr directly. You might want to add 'save'
+option to store corrected BPB values.
+
        freedos=<file>
        sets: file=<file> seg=0x60 sect=0x1FE0 setbpb nohand