[coreboot-gerrit] Change in coreboot[master]: Makefile.inc: Use perl to generate ps2-keyboard-spinup-file

Arthur Heymans (Code Review) gerrit at coreboot.org
Tue Apr 4 13:43:36 CEST 2017


Arthur Heymans has uploaded a new change for review. ( https://review.coreboot.org/19108 )

Change subject: Makefile.inc: Use perl to generate ps2-keyboard-spinup-file
......................................................................

Makefile.inc: Use perl to generate ps2-keyboard-spinup-file

This file, used to define a timeout for seabios for the PS2 keyboard
to come up, is generated using cbfstool add-int. The problem with this
is that it conflicts when an image gets updated. A workaround was to
not update that file when updating an image.

When using perl to generate the file its always gets created and
updated.

Change-Id: I46b393c805cc62259ce0f99a8946e98f5378dc41
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M Makefile.inc
1 file changed, 13 insertions(+), 8 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/19108/1

diff --git a/Makefile.inc b/Makefile.inc
index 5ab3524..80ef739 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -877,20 +877,25 @@
 	$(RMODTOOL) -i $(CONFIG_REFCODE_BLOB_FILE) -o $@
 endif
 
+ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),)
+ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),0)
+ifneq ($(CONFIG_UPDATE_IMAGE),y)
+$(obj)/ps2-keyboard-spinup: $(DOTCONFIG)
+	@printf "    SeaBIOS    Wait up to $(CONFIG_SEABIOS_PS2_TIMEOUT) ms for PS/2 keyboard controller initialization\n"
+	perl -e "print pack('Q<', $(CONFIG_SEABIOS_PS2_TIMEOUT))" > $@
+cbfs-files-y +=  etc/ps2-keyboard-spinup
+etc/ps2-keyboard-spinup-file := $(obj)/ps2-keyboard-spinup
+etc/ps2-keyboard-spinup-type := raw
+endif
+endif
+endif
+
 $(obj)/coreboot.rom: $(obj)/coreboot.pre $(objcbfs)/ramstage.elf $(CBFSTOOL) $$(INTERMEDIATE)
 	@printf "    CBFS       $(subst $(obj)/,,$(@))\n"
 # The full ROM may be larger than the CBFS part, so create an empty
 # file (filled with \377 = 0xff) and copy the CBFS image over it.
 	dd if=/dev/zero bs=$(call _toint,$(CONFIG_ROM_SIZE)) count=1 2> /dev/null | tr '\000' '\377' > $@.tmp
 	dd if=$(obj)/coreboot.pre of=$@.tmp bs=8192 conv=notrunc 2> /dev/null
-ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),)
-ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),0)
-ifneq ($(CONFIG_UPDATE_IMAGE),y)
-	@printf "    SeaBIOS    Wait up to $(CONFIG_SEABIOS_PS2_TIMEOUT) ms for PS/2 keyboard controller initialization\n"
-	$(CBFSTOOL) $@.tmp add-int -i $(CONFIG_SEABIOS_PS2_TIMEOUT) -n etc/ps2-keyboard-spinup
-endif
-endif
-endif
 ifeq ($(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE),y)
 ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER),y)
 	@printf "    UPDATE-FIT\n"

-- 
To view, visit https://review.coreboot.org/19108
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46b393c805cc62259ce0f99a8946e98f5378dc41
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>



More information about the coreboot-gerrit mailing list