2011-01-25 20:27:23 +01:00
|
|
|
TAG-$(CONFIG_SEABIOS_MASTER)=origin/master
|
2016-03-07 20:38:55 +01:00
|
|
|
TAG-$(CONFIG_SEABIOS_STABLE)=b3ef39f532db52bf17457ba931da758eeb38d6b4
|
2016-03-08 00:56:57 +01:00
|
|
|
TAG-$(CONFIG_SEABIOS_REVISION)=$(CONFIG_SEABIOS_REVISION_ID)
|
2010-12-30 18:39:50 +01:00
|
|
|
|
2016-06-16 01:17:21 +02:00
|
|
|
project_git_repo=https://review.coreboot.org/p/seabios.git
|
2016-03-16 19:42:05 +01:00
|
|
|
project_dir=seabios
|
|
|
|
|
2014-05-09 20:41:01 +02:00
|
|
|
unexport KCONFIG_AUTOHEADER
|
2011-02-07 21:16:40 +01:00
|
|
|
unexport KCONFIG_AUTOCONFIG
|
2014-05-09 20:41:01 +02:00
|
|
|
unexport KCONFIG_DEPENDENCIES
|
|
|
|
unexport KCONFIG_SPLITCONFIG
|
|
|
|
unexport KCONFIG_TRISTATE
|
|
|
|
unexport KCONFIG_NEGATIVES
|
2010-12-30 18:39:50 +01:00
|
|
|
|
2011-06-07 15:03:14 +02:00
|
|
|
all: build
|
2010-12-30 18:39:50 +01:00
|
|
|
|
2014-08-11 16:09:07 +02:00
|
|
|
seabios:
|
2011-06-07 15:03:14 +02:00
|
|
|
echo " Cloning SeaBIOS from Git"
|
2016-03-16 19:42:05 +01:00
|
|
|
git clone $(project_git_repo) $(project_dir)
|
2011-06-07 15:03:14 +02:00
|
|
|
|
2014-08-11 16:09:07 +02:00
|
|
|
fetch: seabios
|
2016-03-08 00:56:57 +01:00
|
|
|
ifeq ($(TAG-y),)
|
|
|
|
echo "Error: The specified tag is invalid"
|
|
|
|
ifeq ($(CONFIG_SEABIOS_REVISION),y)
|
|
|
|
echo "Error: There is no revision specified for SeaBIOS"
|
|
|
|
false
|
|
|
|
endif
|
|
|
|
false
|
|
|
|
endif
|
2016-03-08 05:56:24 +01:00
|
|
|
cd seabios; git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ] || \
|
|
|
|
[ "$(TAG-y)" = "origin/master" ]; then \
|
|
|
|
echo " Fetching new commits from the SeaBIOS git repo"; \
|
|
|
|
git fetch; fi
|
2011-06-07 15:03:14 +02:00
|
|
|
|
|
|
|
checkout: fetch
|
|
|
|
echo " Checking out SeaBIOS revision $(TAG-y)"
|
2014-08-11 16:09:07 +02:00
|
|
|
cd seabios; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
|
2011-02-07 21:16:40 +01:00
|
|
|
|
|
|
|
config: checkout
|
|
|
|
echo " CONFIG SeaBIOS $(TAG-y)"
|
2014-08-11 16:09:07 +02:00
|
|
|
echo "CONFIG_COREBOOT=y" > seabios/.config
|
2016-02-06 20:47:05 +01:00
|
|
|
ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
|
2014-08-11 16:09:07 +02:00
|
|
|
echo "CONFIG_DEBUG_SERIAL=y" >> seabios/.config
|
|
|
|
echo "CONFIG_DEBUG_SERIAL_PORT=$(CONFIG_TTYS0_BASE)" >> seabios/.config
|
2014-07-25 22:33:49 +02:00
|
|
|
else
|
2014-08-11 16:09:07 +02:00
|
|
|
echo "# CONFIG_DEBUG_SERIAL is not set" >> seabios/.config
|
2014-07-25 22:39:05 +02:00
|
|
|
endif
|
2014-07-25 22:24:32 +02:00
|
|
|
ifneq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y)
|
2014-08-11 16:09:07 +02:00
|
|
|
echo "# CONFIG_THREAD_OPTIONROMS is not set" >> seabios/.config
|
2014-09-12 19:43:49 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_SEABIOS_VGA_COREBOOT),y)
|
|
|
|
echo "CONFIG_VGA_COREBOOT=y" >> seabios/.config
|
|
|
|
echo "CONFIG_BUILD_VGABIOS=y" >> seabios/.config
|
2015-11-28 23:44:34 +01:00
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_PAYLOAD_CONFIGFILE),)
|
|
|
|
ifneq ("$(wildcard $(CONFIG_PAYLOAD_CONFIGFILE))","")
|
|
|
|
cat $(CONFIG_PAYLOAD_CONFIGFILE) >> seabios/.config
|
|
|
|
else
|
|
|
|
echo "Error: File $(CONFIG_PAYLOAD_CONFIGFILE) does not exist"
|
|
|
|
false
|
|
|
|
endif
|
2014-07-25 22:24:32 +02:00
|
|
|
endif
|
2011-02-07 21:16:40 +01:00
|
|
|
# This shows how to force a previously set .config option *off*
|
2014-08-11 16:09:07 +02:00
|
|
|
#echo "# CONFIG_SMBIOS is not set" >> seabios/.config
|
|
|
|
$(MAKE) -C seabios olddefconfig OUT=out/
|
2011-02-07 21:16:40 +01:00
|
|
|
|
2011-06-07 15:03:14 +02:00
|
|
|
build: config
|
2011-02-07 21:16:40 +01:00
|
|
|
echo " MAKE SeaBIOS $(TAG-y)"
|
2014-08-11 16:09:07 +02:00
|
|
|
$(MAKE) -C seabios OUT=out/
|
2010-12-30 18:39:50 +01:00
|
|
|
|
|
|
|
clean:
|
2015-06-25 03:43:17 +02:00
|
|
|
test -d seabios/out && rm -rf seabios/out || exit 0
|
2010-12-30 18:39:50 +01:00
|
|
|
|
|
|
|
distclean:
|
2014-08-11 16:09:07 +02:00
|
|
|
rm -rf seabios
|
2010-12-30 18:39:50 +01:00
|
|
|
|
2016-03-16 19:42:05 +01:00
|
|
|
print-repo-info:
|
|
|
|
echo "$(project_git_repo) $(project_dir)"
|
|
|
|
|
|
|
|
.PHONY: checkout config build clean distclean clone fetch print-repo-info
|