1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
diff -ubwr ./Makefile ../../work/syslinux-3.72/Makefile
--- ./Makefile 2008-09-26 01:46:02.000000000 +0200
+++ ../../work/syslinux-3.72/Makefile 2008-11-25 11:38:14.000000000 +0100
@@ -48,18 +48,18 @@
# Note: libinstaller is both a BSUBDIR and an ISUBDIR. It contains
# files that depend only on the B phase, but may have to be regenerated
# for "make installer".
-BSUBDIRS = codepage core memdisk modules com32 mbr memdump gpxe sample \
+BSUBDIRS_ = codepage core memdisk modules com32 mbr memdump gpxe sample \
libinstaller dos win32
ITARGET =
IOBJECTS = $(ITARGET) dos/copybs.com \
utils/gethostip utils/isohybrid utils/mkdiskimage \
- mtools/syslinux linux/syslinux extlinux/extlinux
-ISUBDIRS = libinstaller mtools linux extlinux utils
+ mtools/syslinux
+ISUBDIRS = libinstaller mtools
# Things to install in /usr/bin
INSTALL_BIN = mtools/syslinux
# Things to install in /sbin
-INSTALL_SBIN = extlinux/extlinux
+INSTALL_SBIN = #extlinux/extlinux
# Things to install in /usr/lib/syslinux
INSTALL_AUX = core/pxelinux.0 gpxe/gpxelinux.0 core/isolinux.bin \
core/isolinux-debug.bin \
diff -ubwr ./com32/lib/MCONFIG ../../work/syslinux-3.72/com32/lib/MCONFIG
--- ./com32/lib/MCONFIG 2008-09-26 01:46:02.000000000 +0200
+++ ../../work/syslinux-3.72/com32/lib/MCONFIG 2008-11-25 11:32:22.000000000 +0100
@@ -47,7 +47,7 @@
$(CC) $(CFLAGS) -S -o $@ $<
.S.o:
- $(CC) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
+ $(CC) $(filter-out -std=gnu99, $(CFLAGS)) -D__ASSEMBLY__ -c -o $@ $<
.S.s:
$(CC) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
diff -ubwr ./com32/libutil/md5.c ../../work/syslinux-3.72/com32/libutil/md5.c
--- ./com32/libutil/md5.c 2008-09-26 01:46:02.000000000 +0200
+++ ../../work/syslinux-3.72/com32/libutil/md5.c 2008-11-25 11:32:22.000000000 +0100
@@ -27,7 +27,7 @@
*/
#include <string.h>
-#include <endian.h>
+#include <machine/endian.h>
#include <md5.h>
static void MD5Transform(uint32_t [4], const unsigned char [64]);
diff -ubwr ./com32/libutil/sha256crypt.c ../../work/syslinux-3.72/com32/libutil/sha256crypt.c
--- ./com32/libutil/sha256crypt.c 2008-09-26 01:46:02.000000000 +0200
+++ ../../work/syslinux-3.72/com32/libutil/sha256crypt.c 2008-11-25 11:32:22.000000000 +0100
@@ -1,8 +1,8 @@
/* SHA256-based Unix crypt implementation.
Released into the Public Domain by Ulrich Drepper <drepper@redhat.com>. */
-#include <alloca.h>
-#include <endian.h>
+#include <stdlib.h>
+#include <machine/endian.h>
#include <errno.h>
#include <limits.h>
#include <stdint.h>
diff -ubwr ./com32/libutil/sha512crypt.c ../../work/syslinux-3.72/com32/libutil/sha512crypt.c
--- ./com32/libutil/sha512crypt.c 2008-09-26 01:46:02.000000000 +0200
+++ ../../work/syslinux-3.72/com32/libutil/sha512crypt.c 2008-11-25 11:32:22.000000000 +0100
@@ -1,8 +1,8 @@
/* SHA512-based Unix crypt implementation.
Released into the Public Domain by Ulrich Drepper <drepper@redhat.com>. */
-#include <alloca.h>
-#include <endian.h>
+#include <stdlib.h>
+#include <machine/endian.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
diff -ubwr ./mtools/syslinux.c ../../work/syslinux-3.72/mtools/syslinux.c
--- ./mtools/syslinux.c 2008-09-26 01:46:02.000000000 +0200
+++ ../../work/syslinux-3.72/mtools/syslinux.c 2008-11-25 11:32:22.000000000 +0100
@@ -38,6 +38,8 @@
#include "syslinux.h"
#include "libfat.h"
+int verbose=0;
+
char *program; /* Name of program */
char *device; /* Device to install to */
pid_t mypid;
@@ -159,6 +161,8 @@
while ( *opt ) {
if ( *opt == 's' ) {
stupid = 1;
+ } else if ( *opt == 'v' ) {
+ verbose++;
} else if ( *opt == 'r' ) {
raid_mode = 1;
} else if ( *opt == 'f' ) {
@@ -217,11 +221,9 @@
fprintf(mtc,
/* "MTOOLS_NO_VFAT=1\n" */
"MTOOLS_SKIP_CHECK=1\n" /* Needed for some flash memories */
- "drive s:\n"
- " file=\"/proc/%lu/fd/%d\"\n"
+ "drive s: file=\"%s\"\n"
" offset=%llu\n",
- (unsigned long)mypid,
- dev_fd,
+ device,
(unsigned long long)filesystem_offset);
fclose(mtc);
@@ -234,8 +236,10 @@
}
/* This command may fail legitimately */
+if (verbose) fprintf(stderr, "doing mattrib\n");
system("mattrib -h -r -s s:/ldlinux.sys 2>/dev/null");
+if (verbose) fprintf(stderr, "doing mcopy\n");
mtp = popen("mcopy -D o -D O -o - s:/ldlinux.sys", "w");
if ( !mtp ||
(fwrite(syslinux_ldlinux, 1, syslinux_ldlinux_len, mtp)
@@ -248,7 +252,9 @@
* Now, use libfat to create a block map
*/
fs = libfat_open(libfat_xpread, dev_fd);
+if (verbose) fprintf(stderr, "libfat_open returns %p\n", fs);
ldlinux_cluster = libfat_searchdir(fs, 0, "LDLINUX SYS", NULL);
+if (verbose) fprintf(stderr, "libfat_searchdir returns %d\n", ldlinux_cluster);
secp = sectors;
nsectors = 0;
s = libfat_clustertosector(fs, ldlinux_cluster);
@@ -256,6 +262,7 @@
*secp++ = s;
nsectors++;
s = libfat_nextsector(fs, s);
+if (verbose) fprintf(stderr, "libfat_nextsector returns %d\n", s);
}
libfat_close(fs);
|