All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] How to reduce the size of the rootfs with buildroot
@ 2019-09-26  6:51 Song Xiaojia
  2019-09-27 10:24 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Song Xiaojia @ 2019-09-26  6:51 UTC (permalink / raw)
  To: buildroot

Hi,
 I want to merge the linux image+file system+bootloader to one file, but my
current filesystem is too large (189MB).
I want to create a very small-size rootfs (<10MB) for my linux system on
riscv soc.
I wonder how to leverage the buildroot to achieve that?

I also feel a little confused about the initramfs and rootfs, though I did
some search. Some of the linux system booting just need initramfs, while
others need both (initramfs+rootfs).
For my case do I need both or just....

Thanks.

Best,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190925/a8a311aa/attachment.html>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] How to reduce the size of the rootfs with buildroot
  2019-09-26  6:51 [Buildroot] How to reduce the size of the rootfs with buildroot Song Xiaojia
@ 2019-09-27 10:24 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-09-27 10:24 UTC (permalink / raw)
  To: buildroot

On Wed, 25 Sep 2019 23:51:32 -0700
Song Xiaojia <xiaojia.song12@gmail.com> wrote:

>  I want to merge the linux image+file system+bootloader to one file, but my
> current filesystem is too large (189MB).
> I want to create a very small-size rootfs (<10MB) for my linux system on
> riscv soc.
> I wonder how to leverage the buildroot to achieve that?

Do a full clean build (make clean all), and then run:

	make graph-size

Following this, in output/graphs/, you have a nice graph showing the
contribution of each package to the overall filesystem size.

I assume that if your filesystem size is 198 MB, it's because you have
lots of packages enabled. If you want to reduce the filesystem size,
the easiest solution is "simply" to enable less packages.

> I also feel a little confused about the initramfs and rootfs, though I did
> some search. Some of the linux system booting just need initramfs, while
> others need both (initramfs+rootfs).
> For my case do I need both or just....

It depends of your use case. If you have nothing special to do in
user-space before mounting the real root filesystem, then you should
either use an initramfs *OR* a real rootfs, but not both.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-27 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26  6:51 [Buildroot] How to reduce the size of the rootfs with buildroot Song Xiaojia
2019-09-27 10:24 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.