mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-12-25 04:31:40 +00:00
-Clean up patch and update spec file
Former-commit-id: 4c750397cab1657c9054a4404f7192f8810e343b
This commit is contained in:
parent
7f34c5b619
commit
01e058e193
@ -1,6 +1,6 @@
|
||||
diff -urN syslinux-3.86/com32/mboot/mboot.c syslinux-3.86-multibootif/com32/mboot/mboot.c
|
||||
--- syslinux-3.86/com32/mboot/mboot.c 2010-03-31 12:24:25.000000000 -0400
|
||||
+++ syslinux-3.86-multibootif/com32/mboot/mboot.c 2010-05-14 17:08:13.898848924 -0400
|
||||
+++ syslinux-3.86-multibootif/com32/mboot/mboot.c 2010-05-14 21:15:43.000000000 -0400
|
||||
@@ -93,9 +93,18 @@
|
||||
char **argp, **argx;
|
||||
struct module_data *mp;
|
||||
@ -14,43 +14,41 @@ diff -urN syslinux-3.86/com32/mboot/mboot.c syslinux-3.86-multibootif/com32/mboo
|
||||
+ reg.eax.w[0] = 0x000f; /* Get IPAPPEND strings */
|
||||
+ __intcall(0x22,®,®);
|
||||
+ if (!(reg.eflags.l & EFLAGS_CF)) {
|
||||
+ bootifstr = MK_PTR(reg.es,
|
||||
+ *(uint16_t *) MK_PTR(reg.es, reg.ebx.w[0] + 2));
|
||||
+ }
|
||||
+ bootifstr = MK_PTR(reg.es,
|
||||
+ *(uint16_t *) MK_PTR(reg.es, reg.ebx.w[0] + 2));
|
||||
+ } /* bootifstr would now be like BOOTIF= argument */
|
||||
|
||||
for (argp = argv; *argp; argp++) {
|
||||
if (!strcmp(*argp, module_separator))
|
||||
@@ -128,9 +137,17 @@
|
||||
arglen = 0;
|
||||
for (argx = argp; *argx && strcmp(*argx, module_separator); argx++)
|
||||
@@ -130,15 +139,29 @@
|
||||
arglen += strlen(*argx) + 1;
|
||||
+ if (firstmod) {
|
||||
+ arglen += strlen(bootifstr) + 1;
|
||||
+ }
|
||||
|
||||
if (arglen == 0) {
|
||||
- mp->cmdline = strdup("");
|
||||
+ if (firstmod) { /* first module, let's add BOOTIF for fun */
|
||||
+ firstmod=0;
|
||||
+ if (firstmod) { /* first module, let's add BOOTIF to the command line */
|
||||
+ firstmod=0;
|
||||
+ mp->cmdline = strdup(bootifstr);
|
||||
+ } else {
|
||||
+ mp->cmdline = strdup("");
|
||||
+ }
|
||||
} else {
|
||||
char *p;
|
||||
+ if (firstmod) {
|
||||
+ arglen += strlen(bootifstr) + 1;
|
||||
+ }
|
||||
mp->cmdline = p = malloc(arglen);
|
||||
@@ -138,7 +155,13 @@
|
||||
for (; *argp && strcmp(*argp, module_separator); argp++) {
|
||||
p = strpcpy(p, *argp);
|
||||
*p++ = ' ';
|
||||
}
|
||||
- *--p = '\0';
|
||||
+ if (firstmod) { /* first module, let's add BOOTIF for fun */
|
||||
+ firstmod=0;
|
||||
+ p = strpcpy(p,bootifstr);
|
||||
+ *p = '\0';
|
||||
+ } else {
|
||||
+ if (firstmod) { /* first module, let's add BOOTIF to the command line */
|
||||
+ firstmod=0;
|
||||
+ p = strpcpy(p,bootifstr);
|
||||
+ *p = '\0';
|
||||
+ } else {
|
||||
+ *--p = '\0';
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
mp++;
|
||||
if (*argp)
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- rpm -*-
|
||||
%define RPMVERSION 3.82
|
||||
%define VERSION 3.82
|
||||
%define RPMVERSION 3.86
|
||||
%define VERSION 3.86
|
||||
Summary: Kernel loader which uses a FAT, ext2/3 or iso9660 filesystem or a PXE network
|
||||
Name: syslinux
|
||||
Version: %{RPMVERSION}
|
||||
@ -8,6 +8,7 @@ Release: 1
|
||||
License: GPL
|
||||
Group: System/Boot
|
||||
Source0: ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{VERSION}.tar.bz2
|
||||
Patch0: syslinux-3.86-multibootif.patch
|
||||
ExclusiveArch: i386 i486 i586 i686 athlon pentium4 x86_64
|
||||
Packager: H. Peter Anvin <hpa@zytor.com>
|
||||
Buildroot: %{_tmppath}/%{name}-%{VERSION}-root
|
||||
@ -56,6 +57,7 @@ booting in the /opt/xcat/share/xcat/netboot/syslinux directory.
|
||||
|
||||
%prep
|
||||
%setup -q -n syslinux-%{VERSION}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
make CC='%{my_cc}' clean
|
||||
@ -69,6 +71,9 @@ make CC='%{my_cc}' install-all \
|
||||
LIBDIR=%{_libdir} DATADIR=%{_datadir} \
|
||||
MANDIR=%{_mandir} INCDIR=%{_includedir} \
|
||||
TFTPBOOT=/opt/xcat/share/xcat/netboot/syslinux EXTLINUXDIR=/boot/extlinux
|
||||
rm %{buildroot}/usr/share/syslinux/dosutil/copybs.com
|
||||
rm %{buildroot}/usr/share/syslinux/dosutil/eltorito.sys
|
||||
rm %{buildroot}/usr/share/syslinux/dosutil/mdiskchk.com
|
||||
make CC='%{my_cc}' -C sample tidy
|
||||
mkdir -p %{buildroot}/etc
|
||||
( cd %{buildroot}/etc && ln -s ../boot/extlinux/extlinux.conf . )
|
||||
|
Loading…
Reference in New Issue
Block a user