[syslinux:master] diag/: Add Makefile,README here and mbr/

syslinux-bot for Gene Cumm gene.cumm at gmail.com
Wed Mar 16 14:00:22 PDT 2011


Commit-ID:  0b298f8be44c7ee2f532e823a16cba9397ddf551
Gitweb:     http://syslinux.zytor.com/commit/0b298f8be44c7ee2f532e823a16cba9397ddf551
Author:     Gene Cumm <gene.cumm at gmail.com>
AuthorDate: Sun, 6 Mar 2011 17:17:01 -0500
Committer:  Gene Cumm <gene.cumm at gmail.com>
CommitDate: Wed, 9 Mar 2011 21:07:03 -0500

diag/: Add Makefile,README here and mbr/



---
 diag/Makefile              |    4 ++++
 diag/README                |    4 ++++
 {mbr => diag/mbr}/Makefile |   20 ++++++--------------
 diag/mbr/README            |   15 +++++++++++++++
 4 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/diag/Makefile b/diag/Makefile
new file mode 100644
index 0000000..4604454
--- /dev/null
+++ b/diag/Makefile
@@ -0,0 +1,4 @@
+SUBDIRS = mbr
+
+all tidy dist clean spotless install:
+	set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
diff --git a/diag/README b/diag/README
new file mode 100644
index 0000000..35dd1e0
--- /dev/null
+++ b/diag/README
@@ -0,0 +1,4 @@
+Diagnostic tools and images to assist with troubleshooting Syslinux-related issues.  See README in each directory for more details.
+
+geodsp/		Display geometry/LBA translation as the BIOS detects it.
+mbr/		Diagnostic MBRs
diff --git a/mbr/Makefile b/diag/mbr/Makefile
similarity index 65%
copy from mbr/Makefile
copy to diag/mbr/Makefile
index c3eb97a..b13ed80 100644
--- a/mbr/Makefile
+++ b/diag/mbr/Makefile
@@ -15,29 +15,21 @@
 # Makefile for MBR
 #
 
-topdir = ..
+topdir = ../..
+mbrdir = $(topdir)/mbr
 include $(topdir)/MCONFIG.embedded
 
-all:	mbr.bin   altmbr.bin   gptmbr.bin   isohdpfx.bin   isohdppx.bin \
-	mbr_c.bin altmbr_c.bin gptmbr_c.bin isohdpfx_c.bin isohdppx_c.bin \
-	mbr_f.bin altmbr_f.bin gptmbr_f.bin isohdpfx_f.bin isohdppx_f.bin
+all:	handoff.bin
 
 %.o: %.S
 	$(CC) $(MAKEDEPS) $(SFLAGS) -Wa,-a=$*.lst -c -o $@ $<
 
-%_c.o: %.S
-	$(CC) $(MAKEDEPS) $(SFLAGS) -Wa,-a=$*_c.lst -DCTRL_80 -c -o $@ $<
-
-%_f.o: %.S
-	$(CC) $(MAKEDEPS) $(SFLAGS) -Wa,-a=$*_f.lst -DFORCE_80 -c -o $@ $<
-
 .PRECIOUS: %.elf
-%.elf: %.o mbr.ld
-	$(LD) $(LDFLAGS) -T mbr.ld -e _start -o $@ $<
+%.elf: %.o $(mbrdir)/mbr.ld
+	$(LD) $(LDFLAGS) -T $(mbrdir)/mbr.ld -e _start -o $@ $<
 
-%.bin: %.elf checksize.pl
+%.bin: %.elf $(mbrdir)/checksize.pl
 	$(OBJCOPY) -O binary $< $@
-	$(PERL) checksize.pl $@
 	$(CHMOD) -x $@
 
 mbr_bin.c: mbr.bin
diff --git a/diag/mbr/README b/diag/mbr/README
new file mode 100644
index 0000000..390f51d
--- /dev/null
+++ b/diag/mbr/README
@@ -0,0 +1,15 @@
+Diagnostic MBR/VBR files
+
+handoff.bin	Show the data that the BIOS/MBR hands off to an MBR/VBR.
+
+
+  +++ USAGE +++
+
+Writing out an MBR is straight forward (it is assumed below that /dev/hda is the target raw device and /dev/hda1 is the target partition):
+
+  dd bs=440 conv=notrunc count=1 if=mbr.bin of=/dev/hda
+
+Writing a VBR to match Syslinux requires more work as it must have a jump and be offset into the partition:
+
+  echo -en "\0353\0130\0220" |dd conv=notrunc bs=1 count=3 of=/dev/hda1
+  dd conv=notrunc bs=2 count=210 seek=45 if=mbr.bin of=/dev/hda1



More information about the Syslinux-commits mailing list