uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
35
pkgs/os-specific/linux/kmod/aggregator.nix
Normal file
35
pkgs/os-specific/linux/kmod/aggregator.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ stdenvNoCC, kmod, modules, buildEnv, name ? "kernel-modules" }:
|
||||
|
||||
buildEnv {
|
||||
inherit name;
|
||||
|
||||
paths = modules;
|
||||
|
||||
postBuild =
|
||||
''
|
||||
source ${stdenvNoCC}/setup
|
||||
|
||||
if ! test -d "$out/lib/modules"; then
|
||||
echo "No modules found."
|
||||
# To support a kernel without modules
|
||||
exit 0
|
||||
fi
|
||||
|
||||
kernelVersion=$(cd $out/lib/modules && ls -d *)
|
||||
if test "$(echo $kernelVersion | wc -w)" != 1; then
|
||||
echo "inconsistent kernel versions: $kernelVersion"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "kernel version is $kernelVersion"
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
# Regenerate the depmod map files. Be sure to pass an explicit
|
||||
# kernel version number, otherwise depmod will use `uname -r'.
|
||||
if test -w $out/lib/modules/$kernelVersion; then
|
||||
rm -f $out/lib/modules/$kernelVersion/modules.!(builtin*|order*)
|
||||
${kmod}/bin/depmod -b $out -C $out/etc/depmod.d -a $kernelVersion
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue