[syslinux] Patch to port isohybrid.pl to isohybrid.c
Geert Stappers
stappers at stappers.nl
Tue Apr 13 00:23:42 PDT 2010
Op 20100413 om 08:27 schreef Geert Stappers:
> >Op 20100412 om 14:55 schreef P J P:
> >> Hello all,
> >>
> >> Past few days I was working on porting the isohybrid Perl script to c.
> >> (-> https://fedorahosted.org/fedora-engineering-services/ticket/15)
> >>
> >> The first patch towards the same could be accessed
> >>
> >> from: http://pjp.dgplug.org/tools/syslinux-3.86-isohybrid.patch
> >
> >--- syslinux-3.86/utils/Makefile 2010-03-31 21:54:25.000000000 +0530
> >+++ syslinux-3.86.1/utils/Makefile 2010-04-11 23:29:41.633885260 +0530
> >@@ -36,10 +36,8 @@
> > $(PERL) bin2hex.pl < ../mbr/mbr.bin | cat mkdiskimage.in - > $@
> > chmod a+x $@
> >
> >-isohybrid: isohybrid.in $(ISOHDPFX) bin2hex.pl
> >- cp -f isohybrid.in $@
> >- for f in $(ISOHDPFX) ; do $(PERL) bin2hex.pl < $$f >> $@ ; done
> >- chmod a+x $@
> >+isohybrid: isohybrid.c
> >+ $(CC) $(UMAKEDEPS) $(CFLAGS) -o $@ $<
> >
> > gethostip: gethostip.o
> > $(CC) $(LDFLAGS) -o $@ $^
> >
> >>
> >> I would really appreciate it if somebody could have a look at it
> >> and let me know the feedback.
My review and feedback are here
to express that I care about the Syslinux project.
> $(ISOHDPFX) went as hexdata[] into the source file isohybrid.c a very
> static way, it should be piggybacked to isohybrid, the executable.
>
> The Makefile target will look something like
>
> isohybrid: isohybrid.c $(ISOHDPFX)
> $(CC) $(UMAKEDEPS) $(CFLAGS) -o $@ isohybrid.c
> for f in $(ISOHDPFX) ; do cat $$f >> $@ ; done
>
That is way too simple, it leaves out the
print "*\n";
from the original bin2hex.pl
The important part is that if any of the ISOHDPFX files
|ISOHDPFX = ../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin ../mbr/isohdpfx_c.bin \
| ../mbr/isohdppx.bin ../mbr/isohdppx_f.bin ../mbr/isohdppx_c.bin
change, then must isohybrid be rebuild.
Groeten
Geert Stappers
More information about the Syslinux
mailing list