Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/20782
Change subject: payloads/external/iPXE: Add more Kconfig options
......................................................................
payloads/external/iPXE: Add more Kconfig options
Add two now options:
* Disable the promt "Press Ctrl+B for the iPXE command line..."
Add a boolean that disable the initial 2 second timeout.
* Include a script that is executed instead of showing a shell
Allows to add a script that will be included into the iPXE ROM.
Tested on Lenovo T500.
Change-Id: Ie1083d8571d9d1f1c7c71659fb6ff0de2eecad0e
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
M payloads/external/Makefile.inc
M payloads/external/iPXE/Kconfig
M payloads/external/iPXE/Makefile
3 files changed, 58 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/20782/1
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index 6bc1651..d47256e 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -191,7 +191,9 @@
ifeq ($(CONFIG_BUILD_IPXE),y)
PXE_ROM_FILE:=payloads/external/iPXE/ipxe/ipxe.rom
endif
-
+ifeq ($(CONFIG_PXE_ADD_SCRIPT),y)
+PXE_CONFIG_SCRIPT:=$(abspath $(patsubst "%",%,$(CONFIG_PXE_SCRIPT)))
+endif
ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
IPXE_UART=COM$(call int-add,$(CONFIG_UART_FOR_CONSOLE) 1)
endif
@@ -200,7 +202,7 @@
pci$(CONFIG_PXE_ROM_ID).rom-file := $(PXE_ROM_FILE)
pci$(CONFIG_PXE_ROM_ID).rom-type := raw
-payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG)
+payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG) $(PXE_CONFIG_SCRIPT)
$(MAKE) -C payloads/external/iPXE all \
CROSS_COMPILE="$(CROSS_COMPILE_$(ARCH-ramstage-y))" \
PXE_ROM_PCI_ID=$(PXE_ROM_PCI_ID) \
@@ -209,4 +211,7 @@
CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO) \
IPXE_UART=$(IPXE_UART) \
CONFIG_TTYS0_BAUD=$(CONFIG_TTYS0_BAUD) \
+ CONFIG_SCRIPT=$(PXE_CONFIG_SCRIPT) \
+ CONFIG_HAS_SCRIPT=$(CONFIG_PXE_ADD_SCRIPT) \
+ CONFIG_PXE_NO_PROMT=$(CONFIG_PXE_NO_PROMT) \
MFLAGS= MAKEFLAGS=
diff --git a/payloads/external/iPXE/Kconfig b/payloads/external/iPXE/Kconfig
index 8211410..e17e731 100644
--- a/payloads/external/iPXE/Kconfig
+++ b/payloads/external/iPXE/Kconfig
@@ -78,5 +78,32 @@
Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
+config PXE_NO_PROMT
+ bool "Do not show prompt to boot from PXE"
+ default n
+ depends on BUILD_IPXE
+ help
+ Dont wait for the user to press Ctrl-B.
+ The PXE still can be run as it shows up in SeaBIOS's payload list.
+
+config PXE_ADD_SCRIPT
+ bool "Embedded iPXE script for automated provisioning"
+ depends on BUILD_IPXE
+ default n
+ help
+ Enable to embed a script that is run instead of a iPXE shell.
+
+
+config PXE_SCRIPT
+ string "Embedded iPXE script for automated provisioning"
+ depends on PXE_ADD_SCRIPT
+ default ""
+ help
+ Path to a script that is embedded into the iPXE binary.
+ Example: startup.ipxe
+
+ Uses the ipxe script instead showing the promt:
+ "Press Ctrl-B to start iPXE..."
+
endmenu
endif
diff --git a/payloads/external/iPXE/Makefile b/payloads/external/iPXE/Makefile
index a8b1245..b4b7dbe 100644
--- a/payloads/external/iPXE/Makefile
+++ b/payloads/external/iPXE/Makefile
@@ -54,15 +54,38 @@
sed 's|#define\s*COMCONSOLE.*|#define COMCONSOLE $(IPXE_UART)|' "$(project_dir)/src/config/serial.h" > "$(project_dir)/src/config/serial.h.tmp"
sed 's|#define\s*COMSPEED.*|#define COMSPEED $(CONFIG_TTYS0_BAUD)|' "$(project_dir)/src/config/serial.h.tmp" > "$(project_dir)/src/config/serial.h"
endif
+ifeq ($(CONFIG_HAS_SCRIPT),$(CONFIG_PXE_NO_PROMT),y)
+ cp "$(project_dir)/src/config/general.h" "$(project_dir)/src/config/general.h.cb"
+endif
+ifeq ($(CONFIG_HAS_SCRIPT),y)
+ sed 's|//#define\s*IMAGE_SCRIPT.*|#define IMAGE_SCRIPT|' "$(project_dir)/src/config/general.h" > "$(project_dir)/src/config/general.h.tmp"
+ mv "$(project_dir)/src/config/general.h.tmp" "$(project_dir)/src/config/general.h"
+endif
+ifeq ($(CONFIG_PXE_NO_PROMT),y)
+ sed 's|#define\s*BANNER_TIMEOUT.*|#define BANNER_TIMEOUT 0|' "$(project_dir)/src/config/general.h" > "$(project_dir)/src/config/general.h.tmp"
+ mv "$(project_dir)/src/config/general.h.tmp" "$(project_dir)/src/config/general.h"
+endif
-build: config
+build: config $(CONFIG_SCRIPT)
+ifeq ($(CONFIG_HAS_SCRIPT),y)
+ echo " MAKE $(project_name) $(TAG-y) EMBED=$(CONFIG_SCRIPT)"
+ $(MAKE) -C $(project_dir)/src bin/$(PXE_ROM_PCI_ID).rom EMBED=$(CONFIG_SCRIPT)
+else
echo " MAKE $(project_name) $(TAG-y)"
$(MAKE) -C $(project_dir)/src bin/$(PXE_ROM_PCI_ID).rom
+endif
cp $(project_dir)/src/bin/$(PXE_ROM_PCI_ID).rom $(project_dir)/ipxe.rom
ifeq ($(CONSOLE_SERIAL),yy)
cp "$(project_dir)/src/config/console.h.cb" "$(project_dir)/src/config/console.h"
cp "$(project_dir)/src/config/serial.h.cb" "$(project_dir)/src/config/serial.h"
endif
+ifeq ($(CONFIG_HAS_SCRIPT),y)
+ cp "$(project_dir)/src/config/general.h.cb" "$(project_dir)/src/config/general.h"
+endif
+ifeq ($(CONFIG_PXE_NO_PROMT),y)
+ cp "$(project_dir)/src/config/general.h.cb" "$(project_dir)/src/config/general.h"
+endif
+
clean:
test -d $(project_dir) && $(MAKE) -C $(project_dir)/src veryclean || exit 0
--
To view, visit https://review.coreboot.org/20782
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1083d8571d9d1f1c7c71659fb6ff0de2eecad0e
Gerrit-Change-Number: 20782
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro(a)das-labor.org>
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/20781
Change subject: util/gitconfig: update pre-commit script
......................................................................
util/gitconfig: update pre-commit script
The previous pre-commit script generates an error when a commit doesn't
actually generate a patch file. This happens in rare instances when the
only change in a patch is to update file permissions.
Update the pre-commit script to verify that there's actually a patch
before calling checkpatch. Also print that we're running checkpatch
so that it doesn't look like odd failures come from lint-stable.
Fixes Bug #132 - Problem with `lint-stable` when changing mode of file
Change-Id: I142610b6fc984b2b14fd6c634bc4e7f2880ba987
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
M util/gitconfig/pre-commit
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/20781/1
diff --git a/util/gitconfig/pre-commit b/util/gitconfig/pre-commit
index 70cd6ea..257f696 100755
--- a/util/gitconfig/pre-commit
+++ b/util/gitconfig/pre-commit
@@ -1,3 +1,9 @@
#!/bin/sh
%MAKE% lint-stable
-git diff --cached | util/lint/checkpatch.pl --no-signoff -q -
+
+PATCHDIFF=$(git diff --cached)
+if echo "$PATCHDIFF" | grep -q "@@"; then
+ echo
+ echo "Running checkpatch"
+ echo "$PATCHDIFF" | util/lint/checkpatch.pl --no-signoff -q -
+fi
--
To view, visit https://review.coreboot.org/20781
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I142610b6fc984b2b14fd6c634bc4e7f2880ba987
Gerrit-Change-Number: 20781
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>