aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-07 15:32:21 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-07-07 15:32:21 -0700
commit852d962ee2d0a51bf7aa3c6f0b1fdecbef1a3efd (patch)
tree1fd82e3dcc96b5049ae7f47ca2ed3df0ac3d93a7 /memdisk
parent07ff8e874b0bd1d1c4fa893c94063fbedf6e3315 (diff)
downloadsyslinux.git-852d962ee2d0a51bf7aa3c6f0b1fdecbef1a3efd.tar.gz
syslinux.git-852d962ee2d0a51bf7aa3c6f0b1fdecbef1a3efd.tar.xz
syslinux.git-852d962ee2d0a51bf7aa3c6f0b1fdecbef1a3efd.zip
Share the gen-id stuff between core and memdisk
Both core and memdisk wants to use the gen-id stuff, so let it.
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/Makefile12
-rw-r--r--memdisk/memdisk16.asm4
2 files changed, 15 insertions, 1 deletions
diff --git a/memdisk/Makefile b/memdisk/Makefile
index 005ab1d4..073d32cd 100644
--- a/memdisk/Makefile
+++ b/memdisk/Makefile
@@ -38,6 +38,18 @@ NINCLUDE =
OBJCOPY = objcopy
PERL = perl
+SRCS = $(wildcard *.asm *.c *.h)
+
+# The DATE is set on the make command line when building binaries for
+# official release. Otherwise, substitute a hex string that is pretty much
+# guaranteed to be unique to be unique from build to build.
+ifndef HEXDATE
+HEXDATE := $(shell $(PERL) ../now.pl $(SRCS))
+endif
+ifndef DATE
+DATE := $(shell sh ../gen-id.sh $(HEXDATE))
+endif
+
# Important: init.o16 must be first!!
OBJS16 = init.o16 init32.o
OBJS32 = start32.o setup.o msetup.o e820func.o conio.o memcpy.o memset.o \
diff --git a/memdisk/memdisk16.asm b/memdisk/memdisk16.asm
index d73ddc5d..d43404e8 100644
--- a/memdisk/memdisk16.asm
+++ b/memdisk/memdisk16.asm
@@ -19,6 +19,8 @@
;; com32.inc in the main SYSLINUX distribution.
;;
+%include '../version.gen'
+
MY_CS equ 0x0800 ; Segment address to use
CS_BASE equ (MY_CS << 4) ; Corresponding address
@@ -79,7 +81,7 @@ b_edx dd 0 ; EDX for boot sector invocation
section .rodata
memdisk_version:
- db "MEMDISK ", VERSION, " ", DATE, 0
+ db "MEMDISK ", VERSION_STR, " ", DATE, 0
;; -----------------------------------------------------------------------
;; End kernel image header