drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / payloads / external / SeaBIOS / Makefile
blob7926f3fb90adfdb60e963d2951d30cfb5e32b336
1 TAG-$(CONFIG_SEABIOS_MASTER)=origin/master
2 TAG-$(CONFIG_SEABIOS_STABLE)=a6ed6b701f0a57db0569ab98b0661c12a6ec3ff8
3 TAG-$(CONFIG_SEABIOS_REVISION)=$(CONFIG_SEABIOS_REVISION_ID)
5 project_git_repo=https://review.coreboot.org/seabios.git
6 project_dir=seabios
8 unexport KCONFIG_AUTOHEADER
9 unexport KCONFIG_AUTOCONFIG
10 unexport KCONFIG_DEPENDENCIES
11 unexport KCONFIG_SPLITCONFIG
12 unexport KCONFIG_TRISTATE
13 unexport KCONFIG_NEGATIVES
15 all: build
17 seabios:
18 echo " Cloning SeaBIOS from Git"
19 git clone $(project_git_repo) $(project_dir)
21 fetch: seabios
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
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
35 checkout: fetch
36 echo " Checking out SeaBIOS revision $(TAG-y)"
37 cd seabios; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
39 config: checkout
40 echo " CONFIG SeaBIOS $(TAG-y)"
41 echo "CONFIG_COREBOOT=y" > seabios/.config
42 ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
43 echo "CONFIG_DEBUG_SERIAL=y" >> seabios/.config
44 echo "CONFIG_DEBUG_SERIAL_PORT=$(CONFIG_TTYS0_BASE)" >> seabios/.config
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
48 else ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_ENABLE_HSUART),yy)
49 echo "CONFIG_DEBUG_SERIAL_MMIO=y" >> seabios/.config
50 echo "CONFIG_DEBUG_SERIAL_MEM_ADDRESS=$(CONFIG_CONSOLE_UART_BASE_ADDRESS)" >> seabios/.config
51 else ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250MEM_32),yy)
52 echo "CONFIG_DEBUG_SERIAL_MMIO=y" >> seabios/.config
53 echo "CONFIG_DEBUG_SERIAL_MEM_ADDRESS=$(CONFIG_CONSOLE_UART_BASE_ADDRESS)" >> seabios/.config
54 else
55 echo "# CONFIG_DEBUG_SERIAL is not set" >> seabios/.config
56 endif
57 ifneq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y)
58 echo "# CONFIG_THREAD_OPTIONROMS is not set" >> seabios/.config
59 endif
60 ifeq ($(CONFIG_SEABIOS_VGA_COREBOOT),y)
61 echo "CONFIG_VGA_COREBOOT=y" >> seabios/.config
62 echo "CONFIG_BUILD_VGABIOS=y" >> seabios/.config
63 endif
64 ifneq ($(CONFIG_PAYLOAD_CONFIGFILE),)
65 ifneq ("$(wildcard $(CONFIG_PAYLOAD_CONFIGFILE))","")
66 cat $(CONFIG_PAYLOAD_CONFIGFILE) >> seabios/.config
67 else
68 echo "Error: File $(CONFIG_PAYLOAD_CONFIGFILE) does not exist"
69 false
70 endif
71 endif
72 ifneq ($(CONFIG_SEABIOS_DEBUG_LEVEL),-1)
73 echo "CONFIG_DEBUG_LEVEL=$(CONFIG_SEABIOS_DEBUG_LEVEL)" >> seabios/.config
74 endif
75 ifneq ($(CONFIG_SEABIOS_HARDWARE_IRQ),y)
76 echo "# CONFIG_HARDWARE_IRQ is not set" >> seabios/.config
77 endif
78 # This shows how to force a previously set .config option *off*
79 # echo "# CONFIG_SMBIOS is not set" >> seabios/.config
80 $(MAKE) -C seabios olddefconfig OUT=out/
82 build: config
83 echo " MAKE SeaBIOS $(TAG-y)"
84 $(MAKE) -C seabios OUT=out/
86 clean:
87 test -d seabios/out && rm -rf seabios/out || exit 0
89 distclean:
90 rm -rf seabios
92 print-repo-info:
93 echo "$(project_git_repo) $(project_dir)"
95 .PHONY: checkout config build clean distclean clone fetch print-repo-info