From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.x-arc.de ([217.6.246.34] helo=root.phytec.de) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIzkn-00073m-FI for barebox@lists.infradead.org; Fri, 01 Jul 2016 14:49:14 +0000 Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id 59BF4A0033E for ; Fri, 1 Jul 2016 16:49:56 +0200 (CEST) From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= Date: Fri, 1 Jul 2016 16:48:39 +0200 Message-Id: <1467384519-23059-1-git-send-email-s.mueller-klieser@phytec.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] ARM: bootm: recalculate decompression space To: barebox@lists.infradead.org QWNjb3JkaW5nIHRvIHRoZSBrZXJuZWwgZG9jdW1lbnRhdGlvbiBpdCBpcyByZWNvbW1lbmRlZCB0 byBwbGFjZSB0aGUKY29tcHJlc3NlZCBpbWFnZSBiZXR3ZWVuIDMyIE1pQiBhbmQgMTI4IE1pQi4g VGhlIERUQiBhbmQgaW5pdHJkIHNob3VsZApiZSBwbGFjZWQgYWJvdmUgMTI4IE1pQi4gV2Ugd2ls bCBmb2xsb3cgdGhlIHJlY29tbWVuZGF0aW9uIGFzIGxvbmcgYXMgd2UKaGF2ZSBlbm91Z2ggUkFN LiBJZiB0aGlzIGlzIG5vdCB0aGUgY2FzZSwgd2UgZmFsbCBiYWNrIHRvIHRoZSBzY2hlbWUuClRo aXMgY2hhbmdlIGlzIHJlcXVpcmVkIGJlY2F1c2Ugb2YgdGhlIEFSTSBkZWZhdWx0IGtlcm5lbCBj b25maWcgY2hhbmdlcwpyZWdhcmRpbmcgUk9EQVRBIGx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