Go to file
Yann E. MORIN 9d19f8fc86 package/mke2img: new package
Currently, we are using a shell script called genext2fs, that
impersonates the real genext2fs. But that script does much more than
just call genextfs: it also calls tune2fs and e2fsck.

Because it impersonates genext2fs, we can not easily add new options,
and are constrained by the genext2fs options.

But it turns out that, of all the options supported by the real
genext2fs, we only really care for a subset, namely:
  - number of blocks
  - number of inodes
  - percentage of blocks reeserved to root
  - the root directory which to generate the image from

So, we introduce a new host package, mke2img, that is intended to
eventually replace genext2fs.sh.

This new script is highly modeled from the existing genext2fs.sh, but
was slightly refreshed, and a new, supposedly sane set of options has
been choosen for the features we need (see above), and some new options
were added, too, rather than relying on the arguments order or
environment variables:
  -b <nb-blocks>    number of blocks in the filesystem
  -i <nb-inodes>    number of inodes in the filesystem
  -r <pc-reserved>  percentage of reserved blocks
* -d <root-dir>     directory containing the root of the filesystem
* -o <img-file>     output image file
  -G <ext-gen>      extfs generation: 2, 3, or 4 (default: 2)
  -R <ext-rev>      ext2 revision: 0 or 1 (default 1)
  -l <label>        filesystem label
  -u <uid>          filesystem UUID; if not specified, a random one is used

* Mandatory options

Since the upstream e2fsprogs are expected to release a new mke2fs that
will be able to generate a filesystem image from a directory, we then
will be able to replace all the logic in mke2img, to use mke2fs instead
of the (relatively fragile) combination of the three tools we currently
use.

An entry is added for it in the "Host utilities" menu, so it can be
selected for use by post-{build,image} scripts. The ext2 filesystem
selection is changed to select that now.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Karoly Kasza <kaszak@gmail.com>
Reviewed-by: Karoly Kasza <kaszak@gmail.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-12-07 22:06:44 +01:00
arch arch/mips: remove deprecated mips1/2/3/4 support 2014-12-01 20:06:32 +01:00
board Add a defconfig for MIPS Creator CI20 2014-11-28 23:36:29 +01:00
boot boot/grub: use install instead of cp 2014-11-22 19:01:12 +01:00
configs ci20_defconfig: remove BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y 2014-12-01 20:08:32 +01:00
docs docs: fix typo in cmake-package documentation 2014-12-07 21:54:27 +01:00
fs package/mke2img: new package 2014-12-07 22:06:44 +01:00
linux linux: bump default version to 3.17.4 2014-11-21 21:45:38 +01:00
package package/mke2img: new package 2014-12-07 22:06:44 +01:00
support Merge branch 'next' 2014-12-01 11:16:42 +01:00
system system/permissions: /etc/random-seed must be mode 600 2014-11-25 22:37:43 +01:00
toolchain toolchain/external: fix building the wrapper on MIPS 2014-11-27 22:47:08 +01:00
.defconfig buildroot: get rid of s390 support 2009-01-12 14:36:14 +00:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
CHANGES Update for 2014.11 2014-12-01 10:19:00 +01:00
COPYING clarify license and fix website license link 2009-05-08 09:29:41 +02:00
Config.in Remove BR2_DEPRECATED_SINCE_2013_11 2014-12-01 20:06:55 +01:00
Config.in.legacy Config.in.legacy: fix typo 2014-11-09 08:54:47 +01:00
Makefile Merge branch 'next' 2014-12-01 11:16:42 +01:00
Makefile.legacy Makefile.legacy: fix recursive invocation with BUILDROOT_DL_DIR and _CONFIG 2014-02-11 08:14:57 +01:00
README docs: Move README file to root 2014-03-03 21:28:39 +01:00

README

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) Use your shiny new root filesystem. Depending on which sort of
    root filesystem you selected, you may want to loop mount it,
    chroot into it, nfs mount it on your target device, burn it
    to flash, or whatever is appropriate for your target system.

You do not need to be root to build or run buildroot.  Have fun!

Offline build:
==============

In order to do an offline-build (not connected to the net), fetch all
selected source by issuing a
$ make source

before you disconnect.
If your build-host is never connected, then you have to copy buildroot
and your toplevel .config to a machine that has an internet-connection
and issue "make source" there, then copy the content of your dl/ dir to
the build-host.

Building out-of-tree:
=====================

Buildroot supports building out of tree with a syntax similar
to the Linux kernel. To use it, add O=<directory> to the
make command line, E.G.:

$ make O=/tmp/build

And all the output files (including .config) will be located under /tmp/build.

More finegrained configuration:
===============================

You can specify a config-file for uClibc:
$ make UCLIBC_CONFIG_FILE=/my/uClibc.config

And you can specify a config-file for busybox:
$ make BUSYBOX_CONFIG_FILE=/my/busybox.config

To use a non-standard host-compiler (if you do not have 'gcc'),
make sure that the compiler is in your PATH and that the library paths are
setup properly, if your compiler is built dynamically:
$ make HOSTCC=gcc-4.3.orig HOSTCXX=gcc-4.3-mine

Depending on your configuration, there are some targets you can use to
use menuconfig of certain packages. This includes:
$ make HOSTCC=gcc-4.3 linux-menuconfig
$ make HOSTCC=gcc-4.3 uclibc-menuconfig
$ make HOSTCC=gcc-4.3 busybox-menuconfig

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org