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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,24 @@
From e7446c9bcb47674c9d0ee3b5bab129e9b86eb1c9 Mon Sep 17 00:00:00 2001
From: Walter Franzini <walter.franzini@gmail.com>
Date: Fri, 7 Jun 2019 17:57:11 +0200
Subject: [PATCH] musl does not support rewind pipe, make it build anyway
---
src/formats.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/formats.c b/src/formats.c
index f3efe764..477bf451 100644
--- a/src/formats.c
+++ b/src/formats.c
@@ -424,7 +424,6 @@ static void UNUSED rewind_pipe(FILE * fp)
/* To fix this #error, either simply remove the #error line and live without
* file-type detection with pipes, or add support for your compiler in the
* lines above. Test with cat monkey.wav | ./sox --info - */
- #error FIX NEEDED HERE
#define NO_REWIND_PIPE
(void)fp;
#endif
--
2.19.2

View file

@ -0,0 +1,79 @@
{ config
, lib
, stdenv
, fetchzip
, autoreconfHook
, autoconf-archive
, pkg-config
, CoreAudio
, enableAlsa ? true
, alsa-lib
, enableLibao ? true
, libao
, enableLame ? config.sox.enableLame or false
, lame
, enableLibmad ? true
, libmad
, enableLibogg ? true
, libogg
, libvorbis
, enableOpusfile ? true
, opusfile
, enableFLAC ? true
, flac
, enablePNG ? true
, libpng
, enableLibsndfile ? true
, libsndfile
, enableWavpack ? true
, wavpack
# amrnb and amrwb are unfree, disabled by default
, enableAMR ? false
, amrnb
, amrwb
, enableLibpulseaudio ? stdenv.isLinux
, libpulseaudio
}:
stdenv.mkDerivation rec {
pname = "sox";
version = "unstable-2021-05-09";
src = fetchzip {
url = "https://sourceforge.net/code-snapshots/git/s/so/sox/code.git/sox-code-42b3557e13e0fe01a83465b672d89faddbe65f49.zip";
hash = "sha256-9cpOwio69GvzVeDq79BSmJgds9WU5kA/KUlAkHcpN5c=";
};
nativeBuildInputs = [
autoreconfHook
autoconf-archive
] ++ lib.optional enableOpusfile [
# configure.ac uses pkg-config only to locate libopusfile
pkg-config
];
patches = [ ./0001-musl-rewind-pipe-workaround.patch ];
buildInputs =
lib.optional (enableAlsa && stdenv.isLinux) alsa-lib
++ lib.optional enableLibao libao
++ lib.optional enableLame lame
++ lib.optional enableLibmad libmad
++ lib.optionals enableLibogg [ libogg libvorbis ]
++ lib.optional enableOpusfile opusfile
++ lib.optional enableFLAC flac
++ lib.optional enablePNG libpng
++ lib.optional enableLibsndfile libsndfile
++ lib.optional enableWavpack wavpack
++ lib.optionals enableAMR [ amrnb amrwb ]
++ lib.optional enableLibpulseaudio libpulseaudio
++ lib.optional stdenv.isDarwin CoreAudio;
meta = with lib; {
description = "Sample Rate Converter for audio";
homepage = "http://sox.sourceforge.net/";
maintainers = with maintainers; [ marcweber ];
license = if enableAMR then licenses.unfree else licenses.gpl2Plus;
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,79 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Misty De Meo <mistydemeo@gmail.com>
Date: Tue, 15 Sep 2020 16:57:26 -0700
Subject: [PATCH] Check for __arm64__, not just __arm__
On at least one 64-bit ARM processor I've tested (Apple Silicon on macOS),
__arm__ isn't defined but __arm64__ is. As a result, some of the
ARM-specific macros are missing and calls to them fail.
---
src/cr-core.c | 2 +-
src/dev32s.h | 2 +-
src/pffft-wrap.c | 2 +-
src/pffft.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/cr-core.c b/src/cr-core.c
index 159a5d9..fe5ea8a 100644
--- a/src/cr-core.c
+++ b/src/cr-core.c
@@ -80,7 +80,7 @@ static void cubic_stage_fn(stage_t * p, fifo_t * output_fifo)
#define DEFINED_X86 0
#endif
-#if defined __arm__
+#if defined(__arm__) || defined(__arm64__)
#define DEFINED_ARM 1
#else
#define DEFINED_ARM 0
diff --git a/src/dev32s.h b/src/dev32s.h
index 7edae86..a14d7ad 100644
--- a/src/dev32s.h
+++ b/src/dev32s.h
@@ -31,7 +31,7 @@ SIMD_INLINE(void) vStorSum(float * a, v4_t b) {
v4_t t = vAdd(_mm_movehl_ps(b, b), b);
_mm_store_ss(a, vAdd(t, _mm_shuffle_ps(t,t,1)));}
-#elif defined __arm__
+#elif defined(__arm__) || defined(__arm64__)
#include <arm_neon.h>
diff --git a/src/pffft-wrap.c b/src/pffft-wrap.c
index c920f06..1641fc4 100644
--- a/src/pffft-wrap.c
+++ b/src/pffft-wrap.c
@@ -40,7 +40,7 @@ static void pffft_zconvolve(PFFFT_Setup *s, const float *a, const float *b, floa
float ar, ai, br, bi;
-#ifdef __arm__
+#if defined(__arm__) || defined(__arm64__)
__builtin_prefetch(va);
__builtin_prefetch(vb);
__builtin_prefetch(va+2);
diff --git a/src/pffft.c b/src/pffft.c
index 46c841e..8c775a9 100644
--- a/src/pffft.c
+++ b/src/pffft.c
@@ -157,7 +157,7 @@ typedef __m128 v4sf;
/*
ARM NEON support macros
*/
-#elif !defined(PFFFT_SIMD_DISABLE) && defined(__arm__)
+#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__arm__) || defined(__arm64__))
# include <arm_neon.h>
typedef float32x4_t v4sf;
# define SIMD_SZ 4
@@ -1732,7 +1732,7 @@ void pffft_zconvolve_accumulate(PFFFT_Setup *s, const float *a, const float *b,
const v4sf * RESTRICT vb = (const v4sf*)b;
v4sf * RESTRICT vab = (v4sf*)ab;
-#ifdef __arm__
+#if defined(__arm__) || defined(__arm64__)
__builtin_prefetch(va);
__builtin_prefetch(vb);
__builtin_prefetch(vab);
--
2.30.1

View file

@ -0,0 +1,35 @@
{ lib, stdenv, fetchurl, cmake }:
stdenv.mkDerivation rec {
pname = "soxr";
version = "0.1.3";
src = fetchurl {
url = "mirror://sourceforge/soxr/soxr-${version}-Source.tar.xz";
sha256 = "12aql6svkplxq5fjycar18863hcq84c5kx8g6f4rj0lcvigw24di";
};
patches = [
# Remove once https://sourceforge.net/p/soxr/code/merge-requests/5/ is merged.
./arm64-check.patch
];
outputs = [ "out" "doc" ]; # headers are just two and very small
preConfigure =
if stdenv.isDarwin then ''
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}"`pwd`/build/src
'' else ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}"`pwd`/build/src
'';
nativeBuildInputs = [ cmake ];
meta = with lib; {
description = "An audio resampling library";
homepage = "http://soxr.sourceforge.net";
license = licenses.lgpl21Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ ];
};
}

View file

@ -0,0 +1,37 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation {
pname = "wavrsocvt";
version = "1.0.2.0";
src = fetchurl {
url = "http://bricxcc.sourceforge.net/wavrsocvt.tgz";
sha256 = "15qlvdfwbiclljj7075ycm78yzqahzrgl4ky8pymix5179acm05h";
};
unpackPhase = ''
tar -zxf $src
'';
installPhase = ''
mkdir -p $out/bin
cp wavrsocvt $out/bin
'';
meta = with lib; {
description = "Convert .wav files into sound files for Lego NXT brick";
longDescription = ''
wavrsocvt is a command-line utility which can be used from a
terminal window or script to convert .wav files into sound
files for the NXT brick (.rso files). It can also convert the
other direction (i.e., .rso -> .wav). It can produce RSO files
with a sample rate between 2000 and 16000 (the min/max range of
supported sample rates in the standard NXT firmware).
You can then upload these with e.g. nxt-python.
'';
homepage = "http://bricxcc.sourceforge.net/";
license = licenses.mpl11;
maintainers = with maintainers; [ leenaars ];
platforms = with platforms; linux;
};
}