Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] How to reduce the size of the rootfs with buildroot
Date: Fri, 27 Sep 2019 12:24:20 +0200	[thread overview]
Message-ID: <20190927122420.1a6ff236@windsurf> (raw)
In-Reply-To: <CAN6m0Dxz-KsTSR0063KmztKvx5uGfva-6vixpsjURs4sBtkxZQ@mail.gmail.com>

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

      reply	other threads:[~2019-09-27 10:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190927122420.1a6ff236@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox