diff options
Diffstat (limited to 'main/mkinitfs/git.patch')
-rw-r--r-- | main/mkinitfs/git.patch | 55 |
1 files changed, 43 insertions, 12 deletions
diff --git a/main/mkinitfs/git.patch b/main/mkinitfs/git.patch index 14842a85e9..ef27ea474d 100644 --- a/main/mkinitfs/git.patch +++ b/main/mkinitfs/git.patch @@ -208,6 +208,24 @@ index 8adf4df..6f28294 100644 /usr/sbin/accton /usr/sbin/sa - +diff --git a/features.d/btrfs.modules b/features.d/btrfs.modules +index b5a271f..a114111 100644 +--- a/features.d/btrfs.modules ++++ b/features.d/btrfs.modules +@@ -1,2 +1,5 @@ + kernel/crypto/crc32c* ++kernel/arch/*/crypto/crc32* ++kernel/arch/*/crypto/crc32* ++kernel/crypto/crc32* + kernel/fs/btrfs +diff --git a/features.d/cryptsetup.modules b/features.d/cryptsetup.modules +index 9b63cd3..1469be7 100644 +--- a/features.d/cryptsetup.modules ++++ b/features.d/cryptsetup.modules +@@ -1,2 +1,3 @@ + kernel/crypto/* ++kernel/arch/*/crypto/* + kernel/drivers/md/dm-crypt.ko diff --git a/features.d/kms.files b/features.d/kms.files deleted file mode 100644 index 9d198b2..0000000 @@ -238,6 +256,15 @@ index fa74c10..b0e6c22 100644 kernel/drivers/block/virtio* kernel/drivers/virtio +kernel/drivers/net/virtio_net* +diff --git a/features.d/xfs.modules b/features.d/xfs.modules +index f577bf3..2b7fd53 100644 +--- a/features.d/xfs.modules ++++ b/features.d/xfs.modules +@@ -1 +1,4 @@ ++kernel/arch/*/crypto/crc32* ++kernel/arch/*/crypto/crc32* ++kernel/crypto/crc32* + kernel/fs/xfs diff --git a/initramfs-init.in b/initramfs-init.in index 934fe92..cdf50b9 100755 --- a/initramfs-init.in @@ -915,10 +942,10 @@ index 04dc99c..c5f6434 100755 rc=$? diff --git a/nlplug-findfs.c b/nlplug-findfs.c new file mode 100644 -index 0000000..27b9ce2 +index 0000000..7d1511e --- /dev/null +++ b/nlplug-findfs.c -@@ -0,0 +1,1017 @@ +@@ -0,0 +1,1021 @@ + +/* + * Copy me if you can. @@ -962,7 +989,8 @@ index 0000000..27b9ce2 +#include "arg.h" + +#define DEFAULT_EVENT_TIMEOUT 250 -+#define USB_STORAGE_TIMEOUT 2000 ++/* usb mass storage needs 1 sec to settle */ ++#define USB_STORAGE_TIMEOUT 1000 + +#define FOUND_DEVICE 0x1 +#define FOUND_BOOTREPO 0x2 @@ -1108,7 +1136,6 @@ index 0000000..27b9ce2 + char *devname; + char *major; + char *minor; -+ char *driver; + char devnode[256]; + char *envp[64]; +}; @@ -1191,7 +1218,7 @@ index 0000000..27b9ce2 + return fd; +} + -+static int load_kmod(const char *modalias) ++static int load_kmod(const char *modalias, char *driver, size_t len) +{ + static struct kmod_ctx *ctx = NULL; + struct kmod_list *list = NULL; @@ -1228,6 +1255,8 @@ index 0000000..27b9ce2 + fmt = "module '%s' failed"; + } + dbg(fmt, kmod_module_get_name(mod)); ++ if (driver) ++ strncpy(driver, kmod_module_get_name(mod), len); + kmod_module_unref(mod); + } + kmod_module_unref_list(list); @@ -1339,7 +1368,7 @@ index 0000000..27b9ce2 +static void start_cryptsetup(struct ueventconf *conf) +{ + dbg("starting cryptsetup %s -> %s", conf->crypt_devnode, conf->crypt_name); -+ load_kmod("dm-crypt"); ++ load_kmod("dm-crypt", NULL, 0); + pthread_create(&conf->cryptsetup_tid, NULL, cryptsetup_thread, conf); + conf->running_threads |= CRYPTSETUP_THREAD; +} @@ -1613,12 +1642,16 @@ index 0000000..27b9ce2 + return 0; + + if (ev->modalias != NULL && strcmp(ev->action, "add") == 0) { -+ load_kmod(ev->modalias); ++ char buf[128]; ++ memset(buf, 0, sizeof(buf)); ++ load_kmod(ev->modalias, buf, sizeof(buf)-1); + conf->modalias_count++; + -+ } else if (ev->driver != NULL && strcmp(ev->driver, "usb-storage") == 0) { -+ conf->timeout += timeout_increment; -+ timeout_increment = 0; ++ /* increase timeout so usb drives gets time to settle */ ++ if (strcmp(buf, "usb_storage") == 0) { ++ conf->timeout += timeout_increment; ++ timeout_increment = 0; ++ } + + } else if (ev->devname != NULL) { + if (conf->program_argv[0] != NULL) { @@ -1691,8 +1724,6 @@ index 0000000..27b9ce2 + ev.major = value; + } else if (envcmp(key, "MINOR")) { + ev.minor = value; -+ } else if (envcmp(key, "DRIVER")) { -+ ev.driver = value; + } + + if (!envcmp(key, "PATH")) |