提交 e183a174 编写于 作者: M Masahiro Yamada 提交者: Tom Rini

board: samsung: refactor host programs

Some Samsung boards have their own tools under board/samsung/<board>/tools/.
This commit refactor more makefiles with "hostprogs-y".
Signed-off-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
上级 940db16d
...@@ -809,6 +809,7 @@ clean: ...@@ -809,6 +809,7 @@ clean:
$(obj)tools/proftool $(obj)tools/proftool
@rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \ @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \
$(obj)board/matrix_vision/*/bootscript.img \ $(obj)board/matrix_vision/*/bootscript.img \
$(obj)spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl \
$(obj)u-boot.lds \ $(obj)u-boot.lds \
$(obj)arch/blackfin/cpu/init.{lds,elf} $(obj)arch/blackfin/cpu/init.{lds,elf}
@rm -f $(obj)include/bmp_logo.h @rm -f $(obj)include/bmp_logo.h
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
ifndef CONFIG_SPL_BUILD
obj-y += origen.o
endif
ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_BUILD
all: $(OBJTREE)/tools/mk$(BOARD)spl hostprogs-y := tools/mkorigenspl
endif always := $(hostprogs-y)
# Fix ME after we implement hostprogs-y. # omit -O2 option to suppress
ifdef CONFIG_SPL_BUILD # warning: dereferencing type-punned pointer will break strict-aliasing rules
$(OBJTREE)/tools/mk$(BOARD)spl: tools/mkv310_image.c #
$(HOSTCC) tools/mkv310_image.c -o $(OBJTREE)/tools/mk$(BOARD)spl # TODO:
# Fix the root cause in tools/mkorigenspl.c and delete the following work-around
$(obj)tools/mkorigenspl: HOSTCFLAGS:=$(filter-out -O2,$(HOSTCFLAGS))
else
obj-y += origen.o
endif endif
...@@ -4,16 +4,9 @@ ...@@ -4,16 +4,9 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
ifndef CONFIG_SPL_BUILD
obj-y += smdkv310.o
endif
ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_BUILD
all: $(OBJTREE)/tools/mk$(BOARD)spl hostprogs-y := tools/mksmdkv310spl
endif always := $(hostprogs-y)
else
# Fix ME after we implement hostprogs-y. obj-y += smdkv310.o
ifdef CONFIG_SPL_BUILD
$(OBJTREE)/tools/mk$(BOARD)spl: tools/mkv310_image.c
$(HOSTCC) tools/mkv310_image.c -o $(OBJTREE)/tools/mk$(BOARD)spl
endif endif
...@@ -165,8 +165,8 @@ else ...@@ -165,8 +165,8 @@ else
VAR_SIZE_PARAM = VAR_SIZE_PARAM =
endif endif
$(obj)$(BOARD)-spl.bin: $(obj)u-boot-spl.bin $(obj)$(BOARD)-spl.bin: $(obj)u-boot-spl.bin
$(if $(wildcard $(OBJTREE)/tools/mk$(BOARD)spl),\ $(if $(wildcard $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl),\
$(OBJTREE)/tools/mk$(BOARD)spl,\ $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl,\
$(OBJTREE)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@ $(OBJTREE)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@
endif endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册