Re: [SeaBIOS] iasl-option not working
On Wed, Aug 29, 2012 at 09:38:00PM -0400, Kevin O'Connor wrote: > Hi Michael, > > I was running through the SeaBIOS release checks when I found that the > new iasl-option code in the Makefile seems to choke on older versions > of iasl (for example, version 20120123 as shipped with fc13). Can you > verify if the iasl detection still works properly for you with the > patch below? > > -Kevin So I think using -h is a bad idea: it failed once it might fail again. How about the following patch instead? Tested with latest iasl from git (which needs -Pn) and with F17 version (which does not). --> Makefile: fix iasl option detection IASL option detection relied on iasl -h exit status which is not very robust: -h is not expected to be used from scripts. In particular combination of -h with any option seems to succeed with some old versions of iasl (e.g. version 20120123 as shipped with fc13). Instead, supply a dummy input file and run iasl on it to test option support. Signed-off-by: Michael S. Tsirkin --- diff --git a/Makefile b/Makefile index 72ee152..0ab9f9f 100644 --- a/Makefile +++ b/Makefile @@ -221,14 +221,15 @@ $(OUT)vgabios.bin: $(OUT)vgabios.bin.raw tools/buildrom.py DSDT build rules -iasl-option=$(shell if "$(1)" "$(2)" -h > /dev/null 2>&1 \ -; then echo "$(2)"; else echo "$(3)"; fi ;) +iasl-option=$(shell cp src/iasl-test.dsl $(1)/iasl-test.dsl; \ +if "$(2)" "$(3)" $(1)/iasl-test.dsl > /dev/null 2>&1 \ +; then echo "$(3)"; else echo "$(4)"; fi ;) $(OUT)%.hex: src/%.dsl ./tools/acpi_extract_preprocess.py ./tools/acpi_extract.py @echo " Compiling IASL $@" $(Q)cpp -P $< > $(OUT)$*.dsl.i.orig $(Q)$(PYTHON) ./tools/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > $(OUT)$*.dsl.i - $(Q)$(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i + $(Q)$(IASL) $(call iasl-option,$(OUT),$(IASL),-Pn,) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i $(Q)$(PYTHON) ./tools/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off $(Q)cat $(OUT)$*.off > $@ diff --git a/src/iasl-test.dsl b/src/iasl-test.dsl index e69de29..1a8b95e 100644 --- a/src/iasl-test.dsl +++ b/src/iasl-test.dsl @@ -0,0 +1,6 @@ +DefinitionBlock ("iasl-test.aml", "TEST", 0x01, "TSTC", "TESTIASLCMP", 0x1) +{ + +Device (TEST) { +} +} ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] iasl-option not working
On Thu, Aug 30, 2012 at 12:38:34PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 29, 2012 at 09:38:00PM -0400, Kevin O'Connor wrote: > > Hi Michael, > > > > I was running through the SeaBIOS release checks when I found that the > > new iasl-option code in the Makefile seems to choke on older versions > > of iasl (for example, version 20120123 as shipped with fc13). Can you > > verify if the iasl detection still works properly for you with the > > patch below? > > > > -Kevin > > So I think using -h is a bad idea: it failed once > it might fail again. > How about the following patch instead? > Tested with latest iasl from git (which needs -Pn) > and with F17 version (which does not). > Scratch that, creating a temporary file without a makefile rule will break parallel build. Here's a version that has a proper rule. --> Makefile: fix iasl option detection IASL option detection relied on iasl -h exit status which is not very robust: -h is not expected to be used from scripts. In particular combination of -h with any option seems to succeed with some old versions of iasl (e.g. version 20120123 as shipped with fc13). Instead, supply a dummy input file and run iasl on it to test option support. Signed-off-by: Michael S. Tsirkin --- diff --git a/Makefile b/Makefile index 72ee152..33b3e69 100644 --- a/Makefile +++ b/Makefile @@ -221,14 +221,17 @@ $(OUT)vgabios.bin: $(OUT)vgabios.bin.raw tools/buildrom.py DSDT build rules -iasl-option=$(shell if "$(1)" "$(2)" -h > /dev/null 2>&1 \ -; then echo "$(2)"; else echo "$(3)"; fi ;) +iasl-option=$(shell if "$(2)" "$(3)" "$(1)" > /dev/null 2>&1 \ +; then echo "$(3)"; else echo "$(4)"; fi ;) + +$(OUT)/iasl-test.dsl: src/iasl-test.dsl + $(Q)cp -f $< $@ -$(OUT)%.hex: src/%.dsl ./tools/acpi_extract_preprocess.py ./tools/acpi_extract.py +$(OUT)%.hex: src/%.dsl ./tools/acpi_extract_preprocess.py ./tools/acpi_extract.py $(OUT)/iasl-test.dsl @echo " Compiling IASL $@" $(Q)cpp -P $< > $(OUT)$*.dsl.i.orig $(Q)$(PYTHON) ./tools/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > $(OUT)$*.dsl.i - $(Q)$(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i + $(Q)$(IASL) $(call iasl-option,$(OUT)/iasl-test.dsl,$(IASL),-Pn,) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i $(Q)$(PYTHON) ./tools/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off $(Q)cat $(OUT)$*.off > $@ diff --git a/src/iasl-test.dsl b/src/iasl-test.dsl index e69de29..1a8b95e 100644 --- a/src/iasl-test.dsl +++ b/src/iasl-test.dsl @@ -0,0 +1,6 @@ +DefinitionBlock ("iasl-test.aml", "TEST", 0x01, "TSTC", "TESTIASLCMP", 0x1) +{ + +Device (TEST) { +} +} ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH] Makefile: delete output on error
I had a disk full condition and a partial hex file got generated. Following make failed trying to use it. We can make build a bit more robust by instructing make to remove output files on error. Signed-off-by: Michael S. Tsirkin --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 33b3e69..e5e2735 100644 --- a/Makefile +++ b/Makefile @@ -75,6 +75,7 @@ all: $(target-y) # Make definitions .PHONY : all clean distclean FORCE +.DELETE_ON_ERROR: vpath %.c src vgasrc vpath %.S src vgasrc -- MST ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] What do I pass to cbfs_run_payload() after finding the payload with romfile_find() ?
> Subject: Re: [SeaBIOS] What do I pass to cbfs_run_payload() after finding the > payload with romfile_find() ? > > On Wed, Aug 29, 2012 at 02:06:03PM -0500, Dave Frodin wrote: > [...] > > This is where I'm at after the change ... > > > > // Output the LCD splash image to the Explorer board > > struct romfile_s *file; > > dprintf(1,"Looking for Explorer LCD splash payload ... "); > > file = romfile_find("img/explorer-splash"); > > if(file) > > { > > dprintf(1," found file [%s]. Loading it...\n ",file->name); <=== > > everything works up to here > > // cbfs_run_payload(); > > } > > else dprintf(1,"could NOT find it!\n"); > > > > The cbfs_run_payload is expecting (cbfs_file *). How do I extract > > what cbfs_run_payload() wants from what > > I got back from romfile_find() ? > > cbfs_run_payload((void*)file->id); > > -Kevin > Kevin, Well that was easy enough. Thanks, again Dave ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] Bootorder file question regarding USB hubs/devices
Previously (before fetching the latest seabios/master) our bootorder file looked like this /pci@i0cf8/usb@12,2/*@4 /pci@i0cf8/usb@12,2/*@5 /pci@i0cf8/usb@12,2/*@3 /pci@i0cf8/usb@12,2/*@2 /pci@i0cf8/usb@12,2/*@1 /pci@i0cf8/usb@12,2/*@0 Now it looks like this. This also includes devices plugged into hubs on two of the ports. (Thank you to whoever got hubs working) /pci@i0cf8/usb@12,2/storage@5/*@0/*@0,0 /pci@i0cf8/usb@12,2/storage@4/*@0/*@0,0 /pci@i0cf8/usb@12,2/storage@3/*@0/*@0,0 /pci@i0cf8/usb@12,2/storage@2/*@0/*@0,0 /pci@i0cf8/usb@12,2/storage@1/*@0/*@0,0 /pci@i0cf8/usb@12,2/storage@0/*@0/*@0,0 /pci@i0cf8/usb@12,2/hub@4/storage@1/*@0/*@0,0 /pci@i0cf8/usb@12,2/hub@4/storage@2/*@0/*@0,0 /pci@i0cf8/usb@12,2/hub@4/storage@3/*@0/*@0,0 /pci@i0cf8/usb@12,2/hub@4/storage@4/*@0/*@0,0 /pci@i0cf8/usb@12,2/hub@1/storage@1/*@0/*@0,0 /pci@i0cf8/usb@12,2/hub@1/storage@2/*@0/*@0,0 /pci@i0cf8/usb@12,2/hub@1/storage@3/*@0/*@0,0 /pci@i0cf8/usb@12,2/hub@1/storage@4/*@0/*@0,0 Is there an easier/generic way to condense this down? Is there any kind of wildcard support when it comes to adding any USB device? Thanks in advance, Dave ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: delete output on error
"Michael S. Tsirkin" writes: > I had a disk full condition and a partial hex file > got generated. Following make failed trying to use it. > We can make build a bit more robust by instructing > make to remove output files on error. > > Signed-off-by: Michael S. Tsirkin > --- > Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Makefile b/Makefile > index 33b3e69..e5e2735 100644 > --- a/Makefile > +++ b/Makefile > @@ -75,6 +75,7 @@ all: $(target-y) > > # Make definitions > .PHONY : all clean distclean FORCE > +.DELETE_ON_ERROR: > > vpath %.c src vgasrc > vpath %.S src vgasrc Every Makefile should have this. Reviewed-by: Markus Armbruster ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios