From fd549a4db9c562587652c23884bab5a4f3631d10 Mon Sep 17 00:00:00 2001 From: gikidy Date: Thu, 26 Feb 2009 03:39:15 +0000 Subject: 1. Add GNUmakefile for Linux GCC to build BootSector; 2. Modified some S files to pass ld phase. Now the makefile only for pass build and source control. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7699 6f19259b-4bc3-4df7-8a09-765794883524 --- DuetPkg/BootSector/bs32.S | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'DuetPkg/BootSector/bs32.S') diff --git a/DuetPkg/BootSector/bs32.S b/DuetPkg/BootSector/bs32.S index f01f5bf7d1..f2e3b91454 100644 --- a/DuetPkg/BootSector/bs32.S +++ b/DuetPkg/BootSector/bs32.S @@ -16,9 +16,10 @@ #------------------------------------------------------------------------------ #.MODEL small - .stack: - .486p: - .code: + #.stack: + #.486p: + #.code: +.section .text .equ FAT_DIRECTORY_ENTRY_SIZE, 0x0020 .equ FAT_DIRECTORY_ENTRY_SHIFT, 5 @@ -30,7 +31,9 @@ .equ LOADER_FILENAME_PART2, 0x30325244 # "DR20" .equ LOADER_FILENAME_PART3, 0x20202030 # "0___" - .org 0x00 + .org 0x00 +.global _start +_start: Ia32Jump: jmp BootSectorEntryPoint # JMP inst - 3 bytes nop @@ -148,7 +151,7 @@ FindEFILDR: jmp FoundAll FindVARSTORE: - # if the file is not loader file, see if it's "EFIVAR BIN" + ## if the file is not loader file, see if it's "EFIVAR BIN" cmpl $0x56494645, (%di) # Compare to "EFIV" jne FindNext cmpl $0x20205241, 4(%di) # Compare to "AR " @@ -275,7 +278,7 @@ LimitTransfer: # ERROR Condition: # **************************************************************************** NotFoundAll: - # if we found EFILDR, continue + ## if we found EFILDR, continue testw %bx, %bx jne FoundEFILDR BadBootSector: @@ -294,7 +297,7 @@ ErrorString: # LBA Offset for BootSector, need patched by tool for HD boot. # **************************************************************************** - .org 0x01fa + # .org 0x01fa # BUG_BUG LBAOffsetForBootSector: .long 0x0 @@ -302,7 +305,7 @@ LBAOffsetForBootSector: # Sector Signature # **************************************************************************** - .org 0x01fe + # .org 0x01fe # BUG_BUG SectorSignature: .word 0xaa55 # Boot Sector Signature -- cgit v1.2.3