From: Jani Nikula <jani.nikula@linux.intel.com>
To: Derek Morton <derek.j.morton@intel.com>, intel-gfx@lists.freedesktop.org
Cc: thomas.wood@intel.com
Subject: Re: [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android
Date: Mon, 15 Jun 2015 18:30:37 +0300 [thread overview]
Message-ID: <878ubl56qq.fsf@intel.com> (raw)
In-Reply-To: <1434379789-27250-1-git-send-email-derek.j.morton@intel.com>
On Mon, 15 Jun 2015, Derek Morton <derek.j.morton@intel.com> wrote:
> Disable the tools / demo code that do not currently build
> for android until they can be fixed.
>
> Affected tools / demos
> intel_reg
> intel_display_crc
> intel_sprite_on
The simplest you can do to fix intel_reg is to have configure set up
HAVE_SYS_IO or similar and do this in the code:
diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 090cc25613b9..c1e1d5ed3f1c 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -28,7 +28,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/io.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@@ -38,6 +37,19 @@
#include "intel_reg_spec.h"
+#ifdef HAVE_SYS_IO
+#include <sys/io.h>
+#else
+static inline int _not_supported(void)
+{
+ fprintf(stderr, "portio-vga not supported\n");
+ return 0;
+}
+#define inb(port) _not_supported()
+#define outb(value, port) _not_supported()
+#define iopl(level)
+#endif
+
struct config {
struct pci_device *pci_dev;
char *mmiofile;
I'm sure it could be made prettier, but this gets the job done.
BR,
Jani.
>
> v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO
> flag.
>
> Signed-off-by: Derek Morton <derek.j.morton@intel.com>
> ---
> Android.mk | 2 +-
> tools/Android.mk | 5 +++++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Android.mk b/Android.mk
> index 1ab3e64..681d114 100644
> --- a/Android.mk
> +++ b/Android.mk
> @@ -1,2 +1,2 @@
> -include $(call all-named-subdir-makefiles, lib tests tools benchmarks demos)
> +include $(call all-named-subdir-makefiles, lib tests tools benchmarks)
>
> diff --git a/tools/Android.mk b/tools/Android.mk
> index 39f4512..4be0032 100644
> --- a/tools/Android.mk
> +++ b/tools/Android.mk
> @@ -37,10 +37,15 @@ endef
>
> skip_tools_list := \
> intel_framebuffer_dump \
> + intel_reg \
> intel_reg_dumper \
> intel_vga_read \
> intel_vga_write
>
> +ifneq ("${ANDROID_HAS_CAIRO}", "1")
> + skip_tools_list += intel_display_crc
> +endif
> +
> tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS))
>
> $(foreach item,$(tools_list),$(eval $(call add_tool,$(item))))
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-15 15:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 14:49 [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android Derek Morton
2015-06-15 15:30 ` Jani Nikula [this message]
2015-06-16 10:04 ` Morton, Derek J
2015-07-16 8:44 ` Morton, Derek J
2015-07-16 11:07 ` [PATCH i-g-t 0/2] Enabling intel_reg on Android Thomas Wood
2015-07-16 11:07 ` [PATCH i-g-t 1/2] intel_reg: support platforms without sys/io.h Thomas Wood
2015-07-16 11:07 ` [PATCH i-g-t 2/2] tools/Android.mk: add any extra program sources Thomas Wood
2015-07-16 14:13 ` Morton, Derek J
2015-07-16 15:23 ` Thomas Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878ubl56qq.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=derek.j.morton@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=thomas.wood@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox