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
16
pkgs/build-support/kernel/compress-firmware-xz.nix
Normal file
16
pkgs/build-support/kernel/compress-firmware-xz.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ runCommand }:
|
||||
|
||||
firmware:
|
||||
|
||||
runCommand "${firmware.name}-xz" {} ''
|
||||
mkdir -p $out/lib
|
||||
(cd ${firmware} && find lib/firmware -type d -print0) |
|
||||
(cd $out && xargs -0 mkdir -v --)
|
||||
(cd ${firmware} && find lib/firmware -type f -print0) |
|
||||
(cd $out && xargs -0rtP "$NIX_BUILD_CORES" -n1 \
|
||||
sh -c 'xz -9c -T1 -C crc32 --lzma2=dict=2MiB "${firmware}/$1" > "$1.xz"' --)
|
||||
(cd ${firmware} && find lib/firmware -type l) | while read link; do
|
||||
target="$(readlink "${firmware}/$link")"
|
||||
ln -vs -- "''${target/^${firmware}/$out}.xz" "$out/$link.xz"
|
||||
done
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue