From patchwork Fri May 23 23:41:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 4236181 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4522C9F32B for ; Fri, 23 May 2014 23:45:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20B68203AF for ; Fri, 23 May 2014 23:45:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FBD1203AE for ; Fri, 23 May 2014 23:45:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wnz6N-00031L-TG; Fri, 23 May 2014 23:42:15 +0000 Received: from mail-pb0-f41.google.com ([209.85.160.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wnz6K-000305-UV for linux-arm-kernel@lists.infradead.org; Fri, 23 May 2014 23:42:13 +0000 Received: by mail-pb0-f41.google.com with SMTP id uo5so4845918pbc.28 for ; Fri, 23 May 2014 16:41:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+FX71V6m7WaKKjtD8fbzybnICTvS0f/F3QOZRqhrYpY=; b=OGoY2imsm43idTBUFbeGLlD1E5KB9Smq5LcsPY8kf+FT9WymVhFCxH3vkXbKjhRSfX KuWQ6eRklu0W+7gsRk1K5S/m+5OXU3fZJl8cRoK69inH6ytbUDL1TF2sBFRA3keAHrG7 QkWegG+ETmY9Ec55a0GAgXwmp7GgJ6gRwxvg9GSuk12taEl/A83//IB8C17id0Naaz0K 3nLtOSiOsbozb/MszG2U56/tbTERkwO0v1W0KA9UPFwa8hgk4gb+D43N9vvtXYp7Zd/a YFmQRAp/PyE5zXwBY4G43tB2Kk8K9TWD/Sg591pgGIoT5dK64OY5Jinjz/eS7NG+07Cv ooFw== X-Gm-Message-State: ALoCoQko1yDxuAA018W82CNb5LqvMRPDTzAEAP1kiDLGFPRNivF83gLLpmRvttx3EBUfWoEFILJB X-Received: by 10.67.14.231 with SMTP id fj7mr9760022pad.115.1400888510719; Fri, 23 May 2014 16:41:50 -0700 (PDT) Received: from localhost (c-67-183-17-239.hsd1.wa.comcast.net. [67.183.17.239]) by mx.google.com with ESMTPSA id hb10sm6393868pbd.75.2014.05.23.16.41.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 23 May 2014 16:41:50 -0700 (PDT) From: Kevin Hilman To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH] scripts/dtc: pad DTBs to facilitate later modification Date: Fri, 23 May 2014 16:41:47 -0700 Message-Id: <1400888507-11637-1-git-send-email-khilman@linaro.org> X-Mailer: git-send-email 1.9.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140523_164213_012713_D60652E8 X-CRM114-Status: GOOD ( 12.05 ) X-Spam-Score: -0.7 (/) Cc: Thomas Petazzoni , Michal Marek , linaro-kernel@lists.linaro.org, Arnd Bergmann , Stephen Warren , Nicolas Pitre , open list , Olof Johansson , "open list:KERNEL BUILD + fi..." X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP By default, add some padding to the DT blobs to facilitate later patching. An example need for DTB patching is the need to modifiy the command line on platforms where ATAGS are not (or cannot) be used to pass the commandline. For example, we do not support a big-endian kernel reading ATAGS from a little-endian u-boot, so the only way to pass a command line in the DT. Also, without ATAG support (or if u-boot was built without CONFIG_INITRD_TAG) the only way to pass an initrd is by adding an initrd= option to command line (in the DT). Therefore, to facilitate adding to the DT command line directly in the DTB, add some padding. Cc: Nicolas Pitre Cc: Stephen Warren Cc: Thomas Petazzoni Signed-off-by: Kevin Hilman Acked-by: Stephen Warren --- I kinda pulled 64 bytes out of the air here since it's enough to add some common things to the commandline like debug, earlyprink initrd=,, etc., but I'm certainlly not opposed to more padding. scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 6a5b0decb797..d7a57c2620f3 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -264,7 +264,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb quiet_cmd_dtc = DTC $@ cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ - $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ + $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 -p 64 \ -i $(dir $<) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)