<div dir="ltr"><div><div><div><div><div><div> Arjav,<br><br></div> As far as I know, the final package will end up in the "staging_dir" directory, not the build_dir. Inside the build_dir will be all the binaries compiled by the package.<br><br></div> Try doing something like:<br><br></div> 1) Edit the Makefile(s) and remove the lines that install binaries you don't want.<br></div> 2) Issue: make V=s package/"the package you are compiling"/{clen,install}<br></div> 3) Check the bin and staging_dir directories (the bin directory is where the final package will be, in the staging_dir, you can check what was put inside the package)<br><br></div><div> <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-07 10:24 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"><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" target="_blank">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.$(P<wbr>KG_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_-1887933953171315660m_-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><span class="HOEnZb"><font color="#888888">
<br>
--<br>
Thanks & Regards,<br>
Arjav Parikh<br>
</font></span></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-1887933953171315660m_-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>
</font></span></div>
</blockquote></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_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>