Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1083005pxk; Fri, 25 Sep 2020 05:56:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3c8WQiLWHgMcJljzQDGQme2fJ2lec8OlC/Kp/FOASX9ydZRJ6Xey4vaeIstUtUxbrjT3S X-Received: by 2002:a05:6402:84f:: with SMTP id b15mr1137428edz.149.1601038609682; Fri, 25 Sep 2020 05:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601038609; cv=none; d=google.com; s=arc-20160816; b=VztOy4+IrTYn96mhDEbkv8iW2vbeHixKXwZBkvwfG6eAWJUvLdrhRpPNlg3gOf5Zdm DJURZDA5rzRPaDs0cUURlhzfhtc4yHj/0zESrgJFFUv9ZRQ6eEzGkIDwJMhr1i3Zs4ZQ HMh1xAZhhXcgyEXw5vq97/MvE4M6N9WoXyrOp0OeKg0hbK+ZSUmfySs9HiZtM7BvGViz AvHIDTdskpN5nHL6JQFjJ6UEm3+7fIanCxSnMHuBN7GsjSg0RcsOLMosr0+AdBk6X3Ee //WArlgU+UijPEduvmxBye4KgXsWYAmZm6XLj+GMVt3uGZRqqbwKjaE2Q/Hmg8aprZSz WpLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+FQw7yLlg+phpyp8Iroirh8zJ2U0Oks8P7FuxxrZkBA=; b=lNV+MpJcZKameXGW2Ou0t3pCWiAhbdPjLWqukc9mhzDn2J3SsbYB+ewyOzYxaf9l8V 4c6GW5F9L9iooqmiKFWsKnVxKZhA/R4eDkdIH0jjjjKQdVRQv4fQ9z3aMcNCCCVBz4lu dx2NAwU9aNY0yRTCnavszxBMxagJcwsj7oULleOlcWYwMXEWtbqmK995rG87Dg92iU36 bN39tsYuPg7cZcnk9J1WDYvLplps2u3rUpngR/8+D4ag25TuqP4fYfcU3USRzSVtnL05 XtdDEk02Bjxis60AoQvKByrb2H+x2mY6yvVdxX691m8JlgpV70FHzVnPY0RMT45Gc09K CcaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nUK3n8sW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si1814038ejn.61.2020.09.25.05.56.26; Fri, 25 Sep 2020 05:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nUK3n8sW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729576AbgIYMy3 (ORCPT + 99 others); Fri, 25 Sep 2020 08:54:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:32954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729569AbgIYMy2 (ORCPT ); Fri, 25 Sep 2020 08:54:28 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3457E21741; Fri, 25 Sep 2020 12:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601038466; bh=rHj9sRhJntAzO0JLGuynsGUS6iDb8qG5E+w0MCVmR58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nUK3n8sW7YInno4cfLw/X7+cQViZaatg3yLCwt22dNuB7sG/KK83Kgp5K+ov8iG/b RrmA2sInWfqFQCYVKl423YKBdsj9wyfPwYl0qd3G2tf+RVs6Cytja9wNJhNNzAbfzk BRu1whpwFxZ8wRL0rIQ7mEU9Y/X2lxGe9npP+dVU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Masahiro Yamada , Nick Desaulniers Subject: [PATCH 4.19 28/37] net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware Date: Fri, 25 Sep 2020 14:48:56 +0200 Message-Id: <20200925124725.211971609@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200925124720.972208530@linuxfoundation.org> References: <20200925124720.972208530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada commit 63b903dfebdea92aa92ad337d8451a6fbfeabf9d upstream. 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 Signed-off-by: Masahiro Yamada Signed-off-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman --- drivers/net/wan/Kconfig | 2 +- drivers/net/wan/Makefile | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) --- a/drivers/net/wan/Kconfig +++ b/drivers/net/wan/Kconfig @@ -199,7 +199,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. --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -41,17 +41,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