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
20
pkgs/development/libraries/libx86/constants.patch
Normal file
20
pkgs/development/libraries/libx86/constants.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- libx86/lrmi.c 2008-09-06 12:24:36.070136428 +0200
|
||||
+++ libx86/lrmi.c 2008-09-06 12:28:10.584287458 +0200
|
||||
@@ -56,5 +56,17 @@
|
||||
|
||||
#if defined(__linux__)
|
||||
+#ifndef TF_MASK
|
||||
+#define TF_MASK X86_EFLAGS_TF
|
||||
+#endif
|
||||
+#ifndef IF_MASK
|
||||
+#define IF_MASK X86_EFLAGS_IF
|
||||
+#endif
|
||||
+#ifndef IOPL_MASK
|
||||
+#define IOPL_MASK X86_EFLAGS_IOPL
|
||||
+#endif
|
||||
+#ifndef VIF_MASK
|
||||
+#define VIF_MASK X86_EFLAGS_VIF
|
||||
+#endif
|
||||
#define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
|
||||
#elif defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL)
|
||||
29
pkgs/development/libraries/libx86/default.nix
Normal file
29
pkgs/development/libraries/libx86/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libx86";
|
||||
version = "1.1";
|
||||
src = fetchurl {
|
||||
url = "https://www.codon.org.uk/~mjg59/libx86/downloads/${pname}-${version}.tar.gz";
|
||||
sha256 = "0j6h6bc02c6qi0q7c1ncraz4d1hkm5936r35rfsp4x1jrc233wav";
|
||||
};
|
||||
patches = [./constants.patch ./non-x86.patch ];
|
||||
|
||||
# using BACKEND=x86emu on 64bit systems fixes:
|
||||
# http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html
|
||||
makeFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
] ++ lib.optional (!stdenv.isi686) "BACKEND=x86emu";
|
||||
|
||||
preBuild = ''
|
||||
sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@'
|
||||
sed -e s@/usr@@ -i Makefile
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Real-mode x86 code emulator";
|
||||
maintainers = with maintainers; [ raskin ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
38
pkgs/development/libraries/libx86/non-x86.patch
Normal file
38
pkgs/development/libraries/libx86/non-x86.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
diff -Naur libx86-1.1+ds1.orig/Makefile libx86-1.1+ds1/Makefile
|
||||
--- libx86-1.1+ds1.orig/Makefile 2008-05-19 12:28:59.000000000 +0300
|
||||
+++ libx86-1.1+ds1/Makefile 2012-02-20 01:32:03.750068423 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
ifeq ($(BACKEND),x86emu)
|
||||
OBJECTS += thunk.o x86emu/decode.o x86emu/debug.o x86emu/fpu.o \
|
||||
x86emu/ops.o x86emu/ops2.o x86emu/prim_ops.o x86emu/sys.o
|
||||
+ CFLAGS += -DX86EMU -fno-delete-null-pointer-checks
|
||||
else
|
||||
OBJECTS += lrmi.o
|
||||
endif
|
||||
diff -Naur libx86-1.1+ds1.orig/thunk.c libx86-1.1+ds1/thunk.c
|
||||
--- libx86-1.1+ds1.orig/thunk.c 2008-04-03 03:48:00.000000000 +0300
|
||||
+++ libx86-1.1+ds1/thunk.c 2012-02-20 01:12:56.468820192 +0200
|
||||
@@ -32,6 +32,7 @@
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
+#ifndef X86EMU
|
||||
#define __BUILDIO(bwl,bw,type) \
|
||||
static inline void out##bwl##_local(unsigned long port, unsigned type value) { __asm__ __volatile__("out" #bwl " %" #bw "0, %w1" : : "a"(value), "Nd"(port)); \
|
||||
}\
|
||||
@@ -44,6 +45,15 @@
|
||||
__BUILDIO(b,b,char)
|
||||
__BUILDIO(w,w,short)
|
||||
__BUILDIO(l,,int)
|
||||
+#else
|
||||
+/* use libc functions */
|
||||
+#define inb_local inb
|
||||
+#define inw_local inw
|
||||
+#define inl_local inl
|
||||
+#define outb_local outb
|
||||
+#define outw_local outw
|
||||
+#define outl_local outl
|
||||
+#endif /* X86EMU */
|
||||
|
||||
|
||||
char *mmap_addr = SHMERRORPTR;
|
||||
7
pkgs/development/libraries/libx86/src-for-default.nix
Normal file
7
pkgs/development/libraries/libx86/src-for-default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
rec {
|
||||
pname="libx86";
|
||||
version="1.1";
|
||||
hash="0j6h6bc02c6qi0q7c1ncraz4d1hkm5936r35rfsp4x1jrc233wav";
|
||||
url="http://www.codon.org.uk/~mjg59/libx86/downloads/libx86-${version}.tar.gz";
|
||||
advertisedUrl="http://www.codon.org.uk/~mjg59/libx86/downloads/libx86-${version}.tar.gz";
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
downloadPage = "http://www.codon.org.uk/~mjg59/libx86/downloads/?C=M;O=D";
|
||||
baseName = "libx86";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue