Received: by 10.223.185.116 with SMTP id b49csp5080278wrg; Wed, 7 Mar 2018 06:08:41 -0800 (PST) X-Google-Smtp-Source: AG47ELtS40gPwnmdXS3pV6cpdbfhsj28S8V03M/q77HNKJixMhV4273ptAzOzJdFv/QLz7zRkX0s X-Received: by 2002:a17:902:1763:: with SMTP id i90-v6mr20224347pli.309.1520431721177; Wed, 07 Mar 2018 06:08:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520431721; cv=none; d=google.com; s=arc-20160816; b=iGKfjq9ZolpvbIIF92sugfAH4R3cY8Y7adIqvzqwC13fl34hTfjSaVRqfx/2duS8S3 uu1zONTVSjj+JLItvDTyi5WJnJSXBadkSlzfcfCOcZfZUndnk5Og+E1by004Y6RerQBi CbQpZXdn+CGWnUhzsSghtdOGq28ep2re/iN/nAtTPH05MnTUk/ZM2DT1OXkAWHrQuojq hX+1Uyhqf0ksTGiOfGqaeqoRq2RO6GUoy2iJEJX1tohwp80ahnaHD38zzW/QlZZwsgcU pZhozKqju8eEO+I2/5Zwj+7w/yXaYBmKnuYLLUZqfKDWuNb24P4c7Z7Fe+HBKS4vUZV8 NHtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:arc-authentication-results; bh=dSe9w1Y1DTi4anM8KXJ7seJOWDhk9/nRn4A1R8EBk78=; b=ik+Siyw+3N1+97lwgQtt/muQI8xW2f0D99osv0UmOfIkCG07pxbfV9O00wF7njnE3q Mw31R1akXnqQOnzXNbGdsIt92lS7kxpuVT1namTXK7WMw7Fxp6X3bD8YkuTGX72ktXOT V7stv56LoHsYBXR9rWNYg5TRtBNhpiJXQ4N/sd+hrbeYQVF9AQ9Gs/nHyU7khnuOpiXu VZpGG7BOOsyJ+EPoA6YHagvnoH/QwXC6gfSLpIKMZWUQt0NvG176kvrXp/UBdWqWoZjc nxI/lhRqQYI6tRDoF1fMERV5gap/aFcRvV/0CQuVV6BZ5OHwmSIhYJWUPQWL9YLSuL10 9g2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si11274679pgc.726.2018.03.07.06.08.26; Wed, 07 Mar 2018 06:08:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754418AbeCGOHN (ORCPT + 99 others); Wed, 7 Mar 2018 09:07:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:34908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751189AbeCGOHK (ORCPT ); Wed, 7 Mar 2018 09:07:10 -0500 Received: from localhost.localdomain (jahogan.plus.com [212.159.75.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B07E52172D; Wed, 7 Mar 2018 14:07:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B07E52172D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jhogan@kernel.org From: James Hogan To: linux-kbuild@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, James Hogan , Rob Herring , Frank Rowand , Masahiro Yamada , Michal Marek , Ralf Baechle , Florian Fainelli , Kevin Cernekee , linux-mips@linux-mips.org, stable@vger.kernel.org Subject: [PATCH] kbuild: Handle builtin dtb files containing hyphens Date: Wed, 7 Mar 2018 14:06:33 +0000 Message-Id: <20180307140633.26182-1-jhogan@kernel.org> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On dtb files which contain hyphens, the dt_S_dtb command to build the dtb.S files (which allow DTB files to be built into the kernel) results in errors like the following: bcm3368-netgear-cvg834g.dtb.S: Assembler messages: bcm3368-netgear-cvg834g.dtb.S:5: Error: : no such section bcm3368-netgear-cvg834g.dtb.S:5: Error: junk at end of line, first unrecognized character is `-' bcm3368-netgear-cvg834g.dtb.S:6: Error: unrecognized opcode `__dtb_bcm3368-netgear-cvg834g_begin:' bcm3368-netgear-cvg834g.dtb.S:8: Error: unrecognized opcode `__dtb_bcm3368-netgear-cvg834g_end:' bcm3368-netgear-cvg834g.dtb.S:9: Error: : no such section bcm3368-netgear-cvg834g.dtb.S:9: Error: junk at end of line, first unrecognized character is `-' This is due to the hyphen being used in symbol names. Replace all hyphens with underscores in the dt_S_dtb command to avoid this problem. Quite a lot of dts files have hyphens, but its only a problem on MIPS where such files can be built into the kernel. For example when CONFIG_DT_NETGEAR_CVG834G=y, or on BMIPS kernels when the dtbs target is used (in the latter case it admitedly shouldn't really build all the dtb.o files, but thats a separate issue). Fixes: 695835511f96 ("MIPS: BMIPS: rename bcm96358nb4ser to bcm6358-neufbox4-sercom") Signed-off-by: James Hogan Cc: Rob Herring Cc: Frank Rowand Cc: Masahiro Yamada Cc: Michal Marek Cc: Ralf Baechle Cc: Florian Fainelli Cc: Kevin Cernekee Cc: devicetree@vger.kernel.org Cc: linux-kbuild@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: # 4.9+ --- scripts/Makefile.lib | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 5589bae34af6..a6f538b31ad6 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -297,11 +297,11 @@ cmd_dt_S_dtb= \ echo '\#include '; \ echo '.section .dtb.init.rodata,"a"'; \ echo '.balign STRUCT_ALIGNMENT'; \ - echo '.global __dtb_$(*F)_begin'; \ - echo '__dtb_$(*F)_begin:'; \ + echo '.global __dtb_$(subst -,_,$(*F))_begin'; \ + echo '__dtb_$(subst -,_,$(*F))_begin:'; \ echo '.incbin "$<" '; \ - echo '__dtb_$(*F)_end:'; \ - echo '.global __dtb_$(*F)_end'; \ + echo '__dtb_$(subst -,_,$(*F))_end:'; \ + echo '.global __dtb_$(subst -,_,$(*F))_end'; \ echo '.balign STRUCT_ALIGNMENT'; \ ) > $@ -- 2.13.6