Go to file
Yann E. MORIN c2fee90943 package/eudev: introduce a host variant
eudev and systemd provide a hardware database (hwdb) as a set of
multiple files. Various other utilities may also use that database.

Those files have to be "compiled" into a binary to be useful; libudev
(and thus all utilities based on it) only use the compiled hwdb.

Compiling the hwdb is done with udevadm, using the hwdb sub-command:
    udevadm hwdb --update

Provide a simple host-variant of eudev, so that we can call udevadm at
build time.

When it is configured, eudev will shoehorn its --prefix path as the base
location where the .hwdb file will be searched from, as well as where
the hwdb.bin will be generated in. This means that with the usual
--prefix=$(HOST_DIR), it would look into there.

udevadm also accepts a --root=/path option at runtime, which prepends
/path to all the paths it uses to find and generate files.

Obviously, combining --root=$(TARGET_DIR) and --prefix=$(HOST_DIR) would
not do what we want: all files would be searched for, and generated, in
$(HOST_DIR)$(TARGET_DIR)/ . Avoiding use of --root would not help much
either, as files would still searched in $(HOST_DIR) (we could use a
trick to copy files there, generate and then move the hwdb.bin, but
that's not nice).

However, since we only need udevadm, and since udevadm has no internal
and no external dependency, we can use a less dirty trick and configure
host-eudev with --prefix=/usr (and similar for the other paths), manually
copy udevadm to HOST_DIR, and then use --root when calling it.

Then, we get a udevadm that can read files from, and generate files into
$(TARGET_DIR). We register a target-finalize hook to generate the
hwdb.bin, so that any pakage may install its .hwdb files (currently only
eudev and systemd do, but other packages might (e.g. sane is known to do
so on standard desktop distros))

The *.hwdb source files consume a lot of space, roughly the same as the
generated database, i.e. ~8MiB as of today, and they are totally useless
on the target; only the generated hwdb.bin is useful. So we want to get
rid of them.

However, we also want to be able to complete a build (e.g. make
foo-reinstall to reinstall more hwdb files), so we don't want to
irremediably lose them. As such, we register a pre-rootfs-cmd hook, that
removes them just before assembling the filesystems, when we're only
using a copy of the target directory.

Note that this is the first host package to register a target-finalize
hook, and also the first to register a pre-rootfs-cmd hook. This avoids
duplicating these hooks logic in both eudev and systemd.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Carlos Santos <unixmania@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-11-01 08:30:34 +01:00
arch arch/riscv: set the default float ABI based on ISA extensions 2019-09-19 21:43:53 +02:00
board board/qemu/arm-vexpress-tz: fixup GDB config info 2019-10-29 22:24:32 +01:00
boot boot/optee-os: bump version to 3.7.0 2019-10-29 22:25:18 +01:00
configs configs/qemu_arm_vexpress_tz: Armv7-A emulation with TrustZone services 2019-10-27 15:56:16 +01:00
docs docs/manual/configure.txt: explain how to reuse a Buildroot toolchain as external toolchain 2019-10-27 16:29:07 +01:00
fs fs: don't use := when not needed 2019-10-27 10:35:06 +01:00
linux {linux, linux-headers}: bump 4.{4, 9, 14, 19}.x / 5.3.x series 2019-10-29 22:22:10 +01:00
package package/eudev: introduce a host variant 2019-11-01 08:30:34 +01:00
support support/dependencies: set cmake version min to 3.10 2019-10-28 23:01:47 +01:00
system package/netifrc: add support for BR2_SYSTEM_DHCP 2019-09-23 22:57:04 +02:00
toolchain toolchain: expose BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS for all toolchain types 2019-10-28 23:09:33 +01:00
utils utils/scancpan: handle LICENCE spelling 2019-10-29 23:46:46 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: fix check for 80/132 columns 2019-04-10 12:31:33 +02:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
.gitlab-ci.yml gitlab-ci: use our updated docker base image 2019-10-27 21:52:28 +01:00
.gitlab-ci.yml.in gitlab-ci: use our updated docker base image 2019-10-27 21:52:28 +01:00
CHANGES Update for 2019.02.6 2019-10-04 09:27:30 +02:00
Config.in Config.in: disable PIC/PIE if the toolchain does not support PIE 2019-10-28 08:43:22 +01:00
Config.in.legacy package/alljoyn*: Remove the Alljoyn framework packages 2019-10-31 23:24:50 +01:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS package/alljoyn*: Remove the Alljoyn framework packages 2019-10-31 23:24:50 +01:00
Makefile core: drop check-uniq-files 2019-10-26 21:19:07 +02:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README README: add reference to submitting-patches 2016-02-01 19:16:08 +01:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

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

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

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

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches