From patchwork Thu Feb 27 20:25:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 324920 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 7890D2C0096 for ; Fri, 28 Feb 2014 07:30:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C4AE64B624; Thu, 27 Feb 2014 21:30:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 IamwUhfPDVFo; Thu, 27 Feb 2014 21:30:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 922604B644; Thu, 27 Feb 2014 21:28:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E0C994B617 for ; Thu, 27 Feb 2014 21:28:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 Rg+wiM7b1LYn for ; Thu, 27 Feb 2014 21:28:31 +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-qg0-f73.google.com (mail-qg0-f73.google.com [209.85.192.73]) by theia.denx.de (Postfix) with ESMTPS id 9AE214B5BB for ; Thu, 27 Feb 2014 21:28:15 +0100 (CET) Received: by mail-qg0-f73.google.com with SMTP id f51so330548qge.0 for ; Thu, 27 Feb 2014 12:28:13 -0800 (PST) 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:in-reply-to :references; bh=jTKddsy7mTRvS3tmlc0WYMjSmCftMkTJlnyq5g1qZU8=; b=mz5bt6qrBcDGO1EgTRg/tYOFCnCkQ5IY20thSknN6BFCtV7UKpuzTDRYmISDCa3oPI afi7Ep9tsnnrzRYHWhBTn+nHL2XlXX25Ez/rysvYzUNorRpze/pEuBdbc7XF1y9KBstk sAsAEWyEH6Gdzy96/cPmlpqP+f+NEMXQxDP1XIFj0r+V6rv3+TB/ntoZ95vND//1pPgc 1Vz2JIJd8Q3PXd4ZEkQvzm5Pk8qs47aYGRUAKd59iv1L8pUhVrbV7X/24hsjjdkngpVD 10ltQLJXD2TDn7FDRnObhIM9Ut9GXbp//GwwOsMYiyrivrCRa/vObnbb1yEMs3BkQQht Wjxw== X-Gm-Message-State: ALoCoQnvJbnYYNS/amg75AItk1CGeURie/dZiyQkw3JhBxoTADMm6yRsM17twOjzNWlYpWfLcBVyIYP7xFJEu/g/lqj6IS16IYvcFMc883gva2hwnctgGt+Zz4yQTakAoTiNXzdNC/3JL4qEVXRdDiq/qhUVs/ccrc8ovFDfVzsXsPtLwvkLfM1ivgkq5rhA/8FabYr4ZmGs X-Received: by 10.236.78.70 with SMTP id f46mr5645138yhe.19.1393532893473; Thu, 27 Feb 2014 12:28:13 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id x29si952710yha.0.2014.02.27.12.28.13 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Feb 2014 12:28:13 -0800 (PST) Received: from kaki.bld.corp.google.com (kaki.bld.corp.google.com [172.29.216.32]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 5B7D631C2CE; Thu, 27 Feb 2014 12:28:13 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id D65D4221BE8; Thu, 27 Feb 2014 13:28:12 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 27 Feb 2014 13:25:57 -0700 Message-Id: <1393532785-9020-4-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.9.0.279.gdc9e3eb In-Reply-To: <1393532785-9020-1-git-send-email-sjg@chromium.org> References: <1393532785-9020-1-git-send-email-sjg@chromium.org> Cc: u-boot-review@google.com Subject: [U-Boot] [PATCH v2 03/31] sandbox: Build a device tree file for sandbox X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add support for building a device tree for sandbox's CONFIG_OF_HOSTFILE option to make it easier to use device tree with sandbox. This adjusts the Makefile to build a u-boot.dtb file which can be passed to sandbox U-Boot with: ./u-boot -d u-boot.dtb Reviewed-by: Che-Liang Chiou Reviewed-by: Gabe Black Signed-off-by: Simon Glass --- Changes in v2: None Makefile | 3 ++- arch/sandbox/dts/Makefile | 11 +++++++++++ arch/sandbox/dts/sandbox.dts | 30 ++++++++++++++++++++++++++++++ include/configs/sandbox.h | 1 + 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 arch/sandbox/dts/Makefile create mode 100644 arch/sandbox/dts/sandbox.dts diff --git a/Makefile b/Makefile index 0c0ff1d..17cd6ac 100644 --- a/Makefile +++ b/Makefile @@ -720,6 +720,7 @@ ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin +ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb ifneq ($(CONFIG_SPL_TARGET),) ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) endif @@ -1371,7 +1372,7 @@ endif $(build)=$(build-dir) $(@:.ko=.o) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -# FIXME Should go into a make.lib or something +# FIXME Should go into a make.lib or something # =========================================================================== quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile new file mode 100644 index 0000000..a4c980b --- /dev/null +++ b/arch/sandbox/dts/Makefile @@ -0,0 +1,11 @@ +dtb-$(CONFIG_SANDBOX) += sandbox.dtb + +targets += $(dtb-y) + +DTC_FLAGS += -R 4 -p 0x1000 + +PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y)) + @: + +clean-files := *.dtb diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts new file mode 100644 index 0000000..ea4b8ad --- /dev/null +++ b/arch/sandbox/dts/sandbox.dts @@ -0,0 +1,30 @@ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + model = "Sandbox test environment"; + + memory { + reg = <0 0x08000000>; + }; + + triangle { + compatible = "demo-shape"; + colour = "cyan"; + sides = <3>; + character = <83>; + }; + square { + compatible = "demo-shape"; + colour = "blue"; + sides = <4>; + }; + hexagon { + compatible = "demo-simple"; + colour = "white"; + sides = <6>; + }; + +}; diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 6fa2d03..e674233 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -32,6 +32,7 @@ #define CONFIG_FIT_SIGNATURE #define CONFIG_RSA #define CONFIG_CMD_FDT +#define CONFIG_DEFAULT_DEVICE_TREE sandbox #define CONFIG_FS_FAT #define CONFIG_FS_EXT4