summaryrefslogtreecommitdiff
path: root/src/ec/hp/mec1322/Makefile.inc
blob: 444e7e988a973c1069751257250693ec9a3dd5e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## SPDX-License-Identifier: GPL-2.0-only

ifeq ($(CONFIG_EC_HP_MEC1322),y)
MEC1322:=$(top)/util/mec1322/mec1322
INTERMEDIATE+=mec1322_ec_insert

ifeq ($(CONFIG_MEC1322_FIRMWARE),y)
cbfs-files-y += ecfw.bin

ecfw.bin-file := $(call strip_quotes,$(CONFIG_MEC1322_FW))
ecfw.bin-position := $(shell printf "0x%x" \
	$$(( 0x100000000 - $(CONFIG_ROM_SIZE) + $(CONFIG_MEC1322_FW_OFFSET))))
ecfw.bin-type := raw

endif

mec1322_ec_insert: $(obj)/coreboot.pre
ifeq ($(CONFIG_MEC1322_FIRMWARE),y)
	$(MAKE) -C util/mec1322
	printf "    MEC1322    Inserting MEC1322 firmware blobs.\n"
	$(MEC1322) insert $(obj)/coreboot.pre $(CONFIG_MEC1322_FW_OFFSET)
endif

PHONY+=mec1322_ec_insert

build_complete::
ifeq ($(CONFIG_MEC1322_FIRMWARE),)
	printf "\n** WARNING **\n"
	printf "You haven't added the firmware blobs for MEC1322 EC.\n"
	printf "You may be unable to power on your laptop without these blobs.\n"
	printf "Please select the following option to add them:\n\n"
	printf "  Chipset --->\n"
	printf "    [*] Add firmware images for MEC1322 EC\n\n"
endif

endif