1 LIBPAYLOAD_URL
=svn
://coreboot.org
/repos
/trunk
/payloads
/libpayload
4 LIBPAYLOAD_DIR
=$(BUILD_DIR
)/libpayload
5 LIBPAYLOAD_SRC_DIR
=$(LIBPAYLOAD_DIR
)/svn
6 LIBPAYLOAD_STAMP_DIR
=$(LIBPAYLOAD_DIR
)/stamps
7 LIBPAYLOAD_LOG_DIR
=$(LIBPAYLOAD_DIR
)/logs
9 ifeq ($(CONFIG_VERBOSE
),y
)
10 LIBPAYLOAD_FETCH_LOG
=/dev
/stdout
11 LIBPAYLOAD_BUILD_LOG
=/dev
/stdout
12 LIBPAYLOAD_INSTALL_LOG
=/dev
/stdout
14 LIBPAYLOAD_BUILD_LOG
=$(LIBPAYLOAD_LOG_DIR
)/build.log
15 LIBPAYLOAD_INSTALL_LOG
=$(LIBPAYLOAD_LOG_DIR
)/install.log
16 LIBPAYLOAD_FETCH_LOG
=$(LIBPAYLOAD_LOG_DIR
)/fetch.log
19 ifeq ($(call custom-config-exists
,libpayload
), 1)
20 LIBPAYLOAD_CONFIG
=$(call custom-config-name
,libpayload
)
22 ifeq ($(CONFIG_PLATFORM_GEODE
),y
)
23 LIBPAYLOAD_CONFIG
=$(PACKAGE_DIR
)/libpayload
/conf
/defconfig.geode
25 LIBPAYLOAD_CONFIG
=$(PACKAGE_DIR
)/libpayload
/conf
/defconfig
29 LIBPAYLOAD_TARBALL
=libpayload-svn-
$(LIBPAYLOAD_TAG
).
tar.gz
31 $(SOURCE_DIR
)/$(LIBPAYLOAD_TARBALL
):
32 @ mkdir
-p
$(SOURCE_DIR
)/libpayload
33 @
$(BIN_DIR
)/fetchsvn.sh
$(LIBPAYLOAD_URL
) $(SOURCE_DIR
)/libpayload \
34 $(LIBPAYLOAD_TAG
) $(SOURCE_DIR
)/$(LIBPAYLOAD_TARBALL
) \
35 > $(LIBPAYLOAD_FETCH_LOG
) 2>&1
37 $(LIBPAYLOAD_STAMP_DIR
)/.unpacked
: $(SOURCE_DIR
)/$(LIBPAYLOAD_TARBALL
) |
$(LIBPAYLOAD_STAMP_DIR
) $(LIBPAYLOAD_DIR
)
38 @ echo
"Unpacking libpayload..."
39 @
tar -C
$(LIBPAYLOAD_DIR
) -zxf
$(SOURCE_DIR
)/$(LIBPAYLOAD_TARBALL
)
42 $(LIBPAYLOAD_SRC_DIR
)/.config
: $(LIBPAYLOAD_STAMP_DIR
)/.unpacked
43 @ cp
$(LIBPAYLOAD_CONFIG
) $@
44 @ make
-C
$(LIBPAYLOAD_SRC_DIR
) oldconfig
> $(LIBPAYLOAD_BUILD_LOG
) 2>&1
46 $(LIBPAYLOAD_SRC_DIR
)/lib
/libpayload.a
: $(LIBPAYLOAD_SRC_DIR
)/.config
47 @ echo
"Building libpayload..."
48 ifeq ($(findstring customconfig
,$(LIBPAYLOAD_CONFIG
)),customconfig
)
49 @ echo
"Using custom config $(LIBPAYLOAD_CONFIG)"
51 @ make
-C
$(LIBPAYLOAD_SRC_DIR
) > $(LIBPAYLOAD_BUILD_LOG
) 2>&1
52 @ mkdir
-p
$(OUTPUT_DIR
)/config
/libpayload
53 @ cp
$(LIBPAYLOAD_SRC_DIR
)/.config
$(OUTPUT_DIR
)/config
/libpayload
55 $(LIBPAYLOAD_STAMP_DIR
)/.installed
: $(LIBPAYLOAD_SRC_DIR
)/lib
/libpayload.a
56 @ echo
"Installing libpayload..."
57 @ make
-C
$(LIBPAYLOAD_SRC_DIR
) DESTDIR
=$(STAGING_DIR
) install \
58 > $(LIBPAYLOAD_INSTALL_LOG
) 2>&1
61 $(LIBPAYLOAD_STAMP_DIR
) $(LIBPAYLOAD_LOG_DIR
):
64 libpayload
: $(LIBPAYLOAD_STAMP_DIR
) $(LIBPAYLOAD_LOG_DIR
) $(LIBPAYLOAD_STAMP_DIR
)/.installed
67 @ echo
"Cleaning libpayload..."
68 ifneq ($(wildcard $(LIBPAYLOAD_SRC_DIR
)/Makefile
),)
69 @
$(MAKE
) -C
$(LIBPAYLOAD_SRC_DIR
) clean > /dev
/null
2>&1
71 @
rm -f
$(LIBPAYLOAD_STAMP_DIR
)/.installed
74 @
rm -rf
$(LIBPAYLOAD_DIR
)/*
76 libpayload-extract
: $(LIBPAYLOAD_STAMP_DIR
)/.patched
78 libpayload-config
: |
$(LIBPAYLOAD_SRC_DIR
)/.config
79 ifeq ($(call custom-config-exists
,libpayload
), 1)
80 @ cp
-f
$(call custom-config-name
,libpayload
) $(LIBPAYLOAD_SRC_DIR
)/.config
82 @ echo
"Configure libpayload..."
83 @
$(MAKE
) -C
$(LIBPAYLOAD_SRC_DIR
) menuconfig
85 ifeq ($(call custom-config-exists
,libpayload
),1)
86 @ echo
"Found an existing custom configuration file:"
87 @ echo
" $(call custom-config-name,libpayload)"
88 @ echo
"I've copied it back to the source directory for modification."
89 @ echo
"Remove the above file and re-run this command if you want to create a new customer configuration from scratch for this payload/board."
92 @ cp
-f
$(LIBPAYLOAD_SRC_DIR
)/.config
$(call custom-config-name
,libpayload
)
93 @ echo
"Your custom config file has been saved as $(call custom-config-name,libpayload)."