From patchwork Tue May 17 12:59:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 623047 X-Patchwork-Delegate: monstr@monstr.eu 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 3r8HTp0tGHz9t4b for ; Tue, 17 May 2016 22:59:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b=LR7N81o4; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A5D64A7548; Tue, 17 May 2016 14:59:23 +0200 (CEST) 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 xEkoDUL4YgM7; Tue, 17 May 2016 14:59:23 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 27F2BA752D; Tue, 17 May 2016 14:59:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 990F9A7532 for ; Tue, 17 May 2016 14:59:19 +0200 (CEST) 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 3PNmnGlsMsgZ for ; Tue, 17 May 2016 14:59:19 +0200 (CEST) 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-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by theia.denx.de (Postfix) with ESMTPS id 4A50DA74E0 for ; Tue, 17 May 2016 14:59:14 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id e201so4608480wme.2 for ; Tue, 17 May 2016 05:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=A5AFMpyp8nnX36Af+4jC+lsVhtf0o0UMJ8jkiXtP8pk=; b=LR7N81o4pjQ07q6mErOxEmvALMSvQTeK2WLgD3616Km4S6ueH4lBvkOFzzhtVSBY/B +BwifN76MAqOJSvMOpEqrH+0fQCCFDhGLrVPRpQ18O81VsGejQXMGMpp7zcT9NO5av5V WXL7iXY26uvGLJgvufAD73zZFmieptP06NzopUksJe9MsVZChjJK7WnMYNXv8iRXc98r RD8U/Q8NJA3kr7d9qJ85sPGfT3H0Yj43o4RWd4+n5Sv1/5jjAanW5S+cPe+YfyirP1g7 VIsyD9Amvkqv/sa8ATiyCZKgZll4Bdxa0nI9RpDtW6eZVX8ausuYt2m51hWpL8O7IuNs lksw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=A5AFMpyp8nnX36Af+4jC+lsVhtf0o0UMJ8jkiXtP8pk=; b=HKu75n+BR20AhIJGLhcME1sxZHInHMvUebh/eSbl8xeBT613Eeb7ZBReOYw57K1kN+ YlaoVKlc/AiMZ/BPVZXkqAk7NIi2un3Z6sOdA0u3jRu+T24AdqQxPbkGkZl8hoQsOiG6 q1J7Tw0a66kLD/dl8t8mBXVMEumJobT7DTKh7/sugMLCUzkh1bvvFlMPOksjgjxDTyaQ XUhQrX6yk4HJU0GZtDz7HtQUSglrJivkcImF56Rc/b2oTqZ1w/iD7TxGi8pnR0hfqv91 W0x2hAVFGgHrNo13fRSw0piiZB5ROgEQCBXz6DSQ1mHi/65bYArif/aDlYGFmVrUIrgY H1fA== X-Gm-Message-State: AOPr4FXhV6JCw53+Q6deOgLdGUsuVq6MyGnVqNwFYCffl/sCy7EHsZb97pH5PdxJEZJEMw== X-Received: by 10.194.191.133 with SMTP id gy5mr1460876wjc.136.1463489954420; Tue, 17 May 2016 05:59:14 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id a63sm3463308wmh.11.2016.05.17.05.59.13 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 17 May 2016 05:59:13 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, Simon Glass Date: Tue, 17 May 2016 14:59:11 +0200 Message-Id: <437a37a010e7a0d85ac4f354ea81abaf275662d9.1463489948.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 Cc: Nathan Rossi , Julius Werner , Karl Apsite Subject: [U-Boot] [PATCH 1/2] mkimage: Report information about fpga 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" Add FIT_FPGA_PROP that user can identify an optional entry for fpga. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- common/image-fit.c | 4 +++ common/image.c | 1 + doc/uImage.FIT/multi-with-fpga.its | 67 +++++++++++++++++++++++++++++++++++ doc/uImage.FIT/source_file_format.txt | 3 ++ include/image.h | 4 ++- 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 doc/uImage.FIT/multi-with-fpga.its diff --git a/common/image-fit.c b/common/image-fit.c index 25f8a1183d58..498ec6400425 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1483,6 +1483,10 @@ void fit_conf_print(const void *fit, int noffset, const char *p) if (uname) printf("%s FDT: %s\n", p, uname); + uname = (char *)fdt_getprop(fit, noffset, FIT_FPGA_PROP, NULL); + if (uname) + printf("%s FPGA: %s\n", p, uname); + /* Print out all of the specified loadables */ for (loadables_index = 0; fdt_get_string_index(fit, noffset, diff --git a/common/image.c b/common/image.c index 9824685344bb..ec78b7eab336 100644 --- a/common/image.c +++ b/common/image.c @@ -160,6 +160,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_RKSPI, "rkspi", "Rockchip SPI Boot Image" }, { IH_TYPE_ZYNQIMAGE, "zynqimage", "Xilinx Zynq Boot Image" }, { IH_TYPE_ZYNQMPIMAGE, "zynqmpimage", "Xilinx ZynqMP Boot Image" }, + { IH_TYPE_FPGA, "fpga", "FPGA Image" }, { -1, "", "", }, }; diff --git a/doc/uImage.FIT/multi-with-fpga.its b/doc/uImage.FIT/multi-with-fpga.its new file mode 100644 index 000000000000..0cdb31fe91c4 --- /dev/null +++ b/doc/uImage.FIT/multi-with-fpga.its @@ -0,0 +1,67 @@ +/* + * U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs + * This example makes use of the 'loadables' field + */ + +/dts-v1/; + +/ { + description = "Configuration to load fpga before Kernel"; + #address-cells = <1>; + + images { + fdt@1 { + description = "zc706"; + data = /incbin/("/tftpboot/devicetree.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + load = <0x10000000>; + hash@1 { + algo = "md5"; + }; + }; + + fpga@1 { + description = "FPGA"; + data = /incbin/("/tftpboot/download.bit"); + type = "fpga"; + arch = "arm"; + compression = "none"; + load = <0x30000000>; + hash@1 { + algo = "md5"; + }; + }; + + linux_kernel@1 { + description = "Linux"; + data = /incbin/("/tftpboot/zImage"); + type = "kernel"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0x8000>; + entry = <0x8000>; + hash@1 { + algo = "md5"; + }; + }; + }; + + configurations { + default = "config@2"; + config@1 { + description = "Linux"; + kernel = "linux_kernel@1"; + fdt = "fdt@1"; + }; + + config@2 { + description = "Linux with fpga"; + kernel = "linux_kernel@1"; + fdt = "fdt@1"; + fpga = "fpga@1"; + }; + }; +}; diff --git a/doc/uImage.FIT/source_file_format.txt b/doc/uImage.FIT/source_file_format.txt index 9c527c3e012d..3f5418045e5b 100644 --- a/doc/uImage.FIT/source_file_format.txt +++ b/doc/uImage.FIT/source_file_format.txt @@ -236,6 +236,7 @@ o config@1 |- kernel = "kernel sub-node unit name" |- ramdisk = "ramdisk sub-node unit name" |- fdt = "fdt sub-node unit-name" + |- fpga = "fpga sub-node unit-name" |- loadables = "loadables sub-node unit-name" @@ -251,6 +252,8 @@ o config@1 "fdt type"). - setup : Unit name of the corresponding setup binary (used for booting an x86 kernel). This contains the setup.bin file built by the kernel. + - fpga : Unit name of the corresponding fpga bitstream blob + (component image node of a "fpga type"). - loadables : Unit name containing a list of additional binaries to be loaded at their given locations. "loadables" is a comma-separated list of strings. U-Boot will load each binary at its given start-address. diff --git a/include/image.h b/include/image.h index a8488f2b392e..e2a90ca202b1 100644 --- a/include/image.h +++ b/include/image.h @@ -247,8 +247,9 @@ struct lmb; #define IH_TYPE_RKSPI 25 /* Rockchip SPI image */ #define IH_TYPE_ZYNQIMAGE 26 /* Xilinx Zynq Boot Image */ #define IH_TYPE_ZYNQMPIMAGE 27 /* Xilinx ZynqMP Boot Image */ +#define IH_TYPE_FPGA 28 /* FPGA Image */ -#define IH_TYPE_COUNT 28 /* Number of image types */ +#define IH_TYPE_COUNT 29 /* Number of image types */ /* * Compression Types @@ -810,6 +811,7 @@ int bootz_setup(ulong image, ulong *start, ulong *end); #define FIT_LOADABLE_PROP "loadables" #define FIT_DEFAULT_PROP "default" #define FIT_SETUP_PROP "setup" +#define FIT_FPGA_PROP "fpga" #define FIT_MAX_HASH_LEN HASH_MAX_DIGEST_SIZE