<div dir="ltr"><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 1, 2016 at 6:40 PM, Simon Glass <span dir="ltr"><<a href="mailto:sjg@chromium.org" target="_blank">sjg@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<span class=""><br>
On 1 July 2016 at 00:13, vinoth eswaran <<a href="mailto:evinoth1206@gmail.com">evinoth1206@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I am working on an embedded project using Minnowboard Max with U-boot<br>
> and customised Linux kernel.<br>
><br>
> To optimize boot time, currently I am comparing the different<br>
> comparison algorithms and have read about Brotli compression, which<br>
> seems to be good. So I have planned to test and see how good is Brotli<br>
> compression for my use case? The current Linux kernel and U-boot<br>
> doesn't support this compression, so I have to add this compression<br>
> algorithm code.<br>
><br>
> I am seeing two ways of doing this,<br>
><br>
> 1. In U-Boot<br>
><br>
> Fit Image creation from vmlinux. Adding Brotli compression to mkimage<br>
> tool and decompressor to U-Boot.<br>
> Here we are using mkimage tool to create the image.fit. I can do some<br>
> changes in mkimage and add the decompressor to the U-boot code<br>
><br>
> 2. In Linux Kernel<br>
><br>
> bzImage --> adding the Brotli compression and decompression to Linux Kernel<br>
><br>
> and change the default compression from gzip to brotli in the Linux<br>
> kernel Configuration.<br>
><br>
> I don't know which way is comparably easier to implement, any<br>
> suggestions on these topic will be of great help. Have any body tried<br>
> this algorithm for the Linux Kernel??<br>
<br>
</span>I suggest going with option 1. U-Boot supports several algorithms so<br>
another one is pretty easy to add. The last one was IH_COMP_LZ4, so<br>
you can search for that in the code. The commit was:<br>
<br>
027b728d Add support for LZ4 decompression algorithm<br></blockquote><div><br></div><div>Thanks for your suggestion and I am currently working on checking the Brotlli compression/decompression algorithm with Fit image.<br></div><div><br>During decompression I am facing some issue with respect to memory allocation, <br><br></div><div>The Brotli decompression algorithm (dec.c) fails because it is not able to allocate(around 4MB) for its ring buffer -BrotliAllocateRingBuffer()<br>Ring memory size:4194304 memory required :4194346<br><br></div><div>Not sure why this memory is not available in RAM , as currently we have only compressed image located at 0x02000000 with size of around 4.2MB and trying to extract the image to the location 0x01000000.<br></div><div>The Minnow board turbot RAM size is 2 GB and not sure why this happening?? Is there any configuration where I can increase the heap size ??<br><br></div><div>I tried to allocate some memory by calling malloc with different sizes (1MB, 2MB, 3MB etc.,) and I am seeing that allocation greater than 1 MB returns NULL. I think we have enough memory in RAM , might be the heap size is less. Where can I check the heap configuration in U-Boot??<br><br></div><div>Thanks & Regards,<br></div><div>Vinothkumar<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
Simon<br>
</blockquote></div><br></div></div></div>