blob: ec877a9fda56afb6db5841e490c8a42265701d27 [file] [log] [blame]
Stefan Reinauer33ee3ee2011-01-25 19:27:23 +00001TAG-$(CONFIG_SEABIOS_MASTER)=origin/master
Alexander Couzens3ed0d852015-09-02 00:02:56 +02002TAG-$(CONFIG_SEABIOS_STABLE)=33fbe13a3e2a01e0ba1087a8feed801a0451db21
Peter Stugeb1d1c4d2011-02-07 20:16:40 +00003
Patrick Georgi3ee43172014-05-09 20:41:01 +02004unexport KCONFIG_AUTOHEADER
Peter Stugeb1d1c4d2011-02-07 20:16:40 +00005unexport KCONFIG_AUTOCONFIG
Patrick Georgi3ee43172014-05-09 20:41:01 +02006unexport KCONFIG_DEPENDENCIES
7unexport KCONFIG_SPLITCONFIG
8unexport KCONFIG_TRISTATE
9unexport KCONFIG_NEGATIVES
Stefan Reinauerf1939bb2010-12-30 17:39:50 +000010
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020011all: build
Stefan Reinauerf1939bb2010-12-30 17:39:50 +000012
Idwer Volleringab11a6a92014-08-11 16:09:07 +020013seabios:
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020014 echo " Cloning SeaBIOS from Git"
Idwer Volleringab11a6a92014-08-11 16:09:07 +020015 git clone http://review.coreboot.org/p/seabios.git seabios
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020016
Idwer Volleringab11a6a92014-08-11 16:09:07 +020017fetch: seabios
18 cd seabios; git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ]; \
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020019 then echo " Fetching new commits from the SeaBIOS git repo"; git fetch; fi
20
21checkout: fetch
22 echo " Checking out SeaBIOS revision $(TAG-y)"
Idwer Volleringab11a6a92014-08-11 16:09:07 +020023 cd seabios; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
Peter Stugeb1d1c4d2011-02-07 20:16:40 +000024
25config: checkout
26 echo " CONFIG SeaBIOS $(TAG-y)"
Idwer Volleringab11a6a92014-08-11 16:09:07 +020027 echo "CONFIG_COREBOOT=y" > seabios/.config
Martin Roth0d7f1332014-07-25 14:33:49 -060028ifeq ($(CONFIG_CONSOLE_SERIAL),y)
Idwer Volleringab11a6a92014-08-11 16:09:07 +020029 echo "CONFIG_DEBUG_SERIAL=y" >> seabios/.config
30 echo "CONFIG_DEBUG_SERIAL_PORT=$(CONFIG_TTYS0_BASE)" >> seabios/.config
Martin Roth0d7f1332014-07-25 14:33:49 -060031else
Idwer Volleringab11a6a92014-08-11 16:09:07 +020032 echo "# CONFIG_DEBUG_SERIAL is not set" >> seabios/.config
Martin Roth0d7f1332014-07-25 14:33:49 -060033endif
Martin Roth4d7d25f2014-07-25 14:39:05 -060034ifneq ($(CONFIG_SEABIOS_MALLOC_UPPERMEMORY),y)
Martin Rothe69c6132014-10-31 10:14:44 -060035 echo "# CONFIG_MALLOC_UPPERMEMORY is not set" >> seabios/.config
Martin Roth4d7d25f2014-07-25 14:39:05 -060036endif
Martin Roth97804522014-07-25 14:24:32 -060037ifneq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y)
Idwer Volleringab11a6a92014-08-11 16:09:07 +020038 echo "# CONFIG_THREAD_OPTIONROMS is not set" >> seabios/.config
Martin Roth97804522014-07-25 14:24:32 -060039endif
Edward O'Callaghana296f9e2014-09-13 03:43:49 +100040ifeq ($(CONFIG_SEABIOS_VGA_COREBOOT),y)
41 echo "CONFIG_VGA_COREBOOT=y" >> seabios/.config
42 echo "CONFIG_BUILD_VGABIOS=y" >> seabios/.config
43endif
Peter Stugeb1d1c4d2011-02-07 20:16:40 +000044 # This shows how to force a previously set .config option *off*
Idwer Volleringab11a6a92014-08-11 16:09:07 +020045 #echo "# CONFIG_SMBIOS is not set" >> seabios/.config
46 $(MAKE) -C seabios olddefconfig OUT=out/
Peter Stugeb1d1c4d2011-02-07 20:16:40 +000047
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020048build: config
Peter Stugeb1d1c4d2011-02-07 20:16:40 +000049 echo " MAKE SeaBIOS $(TAG-y)"
Alexander Couzens63388672015-06-11 14:24:39 +020050 export VERSION=$$(cd seabios && \
51 git describe --tags --long --dirty 2>/dev/null || \
52 echo "unknown") ; \
Idwer Volleringab11a6a92014-08-11 16:09:07 +020053 $(MAKE) -C seabios OUT=out/
Stefan Reinauerf1939bb2010-12-30 17:39:50 +000054
55clean:
Martin Rothac833672015-06-24 19:43:17 -060056 test -d seabios/out && rm -rf seabios/out || exit 0
Stefan Reinauerf1939bb2010-12-30 17:39:50 +000057
58distclean:
Idwer Volleringab11a6a92014-08-11 16:09:07 +020059 rm -rf seabios
Stefan Reinauerf1939bb2010-12-30 17:39:50 +000060
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020061.PHONY: checkout config build clean distclean clone fetch