[coreboot-gerrit] New patch to review for coreboot: payloads/external/OpenBIOS: Add OpenBIOS as a payload option.
David Griffith (dave@661.org)
gerrit at coreboot.org
Fri May 20 09:23:30 CEST 2016
David Griffith (dave at 661.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14923
-gerrit
commit a53063f7197940cb3a7340f472906ab7f36c3cc5
Author: David Griffith <dave at 661.org>
Date: Fri May 20 00:19:16 2016 -0700
payloads/external/OpenBIOS: Add OpenBIOS as a payload option.
Downloads OpenBIOS git repo from https://github.com/openbios/openbios
Code shamelessly copied from payloads/external/SeaBIOS.
Change-Id: I1187fa7e3853c3538e92fa7d9c01eea33dd16eaf
Signed-off-by: David Griffith <dave at 661.org>
---
payloads/external/Makefile.inc | 9 ++++++
payloads/external/OpenBIOS/Kconfig | 36 +++++++++++++++++++++
payloads/external/OpenBIOS/Kconfig.name | 13 ++++++++
payloads/external/OpenBIOS/Makefile | 57 +++++++++++++++++++++++++++++++++
4 files changed, 115 insertions(+)
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index 65b3dd2..79fec14 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -85,6 +85,15 @@ payloads/external/SeaBIOS/seabios/out/vgabios.bin: seabios
payloads/external/SeaBIOS/seabios/.config: payloads/external/SeaBIOS/seabios/out/bios.bin.elf
payloads/external/SeaBIOS/seabios/out/autoversion.h: payloads/external/SeaBIOS/seabios/out/bios.bin.elf
+payloads/external/OpenBIOS/openbios/obj-x86/openbios-builtin.elf openbios:
+ $(MAKE) -C payloads/external/OpenBIOS all \
+ HOSTCC="$(HOSTCC)" \
+ CONFIG_OPENBIOS_DEVEL=$(CONFIG_OPENBIOS_MASTER) \
+ CONFIG_OPENBIOS_STABLE=$(CONFIG_OPENBIOS_STABLE) \
+ CONFIG_OPENBIOS_REVISION=$(CONFIG_OPENBIOS_REVISION) \
+ CONFIG_OPENBIOS_REVISION_ID=$(CONFIG_OPENBIOS_REVISION_ID) \
+ MFLAGS= MAKEFLAGS=
+
payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(top)/$(DOTCONFIG) $(CBFSTOOL)
$(MAKE) -C payloads/external/depthcharge \
BOARD=$(call ws_to_under,$(call strip_quotes,$(call tolower,$(CONFIG_MAINBOARD_PART_NUMBER)))) \
diff --git a/payloads/external/OpenBIOS/Kconfig b/payloads/external/OpenBIOS/Kconfig
new file mode 100644
index 0000000..e65c06b
--- /dev/null
+++ b/payloads/external/OpenBIOS/Kconfig
@@ -0,0 +1,36 @@
+if PAYLOAD_OPENBIOS
+
+choice
+ prompt "OpenBIOS version"
+ default OPENBIOS_STABLE
+
+config OPENBIOS_STABLE
+ bool "v1.1"
+ help
+ Stable OpenBIOS version
+
+config OPENBIOS_MASTER
+ bool "master"
+ help
+ Newest OpenBIOS version
+
+config OPENBIOS_REVISION
+ bool "git revision"
+ help
+ Select this option if you have a specific commit that you
+ want to use as the revision from which to build OpenBIOS.
+
+ You will be able to specify the name of a branch or a commit id later.
+endchoice
+
+config OPENBIOS_REVISION_ID
+ string "Insert a commit's ID SHA-1 or branch name"
+ depends on OPENBIOS_REVISION
+ default "origin/master"
+ help
+ The commit's SHA-1 or branch name of the revision to use.
+
+config PAYLOAD_FILE
+ default "payloads/external/OpenBIOS/openbios/obj-x86/openbios-builtin.elf"
+
+endif
diff --git a/payloads/external/OpenBIOS/Kconfig.name b/payloads/external/OpenBIOS/Kconfig.name
new file mode 100644
index 0000000..0bc9a23
--- /dev/null
+++ b/payloads/external/OpenBIOS/Kconfig.name
@@ -0,0 +1,13 @@
+config PAYLOAD_OPENBIOS
+ bool "OpenBIOS"
+ depends on ARCH_X86
+ help
+ Select this option if you want to build a coreboot image
+ with an OpenBIOS payload. If you don't know what this is
+ about, just leave it disabled.
+
+ OpenBIOS is a free, portable implementation of IEEE 1275-1994
+ (Open Firmware). Find detailed information about OpenBIOS at
+ http://www.openbios.org/
+
+ See http://coreboot.org/Payloads for more information.
diff --git a/payloads/external/OpenBIOS/Makefile b/payloads/external/OpenBIOS/Makefile
new file mode 100644
index 0000000..7df300e
--- /dev/null
+++ b/payloads/external/OpenBIOS/Makefile
@@ -0,0 +1,57 @@
+TAG-$(CONFIG_OPENBIOS_MASTER)=origin/master
+TAG-$(CONFIG_OPENBIOS_STABLE)=v1.1
+TAG-$(CONFIG_OPENBIOS_REVISION)=$(CONFIG_OPENBIOS_REVISION_ID)
+
+project_git_repo=https://github.com/openbios/openbios.git
+project_dir=openbios
+
+unexport KCONFIG_AUTOHEADER
+unexport KCONFIG_AUTOCONFIG
+unexport KCONFIG_DEPENDENCIES
+unexport KCONFIG_SPLITCONFIG
+unexport KCONFIG_TRISTATE
+unexport KCONFIG_NEGATIVES
+
+all: build
+
+openbios:
+ echo " Checking out OpenBIOS from Git"
+ git clone $(project_git_repo) $(project_dir)
+
+fetch: openbios
+ifeq ($(TAG-y),)
+ echo "Error: The specified tag \"$(TAG-y)\" is invalid"
+ifeq ($(CONFIG_OPENBIOS_REVISION),y)
+ echo "Error: There is no revision specified for OpenBIOS"
+ false
+endif
+ false
+endif
+ cd $(project_dir); git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ] || \
+ [ "$(TAG-y)" = "origin/master" ]; then \
+ echo " Fetching new commits from the OpenBIOS git repo"; \
+ git fetch; fi
+
+checkout: fetch
+ echo " Checking out OpenBIOS revision $(TAG-y)"
+ cd $(project_dir); git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
+
+config: checkout
+ echo " CONFIG OpenBIOS $(TAG-y)"
+ echo "CONFIG_COREBOOT=y" > $(project_dir)/.config
+
+build: config
+ echo " MAKE OpenBIOS $(TAG-y)"
+ cd $(project_dir); ./config/scripts/switch-arch x86
+ cd $(project_dir); $(MAKE)
+
+clean:
+ test -d $(project_dir)/out && rm -rf $(project_dir)/out || exit 0
+
+distclean:
+ rm -rf $(project_dir)
+
+print-repo-info:
+ echo "$(project_git_repo) $(project_dir)"
+
+.PHONY: checkout config build clean distclean clone fetch print-repo-info
More information about the coreboot-gerrit
mailing list