From 8c1e7d48ad46b9742f39ecf5c313607c5521a786 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 4 Aug 2014 17:21:23 -0600 Subject: [PATCH] fix bootimage lzma build We were using the length of the uncompressed boot image when generating the object file, whereas we should have been using the compressed length. --- src/tools/bootimage-generator/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/bootimage-generator/main.cpp b/src/tools/bootimage-generator/main.cpp index 8860496be3..201cd50648 100644 --- a/src/tools/bootimage-generator/main.cpp +++ b/src/tools/bootimage-generator/main.cpp @@ -1851,10 +1851,6 @@ void writeBootImage2(Thread* t, abort(); } - SymbolInfo bootimageSymbols[] - = {SymbolInfo(0, bootimageStart), - SymbolInfo(bootimageData.length, bootimageEnd)}; - uint8_t* bootimage; unsigned bootimageLength; if (useLZMA) { @@ -1874,6 +1870,10 @@ void writeBootImage2(Thread* t, bootimageLength = bootimageData.length; } + SymbolInfo bootimageSymbols[] + = {SymbolInfo(0, bootimageStart), + SymbolInfo(bootimageLength, bootimageEnd)}; + platform->writeObject(bootimageOutput, Slice(bootimageSymbols, 2), Slice(bootimage, bootimageLength),