Advertise CMD_CALLBACK in genkernel.conf

Signed-off-by: Christoph Junghans <ottxor@gentoo.org>
Make --kerncache compatible with recent versions of GNU tar, bug #457168

Older versions of GNU tar would extract files to the interior of the
directory specified after an adjustment via -C was taken into
consideration. Newer versions will perform extraction to the exterior of
that directory. This caused --kerncache to override the /lib symlink
with an actual directory.

We correct this by switching to a more standard syntax that should be
consistent against all tar implementations, including both old and new
versions of GNU tar.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Revert "Make --kerncache compatible with recent versions of GNU tar, bug #457168"

This reverts commit 2d720491bd62eb1c87f8da23ec7aef393207bf30, which
caused us to have /lib/lib. That got past me when testing.
Make --kerncache compatible with recent versions of GNU tar, bug #457168

Older versions of GNU tar would extract files to the interior of the
directory specified after an adjustment via -C was taken into
consideration. Newer versions will perform extraction to the exterior of
that directory. This caused --kerncache to override the /lib symlink
with an actual directory.

We correct this by switching to a more standard syntax that should be
consistent against old and new versions of GNU tar, as well as bsdtar.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Don't pre-populate netboot's resolv.conf.

Signed-off-by: Guy Martin <gmsoft@gentoo.org>
Add patch to fix busybox bunzip2, see #497916.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Add machine detection for hppa.

Signed-off-by: Guy Martin <gmsoft@gentoo.org>
Add exit 1 to waitForZFS

Proper use of call_func_timeout() requires that we return an exit status
of 1 upon success.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Detect grub2-mkconfig failure

Signed-off-by: Richard Yao <ryao@gentoo.org>
Copy ld.so.conf and friends when copy_binaries is used

This fixes "error while loading shared libraries libgcc_s.so.1 cannot
open shared object file" when attempting to import a root pool on ARM.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Suppress superfluous console kernel output

Signed-off-by: Richard Yao <ryao@gentoo.org>
Start a getty on the serial console if known.

This allows busybox to send SIGINT when Ctrl-C is issued.
Most users start a ping to verify connectivity but can never stop it.

Signed-off-by: Guy Martin <gmsoft@gentoo.org>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Bump version to 3.4.48

Signed-off-by: Richard Yao <ryao@gentoo.org>
Record hostid into initramfs

ZFS pool import on non-exported pools is only permitted when the hostid
of the system matches the host id of the last pool to import it. Store
the hostid of the system to ensure that it matches at boot.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Create rootfs_type_is() helper function

This is meant to facilite automatic detection of root filesystems that
require additional support. The main one being ZFS, but btrfs will also
qualify once support has been added.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Include ZFS support when / is ZFS

Signed-off-by: Richard Yao <ryao@gentoo.org>
Advertise zfs support in genkernel.conf

Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
Signed-off-by: Richard Yao <ryao@gentoo.org>
fix broken function prompt_user()

There is a mistake in the parameter check of function prompt_user()
which causes to exit the initramfs unconditionally when the function is
called with *correct* number of parameters (which then causes a kernel
panic)
This patch puts the parameter check into a readable if..then..fi block.

Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Fix endless loop in gen_funcs.sh when LOGLEVEL is empty

When LOGLEVEL is unset or empty then genkernel loops endlessly in
gen_funcs.sh.
The solution is to set a proper default loglevel in $USRBIN/genkernel.

Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Try mmap() when loading modules

Signed-off-by: Richard Yao <ryao@gentoo.org>