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 merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpowq-0001iN-8Y for barebox@lists.infradead.org; Mon, 29 Jun 2020 08:15:29 +0000 References: <20200623193506.13716-1-cleger@kalray.eu> <20200623193506.13716-5-cleger@kalray.eu> <2ba71698-8c76-ef33-145c-3a587327492e@pengutronix.de> <755055850.8699790.1592982949409.JavaMail.zimbra@kalray.eu> From: Ahmad Fatoum Message-ID: <40a7f463-db1b-1241-13e5-a8a454393c75@pengutronix.de> Date: Mon, 29 Jun 2020 10:15:24 +0200 MIME-Version: 1.0 In-Reply-To: <755055850.8699790.1592982949409.JavaMail.zimbra@kalray.eu> Content-Language: en-US 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: Re: [PATCH 4/4] kvx: add support for elf loading using bootm To: =?UTF-8?Q?Cl=c3=a9ment_Leger?= Cc: Barebox List SGVsbG8sCgpPbiA2LzI0LzIwIDk6MTUgQU0sIENsw6ltZW50IExlZ2VyIHdyb3RlOgo+PiBZb3Ug YWxyZWFkeSBmbHVzaGVkIG91dCB0aGUgZGNhY2hlIGNvbnRlbnRzIHRvIHRoZSBwb2ludCBvZiB1 bmlmaWNhdGlvbi4KPj4gV2hhdCBkbyB5b3UgZ2FpbiBieSBpbnZhbGlkYXRpbmcgaXQ/Cj4gCj4g SW5kZWVkLCB0aGlzIGlzIG5vdCBzdHJpY3RseSBuZWNlc3NhcnksIGl0IGp1c3QgYWxsb3cgdG8g Ym9vdCB0aGUgZWxmIHdpdGhvdXQgYQo+IGRpcnR5IEQtY2FjaGUuIEJ1dCBhY3R1YWxseSwgdGhl IGJvb3RlZCBwcm9ncmFtIHNob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IwNjkxNy0w ICAgIHwKPj4gQW10c2dlcmljaHQgSGlsZGVzaGVpbSwgSFJBIDI2ODYgICAgICAgICAgIHwgRmF4 OiAgICs0OS01MTIxLTIwNjkxNy01NTU1IHwKPiAKCi0tIApQZW5ndXRyb25peCBlLksuICAgICAg ICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfApTdGV1 ZXJ3YWxkZXIgU3RyLiAyMSAgICAgICAgICAgICAgICAgICAgICAgfCBodHRwOi8vd3d3LnBlbmd1 dHJvbml4LmRlLyAgfAozMTEzNyBIaWxkZXNoZWltLCBHZXJtYW55ICAgICAgICAgICAgICAgICAg fCBQaG9uZTogKzQ5LTUxMjEtMjA2OTE3LTAgICAgfApBbXRzZ2VyaWNodCBIaWxkZXNoZWltLCBI UkEgMjY4NiAgICAgICAgICAgfCBGYXg6ICAgKzQ5LTUxMjEtMjA2OTE3LTU1NTUgfAoKX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KYmFyZWJveCBtYWlsaW5n IGxpc3QKYmFyZWJveEBsaXN0cy5pbmZyYWRlYWQub3JnCmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQu b3JnL21haWxtYW4vbGlzdGluZm8vYmFyZWJveAo=