<div dir="auto">Hi Ronaldo,<div dir="auto"><br></div><div dir="auto">I tried doing that by removing the copy line in Makefile but anyhow those files come into build_dir.</div><div dir="auto"><br></div><div dir="auto">I suspect that those files get included from dl directory. Is my understanding in this correct?</div><div dir="auto"><br></div><div dir="auto">If I remove packages from dl directory then I get compilation errors.</div><div dir="auto"><br></div><div dir="auto"><br><div data-smartmail="gmail_signature" dir="auto">Thanks & Regards,<br>Arjav Parikh</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mar 7, 2018 6:49 PM, "Ronaldo Afonso" <<a href="mailto:ronaldo@ronaldoafonso.com.br">ronaldo@ronaldoafonso.com.br</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Â Arjav,<br><br></div>Â I'm not 100% sure of that, but if I were you I would take a look at the Makefiles that generate those packages whose files you don't want to be included in the final build image.<br><br>Â Often the "install" directive of an OpenWrt Makefile is where developers "include" the files they want to be include in the final image.<br><br></div>Â Here is an example of libbz2 package:<br><br>Â 77 define Package/libbz2/install<br>Â 78Â Â Â Â $(INSTALL_DIR) $(1)/usr/lib/<br>Â 79Â Â Â Â $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(<wbr>PKG_VERSION) $(1)/usr/lib/<br>Â 80Â Â Â Â $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0<br>Â 81 endef<br><br></div>Â For example, if you don't want the "libbz2.so" to be included, you can remove lines 79 and 80.<br><br>Â <br><div><br><div>Â <br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-07 9:00 GMT-03:00 Arjav Parikh <span dir="ltr"><<a href="mailto:parikharjav24@gmail.com" target="_blank">parikharjav24@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ronaldo,<br>
<br>
I am building firmware for IPQ806x platform. I have been able to<br>
reduce my firmware image from 22 MB to 10 MBÂ by disabling unwanted<br>
kernel modules and libraries using make menuconfig.<br>
<br>
But there are files in root-ipq806x/lib/fimrware directory of approx<br>
size 4.4 MB. I do not require any of the files present in this<br>
directory. I tried to remove those files by removing its entry from<br>
root-ipq806x/usr/lib/opkg/info<wbr>/wigig-firmware.list assuming that on<br>
next build these files wont appear but still the files are there in<br>
/lib/firmware directory.<br>
By removing these files I can further reduce filesystem by 4 MB.<br>
<br>
<br>
On Wed, Mar 7, 2018 at 5:07 PM, Ronaldo Afonso<br>
<<a href="mailto:ronaldo@ronaldoafonso.com.br" target="_blank">ronaldo@ronaldoafonso.com.br</a>> wrote:<br>
>Â Â Hi Arjav,<br>
><br>
>Â Â Which kind of firmware are you using? An OpenWrt prebuilt (from<br>
> <a href="https://downloads.openwrt.org/releases/" rel="noreferrer" target="_blank">https://downloads.openwrt.org/<wbr>releases/</a>) or a firmware build by yourself?<br>
><br>
>Â Â Well, in or case, I suggest you build your firmware ... using "make<br>
> menuconfig" is the first thing to try for removing unnecessary binaries.<br>
><br>
><br>
><br>
> 2018-03-07 8:02 GMT-03:00 Arjav Parikh <<a href="mailto:parikharjav24@gmail.com" target="_blank">parikharjav24@gmail.com</a>>:<br>
>><br>
>> Hi,<br>
>><br>
>> I want to reduce the root file system size for my project. Till now<br>
>> after removing the unnecessary kernel modules, libraries and using<br>
>> strip binary the file system size has been reduced to 8.3 MB. Bu there<br>
>> are still some files which are not required and I am unaware of how to<br>
>> prvent these files from being included in my file system using<br>
>> openwrt.<br>
>><br>
>> For Ex: there are multiple binaries in /lib/firmware which are not<br>
>> required. This folder itself contains size of 4.4 MB, apart from these<br>
>> there are many libraries in /lib as well as /usr/lib which are not<br>
>> required.<br>
>><br>
>> Can anyone please guide of how to remove firmware binaries and<br>
>> libraries in openwrt.<br>
>><br>
>> --<br>
>> Thanks & Regards,<br>
>> Arjav Parikh<br>
>> ______________________________<wbr>_________________<br>
>> openwrt-devel mailing list<br>
>> <a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank">openwrt-devel@lists.openwrt.or<wbr>g</a><br>
>> <a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-<wbr>bin/mailman/listinfo/openwrt-d<wbr>evel</a><br>
><br>
><br>
><br>
<span class="m_-7282272113782595570HOEnZb"><font color="#888888">><br>
> --<br>
> Ronaldo Afonso<br>
> 11 9 5252 0484<br>
> <a href="http://www.ronaldoafonso.com.br" rel="noreferrer" target="_blank">www.ronaldoafonso.com.br</a><br>
<br>
<br>
<br>
--<br>
Thanks & Regards,<br>
Arjav Parikh<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="m_-7282272113782595570gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Ronaldo Afonso<br><div>11 9 5252 0484</div><div><a href="http://www.ronaldoafonso.com.br" target="_blank">www.ronaldoafonso.com.br</a></div></div></div>
</div>
</blockquote></div></div>