From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aMWDH-0003po-6d for barebox@lists.infradead.org; Fri, 22 Jan 2016 07:33:05 +0000 From: Sascha Hauer Date: Fri, 22 Jan 2016 08:32:31 +0100 Message-Id: <1453447952-30818-14-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1453447952-30818-1-git-send-email-s.hauer@pengutronix.de> References: <1453447952-30818-1-git-send-email-s.hauer@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 13/14] bootm: add initial FIT support To: Barebox List RnJvbTogSmFuIEx1ZWJiZSA8amx1QHBlbmd1dHJvbml4LmRlPgoKVGhpcyBpbXBsZW1lbnRhdGlv biBpcyBpbnNwaXJlZCBieSBVLUJvb3QncyBGSVQgc3VwcG9ydC4gSW5zdGVhZCBvZgp1c2luZyBs aWJmZHQgKHdoaWNoIGRvZXMgbm90IGV4aXN0IGluIGJhcmVib3gpLCBjb25maWd1cmF0aW9uIHNp Z25hdHVyZXMKYXJlIHZlcmlmaWVkIGJ5IHVzaW5nIGEgc2ltcGxpZmllZCBEVCBwYXJzZXIgYmFz ZWQgb24gYmFyZWJveCdzIG93bgpjb2RlLgoKQ3VycmVudGx5LCBvbmx5IHNpZ25lZCBjb25maWd1 cmF0aW9ucyB3aXRoIGhhc2hlZCBpbWFnZXMgYXJlIHN1cHBvcnRlZCwKYXMgdGhlIG90aGVyIHZh cmlhbnRzIGFyZSBsZXNzIHVzZWZ1bCBmb3IgdmVyaWZpZWQgYm9vdC4gQ29tcGF0aWJsZSBGSVQK aW1hZ2VzIGNhbiBiZSBjc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