guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: sunxi-tools: Fix build.


From: guix-commits
Subject: branch master updated: gnu: sunxi-tools: Fix build.
Date: Thu, 08 Oct 2020 17:17:25 -0400

This is an automated email from the git hooks/post-receive script.

dannym pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 7e91728  gnu: sunxi-tools: Fix build.
7e91728 is described below

commit 7e917283d71fee1a29363e113f29c8c21f7c4739
Author: Danny Milosavljevic <dannym@scratchpost.org>
AuthorDate: Thu Oct 8 23:11:55 2020 +0200

    gnu: sunxi-tools: Fix build.
    
    * gnu/packages/patches/sunxi-tools-remove-sys-io.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/admin.scm (sunxi-tools-source): Add it.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/admin.scm                             |  2 +
 .../patches/sunxi-tools-remove-sys-io.patch        | 52 ++++++++++++++++++++++
 3 files changed, 55 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 83d2d72..b59b122 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1420,6 +1420,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/sdl-pango-matrix_declarations.patch     \
   %D%/packages/patches/sdl-pango-sans-serif.patch              \
   %D%/packages/patches/sqlite-hurd.patch                       \
+  %D%/packages/patches/sunxi-tools-remove-sys-io.patch \
   %D%/packages/patches/patchutils-test-perms.patch             \
   %D%/packages/patches/patch-hurd-path-max.patch               \
   %D%/packages/patches/perl-autosplit-default-time.patch       \
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 40db55e..275432c 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2945,6 +2945,8 @@ Kerberos and Heimdal and FAST is supported with recent 
MIT Kerberos.")
              (commit (string-append "v" version))))
        (sha256
         (base32 "04f3jqg8ww4jxsf9c6ddcdgy2xbhkyp0b3l5f1hvvbv94p81rjxd"))
+       (patches
+        (search-patches "sunxi-tools-remove-sys-io.patch"))
        (modules '((guix build utils)))
        (snippet
         ;; Remove binaries contained in the tarball which are only for the
diff --git a/gnu/packages/patches/sunxi-tools-remove-sys-io.patch 
b/gnu/packages/patches/sunxi-tools-remove-sys-io.patch
new file mode 100644
index 0000000..fc1e5ea
--- /dev/null
+++ b/gnu/packages/patches/sunxi-tools-remove-sys-io.patch
@@ -0,0 +1,52 @@
+From 783cbd59fcf086a9aaf603271823fb4ca71f0c55 Mon Sep 17 00:00:00 2001
+From: Danny Milosavljevic <dannym@scratchpost.org>
+Date: Thu, 8 Oct 2020 23:01:05 +0200
+Subject: [PATCH] meminfo: Replace sys/io.h by direct register accesses.
+See: https://github.com/linux-sunxi/sunxi-tools/pull/144
+
+Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
+---
+ meminfo.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/meminfo.c b/meminfo.c
+index 0b0ff23..3b3a5df 100644
+--- a/meminfo.c
++++ b/meminfo.c
+@@ -22,7 +22,6 @@
+ #include <sys/mman.h>
+ #include <stdint.h>
+ #include <errno.h>
+-#include <sys/io.h>
+ #include <stdbool.h>
+ 
+ #include "common.h"
+@@ -74,24 +73,24 @@ static enum sunxi_soc_version soc_version;
+ unsigned int
+ sunxi_io_read(void *base, int offset)
+ {
+-      return inl((unsigned long) (base + offset));
++      return *(volatile unsigned int*) (base + offset);
+ }
+ 
+ void
+ sunxi_io_write(void *base, int offset, unsigned int value)
+ {
+-      outl(value, (unsigned long) (base + offset));
++      *(volatile unsigned int*) (base + offset) = value;
+ }
+ 
+ void
+ sunxi_io_mask(void *base, int offset, unsigned int value, unsigned int mask)
+ {
+-      unsigned int tmp = inl((unsigned long) (base + offset));
++      unsigned int tmp = sunxi_io_read(base, offset);
+ 
+       tmp &= ~mask;
+       tmp |= value & mask;
+ 
+-      outl(tmp, (unsigned long) (base + offset));
++      sunxi_io_write(base, offset, tmp);
+ }
+ 
+ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]