From f65b805f6f14b33be3bcbbcb9575fc4a1fce0aa6 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 29 Oct 2014 23:25:59 +0100 Subject: [PATCH] Fix build of intel partitioning add-on by building its own MBR. It previously shared the same generated MBR header with bin/writembr, but they have incompatible needs. The intel partitioning add-on only wants the MBR code, while writembr wants the whole sector. Build the desired version of the MBR separately for each target instead of sharing a single header. --- .../kernel/partitioning_systems/intel/Jamfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/partitioning_systems/intel/Jamfile b/src/add-ons/kernel/partitioning_systems/intel/Jamfile index 39291a624e..536de33a89 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/Jamfile +++ b/src/add-ons/kernel/partitioning_systems/intel/Jamfile @@ -2,10 +2,17 @@ SubDir HAIKU_TOP src add-ons kernel partitioning_systems intel ; UsePrivateHeaders kernel shared storage ; UsePrivateSystemHeaders ; -UseHeaders [ FDirName $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) bin writembr ] ; -Includes [ FGristFiles PartitionMapWriter.cpp ] - : MBR.h ; +# Assemble the MBR code, and convert it into a header file + +NASMFLAGS on [ FGristFiles mbr.bin ] = -f bin -O5 -dMBR_CODE_ONLY=1 ; + +SEARCH on mbr.nasm = [ FDirName $(HAIKU_TOP) src bin writembr ] ; + +Object [ FGristFiles mbr.bin ] : mbr.nasm ; + +DataFileToSourceFile [ FGristFiles MBR.h ] : [ FGristFiles mbr.bin ] + : kMBR : kMBRSize ; KernelAddon intel : intel.cpp