netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.5 001/121] net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware
@ 2020-04-11 23:05 Sasha Levin
  2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 002/121] netfilter: ctnetlink: be more strict when NF_CONNTRACK_MARK is not set Sasha Levin
                   ` (37 more replies)
  0 siblings, 38 replies; 40+ messages in thread
From: Sasha Levin @ 2020-04-11 23:05 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Masahiro Yamada, Geert Uytterhoeven, Sasha Levin, netdev

From: Masahiro Yamada <masahiroy@kernel.org>

[ Upstream commit 63b903dfebdea92aa92ad337d8451a6fbfeabf9d ]

As far as I understood from the Kconfig help text, this build rule is
used to rebuild the driver firmware, which runs on an old m68k-based
chip. So, you need m68k tools for the firmware rebuild.

wanxl.c is a PCI driver, but CONFIG_M68K does not select CONFIG_HAVE_PCI.
So, you cannot enable CONFIG_WANXL_BUILD_FIRMWARE for ARCH=m68k. In other
words, ifeq ($(ARCH),m68k) is false here.

I am keeping the dead code for now, but rebuilding the firmware requires
'as68k' and 'ld68k', which I do not have in hand.

Instead, the kernel.org m68k GCC [1] successfully built it.

Allowing a user to pass in CROSS_COMPILE_M68K= is handier.

[1] https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-m68k-linux.tar.xz

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wan/Kconfig  |  2 +-
 drivers/net/wan/Makefile | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
index dd1a147f29716..058d77d2e693d 100644
--- a/drivers/net/wan/Kconfig
+++ b/drivers/net/wan/Kconfig
@@ -200,7 +200,7 @@ config WANXL_BUILD_FIRMWARE
 	depends on WANXL && !PREVENT_FIRMWARE_BUILD
 	help
 	  Allows you to rebuild firmware run by the QUICC processor.
-	  It requires as68k, ld68k and hexdump programs.
+	  It requires m68k toolchains and hexdump programs.
 
 	  You should never need this option, say N.
 
diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index 701f5d2fe3b61..995277c657a1e 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -40,17 +40,17 @@ $(obj)/wanxl.o:	$(obj)/wanxlfw.inc
 
 ifeq ($(CONFIG_WANXL_BUILD_FIRMWARE),y)
 ifeq ($(ARCH),m68k)
-  AS68K = $(AS)
-  LD68K = $(LD)
+  M68KAS = $(AS)
+  M68KLD = $(LD)
 else
-  AS68K = as68k
-  LD68K = ld68k
+  M68KAS = $(CROSS_COMPILE_M68K)as
+  M68KLD = $(CROSS_COMPILE_M68K)ld
 endif
 
 quiet_cmd_build_wanxlfw = BLD FW  $@
       cmd_build_wanxlfw = \
-	$(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \
-	$(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \
+	$(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(M68KAS) -m68360 -o $(obj)/wanxlfw.o; \
+	$(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; \
 	rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2020-04-12  1:16 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-11 23:05 [PATCH AUTOSEL 5.5 001/121] net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 002/121] netfilter: ctnetlink: be more strict when NF_CONNTRACK_MARK is not set Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 003/121] net: axienet: Convert DMA error handler to a work queue Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 004/121] net: phy: probe PHY drivers synchronously Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 009/121] ionic: check for NULL structs on teardown Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 010/121] net: phy: mscc: accept all RGMII species in vsc85xx_mac_if_set Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 018/121] selftests/bpf: Fix test_progs's parsing of test numbers Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 019/121] net/mlx5: E-Switch, Hold mutex when querying drop counter in legacy mode Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 020/121] libbpf: Ignore incompatible types with matching name during CO-RE relocation Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 023/121] ath10k: use kzalloc to read for ath10k_sdio_hif_diag_read Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 024/121] mwifiex: set needed_headroom, not hard_header_len Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 025/121] Bluetooth: L2CAP: handle l2cap config request during open state Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 027/121] ath10k: fix not registering airtime of 11a station with WMM disable Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 029/121] net/mlx5e: Init ethtool steering for representors Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 031/121] Bluetooth: Fix calculation of SCO handle for packet processing Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 032/121] net: rmnet: add missing module alias Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 035/121] Bluetooth: guard against controllers sending zero'd events Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 040/121] net: hns3: modify an unsuitable print when setting unknown duplex to fibre Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 042/121] net: intel: e1000e: fix possible sleep-in-atomic-context bugs in e1000e_get_hw_semaphore() Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 043/121] net: dsa: bcm_sf2: Also configure Port 5 for 2Gb/sec on 7278 Sasha Levin
2020-04-12  1:16   ` Florian Fainelli
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 044/121] sh_eth: check sh_eth_cpu_data::no_tx_cntrs when dumping registers Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 045/121] sh_eth: check sh_eth_cpu_data::cexcr " Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 046/121] sh_eth: check sh_eth_cpu_data::no_xdfar " Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 047/121] ice: Fix implicit queue mapping mode in ice_vsi_get_qs Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 049/121] mt76: mt7615: disable 5 GHz on MT7622 Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 050/121] mt76: fix handling full tx queues in mt76_dma_tx_queue_skb_raw Sasha Levin
2020-04-11 23:05 ` [PATCH AUTOSEL 5.5 051/121] rtw88: Fix incorrect beamformee role setting Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 055/121] rtw88: 8822c: update power sequence to v16 Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 065/121] rsi: fix null pointer dereference during rsi_shutdown() Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 068/121] mt76: mt7603: fix input validation issues for powersave-filtered frames Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 076/121] Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 078/121] ath10k: start recovery process when read int status fail for sdio Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 088/121] net: axienet: Propagate failure of DMA descriptor setup Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 089/121] brcmfmac: Fix driver crash on USB control transfer timeout Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 090/121] brcmfmac: Fix double freeing in the fmac usb data path Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 091/121] brcmfmac: fix the incorrect return value in brcmf_inform_single_bss() Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 092/121] xfrm: add prep for esp beet mode offload Sasha Levin
2020-04-11 23:06 ` [PATCH AUTOSEL 5.5 095/121] netfilter: nf_tables: silence a RCU-list warning in nft_table_lookup() Sasha Levin
2020-04-11 23:07 ` [PATCH AUTOSEL 5.5 119/121] svcrdma: Fix leak of transport addresses Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).