[ros-dev] Building Freeloader

Phillip Susi psusi at cfl.rr.com
Sun Apr 3 01:55:13 CEST 2005


Well, I think I found a workaround for two bugs so far so I'll explain 
those. 

I noticed that mformat was using 1 sector per cluster by default which 
seemed to cause a disk error message when the boot sector tried to load 
freeldr.sys.  If there was no freeldr.sys, it would say so, but if there 
was, it would just say 'disk error'.  I found that the image that came 
with the qemu distribution was using 4 sectors per cluster, so I instead 
told mformat to use 4 sectors per cluster and that allowed freeloader to 
load.

The second problem was if I set up a temporary staging area to hold all 
of the install files, including freeldr.sys and freeldr.ini and the 
ReactOS directory, and mcopy the entire thing to the newly formated hard 
disk image, it would hang before freeldr loaded.  Instead I have to 
explicitly copy freeldr.sys first ( and I think I also had to copy it 
with all uppercase to make it work ) and then copy the rest. 

Now that I got freeloader actually loading, when it tries to load the 
kernel it says something about not finding a multiboot header, and then 
the top line of the screen gets overwritten in some places with the text 
"0x80" and "0x81" and when I press enter to ok the message, qemu crashes. 

I seem to remember you added a special multiboot header to the kernel 
image but it looks to me like ntoskrnl.exe has a standard PE image header. 

Brian Palmer wrote:

>At first, mingw couldn't generate 16-bit assembly. Then the problem was that
>the mingw ld seemed to not like to fixup addresses that weren't aligned on a
>32-bit boundary. IIRC, there was a jmp instruction that jmp'ed like two
>bytes down or something and ld rounded it off to the nearest 32-bit address
>which was it's own instruction, so it hung jmp'ing to itself. Long story
>short, unless something has changed, instead of fixing ld to work with
>16-bit code we put nop instructions in FreeLoader to fix (I mean hack) it.
>
>Actually, I have not done any work on FreeLoader in at least a year and a
>half. What kind of problems are you having with it?
>
>-Brian
>
>-----Original Message-----
>From: ros-dev-bounces at reactos.com [mailto:ros-dev-bounces at reactos.com] On
>Behalf Of Phillip Susi
>Sent: Saturday, April 02, 2005 9:42 PM
>To: ros-dev at reactos.com
>Subject: [ros-dev] Building Freeloader
>
>Hey Brian, I've been having all kinds of weird problems getting 
>freeloader installed and working in a boot drive image for qemu.  I seem 
>to remember you used to have to build it with djgpp instead of mingw for 
>some odd reason.  I think it had something to do with mingw's ld 
>clobbering something up when you asked it to output a binary flat file 
>instead of a PE image.  Is this still the case?  Was that issue never 
>resolved?
>
>
>
>
>_______________________________________________
>Ros-dev mailing list
>Ros-dev at reactos.com
>http://reactos.com:8080/mailman/listinfo/ros-dev
>
>_______________________________________________
>Ros-dev mailing list
>Ros-dev at reactos.com
>http://reactos.com:8080/mailman/listinfo/ros-dev
>
>  
>



More information about the Ros-dev mailing list