writembr: Implement support for GPT partitions, #4028.

* This should support both GPT and MBR formatted partitions.
* To boot Haiku from a GPT partition, it must have the correct
  BFS UUID for the partition.
* Tools such as gdisk/gptfdisk can create partitions with
  the correct BFS UUID.
This commit is contained in:
Jessica Hamilton
2015-06-04 15:07:13 +12:00
parent 6ff95509c2
commit 11e8ecdd94
6 changed files with 482 additions and 420 deletions
+13
View File
@@ -134,3 +134,16 @@ actions BootStaticLibraryObjects
$(RM) "$(1)"
$(HAIKU_AR_$(TARGET_PACKAGING_ARCH)) -r "$(1)" "$(2)" ;
}
rule BuildMBR binary : source
{
SEARCH on $(source) = $(SUBDIR) ;
MakeLocateDebug $(binary) ;
Depends $(binary) : $(source) ;
}
actions BuildMBR
{
$(RM) $(1)
$(HAIKU_CC_$(HAIKU_PACKAGING_ARCH)) $(2) -o $(1) $(MBRFLAGS) -nostdlib -Xlinker --oformat=binary -Xlinker -S -Xlinker -N -Xlinker "-e start" -Xlinker "-Ttext=0x600"
}