Received: by 10.223.185.116 with SMTP id b49csp5464607wrg; Wed, 7 Mar 2018 12:12:50 -0800 (PST) X-Google-Smtp-Source: AG47ELtXvJBO8XBdb0bwabKj6BfB0Ky9F2oF4mbq2XUQX8GLh4KT4UPwV+vJM2ubdZRYm8NUR0vT X-Received: by 10.98.27.10 with SMTP id b10mr23866070pfb.121.1520453570073; Wed, 07 Mar 2018 12:12:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520453570; cv=none; d=google.com; s=arc-20160816; b=ZJyvuf1Y3YDv4DgXix8KaJIPx2gonvD51PCUbEJ5NGIxBwpJTdRv9lKZrXJADqI18E wsh6iGWHP45kOvDcBMaVWEf/JjgLf9AnjtPrGWAuqdgwvJFA+LG+6KY67YPZNp1AmGMs NA52w9Tgbwn6M8Sjv7h5dcY9mFfGJSS6luV1mFx0ByXVu2+Ghu3t44VEvlgYF6/ePJmY f5JiUnq6wUBwGQUYSAWL0TYD2qCB0/JuzAGzeAeF1Z8ZSesAj9M2yFxbpJh8qRYfvtZz U7+sV9ulePbYu0P0CjyU8tpkZj3jC3VHEUXp9S4vSmkf5MtkrNTOMCMyJNmd2ZlzFBdv 3mMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=PBN2DEFDcAVdNoB+CJrX7S+pGwbqjmH/++UTk7ZoMLo=; b=tBO2JOW2cfhmiKysMMiWGvIHWt9bVdczmDAmcTvlN6E8BMCmEunE6ztPfJGWrgudvX CssSzQ0m6+2NqY03k97BgvL6E/lXzBGSCxbpeiAFuqMle6OtxuagBPKPANuDUygOLrcq 2xwhsMTTRblDYzkQdoIc7JwU1H7JxA3ARpfNWbIwt0XQdI64weKqSIwPoFuUWrn/imF1 r5GU7TYfOYv6yN8oQ7PIVKhOugwfhJq/GpnE4oVw8WV0v3Sy2XY67CsbHhOlmCxVIvtI 4d2MyWlwqMIYlrWmEKsHJfJVfM+ho5AgD3Ri8fRbtKplLvqsYDJHR+2h9L2UcGQmkUw6 +DRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MA2BHisu; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e87si14466925pfj.381.2018.03.07.12.12.35; Wed, 07 Mar 2018 12:12:50 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MA2BHisu; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965446AbeCGULr (ORCPT + 99 others); Wed, 7 Mar 2018 15:11:47 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:44961 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965386AbeCGULo (ORCPT ); Wed, 7 Mar 2018 15:11:44 -0500 Received: by mail-pl0-f66.google.com with SMTP id 9-v6so1971737ple.11; Wed, 07 Mar 2018 12:11:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=PBN2DEFDcAVdNoB+CJrX7S+pGwbqjmH/++UTk7ZoMLo=; b=MA2BHisuKMbq2DWRog1yAbjuxeCIRGDQ3u2p5ID7G0NkC/MJiuar6iKcjBuhTIWrbZ 1Ffr80dFk8X2dCJZiHSazke7J7HaE8pMaimqiiQd+FgTjJQ0m9y6hAWTgp48o1cbp4r1 xCeh5X99DqFwUpQmIfrV8LOrRbs/HF0nhYKPW9aIiqMo8IqgpGU5Isl5XJnPlBpeGwDD 56cTLeYTxoeZcNV+749IEGyxIZqBTo7r0IZ3CtzvQLRpqOfkfD6dpO9NgEy8stXDAMC9 LOcsWRfxw4i6xO2IbSZOg0eM5A2gEo7RVouzkqJ5ZpdYa07pElWpKXgk+3nsU49pL9Bl um9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PBN2DEFDcAVdNoB+CJrX7S+pGwbqjmH/++UTk7ZoMLo=; b=GOvr0QFWlLg2DLVqph0Nj+zhrLG0iDfFXN4LfCgxU/b8sWAAxZhrLJbJ/j6VBfTDIo O9WP6CzWKc/VSwZB/9mggc0LC1BStbdxEbKvd2tAZnG7DhITPuXcK7t78Emkct5TH4mE ODKmIhAQs/YhMidt1ARA7MVJsD+tAv/I0LweNZJFpzZH8RTFULHhVeTUZkABVCH9vGbW lG9aEhvfREA2vnHVHoE78wT4sEo3vjQ5m7UmxGTX0NGMQbcf3PbkTNSGwgXGEy78KwIP H8YAsG4bkuuvrAThcLEPgqoNsjvZQSFqAEeO21CLXwUgLfTAnDnW3FNNe9tQ8NbX/It1 zBzA== X-Gm-Message-State: APf1xPCWD8TSN4NwepGFRM++RyTD19S5tZM73isJsPChZcbTRN9YFrNU aq0FRELg6WtxklAGLh9A4+s= X-Received: by 2002:a17:902:51ee:: with SMTP id y101-v6mr21898884plh.157.1520453503599; Wed, 07 Mar 2018 12:11:43 -0800 (PST) Received: from [192.168.1.70] (c-73-93-215-6.hsd1.ca.comcast.net. [73.93.215.6]) by smtp.gmail.com with ESMTPSA id f82sm43096798pfd.175.2018.03.07.12.11.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Mar 2018 12:11:43 -0800 (PST) Subject: Re: [PATCH] kbuild: Handle builtin dtb files containing hyphens To: James Hogan , linux-kbuild@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Rob Herring , Masahiro Yamada , Michal Marek , Ralf Baechle , Florian Fainelli , Kevin Cernekee , linux-mips@linux-mips.org, stable@vger.kernel.org References: <20180307140633.26182-1-jhogan@kernel.org> From: Frank Rowand Message-ID: <7ecea7ca-2931-16bc-a110-1ecdaf17f0f2@gmail.com> Date: Wed, 7 Mar 2018 12:11:41 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180307140633.26182-1-jhogan@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I initially misread the patch description (and imagined an entirely different problem). On 03/07/18 06:06, James Hogan wrote: > 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 `-' Please replace the following section: > 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). with: cmd_dt_S_dtb constructs the assembly source to incorporate a devicetree FDT (that is, the .dtb file) as binary data in the kernel image. This assembly source contains labels before and after the binary data. The label names incorporate the file name of the corresponding .dtb file. Hyphens are not legal characters in labels, so transform all hyphens from the file name to underscores when constructing the labels. > > 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'; \ > ) > $@ > > Reviewed-by: Frank Rowand