Stefan Reinauer | 33ee3ee | 2011-01-25 19:27:23 +0000 | [diff] [blame] | 1 | TAG-$(CONFIG_SEABIOS_MASTER)=origin/master |
Philipp Deppenwiese | 40843ef | 2017-01-04 00:30:38 +0100 | [diff] [blame] | 2 | TAG-$(CONFIG_SEABIOS_STABLE)=8891697e3f7d84355420573efd98e94f14736768 |
Antonello Dettori | 3aa91dc | 2016-03-07 23:56:57 +0000 | [diff] [blame] | 3 | TAG-$(CONFIG_SEABIOS_REVISION)=$(CONFIG_SEABIOS_REVISION_ID) |
Peter Stuge | b1d1c4d | 2011-02-07 20:16:40 +0000 | [diff] [blame] | 4 | |
Ryan Salsamendi | 5b9a253 | 2016-06-15 16:17:21 -0700 | [diff] [blame] | 5 | project_git_repo=https://review.coreboot.org/p/seabios.git |
Martin Roth | ae269c0 | 2016-03-16 12:42:05 -0600 | [diff] [blame] | 6 | project_dir=seabios |
| 7 | |
Patrick Georgi | 3ee4317 | 2014-05-09 20:41:01 +0200 | [diff] [blame] | 8 | unexport KCONFIG_AUTOHEADER |
Peter Stuge | b1d1c4d | 2011-02-07 20:16:40 +0000 | [diff] [blame] | 9 | unexport KCONFIG_AUTOCONFIG |
Patrick Georgi | 3ee4317 | 2014-05-09 20:41:01 +0200 | [diff] [blame] | 10 | unexport KCONFIG_DEPENDENCIES |
| 11 | unexport KCONFIG_SPLITCONFIG |
| 12 | unexport KCONFIG_TRISTATE |
| 13 | unexport KCONFIG_NEGATIVES |
Stefan Reinauer | f1939bb | 2010-12-30 17:39:50 +0000 | [diff] [blame] | 14 | |
Cristian Măgherușan-Stanciu | a78d572 | 2011-06-07 15:03:14 +0200 | [diff] [blame] | 15 | all: build |
Stefan Reinauer | f1939bb | 2010-12-30 17:39:50 +0000 | [diff] [blame] | 16 | |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 17 | seabios: |
Cristian Măgherușan-Stanciu | a78d572 | 2011-06-07 15:03:14 +0200 | [diff] [blame] | 18 | echo " Cloning SeaBIOS from Git" |
Martin Roth | ae269c0 | 2016-03-16 12:42:05 -0600 | [diff] [blame] | 19 | git clone $(project_git_repo) $(project_dir) |
Cristian Măgherușan-Stanciu | a78d572 | 2011-06-07 15:03:14 +0200 | [diff] [blame] | 20 | |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 21 | fetch: seabios |
Antonello Dettori | 3aa91dc | 2016-03-07 23:56:57 +0000 | [diff] [blame] | 22 | ifeq ($(TAG-y),) |
| 23 | echo "Error: The specified tag is invalid" |
| 24 | ifeq ($(CONFIG_SEABIOS_REVISION),y) |
| 25 | echo "Error: There is no revision specified for SeaBIOS" |
| 26 | false |
| 27 | endif |
| 28 | false |
| 29 | endif |
Martin Roth | 3f1abb8 | 2016-03-07 21:56:24 -0700 | [diff] [blame] | 30 | cd seabios; git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ] || \ |
| 31 | [ "$(TAG-y)" = "origin/master" ]; then \ |
| 32 | echo " Fetching new commits from the SeaBIOS git repo"; \ |
| 33 | git fetch; fi |
Cristian Măgherușan-Stanciu | a78d572 | 2011-06-07 15:03:14 +0200 | [diff] [blame] | 34 | |
| 35 | checkout: fetch |
| 36 | echo " Checking out SeaBIOS revision $(TAG-y)" |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 37 | cd seabios; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y) |
Peter Stuge | b1d1c4d | 2011-02-07 20:16:40 +0000 | [diff] [blame] | 38 | |
| 39 | config: checkout |
| 40 | echo " CONFIG SeaBIOS $(TAG-y)" |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 41 | echo "CONFIG_COREBOOT=y" > seabios/.config |
Martin Roth | f80331f | 2016-02-06 12:47:05 -0700 | [diff] [blame] | 42 | ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy) |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 43 | echo "CONFIG_DEBUG_SERIAL=y" >> seabios/.config |
| 44 | echo "CONFIG_DEBUG_SERIAL_PORT=$(CONFIG_TTYS0_BASE)" >> seabios/.config |
Ricardo Ribalda Delgado | 77ced40 | 2017-01-03 11:56:22 +0100 | [diff] [blame] | 45 | else ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250MEM)$(CONFIG_HUDSON_UART),yyy) |
| 46 | echo "CONFIG_DEBUG_SERIAL_MMIO=y" >> seabios/.config |
| 47 | echo "CONFIG_DEBUG_SERIAL_MEM_ADDRESS=0xFEDC6000" >> seabios/.config |
Martin Roth | 0d7f133 | 2014-07-25 14:33:49 -0600 | [diff] [blame] | 48 | else |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 49 | echo "# CONFIG_DEBUG_SERIAL is not set" >> seabios/.config |
Martin Roth | 0d7f133 | 2014-07-25 14:33:49 -0600 | [diff] [blame] | 50 | endif |
Martin Roth | 9780452 | 2014-07-25 14:24:32 -0600 | [diff] [blame] | 51 | ifneq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y) |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 52 | echo "# CONFIG_THREAD_OPTIONROMS is not set" >> seabios/.config |
Martin Roth | 9780452 | 2014-07-25 14:24:32 -0600 | [diff] [blame] | 53 | endif |
Edward O'Callaghan | a296f9e | 2014-09-13 03:43:49 +1000 | [diff] [blame] | 54 | ifeq ($(CONFIG_SEABIOS_VGA_COREBOOT),y) |
| 55 | echo "CONFIG_VGA_COREBOOT=y" >> seabios/.config |
| 56 | echo "CONFIG_BUILD_VGABIOS=y" >> seabios/.config |
| 57 | endif |
Martin Roth | 99d05c7 | 2015-11-28 15:44:34 -0700 | [diff] [blame] | 58 | ifneq ($(CONFIG_PAYLOAD_CONFIGFILE),) |
| 59 | ifneq ("$(wildcard $(CONFIG_PAYLOAD_CONFIGFILE))","") |
| 60 | cat $(CONFIG_PAYLOAD_CONFIGFILE) >> seabios/.config |
| 61 | else |
| 62 | echo "Error: File $(CONFIG_PAYLOAD_CONFIGFILE) does not exist" |
| 63 | false |
| 64 | endif |
| 65 | endif |
Stefan Tauner | c48d791 | 2017-01-15 11:49:25 +0100 | [diff] [blame] | 66 | ifneq ($(CONFIG_SEABIOS_DEBUG_LEVEL),-1) |
| 67 | echo "CONFIG_DEBUG_LEVEL=$(CONFIG_SEABIOS_DEBUG_LEVEL)" >> seabios/.config |
| 68 | endif |
| 69 | # This shows how to force a previously set .config option *off* |
| 70 | # echo "# CONFIG_SMBIOS is not set" >> seabios/.config |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 71 | $(MAKE) -C seabios olddefconfig OUT=out/ |
Peter Stuge | b1d1c4d | 2011-02-07 20:16:40 +0000 | [diff] [blame] | 72 | |
Cristian Măgherușan-Stanciu | a78d572 | 2011-06-07 15:03:14 +0200 | [diff] [blame] | 73 | build: config |
Peter Stuge | b1d1c4d | 2011-02-07 20:16:40 +0000 | [diff] [blame] | 74 | echo " MAKE SeaBIOS $(TAG-y)" |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 75 | $(MAKE) -C seabios OUT=out/ |
Stefan Reinauer | f1939bb | 2010-12-30 17:39:50 +0000 | [diff] [blame] | 76 | |
| 77 | clean: |
Martin Roth | ac83367 | 2015-06-24 19:43:17 -0600 | [diff] [blame] | 78 | test -d seabios/out && rm -rf seabios/out || exit 0 |
Stefan Reinauer | f1939bb | 2010-12-30 17:39:50 +0000 | [diff] [blame] | 79 | |
| 80 | distclean: |
Idwer Vollering | ab11a6a9 | 2014-08-11 16:09:07 +0200 | [diff] [blame] | 81 | rm -rf seabios |
Stefan Reinauer | f1939bb | 2010-12-30 17:39:50 +0000 | [diff] [blame] | 82 | |
Martin Roth | ae269c0 | 2016-03-16 12:42:05 -0600 | [diff] [blame] | 83 | print-repo-info: |
| 84 | echo "$(project_git_repo) $(project_dir)" |
| 85 | |
| 86 | .PHONY: checkout config build clean distclean clone fetch print-repo-info |