Age | Commit message (Collapse) | Author | Files | Lines |
|
This requires some refactoring of how we handle TMPDIR declaration and
creation, as well as protecting the way we do cleanup so that we don't
error out when cleanup is called prior to TMPDIR being declared.
We also add a shortcut to the build root based on the TMPDIR for
convenience.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Always use bash's [[ ]], and apply (( )) where arithmetic calculations
are made. We also take a few other bash shortcuts to simplify code where
possible.
We also touch the Makefile here to adjust the sed'ing for directory
names.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Since we intentionally word split these variables, a variable containing
only white space will never trigger us to iterate on each for loop.
Therefore, the existance check is superfluous as it will always pass.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
We don't need to add the destination directory -- we can assume this
will always be added by another function. We also ignore $BASEDIR as we
will never be passing in a path that contains a $BASEDIR so we don't
want to erroenous trim a path.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Output style and coloring is borrowed from makepkg with minor
adjustments. Most instances where we encounter fatal errors are replaced
with a 'die' function to wrap this up neatly. In addition, we introduce
the -n flag, for no-color.
As a side effect, we need to source the functions file earlier so we
have the output functions available earlier.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
We also consolidate our empty variable declarations in mkinitcpio with a
simple declare.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This also adds a /bin/bash shebang to functions. While not technically
necessary, this ensures that vim gives us the correct syntax highlight
file.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Properly detect symlinks using the -L shell test, resolving and
recursing on discovery. This results in removing a lot of extraneous
variable declarations and code.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This is a departure from using gen_init_cpio, which proved to be a huge
bottleneck in performance. Tests for existance change from being a call
to grep, to a simple shell test.
In the process, we have to modify the behavior of the -s option, and we
lose the -a option.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This is never used by anything in the official repos. Kill it with
fire.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This was only ever used in the base layout, and it's not needed.
devices will be present if we're using devtmpfs, and created for us by
init if we mount on tmpfs.
Also, this is part of our move towards using bsdcpio instead of
gen_init_cpio, and as a side effect we can no longer support this. Any
devices that need to be created should be done so by the runtime hooks,
not the install time hooks.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Simplify and fix a few bugs in the process. We rely solely on modinfo
for obtaining information about module location, dependencies and
firmware. Add a small wrapper function for modinfo that will always
specify our $BASEDIR and $KERNELVERSION for us.
Also, kill off HAS_MODULES. Since we have ADDED_MODULES, which contains
all currently added modules, we can count the elements in this when it
comes time to decide to create depmod files.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Modify the sed filter to remove PIC addresses and ignore the first line
which will always be the vdso. Also remove the tls filter, as glibc has
had threaded support mainlined for many years now. If a user has a glibc
this old, we don't have support for them elsewhere (udev, kernel).
We also cleanup the logical flow through this function and remove a lot
of cruft that would always return true, or that didn't quite make sense.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
Function all_modules() doesn't correctly detect module extension.
It's a one char removing patch.
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
|
|
Do a single grep to compare the contents of the module file (if exists)
against the results of all_modules for the provided arguments. If
there's no module file, this is still just pass through to all_modules.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
sanitize and print during module discovery. We also strip path names
during this process and null terminate path names for safety.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
sort/uniq the modaliases files' contents, before passing _all_ of them
to modprobe -a. This cuts back on execution time as well as cleaning up
the resulting list of modules.
Signed-off-by: Dave Reisner <d@falconindy.com>
|
|
This saves a find and grep call for every module that is added more than
once, which can lead to significant savings in image generation time.
Generating a fallback image went from 80 seconds to 60 seconds after
this patch.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is what we currently use in makepkg for the same purpose.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Rather than go through all the hoops, check if the module has already
been added by looking for its file path and skip the addition early if
we can. This helps especially in modules with many recursive
dependencies, and is most noticable when generating a full image with
many modules.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Replace all of the repeated calls to dirname and basename with our new
replacments. Also replace the 'grep ... /dev/null' idiom with calls to
'grep -q', which does exactly what we want.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Replace common behavior we had in some other places with
get_module_name, and add some basename/dirname replacements done in bash
to avoid the forks for the number of times we call these functions.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This makes a bit more organizational sense to keep these first before we
dive into the more complicated functions.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We used to expect only .ko as a kernel module name. Also accept .ko.gz,
so we can reduce the installed size of the kernel26 package.
|
|
Replace some seds with tr and bash pattern removal
|
|
Needed to get libcrc32c and therefore btrfs to work. Also remove the
equivalent section in autodetect, which wasn't working anyway.
|
|
udev 150-1 removes resolve-modalias
|
|
|
|
See `man dash`
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
|
|
|
|
Replace find-exec syntax, using + instead of \;
This is faster (executes cat for all files instead
of once for each file found).
IMPORTANT: This also has the added benefit of fixing
a bash 4.0 bug where $(find ... -exec ... \;) fails
hard. Ugh
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
These changes are potential breakers and we are not
fully prepared to test them, nor are they fully usable
just yet. Revert for now.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This was introduced with the switch to resolve-modalias
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
Hook's BINARIES settings were being copied from the
parent if using an alternate BASEDIR. This should fix
that
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This was never used and has no potential to be used.
Just delete it.
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
This fixes issues with module resolving AND makes us
run a bit faster
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
|
|
|
|
|
|
|
|
a module is found, not for the module itself.
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@209 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
- added compatibility symlink /bin/modprobe
- 0.5.14 release
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@206 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
- fix some bugs introduced by phrakture (could you be more careful?)
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@204 880c04e9-e011-0410-abf7-b926e227c9cd
|
|
* mkinitcpio/functions (add_dir) remove existing dir check before adding
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@203 880c04e9-e011-0410-abf7-b926e227c9cd
|