From patchwork Mon Jan 16 04:09:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 715570 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3v20B21yG8z9s3T for ; Mon, 16 Jan 2017 15:09:46 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="KjPKye+5"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8003CA75E4; Mon, 16 Jan 2017 05:09:43 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IwEp0wDJK7jn; Mon, 16 Jan 2017 05:09:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 35FE0A75CC; Mon, 16 Jan 2017 05:09:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5F9A6A75CC for ; Mon, 16 Jan 2017 05:09:21 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j6MYxrNJnJRB for ; Mon, 16 Jan 2017 05:09:21 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ot0-f177.google.com (mail-ot0-f177.google.com [74.125.82.177]) by theia.denx.de (Postfix) with ESMTPS id 925AAA75B7 for ; Mon, 16 Jan 2017 05:09:15 +0100 (CET) Received: by mail-ot0-f177.google.com with SMTP id 65so38117698otq.2 for ; Sun, 15 Jan 2017 20:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=1DVA0FxFueX/2UuTuJTCUwkPZcsqsFQrLRiRDUgNiF0=; b=KjPKye+5GsEOj1tCaIIXLNalU+qmyd+X/8h0lW2/BzkS3L0Yxp3N7RRV2sEsTHOOP8 fOC42MM7Kh4HGs5aV176NRTHL3PPBpqePj3m7gal0+nmUCYSwSNqJdZzHtxA7zwyQ5LI Qmaj6WPt3qDhxk9N0a6y8uaP5wwDTaiMG9mGhA8bXrBcQyBpxKxqfh+g9t6AjzlTECLY liyb3NJUgIrA2OVRzEZVKXz4N71ndi0bSvzl80iMATyHAnozPojdBM8fPaNXP8EiB4zS DDpYfJAu1VcUC+odVpBtmK1IdCO7DFZ3y9s/LLnURvbJgjZshXRsR/znjIHtzwrkl+V5 J+0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=1DVA0FxFueX/2UuTuJTCUwkPZcsqsFQrLRiRDUgNiF0=; b=Jm0S5kvlixb6hL6vENaaX2NoKSBR2txmdCEEeXuYK6ikt9gV2NerBJpk0+Q+OFP7Y4 Cnc+4eyxKJnKetR0juJTSOW/jhMUH0jqn2Qw6Z2H1hDfg6eFF2te089ZH4Rx6XtskWh1 D65BPRQss71T89GByvbnBqXA+Yel6tOAt3Nm/HHJiRcmTA0iRG53fTBg1HZIlyWW0hdP k3REVkLVDyV8NWAbiHzBWeiBBZ6xwRui9hvyEpj3Gkj1RS8uugSdvA/NsIN7ysWPgbW+ QXyKnTMdoMFEnS1NQ44ELZ260100n7fD829SjOy90tnfuiiYCoio3+laXXmhNRUEYMrO D/Mw== X-Gm-Message-State: AIkVDXJjmvpMZL6WRoX/17rcEk0lOmMlHvraeisZlCGHp6z7GNWGamLqV8bEPE+Wg/tqdh7a X-Received: by 10.157.29.66 with SMTP id m60mr1094406otm.162.1484539753654; Sun, 15 Jan 2017 20:09:13 -0800 (PST) Received: from kaki.bld.corp.google.com ([100.100.197.46]) by smtp.gmail.com with ESMTPSA id k3sm8460604otd.17.2017.01.15.20.09.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Jan 2017 20:09:13 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 24BC043872; Sun, 15 Jan 2017 21:09:11 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sun, 15 Jan 2017 21:09:08 -0700 Message-Id: <20170116040908.22718-1-sjg@chromium.org> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog Subject: [U-Boot] [PATCH] dtoc: Replace dot with underscore to avoid compiler errors X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If there is a '.' in a compatible string, then dtoc will produce a struct with a name containing a '.'. This won't work, so replace it with '_'. Also add a suitable test to the sandbox device tree to catch this. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox.dts | 5 +++++ tools/dtoc/dtoc.py | 1 + 2 files changed, 6 insertions(+) diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index e6d336f16ab..20614646f7f 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -203,6 +203,11 @@ stringarray = "one"; }; + spl-test4 { + u-boot,dm-pre-reloc; + compatible = "sandbox,spl-test.2"; + }; + square { compatible = "demo-shape"; colour = "blue"; diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py index 11050b66f71..6df7b0da13a 100755 --- a/tools/dtoc/dtoc.py +++ b/tools/dtoc/dtoc.py @@ -54,6 +54,7 @@ def Conv_name_to_c(name): str = name.replace('@', '_at_') str = str.replace('-', '_') str = str.replace(',', '_') + str = str.replace('.', '_') str = str.replace('/', '__') return str