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: 30859 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4966920369 for ; Fri, 23 May 2014 23:42:00 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf26899802iec.10 for ; Fri, 23 May 2014 16:41:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=HDCARWMDIjftmxXTUWAWrrXls25OdR9rE9qqmJlkYr4=; b=jlz4ELYN6U0mt5LmKJYX2jC/BBPsbWLEuY2yiUaPhziBwiNV33UBzdeBthVKLS/Jzv ykXYEGq8XzeLV0FRMqo0LoqWO4PtC3yreNHDI0Qjt5Mqg08HSfQrjtbco2kYDqLx/95L wbETNFj1eZ655me59je1xgEq8zdLEx7//Juo4y8ldWS0ph6XksUN4m4F7kgLn6k8UPyp Kk+X8fufPigbdVdXZHFqq0evN2Y/qczZHGS1OFy1sgo5IbZN4UH460ULzejrAVCaQctL OtjtBYo20UC6ql8v/ab5n0DkLAUeY4h9PVyiUEbXNfkUmLneixs/zVyKg5wspd6xDc58 gMhg== X-Gm-Message-State: ALoCoQmjOf0dT1KbASefiI3L1xe+l07LWs4hwNTQ8XA6ReYcOhUdEqavLnhimyp5SeqDgJeglzaw X-Received: by 10.182.241.9 with SMTP id we9mr3810939obc.22.1400888519787; Fri, 23 May 2014 16:41:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.49 with SMTP id z46ls2110439qge.50.gmail; Fri, 23 May 2014 16:41:59 -0700 (PDT) X-Received: by 10.220.249.6 with SMTP id mi6mr4513429vcb.33.1400888519607; Fri, 23 May 2014 16:41:59 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id dl2si2609745vdc.1.2014.05.23.16.41.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 16:41:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ij19so7098977vcb.0 for ; Fri, 23 May 2014 16:41:59 -0700 (PDT) X-Received: by 10.221.4.66 with SMTP id ob2mr6846793vcb.28.1400888519486; Fri, 23 May 2014 16:41:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp68623vcb; Fri, 23 May 2014 16:41:59 -0700 (PDT) X-Received: by 10.68.247.131 with SMTP id ye3mr10084356pbc.40.1400888518628; Fri, 23 May 2014 16:41:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ps5si5846340pbb.80.2014.05.23.16.41.58; Fri, 23 May 2014 16:41:58 -0700 (PDT) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751017AbaEWXlx (ORCPT + 8 others); Fri, 23 May 2014 19:41:53 -0400 Received: from mail-pb0-f49.google.com ([209.85.160.49]:47001 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751303AbaEWXlv (ORCPT ); Fri, 23 May 2014 19:41:51 -0400 Received: by mail-pb0-f49.google.com with SMTP id jt11so4804400pbb.36 for ; Fri, 23 May 2014 16:41:50 -0700 (PDT) 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 Cc: Arnd Bergmann , Olof Johansson , linaro-kernel@lists.linaro.org, Nicolas Pitre , Stephen Warren , Thomas Petazzoni , Michal Marek , linux-kbuild@vger.kernel.org (open list:KERNEL BUILD + fi...), linux-kernel@vger.kernel.org (open list) 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 Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: khilman@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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)