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
This commit is contained in:
gikidy
2009-02-26 03:39:15 +00:00
parent 50db9e551a
commit fd549a4db9
9 changed files with 57 additions and 49 deletions

View File

@@ -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