Re: [OpenWrt-Devel] Reducing the root file system in openwrt

2018-03-07 Thread Ronaldo Afonso
  Arjav,

  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.

  Try doing something like:

   1) Edit the Makefile(s) and remove the lines that install binaries you
don't want.
   2) Issue: make V=s package/"the package you are compiling"/{clen,install}
   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)



2018-03-07 10:24 GMT-03:00 Arjav Parikh :

> Hi Ronaldo,
>
> I tried doing that by removing the copy line in Makefile but anyhow those
> files come into build_dir.
>
> I suspect that those files get included from dl directory. Is my
> understanding in this correct?
>
> If I remove packages from dl directory then I get compilation errors.
>
>
> Thanks & Regards,
> Arjav Parikh
>
> On Mar 7, 2018 6:49 PM, "Ronaldo Afonso" 
> wrote:
>
>>   Arjav,
>>
>>   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.
>>
>>   Often the "install" directive of an OpenWrt Makefile is where
>> developers "include" the files they want to be include in the final image.
>>
>>   Here is an example of libbz2 package:
>>
>>  77 define Package/libbz2/install
>>  78 $(INSTALL_DIR) $(1)/usr/lib/
>>  79 $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
>>  80 $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
>>  81 endef
>>
>>   For example, if you don't want the "libbz2.so" to be included, you can
>> remove lines 79 and 80.
>>
>>
>>
>>
>>
>> 2018-03-07 9:00 GMT-03:00 Arjav Parikh :
>>
>>> Hi Ronaldo,
>>>
>>> I am building firmware for IPQ806x platform. I have been able to
>>> reduce my firmware image from 22 MB to 10 MB  by disabling unwanted
>>> kernel modules and libraries using make menuconfig.
>>>
>>> But there are files in root-ipq806x/lib/fimrware directory of approx
>>> size 4.4 MB. I do not require any of the files present in this
>>> directory. I tried to remove those files by removing its entry from
>>> root-ipq806x/usr/lib/opkg/info/wigig-firmware.list assuming that on
>>> next build these files wont appear but still the files are there in
>>> /lib/firmware directory.
>>> By removing these files I can further reduce filesystem by 4 MB.
>>>
>>>
>>> On Wed, Mar 7, 2018 at 5:07 PM, Ronaldo Afonso
>>>  wrote:
>>> >   Hi Arjav,
>>> >
>>> >   Which kind of firmware are you using? An OpenWrt prebuilt (from
>>> > https://downloads.openwrt.org/releases/) or a firmware build by
>>> yourself?
>>> >
>>> >   Well, in or case, I suggest you build your firmware ... using "make
>>> > menuconfig" is the first thing to try for removing unnecessary
>>> binaries.
>>> >
>>> >
>>> >
>>> > 2018-03-07 8:02 GMT-03:00 Arjav Parikh :
>>> >>
>>> >> Hi,
>>> >>
>>> >> I want to reduce the root file system size for my project. Till now
>>> >> after removing the unnecessary kernel modules, libraries and using
>>> >> strip binary the file system size has been reduced to 8.3 MB. Bu there
>>> >> are still some files which are not required and I am unaware of how to
>>> >> prvent these files from being included in my file system using
>>> >> openwrt.
>>> >>
>>> >> For Ex: there are multiple binaries in /lib/firmware which are not
>>> >> required. This folder itself contains size of 4.4 MB, apart from these
>>> >> there are many libraries in /lib as well as /usr/lib which are not
>>> >> required.
>>> >>
>>> >> Can anyone please guide of how to remove firmware binaries and
>>> >> libraries in openwrt.
>>> >>
>>> >> --
>>> >> Thanks & Regards,
>>> >> Arjav Parikh
>>> >> ___
>>> >> openwrt-devel mailing list
>>> >> openwrt-devel@lists.openwrt.org
>>> >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Ronaldo Afonso
>>> > 11 9 5252 0484
>>> > www.ronaldoafonso.com.br
>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Arjav Parikh
>>>
>>
>>
>>
>> --
>> Ronaldo Afonso
>> 11 9 5252 0484
>> www.ronaldoafonso.com.br
>>
>


-- 
Ronaldo Afonso
11 9 5252 0484
www.ronaldoafonso.com.br
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Reducing the root file system in openwrt

2018-03-07 Thread Arjav Parikh
Hi Ronaldo,

I tried doing that by removing the copy line in Makefile but anyhow those
files come into build_dir.

I suspect that those files get included from dl directory. Is my
understanding in this correct?

If I remove packages from dl directory then I get compilation errors.


Thanks & Regards,
Arjav Parikh

On Mar 7, 2018 6:49 PM, "Ronaldo Afonso" 
wrote:

>   Arjav,
>
>   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.
>
>   Often the "install" directive of an OpenWrt Makefile is where developers
> "include" the files they want to be include in the final image.
>
>   Here is an example of libbz2 package:
>
>  77 define Package/libbz2/install
>  78 $(INSTALL_DIR) $(1)/usr/lib/
>  79 $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
>  80 $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
>  81 endef
>
>   For example, if you don't want the "libbz2.so" to be included, you can
> remove lines 79 and 80.
>
>
>
>
>
> 2018-03-07 9:00 GMT-03:00 Arjav Parikh :
>
>> Hi Ronaldo,
>>
>> I am building firmware for IPQ806x platform. I have been able to
>> reduce my firmware image from 22 MB to 10 MB  by disabling unwanted
>> kernel modules and libraries using make menuconfig.
>>
>> But there are files in root-ipq806x/lib/fimrware directory of approx
>> size 4.4 MB. I do not require any of the files present in this
>> directory. I tried to remove those files by removing its entry from
>> root-ipq806x/usr/lib/opkg/info/wigig-firmware.list assuming that on
>> next build these files wont appear but still the files are there in
>> /lib/firmware directory.
>> By removing these files I can further reduce filesystem by 4 MB.
>>
>>
>> On Wed, Mar 7, 2018 at 5:07 PM, Ronaldo Afonso
>>  wrote:
>> >   Hi Arjav,
>> >
>> >   Which kind of firmware are you using? An OpenWrt prebuilt (from
>> > https://downloads.openwrt.org/releases/) or a firmware build by
>> yourself?
>> >
>> >   Well, in or case, I suggest you build your firmware ... using "make
>> > menuconfig" is the first thing to try for removing unnecessary binaries.
>> >
>> >
>> >
>> > 2018-03-07 8:02 GMT-03:00 Arjav Parikh :
>> >>
>> >> Hi,
>> >>
>> >> I want to reduce the root file system size for my project. Till now
>> >> after removing the unnecessary kernel modules, libraries and using
>> >> strip binary the file system size has been reduced to 8.3 MB. Bu there
>> >> are still some files which are not required and I am unaware of how to
>> >> prvent these files from being included in my file system using
>> >> openwrt.
>> >>
>> >> For Ex: there are multiple binaries in /lib/firmware which are not
>> >> required. This folder itself contains size of 4.4 MB, apart from these
>> >> there are many libraries in /lib as well as /usr/lib which are not
>> >> required.
>> >>
>> >> Can anyone please guide of how to remove firmware binaries and
>> >> libraries in openwrt.
>> >>
>> >> --
>> >> Thanks & Regards,
>> >> Arjav Parikh
>> >> ___
>> >> openwrt-devel mailing list
>> >> openwrt-devel@lists.openwrt.org
>> >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>> >
>> >
>> >
>> >
>> > --
>> > Ronaldo Afonso
>> > 11 9 5252 0484
>> > www.ronaldoafonso.com.br
>>
>>
>>
>> --
>> Thanks & Regards,
>> Arjav Parikh
>>
>
>
>
> --
> Ronaldo Afonso
> 11 9 5252 0484
> www.ronaldoafonso.com.br
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Reducing the root file system in openwrt

2018-03-07 Thread Ronaldo Afonso
  Arjav,

  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.

  Often the "install" directive of an OpenWrt Makefile is where developers
"include" the files they want to be include in the final image.

  Here is an example of libbz2 package:

 77 define Package/libbz2/install
 78 $(INSTALL_DIR) $(1)/usr/lib/
 79 $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
 80 $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
 81 endef

  For example, if you don't want the "libbz2.so" to be included, you can
remove lines 79 and 80.





2018-03-07 9:00 GMT-03:00 Arjav Parikh :

> Hi Ronaldo,
>
> I am building firmware for IPQ806x platform. I have been able to
> reduce my firmware image from 22 MB to 10 MB  by disabling unwanted
> kernel modules and libraries using make menuconfig.
>
> But there are files in root-ipq806x/lib/fimrware directory of approx
> size 4.4 MB. I do not require any of the files present in this
> directory. I tried to remove those files by removing its entry from
> root-ipq806x/usr/lib/opkg/info/wigig-firmware.list assuming that on
> next build these files wont appear but still the files are there in
> /lib/firmware directory.
> By removing these files I can further reduce filesystem by 4 MB.
>
>
> On Wed, Mar 7, 2018 at 5:07 PM, Ronaldo Afonso
>  wrote:
> >   Hi Arjav,
> >
> >   Which kind of firmware are you using? An OpenWrt prebuilt (from
> > https://downloads.openwrt.org/releases/) or a firmware build by
> yourself?
> >
> >   Well, in or case, I suggest you build your firmware ... using "make
> > menuconfig" is the first thing to try for removing unnecessary binaries.
> >
> >
> >
> > 2018-03-07 8:02 GMT-03:00 Arjav Parikh :
> >>
> >> Hi,
> >>
> >> I want to reduce the root file system size for my project. Till now
> >> after removing the unnecessary kernel modules, libraries and using
> >> strip binary the file system size has been reduced to 8.3 MB. Bu there
> >> are still some files which are not required and I am unaware of how to
> >> prvent these files from being included in my file system using
> >> openwrt.
> >>
> >> For Ex: there are multiple binaries in /lib/firmware which are not
> >> required. This folder itself contains size of 4.4 MB, apart from these
> >> there are many libraries in /lib as well as /usr/lib which are not
> >> required.
> >>
> >> Can anyone please guide of how to remove firmware binaries and
> >> libraries in openwrt.
> >>
> >> --
> >> Thanks & Regards,
> >> Arjav Parikh
> >> ___
> >> openwrt-devel mailing list
> >> openwrt-devel@lists.openwrt.org
> >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
> >
> >
> >
> > --
> > Ronaldo Afonso
> > 11 9 5252 0484
> > www.ronaldoafonso.com.br
>
>
>
> --
> Thanks & Regards,
> Arjav Parikh
>



-- 
Ronaldo Afonso
11 9 5252 0484
www.ronaldoafonso.com.br
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Reducing the root file system in openwrt

2018-03-07 Thread Aaron Z
On Wed, Mar 7, 2018 at 7:14 AM, Felix Fietkau  wrote:
> Are you really using a real OpenWrt?
> The presence of the "wigig-firmware" package makes me suspect that
> you're using the "QSDK" fork instead. In that case, you should probably
> ask QCA for support instead. We won't be able to help you properly,
> since the system that you're using is very heavily modified in many ways.
Good point, looking at
https://downloads.openwrt.org/releases/17.01.4/targets/ipq806x/generic/
and https://downloads.openwrt.org/snapshots/targets/ipq806x/generic/,
with the exception of the openwrt-ipq806x-vmlinux.elf image, all of
the images on there are under 10MB and most are under 6MB.

Aaron Z
A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects.
— Robert Heinlein, Time Enough for Love
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Reducing the root file system in openwrt

2018-03-07 Thread Felix Fietkau
On 2018-03-07 13:00, Arjav Parikh wrote:
> Hi Ronaldo,
> 
> I am building firmware for IPQ806x platform. I have been able to
> reduce my firmware image from 22 MB to 10 MB  by disabling unwanted
> kernel modules and libraries using make menuconfig.
> 
> But there are files in root-ipq806x/lib/fimrware directory of approx
> size 4.4 MB. I do not require any of the files present in this
> directory. I tried to remove those files by removing its entry from
> root-ipq806x/usr/lib/opkg/info/wigig-firmware.list assuming that on
> next build these files wont appear but still the files are there in
> /lib/firmware directory.
> By removing these files I can further reduce filesystem by 4 MB.
Hi Arjav,

Are you really using a real OpenWrt?
The presence of the "wigig-firmware" package makes me suspect that
you're using the "QSDK" fork instead. In that case, you should probably
ask QCA for support instead. We won't be able to help you properly,
since the system that you're using is very heavily modified in many ways.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Reducing the root file system in openwrt

2018-03-07 Thread Sven Eckelmann
On Mittwoch, 7. März 2018 17:30:31 CET Arjav Parikh wrote:
[...]
> I tried to remove those files by removing its entry from
> root-ipq806x/usr/lib/opkg/info/wigig-firmware.list assuming that on
> next build these files wont appear but still the files are there in
> /lib/firmware directory.

Is this a new package? Newer heard about wigig-firmware. Maybe this isn't 
actually OpenWrt from openwrt.org. But when it is, then you should not modify 
the generated root directory but just go into `make menuconfig` and deselect 
the wigig-firmware entry.

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Reducing the root file system in openwrt

2018-03-07 Thread Arjav Parikh
Hi Ronaldo,

I am building firmware for IPQ806x platform. I have been able to
reduce my firmware image from 22 MB to 10 MB  by disabling unwanted
kernel modules and libraries using make menuconfig.

But there are files in root-ipq806x/lib/fimrware directory of approx
size 4.4 MB. I do not require any of the files present in this
directory. I tried to remove those files by removing its entry from
root-ipq806x/usr/lib/opkg/info/wigig-firmware.list assuming that on
next build these files wont appear but still the files are there in
/lib/firmware directory.
By removing these files I can further reduce filesystem by 4 MB.


On Wed, Mar 7, 2018 at 5:07 PM, Ronaldo Afonso
 wrote:
>   Hi Arjav,
>
>   Which kind of firmware are you using? An OpenWrt prebuilt (from
> https://downloads.openwrt.org/releases/) or a firmware build by yourself?
>
>   Well, in or case, I suggest you build your firmware ... using "make
> menuconfig" is the first thing to try for removing unnecessary binaries.
>
>
>
> 2018-03-07 8:02 GMT-03:00 Arjav Parikh :
>>
>> Hi,
>>
>> I want to reduce the root file system size for my project. Till now
>> after removing the unnecessary kernel modules, libraries and using
>> strip binary the file system size has been reduced to 8.3 MB. Bu there
>> are still some files which are not required and I am unaware of how to
>> prvent these files from being included in my file system using
>> openwrt.
>>
>> For Ex: there are multiple binaries in /lib/firmware which are not
>> required. This folder itself contains size of 4.4 MB, apart from these
>> there are many libraries in /lib as well as /usr/lib which are not
>> required.
>>
>> Can anyone please guide of how to remove firmware binaries and
>> libraries in openwrt.
>>
>> --
>> Thanks & Regards,
>> Arjav Parikh
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
>
>
> --
> Ronaldo Afonso
> 11 9 5252 0484
> www.ronaldoafonso.com.br



-- 
Thanks & Regards,
Arjav Parikh
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Reducing the root file system in openwrt

2018-03-07 Thread Ronaldo Afonso
  Hi Arjav,

  Which kind of firmware are you using? An OpenWrt prebuilt (from
https://downloads.openwrt.org/releases/) or a firmware build by yourself?

  Well, in or case, I suggest you build your firmware ... using "make
menuconfig" is the first thing to try for removing unnecessary binaries.



2018-03-07 8:02 GMT-03:00 Arjav Parikh :

> Hi,
>
> I want to reduce the root file system size for my project. Till now
> after removing the unnecessary kernel modules, libraries and using
> strip binary the file system size has been reduced to 8.3 MB. Bu there
> are still some files which are not required and I am unaware of how to
> prvent these files from being included in my file system using
> openwrt.
>
> For Ex: there are multiple binaries in /lib/firmware which are not
> required. This folder itself contains size of 4.4 MB, apart from these
> there are many libraries in /lib as well as /usr/lib which are not
> required.
>
> Can anyone please guide of how to remove firmware binaries and
> libraries in openwrt.
>
> --
> Thanks & Regards,
> Arjav Parikh
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>



-- 
Ronaldo Afonso
11 9 5252 0484
www.ronaldoafonso.com.br
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel