blob: 5e1df476a73e65b4cf075ba8018e17b8c51a17f2 [file] [log] [blame]
Stefan Reinauerf1939bb2010-12-30 17:39:50 +00001
2
Stefan Reinauer33ee3ee2011-01-25 19:27:23 +00003TAG-$(CONFIG_SEABIOS_MASTER)=origin/master
Peter Stuge9b48ef22012-10-16 02:25:07 +02004TAG-$(CONFIG_SEABIOS_STABLE)=51755c3b5ed9dcdfdef8cee56631d68642bde416
Peter Stugeb1d1c4d2011-02-07 20:16:40 +00005
6unexport KCONFIG_AUTOCONFIG
Stefan Reinauerf1939bb2010-12-30 17:39:50 +00007
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +02008all: build
Stefan Reinauerf1939bb2010-12-30 17:39:50 +00009
Stefan Reinaueraff6dc22012-01-21 10:34:22 -080010$(OUT)/seabios:
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020011 echo " Cloning SeaBIOS from Git"
Patrick Georgieb129bb2012-05-09 21:07:17 +020012 git clone http://review.coreboot.org/p/seabios.git $(OUT)/seabios
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020013
Stefan Reinaueraff6dc22012-01-21 10:34:22 -080014fetch: $(OUT)/seabios
15 cd $(OUT)/seabios; git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ]; \
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020016 then echo " Fetching new commits from the SeaBIOS git repo"; git fetch; fi
17
18checkout: fetch
19 echo " Checking out SeaBIOS revision $(TAG-y)"
Stefan Reinaueraff6dc22012-01-21 10:34:22 -080020 cd $(OUT)/seabios; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
Peter Stugeb1d1c4d2011-02-07 20:16:40 +000021
22config: checkout
23 echo " CONFIG SeaBIOS $(TAG-y)"
Stefan Reinaueraff6dc22012-01-21 10:34:22 -080024 $(MAKE) -C $(OUT)/seabios defconfig OUT=$(OUT)/seabios/out/
25 echo "CONFIG_COREBOOT=y" >> $(OUT)/seabios/.config
26 echo "CONFIG_DEBUG_SERIAL=y" >> $(OUT)/seabios/.config
27 echo "CONFIG_DEBUG_SERIAL_PORT=0x3f8" >> $(OUT)/seabios/.config
28 echo "CONFIG_COREBOOT_FLASH=y" >> $(OUT)/seabios/.config
29 echo "CONFIG_LZMA=y" >> $(OUT)/seabios/.config
30 echo "CONFIG_FLASH_FLOPPY=y" >> $(OUT)/seabios/.config
31 echo "CONFIG_VGAHOOKS=y" >> $(OUT)/seabios/.config
Peter Stugeb1d1c4d2011-02-07 20:16:40 +000032 # This shows how to force a previously set .config option *off*
Stefan Reinaueraff6dc22012-01-21 10:34:22 -080033 #echo "# CONFIG_SMBIOS is not set" >> $(OUT)/seabios/.config
Peter Stugeb1d1c4d2011-02-07 20:16:40 +000034
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020035build: config
Peter Stugeb1d1c4d2011-02-07 20:16:40 +000036 echo " MAKE SeaBIOS $(TAG-y)"
Stefan Reinaueraff6dc22012-01-21 10:34:22 -080037 $(MAKE) -C $(OUT)/seabios OUT=$(OUT)/seabios/out/
Stefan Reinauerf1939bb2010-12-30 17:39:50 +000038
39clean:
Stefan Reinaueraff6dc22012-01-21 10:34:22 -080040 test -d $(OUT)/seabios && $(MAKE) -C $(OUT)/seabios clean OUT=$(OUT)/seabios/out/ || exit 0
Stefan Reinauerf1939bb2010-12-30 17:39:50 +000041
42distclean:
Stefan Reinaueraff6dc22012-01-21 10:34:22 -080043 rm -rf $(OUT)/seabios
Stefan Reinauerf1939bb2010-12-30 17:39:50 +000044
Cristian Măgherușan-Stanciua78d5722011-06-07 15:03:14 +020045.PHONY: checkout config build clean distclean clone fetch