1 ## SPDX-License-Identifier: GPL-2.0-only
3 project_name
=Memtest86
+
5 ifeq ($(CONFIG_MEMTEST86PLUS_V6
),y
)
6 project_dir
=$(CURDIR
)/memtest86plus_v6
8 ifeq ($(MEMTEST86PLUS_ARCH_64
),y
)
9 build_dir
=$(project_dir
)/build64
11 build_dir
=$(project_dir
)/build32
13 project_git_repo
=https
://github.com
/memtest86plus
/memtest86plus.git
14 TAG-
$(CONFIG_MEMTEST_MAIN
)=origin/main
15 NAME-
$(CONFIG_MEMTEST_MAIN
)=Main
16 TAG-
$(CONFIG_MEMTEST_STABLE
)=v6.20
17 NAME-
$(CONFIG_MEMTEST_STABLE
)=Stable
18 TAG-
$(CONFIG_MEMTEST_REVISION
)=$(CONFIG_MEMTEST_REVISION_ID
)
20 project_dir
=$(CURDIR
)/memtest86plus_v5
22 build_dir
=$(project_dir
)
23 project_git_repo
=https
://review.coreboot.org
/memtest86plus.git
24 TAG-
$(CONFIG_MEMTEST_MAIN
)=origin/main
25 NAME-
$(CONFIG_MEMTEST_MAIN
)=Main
26 TAG-
$(CONFIG_MEMTEST_STABLE
)=0bd34c22604660e4283316331f3e7bf8a3863753
27 NAME-
$(CONFIG_MEMTEST_STABLE
)=Stable
28 TAG-
$(CONFIG_MEMTEST_REVISION
)=$(CONFIG_MEMTEST_REVISION_ID
)
34 echo
" Cloning $(project_name) from Git"
35 git clone
$(project_git_repo
) $(project_dir
)
39 echo
"Error: The specified tag is invalid"
40 ifeq ($(CONFIG_MEMTEST_REVISION
),y
)
41 echo
"Error: There is no revision specified for $(project_name)"
46 -cd
$(project_dir
) 2>/dev
/null
; git show
$(TAG-y
) >/dev
/null
2>&1 ; \
47 if
[ $$?
-ne
0 ] ||
[ "$(TAG-y)" = "origin/main" ]; then \
48 echo
" Fetching new commits from the $(project_name) git repo"; \
52 echo
" Checking out $(project_name) revision $(NAME-y) ($(TAG-y))"
55 git branch
-D coreboot
2>/dev
/null
; \
56 git checkout
-b coreboot
$(TAG-y
)
59 echo
" MAKE $(project_name) $(NAME-y)"
60 $(MAKE
) -C
$(build_dir
) all
61 ifeq ($(CONFIG_MEMTEST86PLUS_V6
),y
)
62 cp
$(build_dir
)/memtest.bin
$(project_dir
)/memtest
66 test -d
$(build_dir
) && $(MAKE
) -C
$(build_dir
) clean || exit
0
72 echo
"$(project_git_repo) $(project_dir)"
74 .PHONY
: all build checkout check_version
clean distclean fetch print-repo-info