提交 c01bd651 编写于 作者: M Masahiro Yamada 提交者: Yang Yingliang

net: wan: wanxl: use $(M68KCC) instead of $(M68KAS) for rebuilding firmware

commit 734f3719 upstream.

The firmware source, wanxlfw.S, is currently compiled by the combo of
$(CPP) and $(M68KAS). This is not what we usually do for compiling *.S
files. In fact, this Makefile is the only user of $(AS) in the kernel
build.

Instead of combining $(CPP) and (AS) from different tool sets, using
$(M68KCC) as an assembler driver is simpler, and saner.
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: NNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 2e9708cb
...@@ -41,16 +41,16 @@ $(obj)/wanxl.o: $(obj)/wanxlfw.inc ...@@ -41,16 +41,16 @@ $(obj)/wanxl.o: $(obj)/wanxlfw.inc
ifeq ($(CONFIG_WANXL_BUILD_FIRMWARE),y) ifeq ($(CONFIG_WANXL_BUILD_FIRMWARE),y)
ifeq ($(ARCH),m68k) ifeq ($(ARCH),m68k)
M68KAS = $(AS) M68KCC = $(CC)
M68KLD = $(LD) M68KLD = $(LD)
else else
M68KAS = $(CROSS_COMPILE_M68K)as M68KCC = $(CROSS_COMPILE_M68K)gcc
M68KLD = $(CROSS_COMPILE_M68K)ld M68KLD = $(CROSS_COMPILE_M68K)ld
endif endif
quiet_cmd_build_wanxlfw = BLD FW $@ quiet_cmd_build_wanxlfw = BLD FW $@
cmd_build_wanxlfw = \ cmd_build_wanxlfw = \
$(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(M68KAS) -m68360 -o $(obj)/wanxlfw.o; \ $(M68KCC) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi -c -o $(obj)/wanxlfw.o $<; \
$(M68KLD) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \ $(M68KLD) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \
hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \ hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \
rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册