* getting etherboot compiling @ 2008-02-01 18:16 John Levon 2008-02-01 18:21 ` John Levon 0 siblings, 1 reply; 11+ messages in thread From: John Levon @ 2008-02-01 18:16 UTC (permalink / raw) To: xen-devel It's riddled with Linux-isms. I have no idea what this code is really for, or how to test it, so I'm not going to be much use fixing this up. With the patch below (at least some of the way), I just get: gld -melf_i386 -N -T arch/i386/core/etherboot.lds -o bin/eepro100.rom.rt bin/pciprefix.exit.o bin/eepro100.rt.o eepro100.rom.rt: Bad entry point /bin/sh: test: argument expected Suggestions? regards john ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-01 18:16 getting etherboot compiling John Levon @ 2008-02-01 18:21 ` John Levon 2008-02-02 10:21 ` Keir Fraser 2008-02-04 10:24 ` Christoph Egger 0 siblings, 2 replies; 11+ messages in thread From: John Levon @ 2008-02-01 18:21 UTC (permalink / raw) To: xen-devel On Fri, Feb 01, 2008 at 06:16:47PM +0000, John Levon wrote: > With the patch below (at least some of the way), I just get: And the patch john diff --git a/config/StdGNU.mk b/config/StdGNU.mk --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -12,6 +12,7 @@ SIZEUTIL = $(CROSS_COMPILE)size MSGFMT = msgfmt MSGMERGE = msgmerge +TAR = tar INSTALL = install INSTALL_DIR = $(INSTALL) -d -m0755 -p diff --git a/config/SunOS.mk b/config/SunOS.mk --- a/config/SunOS.mk +++ b/config/SunOS.mk @@ -11,6 +11,7 @@ SIZEUTIL = $(CROSS_COMPILE)gsize SIZEUTIL = $(CROSS_COMPILE)gsize MSGFMT = gmsgfmt +TAR = gtar SHELL = bash diff --git a/tools/firmware/etherboot/Makefile b/tools/firmware/etherboot/Makefile --- a/tools/firmware/etherboot/Makefile +++ b/tools/firmware/etherboot/Makefile @@ -21,14 +21,14 @@ eb-%.zrom.h: $E/src/Config mv -f $@.new $@ eb-rom-list.h: make-eb-rom-list $E/src/bin/Roms - ./$^ $(NICS) >$@.new && mv -f $@.new $@ + PATH=/usr/gnu/bin/:$(PATH) ./$^ $(NICS) >$@.new && mv -f $@.new $@ eb-roms.h: eb-rom-list.h $(ROM_ZHS) cat $^ >$@.new && mv -f $@.new $@ $E/src/Config: $T Config rm -rf $D $E - tar zxf $T + $(TAR) zxf $T cat Config >>$D/src/Config @ # override many of the settings in Config @@ -36,14 +36,14 @@ eb-roms.h: eb-rom-list.h $(ROM_ZHS) echo "HOST_CC=$(HOSTCC)" >>$D/src/Config echo "CPP=$(CPP)" >>$D/src/Config echo "CC=$(CC)" >>$D/src/Config - echo "AS=$(CC) -c -x assembler -" >>$D/src/Config + echo "AS=$(AS)" >>$D/src/Config echo "LD=$(LD)" >>$D/src/Config echo "SIZE=$(SIZE)" >>$D/src/Config echo "AR=$(AR)" >>$D/src/Config echo "RANLIB=$(RANLIB)" >>$D/src/Config echo "OBJCOPY=$(OBJCOPY)" >>$D/src/Config echo "CFLAGS+=$(CFLAGS)" >>$D/src/Config - echo "ASFLAGS+=$(CFLAGS)" >>$D/src/Config + echo "ASFLAGS+=$(ASFLAGS)" >>$D/src/Config echo "LDFLAGS+=$(LDFLAGS_DIRECT)" >>$D/src/Config @ set -e; cd $D/src/arch/i386; \ @@ -53,7 +53,7 @@ eb-roms.h: eb-rom-list.h $(ROM_ZHS) mv $D $E $E/src/bin/Roms: $E/src/Config - $(MAKE) -C $E/src bin/Roms + PATH=/usr/gnu/bin/:$(PATH) $(MAKE) -C $E/src bin/Roms clean: rm -rf $D $E *.zrom.h eb-rom-list.h eb-roms.h *~ diff --git a/tools/firmware/etherboot/make-eb-rom-list b/tools/firmware/etherboot/make-eb-rom-list --- a/tools/firmware/etherboot/make-eb-rom-list +++ b/tools/firmware/etherboot/make-eb-rom-list @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e roms=$1; shift echo "/* autogenerated - do not edit */" ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-01 18:21 ` John Levon @ 2008-02-02 10:21 ` Keir Fraser 2008-02-04 10:24 ` Christoph Egger 1 sibling, 0 replies; 11+ messages in thread From: Keir Fraser @ 2008-02-02 10:21 UTC (permalink / raw) To: John Levon, xen-devel Probably should take this patch and then either build no ROMs if not building on Linux, or have a default pre-prepared set of ROMs checked into the repo. -- Keir On 1/2/08 18:21, "John Levon" <levon@movementarian.org> wrote: > On Fri, Feb 01, 2008 at 06:16:47PM +0000, John Levon wrote: > >> With the patch below (at least some of the way), I just get: > > And the patch > > john > > diff --git a/config/StdGNU.mk b/config/StdGNU.mk > --- a/config/StdGNU.mk > +++ b/config/StdGNU.mk > @@ -12,6 +12,7 @@ SIZEUTIL = $(CROSS_COMPILE)size > > MSGFMT = msgfmt > MSGMERGE = msgmerge > +TAR = tar > > INSTALL = install > INSTALL_DIR = $(INSTALL) -d -m0755 -p > diff --git a/config/SunOS.mk b/config/SunOS.mk > --- a/config/SunOS.mk > +++ b/config/SunOS.mk > @@ -11,6 +11,7 @@ SIZEUTIL = $(CROSS_COMPILE)gsize > SIZEUTIL = $(CROSS_COMPILE)gsize > > MSGFMT = gmsgfmt > +TAR = gtar > > SHELL = bash > > diff --git a/tools/firmware/etherboot/Makefile > b/tools/firmware/etherboot/Makefile > --- a/tools/firmware/etherboot/Makefile > +++ b/tools/firmware/etherboot/Makefile > @@ -21,14 +21,14 @@ eb-%.zrom.h: $E/src/Config > mv -f $@.new $@ > > eb-rom-list.h: make-eb-rom-list $E/src/bin/Roms > - ./$^ $(NICS) >$@.new && mv -f $@.new $@ > + PATH=/usr/gnu/bin/:$(PATH) ./$^ $(NICS) >$@.new && mv -f $@.new $@ > > eb-roms.h: eb-rom-list.h $(ROM_ZHS) > cat $^ >$@.new && mv -f $@.new $@ > > $E/src/Config: $T Config > rm -rf $D $E > - tar zxf $T > + $(TAR) zxf $T > cat Config >>$D/src/Config > @ > # override many of the settings in Config > @@ -36,14 +36,14 @@ eb-roms.h: eb-rom-list.h $(ROM_ZHS) > echo "HOST_CC=$(HOSTCC)" >>$D/src/Config > echo "CPP=$(CPP)" >>$D/src/Config > echo "CC=$(CC)" >>$D/src/Config > - echo "AS=$(CC) -c -x assembler -" >>$D/src/Config > + echo "AS=$(AS)" >>$D/src/Config > echo "LD=$(LD)" >>$D/src/Config > echo "SIZE=$(SIZE)" >>$D/src/Config > echo "AR=$(AR)" >>$D/src/Config > echo "RANLIB=$(RANLIB)" >>$D/src/Config > echo "OBJCOPY=$(OBJCOPY)" >>$D/src/Config > echo "CFLAGS+=$(CFLAGS)" >>$D/src/Config > - echo "ASFLAGS+=$(CFLAGS)" >>$D/src/Config > + echo "ASFLAGS+=$(ASFLAGS)" >>$D/src/Config > echo "LDFLAGS+=$(LDFLAGS_DIRECT)" >>$D/src/Config > @ > set -e; cd $D/src/arch/i386; \ > @@ -53,7 +53,7 @@ eb-roms.h: eb-rom-list.h $(ROM_ZHS) > mv $D $E > > $E/src/bin/Roms: $E/src/Config > - $(MAKE) -C $E/src bin/Roms > + PATH=/usr/gnu/bin/:$(PATH) $(MAKE) -C $E/src bin/Roms > > clean: > rm -rf $D $E *.zrom.h eb-rom-list.h eb-roms.h *~ > diff --git a/tools/firmware/etherboot/make-eb-rom-list > b/tools/firmware/etherboot/make-eb-rom-list > --- a/tools/firmware/etherboot/make-eb-rom-list > +++ b/tools/firmware/etherboot/make-eb-rom-list > @@ -1,4 +1,4 @@ > -#!/bin/sh > +#!/bin/bash > set -e > roms=$1; shift > echo "/* autogenerated - do not edit */" > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-01 18:21 ` John Levon 2008-02-02 10:21 ` Keir Fraser @ 2008-02-04 10:24 ` Christoph Egger 2008-02-04 15:52 ` Ian Jackson 1 sibling, 1 reply; 11+ messages in thread From: Christoph Egger @ 2008-02-04 10:24 UTC (permalink / raw) To: xen-devel; +Cc: John Levon On Friday 01 February 2008 19:21:03 John Levon wrote: > On Fri, Feb 01, 2008 at 06:16:47PM +0000, John Levon wrote: > > With the patch below (at least some of the way), I just get: > > And the patch See the bottom of this mail for comment. > john > > diff --git a/config/StdGNU.mk b/config/StdGNU.mk > --- a/config/StdGNU.mk > +++ b/config/StdGNU.mk > @@ -12,6 +12,7 @@ SIZEUTIL = $(CROSS_COMPILE)size > > MSGFMT = msgfmt > MSGMERGE = msgmerge > +TAR = tar > > INSTALL = install > INSTALL_DIR = $(INSTALL) -d -m0755 -p > diff --git a/config/SunOS.mk b/config/SunOS.mk > --- a/config/SunOS.mk > +++ b/config/SunOS.mk > @@ -11,6 +11,7 @@ SIZEUTIL = $(CROSS_COMPILE)gsize > SIZEUTIL = $(CROSS_COMPILE)gsize > > MSGFMT = gmsgfmt > +TAR = gtar > > SHELL = bash > > diff --git a/tools/firmware/etherboot/Makefile > b/tools/firmware/etherboot/Makefile --- a/tools/firmware/etherboot/Makefile > +++ b/tools/firmware/etherboot/Makefile > @@ -21,14 +21,14 @@ eb-%.zrom.h: $E/src/Config > mv -f $@.new $@ > > eb-rom-list.h: make-eb-rom-list $E/src/bin/Roms > - ./$^ $(NICS) >$@.new && mv -f $@.new $@ > + PATH=/usr/gnu/bin/:$(PATH) ./$^ $(NICS) >$@.new && mv -f $@.new $@ > > eb-roms.h: eb-rom-list.h $(ROM_ZHS) > cat $^ >$@.new && mv -f $@.new $@ > > $E/src/Config: $T Config > rm -rf $D $E > - tar zxf $T > + $(TAR) zxf $T > cat Config >>$D/src/Config > @ > # override many of the settings in Config > @@ -36,14 +36,14 @@ eb-roms.h: eb-rom-list.h $(ROM_ZHS) > echo "HOST_CC=$(HOSTCC)" >>$D/src/Config > echo "CPP=$(CPP)" >>$D/src/Config > echo "CC=$(CC)" >>$D/src/Config > - echo "AS=$(CC) -c -x assembler -" >>$D/src/Config > + echo "AS=$(AS)" >>$D/src/Config > echo "LD=$(LD)" >>$D/src/Config > echo "SIZE=$(SIZE)" >>$D/src/Config > echo "AR=$(AR)" >>$D/src/Config > echo "RANLIB=$(RANLIB)" >>$D/src/Config > echo "OBJCOPY=$(OBJCOPY)" >>$D/src/Config > echo "CFLAGS+=$(CFLAGS)" >>$D/src/Config > - echo "ASFLAGS+=$(CFLAGS)" >>$D/src/Config > + echo "ASFLAGS+=$(ASFLAGS)" >>$D/src/Config > echo "LDFLAGS+=$(LDFLAGS_DIRECT)" >>$D/src/Config > @ > set -e; cd $D/src/arch/i386; \ > @@ -53,7 +53,7 @@ eb-roms.h: eb-rom-list.h $(ROM_ZHS) > mv $D $E > > $E/src/bin/Roms: $E/src/Config > - $(MAKE) -C $E/src bin/Roms > + PATH=/usr/gnu/bin/:$(PATH) $(MAKE) -C $E/src bin/Roms > > clean: > rm -rf $D $E *.zrom.h eb-rom-list.h eb-roms.h *~ > diff --git a/tools/firmware/etherboot/make-eb-rom-list > b/tools/firmware/etherboot/make-eb-rom-list --- > a/tools/firmware/etherboot/make-eb-rom-list > +++ b/tools/firmware/etherboot/make-eb-rom-list > @@ -1,4 +1,4 @@ > -#!/bin/sh > +#!/bin/bash > set -e > roms=$1; shift > echo "/* autogenerated - do not edit */" This is not ok for *BSD. bash is a third-party package there. Christoph -- AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-04 10:24 ` Christoph Egger @ 2008-02-04 15:52 ` Ian Jackson 2008-02-04 16:18 ` Christoph Egger 2008-02-04 17:03 ` John Levon 0 siblings, 2 replies; 11+ messages in thread From: Ian Jackson @ 2008-02-04 15:52 UTC (permalink / raw) To: Christoph Egger; +Cc: xen-devel, John Levon Christoph Egger writes ("Re: [Xen-devel] getting etherboot compiling"): > This is not ok for *BSD. bash is a third-party package there. I think this is OK in a tool needed for building, surely ? After all you need GCC to build Xen and that's a third-party package in *BSD too. However, it's a very simple script and I can't see anything in it which ought not to work (ie, I think it uses only features in SuSv3). What is the problem that means Solaris /bin/sh doesn't work ? Ian. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-04 15:52 ` Ian Jackson @ 2008-02-04 16:18 ` Christoph Egger 2008-02-04 17:03 ` John Levon 1 sibling, 0 replies; 11+ messages in thread From: Christoph Egger @ 2008-02-04 16:18 UTC (permalink / raw) To: Ian Jackson; +Cc: xen-devel, John Levon On Monday 04 February 2008 16:52:56 Ian Jackson wrote: > Christoph Egger writes ("Re: [Xen-devel] getting etherboot compiling"): > > This is not ok for *BSD. bash is a third-party package there. > > I think this is OK in a tool needed for building, surely ? After all > you need GCC to build Xen and that's a third-party package in *BSD > too. GCC is in the base system. Install a BSD and have a look. > However, it's a very simple script and I can't see anything in it > which ought not to work (ie, I think it uses only features in SuSv3). > What is the problem that means Solaris /bin/sh doesn't work ? Neither do I. It works with *BSD's /bin/sh. However, Solaris /bin/sh is a much older bourne shell than on BSD. Christoph ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-04 15:52 ` Ian Jackson 2008-02-04 16:18 ` Christoph Egger @ 2008-02-04 17:03 ` John Levon 2008-02-04 17:07 ` Ian Jackson 1 sibling, 1 reply; 11+ messages in thread From: John Levon @ 2008-02-04 17:03 UTC (permalink / raw) To: Ian Jackson; +Cc: Christoph Egger, xen-devel On Mon, Feb 04, 2008 at 03:52:56PM +0000, Ian Jackson wrote: > Christoph Egger writes ("Re: [Xen-devel] getting etherboot compiling"): > > This is not ok for *BSD. bash is a third-party package there. > > I think this is OK in a tool needed for building, surely ? After all > you need GCC to build Xen and that's a third-party package in *BSD > too. > > However, it's a very simple script and I can't see anything in it > which ought not to work (ie, I think it uses only features in SuSv3). > What is the problem that means Solaris /bin/sh doesn't work ? It's the variable substitution command, not understand by the 'real' Bourne shell regards john ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-04 17:03 ` John Levon @ 2008-02-04 17:07 ` Ian Jackson 2008-02-04 17:14 ` John Levon 0 siblings, 1 reply; 11+ messages in thread From: Ian Jackson @ 2008-02-04 17:07 UTC (permalink / raw) To: John Levon; +Cc: Christoph Egger, xen-devel John Levon writes ("Re: [Xen-devel] getting etherboot compiling"): > It's the variable substitution command, not understand by the 'real' > Bourne shell You mean the ${...#...} construction in this line echo " ETHERBOOT_ROM($nic,${makerom#*-p}) \\" ? This is specified in SuSv3 `Shell Command Language' section 2.6.2 `Parameter Expansion', final part of the normative text. Ian. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-04 17:07 ` Ian Jackson @ 2008-02-04 17:14 ` John Levon 2008-02-04 17:25 ` Ian Jackson 0 siblings, 1 reply; 11+ messages in thread From: John Levon @ 2008-02-04 17:14 UTC (permalink / raw) To: Ian Jackson; +Cc: Christoph Egger, xen-devel On Mon, Feb 04, 2008 at 05:07:19PM +0000, Ian Jackson wrote: > John Levon writes ("Re: [Xen-devel] getting etherboot compiling"): > > It's the variable substitution command, not understand by the 'real' > > Bourne shell > > You mean the ${...#...} construction in this line > echo " ETHERBOOT_ROM($nic,${makerom#*-p}) \\" > ? Yep. > This is specified in SuSv3 `Shell Command Language' section 2.6.2 > `Parameter Expansion', final part of the normative text. Original Bourne shell isn't SuSv3 (would be hard for that to be true :) Such standards allow a system to provide a way of choosing to opt into them. On Solaris, that involves fiddling with the path to pick the standard variants (adding /usr/xpg4/bin would do it I think). This was because SuS and other standards are incompatible with various bits of historical behaviour. regards john ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-04 17:14 ` John Levon @ 2008-02-04 17:25 ` Ian Jackson 2008-02-05 15:42 ` John Levon 0 siblings, 1 reply; 11+ messages in thread From: Ian Jackson @ 2008-02-04 17:25 UTC (permalink / raw) To: John Levon; +Cc: Christoph Egger, xen-devel John Levon writes ("Re: [Xen-devel] getting etherboot compiling"): > Such standards allow a system to provide a way of choosing to opt into > them. On Solaris, that involves fiddling with the path to pick the > standard variants (adding /usr/xpg4/bin would do it I think). This was > because SuS and other standards are incompatible with various bits of > historical behaviour. Well I think putting #!/usr/xpg4/bin/sh at the top of this script would work even less well. Is there an Official Sun Answer to what #! line should be put at the top of a portable SuSv3 shell script ? As far as I can tell everyone else uses #!/bin/sh for this. As I say, you don't need to run it now anyway (since Keir has checked in the generated roms.h). Even so, if we have to break someone's attempts to build after hacking the roms, I'd rather break on where /bin/sh is prehistoric, which seems like an actual bug, rather than systems which don't have bash or maybe lack /bin/bash as a symlink. Ian. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: getting etherboot compiling 2008-02-04 17:25 ` Ian Jackson @ 2008-02-05 15:42 ` John Levon 0 siblings, 0 replies; 11+ messages in thread From: John Levon @ 2008-02-05 15:42 UTC (permalink / raw) To: Ian Jackson; +Cc: Christoph Egger, xen-devel On Mon, Feb 04, 2008 at 05:25:53PM +0000, Ian Jackson wrote: > John Levon writes ("Re: [Xen-devel] getting etherboot compiling"): > > Such standards allow a system to provide a way of choosing to opt into > > them. On Solaris, that involves fiddling with the path to pick the > > standard variants (adding /usr/xpg4/bin would do it I think). This was > > because SuS and other standards are incompatible with various bits of > > historical behaviour. > > Well I think putting #!/usr/xpg4/bin/sh at the top of this script > would work even less well. Indeed. > Is there an Official Sun Answer to what #! > line should be put at the top of a portable SuSv3 shell script? Not really. "/usr/bin/env sh" would be closest I suppose, assuming you've set up your environment as in standards(5) (that is, set PATH appropriately). > As far as I can tell everyone else uses #!/bin/sh for this. This is rarely true. Most commonly, this means "something that's kind of like the Bourne shell, but definitely not the Korn or C shell", and often "I actually mean bash". > As I say, you don't need to run it now anyway (since Keir has checked > in the generated roms.h). Even so, if we have to break someone's > attempts to build after hacking the roms, I'd rather break on where > /bin/sh is prehistoric, which seems like an actual bug, rather than > systems which don't have bash or maybe lack /bin/bash as a symlink. Agreed. regards, john ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-02-05 15:42 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-02-01 18:16 getting etherboot compiling John Levon 2008-02-01 18:21 ` John Levon 2008-02-02 10:21 ` Keir Fraser 2008-02-04 10:24 ` Christoph Egger 2008-02-04 15:52 ` Ian Jackson 2008-02-04 16:18 ` Christoph Egger 2008-02-04 17:03 ` John Levon 2008-02-04 17:07 ` Ian Jackson 2008-02-04 17:14 ` John Levon 2008-02-04 17:25 ` Ian Jackson 2008-02-05 15:42 ` John Levon
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.