aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Copy ld.so.conf and friends when copy_binaries is usedryaoRichard Yao2013-08-261-0/+30
| | | | | | | 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>
* Detect grub2-mkconfig failureRichard Yao2013-08-211-1/+1
| | | | Signed-off-by: Richard Yao <ryao@gentoo.org>
* Add exit 1 to waitForZFSRichard Yao2013-08-211-0/+1
| | | | | | | 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>
* Include zdb in initramfsRichard Yao2013-07-141-1/+1
| | | | | | zdb is useful for debugging during early boot. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Fix RTC support in generic config files, bug #444932Ben Kohler2013-06-093-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Although the shipping kernel-config with genkernel has ~10 of these various RTC hardware drivers marked as modules, the resulting built kernel & initramfs has these things disabled. Here's an excerpt from arch/x86_64/kernel-config: CONFIG_RTC_CLASS=m CONFIG_RTC_DRV_DS1374=m CONFIG_RTC_DRV_MAX6900=m CONFIG_RTC_DRV_M41T80=m CONFIG_RTC_DRV_CMOS=m CONFIG_RTC_DRV_DS1553=m CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_STK17TA8=m CONFIG_RTC_DRV_M48T86=m CONFIG_RTC_DRV_M48T59=m CONFIG_RTC_DRV_V3020=m The problem is that CONFIG_RTC_CLASS is a boolean, not tristate, so =m is not valid, and so all things depending on RTC_CLASS get dropped from the config. Changing this to CONFIG_RTC_CLASS=y should fix the issue, I have tested this locally with success. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Remove duplicate files from initramfsRichard Yao2013-06-091-0/+14
| | | | | | | | | | | | | | | genkernel's initramfs image is built incrementally by appending to the cpio file. The introduction of copy_binaries resulted in copying libraries from the host system, which causes the cpio to include certain libraries multiple times whenever different stages depended upon the same library. We address this by extracting the cpio to a temporary directory and then compressing it again to "finalize" it. The extraction eliminates the duplicate files. This makes generated initramfs images slightly smaller and in theory, should make the initramfs load slightly faster. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Add more module loading featuresFabio Erculiani2013-06-091-4/+4
| | | | | | These additional features were suggested by Fabio in bug #472312. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Make busybox's module loading more fully featured, bug #472312Ben Kohler2013-06-091-8/+8
| | | | | | | | | | Commit 3a054014e880e5b1ff28e3d87767c45a073da6b5 replaced our modprobe with busybox's modprobe. Unfortunately, this caused a regression where busybox's modprobe fails to properly load certain modules. This can be addressed by abandoning CONFIG_MODPROBE_SMALL=y. We also set a few other features to make module loading more fully featured. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Workaround busybox modprobe's inability to load ZFS modulesRichard Yao2013-06-092-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3a054014e880e5b1ff28e3d87767c45a073da6b5 replaced our modprobe with busybox's modprobe. Unfortunately, busybox's modprobe appears to be unable to properly load modules with more than 1 level of dependencies. The zfs and zpool commands will invoke modprobe if /dev/zvol is missing, which concealed this problem. However, this caused problems because some invocations would fail and under certain circumstances, init would be killed, causing a kernel panic. This issue was made clear by commit c812c35100771bb527f6b03853fa6d8ef66a48fe, which ensured that the zpool and zfs commands were not run until the ZFS module was loaded. busybox modprobe's failure to load module dependencies correctly appears to occur because busybox modprobe does not wait until until a module is loaded before loading a module that depends on it, which is a race. It would be best to correct this race by waiting until the module has properly loaded, but it is not clear that the race is the only thing going wrong and developer time is a premium. We implement a workaround by modifying the busy loop added in the previous commit to explicit call `modprobe zfs` on each iteration. While the first few calls fail due to bugs in busybox modprobe, it will eventually work, after which each call is a noop. This lets us keep looping until either the loop exit condition that /dev/zvol exist is reached or the 5 second timeout is reached. Once the busybox modprobe issue is fixed, this workaround should be safe to revert. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Import pool after ZFS module finishes loadingRichard Yao2013-06-091-3/+14
| | | | | | | | | | | There is a race between ZFS module initialization and our attempt to import pools. We address this by doing a busy wait for the /dev/zfs device to appear. We wait a maximum of 5 seconds for the device to appear. We also slightly alter output messages to be more readable. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Add call_func_timeout helper functionRichard Yao2013-06-091-0/+16
| | | | | | | | | | call_func_timeout permits us to call a helper function and kill it should it exceed some timeout. This is derived from example code posted on Stack Overflow: http://stackoverflow.com/a/11056286 Signed-off-by: Richard Yao <ryao@gentoo.org>
* Refactor ZFS module load hookRichard Yao2013-06-091-9/+10
| | | | Signed-off-by: Richard Yao <ryao@gentoo.org>
* Eliminate warnings about missing ZFS filesRichard Yao2013-06-091-4/+8
| | | | | | | zpool.cache and zdev.conf are optional files, so instead of warning when they are missing, we print a message when they are copied. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Load xhci-plat when availableRichard Yao2013-06-0914-14/+14
| | | | | | | | At least one kernel configuration generates an addition module that we need to load for USB 3.0 support, so lets load it. Reported-by: Robin Johnson <robbat2@gentoo.org> Signed-off-by: Richard Yao <ryao@gentoo.org>
* Add --virtio to man page, bug #432956Richard Yao2013-06-091-0/+3
| | | | | | | This should have been included as part of commit 12e4bee, but it was omitted, so add it now. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Suppress grub2-mkconfig outputRichard Yao2013-06-091-1/+1
| | | | | | | Every other tool that we run has its output suppressed, so lets be consistent. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Update HACKING to use git-shortlogRichard Yao2013-06-091-2/+2
| | | | | | | The old command we used to generate a change history for announcement emails no longer works, so we switch to git-shortlog. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Bump version to 3.4.46.1v3.4.46.1Richard Yao2013-06-031-1/+1
| | | | Signed-off-by: Richard Yao <ryao@gentoo.org>
* Build USB 3.0 support by default, bug #452888Richard Yao2013-06-037-1/+25
| | | | Signed-off-by: Richard Yao <ryao@gentoo.org>
* Bump version to 3.4.46v3.4.46Richard Yao2013-06-031-1/+1
| | | | Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
* Silence cp error when optional ZFS files are unavailableRichard Yao2013-06-031-1/+1
| | | | | | | | | | | | Users were seeing the following error message printed: cp: cannot stat ‘/etc/zfs/zdev.conf’: No such file or directory Both zdev.conf and zpool.cache are optional files. We print a warning when they are absent, but cp printed its own error in addition to our warning. We suppress that. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Fix /etc/modprobe.d regressionRichard Yao2013-06-032-25/+2
| | | | | | | | | Commit 3a054014e880e5b1ff28e3d87767c45a073da6b5 replaced our modprobe with busybox's modprobe, which broke the code responsible for making options from /etc/modprobe.d work. We replace the old mechanism with a new one that copies /etc/modprobe.d to correct that. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Add sysctl to busyboxRichard Yao2013-06-031-1/+1
| | | | | | | | sysctl is necessary to modify chroot restrictions when performing recovery operations on Gentoo Hardened systems. Reported-by: Matthew Thode <prometheanfire@gentoo.org> Signed-off-by: Richard Yao <ryao@gentoo.org>
* gen_compile: fix iscsi module path install, s/RELEASE/KVFabio Erculiani2013-05-021-2/+2
|
* linuxrc: run the debug shell multiple times, add a hook before switch_rootFabio Erculiani2013-04-292-1/+5
|
* linuxrc: use "quiet" cmdline argument for a really quiet initramfs ↵Fabio Erculiani2013-04-293-30/+43
| | | | | | | | | initialization "quiet" is already used by the kernel to avoid printing messages on the console unless they are errors or warnings. Genkernel should do the same wrt its initramfs initialization code. This has also the advantage of improving the boot speed.
* Improve speed of bootstrapCD by not calling devicelist unless neededFabio Erculiani2013-04-251-4/+7
|
* Drop doslowusb and noslowusb boot parameters.Fabio Erculiani2013-04-254-34/+2
| | | | | | | | | | scandelay=<secs> should be always preferred. Moreover, nowadays automatically sleeping waiting for USB storage to come up in the way we were used to do it doesn't work as one expects, because USB is very common and USB storage devices are very likely to be present on a system. Furthermore, the initialization code after setup_slowusb is already waiting for devices to come up.
* Drop "sleep 3" from sdelay if CDROOT=1. One can use scandelay=secs if needed.Fabio Erculiani2013-04-251-8/+2
| | | | | While this makes out of the box booting a bit harder on some ancient CD/DVD drives, it really speeds up the common use case by not sleeping for 3 seconds.
* Drop useless parens in conditionalsFabio Erculiani2013-04-252-4/+4
|
* Drop KV_2_6_OR_GREATERFabio Erculiani2013-04-252-17/+6
| | | | Linux 2.2 and 2.4 are no longer supported. RIP old kernels.
* Drop our own /sbin/modprobe and use busybox built-in applet insteadFabio Erculiani2013-04-254-179/+36
| | | | | | | Our modprobe is an ancient heritage from the past, probably dating to a time where busybox's modprobe features were limited. There is no reason at all to keep using our own version instead of the busybox one. This commit also makes modules_scan 15% faster.
* Add rootflags to switches we understandPeter Hjalmarsson2013-03-312-9/+23
| | | | | | | | Nearly every general documentation including the one in the kernel tree and the scripts for GRUB2 all expects this flag to work. Signed-off-by: Peter Hjalmarsson <xake@rymdraket.net>
* Add ehci-pci to MODULES_USB, needed by 3.8 kernels, see bug #458606Fabio Erculiani2013-03-1913-13/+13
| | | | Thanks to Adrian.Bassett@hotmail.co.uk for reporting this.
* Unify copy_binaries() morePeter Hjalmarsson2013-03-031-7/+4
| | | | | | As suggested by Vapier in bug #450688. Signed-off-by: Peter Hjalmarsson <xake@rymdraket.net>
* Make copy_binaries compatible with lddtree from pax-utils-0.6Peter Hjalmarsson2013-02-091-1/+10
| | | | | | | | On some system the output from the new lddtree does not match with what genkernel expects, however lddtree have insted gained a new option that essentially gives what we want with less code. Signed-off-by: Peter Hjalmarsson <xake@rymdraket.net>
* Fix non-functional init_opts parameter, bug #422471Toralf Förster2012-11-221-0/+1
| | | | | | | | If INIT_OPTS='' is not specified before the argument loop, scoping rules will prevent it from being seen by the switch_root invocation. Signed-off-by: Toralf Förster <toralf.foerster@gmx.de> Signed-off-by: Richard Yao <ryao@gentoo.org>
* linuxrc: part keywordRobin H. Johnson2012-11-202-6/+7
| | | | | | | Clean up documentation and functionality of "part" argument to initramfs. It is meant to imitate the same option to the kernel. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Unquote ${ZPOOL_FORCE} variable usage.Fabio Erculiani2012-11-111-3/+3
| | | | | | | | The default value of ${ZPOOL_USAGE} is unset, quoting it would result into a "" argument passed to zpool. The workaround to this is to use "dozfs=force" boot argument. Signed-off-by: Richard Yao <ryao@gentoo.org>
* Make missing ZFS config file failures into warnings, bug #438200v3.4.45Richard Yao2012-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | Whenever /etc/zfs/{zdev.conf,zpool.cache} was missing, we would fail. zpool.cache is not generated during cross compilation, which causes a failure in Catalyst when building LiveCDs. Users that do not follow a strict set of installation instructions can also suffer failures as a consequence of this. zpool.cache includes information about known pools that enables ZFS to detect situations where an entire pool disappears. It is also required to do pool import in corner cases, such as those those involving file-based pools, and has the beneficial effect of reducing pool import times. Unconditional omission of zpool.cache in general is not an option, but for the situations identified, it is okay to convert the failure into a warning, which is what we do. Reported-by: Rick Farina <zero_chaos@gentoo.org> Reported-by: Alexander Zubkov <green@msu.ru> Signed-off-by: Richard Yao <ryao@gentoo.org>
* Remove redundant default no settingRichard Yao2012-11-051-1/+1
|
* Bump version.Robin H. Johnson2012-11-021-1/+1
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Move to autogenerated ChangeLog.Robin H. Johnson2012-11-024-7/+12
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Bug #378105: UUID/LABEL support for LUKS keydevsMarek Sapota2012-11-021-37/+46
| | | | | | | | LUKS keydevs now support mount by UUID/LABEL. X-Gentoo-Bug: 378105 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=378105 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Change OUTPUTDIR fallback to KERNEL_DIRTim Harder2012-11-021-1/+1
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Missing then keyword.Robin H. Johnson2012-10-192-0/+4
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Support using init= on the command linePeter Hjalmarsson2012-10-152-0/+11
| | | | | | | | | We do not support ramdisk, only initramfs nowdays. So init= is a dead command, and we may as well have it do the same as it does for dracut and in the Linux kernel documentation. (Use rdinit to choose the initramfs init file) Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Update the documentation to reflect current statusPeter Hjalmarsson2012-10-155-25/+22
| | | | | | | | | | | | We only support creating initramfs nowdays, so RAM disk support is not needed. Since initramfs does not need root=/dev/ram0 (and we actually ignore it if it is set), we should not tell people to use it. We should also stop tell people to use real_root. Conflicts: genkernel Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Bump to 3.4.44.2 with depmod corner cases by xake.v3.4.44.2Robin H. Johnson2012-10-152-1/+4
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Add missing ChangeLog entry for xake's commitRobin H. Johnson2012-10-151-0/+3
|