All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
@ 2012-05-07  3:29 Dmitry
  2012-05-07  3:58 ` Baruch Siach
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry @ 2012-05-07  3:29 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Dmitry <golubovsky@gmail.com>
---
 package/Config.in      |    1 +
 package/v86d/Config.in |    9 +++++++++
 package/v86d/v86d.mk   |   26 ++++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100644 package/v86d/Config.in
 create mode 100644 package/v86d/v86d.mk

diff --git a/package/Config.in b/package/Config.in
index 34c0280..208e66f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -230,6 +230,7 @@ source "package/unionfs/Config.in"
 source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
 source "package/usbutils/Config.in"
+source "package/v86d/Config.in"
 source "package/wipe/Config.in"
 source "package/xfsprogs/Config.in"
 endmenu
diff --git a/package/v86d/Config.in b/package/v86d/Config.in
new file mode 100644
index 0000000..ba1baca
--- /dev/null
+++ b/package/v86d/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_V86D
+	bool "v86d"
+	depends on (BR2_i386 || BR2_x86_64)
+	help
+	  v86d is the userspace helper that runs x86 code in an emulated
+	  environment. uvesafb will not work without v86d. v86d currently
+	  supports the x86 and amd64 (x86-64) architectures.
+
+	  http://dev.gentoo.org/~spock/projects/uvesafb/
diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
new file mode 100644
index 0000000..035797e
--- /dev/null
+++ b/package/v86d/v86d.mk
@@ -0,0 +1,26 @@
+############################################
+#
+# v86d
+# 
+############################################
+
+V86D_VERSION = v86d-0.1.10
+V86D_SITE = git://repo.or.cz/v86d.git
+
+# It is necessary to define __i386__ explicitly for successful compilation.
+
+define V86D_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
+endef
+
+V86D_POST_CONFIGURE_HOOKS += V86D_REALLY_RUN_CONFIGURE
+
+# v86d's configure script is not autoconf-based: parameters
+# supplied by Buildroot cause it to produce no result; explicit
+# invocation is needed.
+
+define V86D_REALLY_RUN_CONFIGURE
+	(cd $(@D) ; ./configure --default)
+endef
+
+$(eval $(call AUTOTARGETS))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-07  3:29 [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver Dmitry
@ 2012-05-07  3:58 ` Baruch Siach
  2012-05-07 10:31   ` Dimitry Golubovsky
  0 siblings, 1 reply; 18+ messages in thread
From: Baruch Siach @ 2012-05-07  3:58 UTC (permalink / raw)
  To: buildroot

Hi Dmitry,

On Sun, May 06, 2012 at 11:29:19PM -0400, Dmitry wrote:
> Signed-off-by: Dmitry <golubovsky@gmail.com>
> ---
>  package/Config.in      |    1 +
>  package/v86d/Config.in |    9 +++++++++
>  package/v86d/v86d.mk   |   26 ++++++++++++++++++++++++++
>  3 files changed, 36 insertions(+), 0 deletions(-)
>  create mode 100644 package/v86d/Config.in
>  create mode 100644 package/v86d/v86d.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 34c0280..208e66f 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -230,6 +230,7 @@ source "package/unionfs/Config.in"
>  source "package/usb_modeswitch/Config.in"
>  source "package/usbmount/Config.in"
>  source "package/usbutils/Config.in"
> +source "package/v86d/Config.in"
>  source "package/wipe/Config.in"
>  source "package/xfsprogs/Config.in"
>  endmenu
> diff --git a/package/v86d/Config.in b/package/v86d/Config.in
> new file mode 100644
> index 0000000..ba1baca
> --- /dev/null
> +++ b/package/v86d/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_V86D
> +	bool "v86d"
> +	depends on (BR2_i386 || BR2_x86_64)
> +	help
> +	  v86d is the userspace helper that runs x86 code in an emulated
> +	  environment. uvesafb will not work without v86d. v86d currently
> +	  supports the x86 and amd64 (x86-64) architectures.
> +
> +	  http://dev.gentoo.org/~spock/projects/uvesafb/
> diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
> new file mode 100644
> index 0000000..035797e
> --- /dev/null
> +++ b/package/v86d/v86d.mk
> @@ -0,0 +1,26 @@
> +############################################
> +#
> +# v86d
> +# 
> +############################################
> +
> +V86D_VERSION = v86d-0.1.10
> +V86D_SITE = git://repo.or.cz/v86d.git

A http URL would be more friendly to those behind strict firewalls. Even 
better, the website you linked to above seems to offer a tar.bz2 archive of 
the package source.

> +
> +# It is necessary to define __i386__ explicitly for successful compilation.
> +
> +define V86D_BUILD_CMDS
> +	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
> +endef
> +
> +V86D_POST_CONFIGURE_HOOKS += V86D_REALLY_RUN_CONFIGURE
> +
> +# v86d's configure script is not autoconf-based: parameters
> +# supplied by Buildroot cause it to produce no result; explicit
> +# invocation is needed.

In this case, just define V86D_CONFIGURE_CMDS, and use GENTARGETS instead of 
AUTOTARGETS, which in not appropriate for this package. Then, you won't need 
this V86D_REALLY_RUN_CONFIGURE hack.

Also, having the configure step above the build step looks more natural to me.

baruch

> +
> +define V86D_REALLY_RUN_CONFIGURE
> +	(cd $(@D) ; ./configure --default)
> +endef
> +
> +$(eval $(call AUTOTARGETS))
> -- 

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-07  3:58 ` Baruch Siach
@ 2012-05-07 10:31   ` Dimitry Golubovsky
  0 siblings, 0 replies; 18+ messages in thread
From: Dimitry Golubovsky @ 2012-05-07 10:31 UTC (permalink / raw)
  To: buildroot

Thanks, re-sent.

On Sun, May 6, 2012 at 11:58 PM, Baruch Siach <baruch@tkos.co.il> wrote:

...

> A http URL would be more friendly to those behind strict firewalls. Even
> better, the website you linked to above seems to offer a tar.bz2 archive of
> the package source.

...

-- 
Dimitry Golubovsky

Anywhere on the Web

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
@ 2012-07-18 21:17 Dmitry
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry @ 2012-07-18 21:17 UTC (permalink / raw)
  To: buildroot

Re-submitting the patch with updated build macro name and license info.

Signed-off-by: Dmitry <golubovsky@gmail.com>
---
 package/Config.in      |    1 +
 package/v86d/Config.in |    9 +++++++++
 package/v86d/v86d.mk   |   37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 package/v86d/Config.in
 create mode 100644 package/v86d/v86d.mk

diff --git a/package/Config.in b/package/Config.in
index 6aabb8e..a494641 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -238,6 +238,7 @@ source "package/unionfs/Config.in"
 source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
 source "package/usbutils/Config.in"
+source "package/v86d/Config.in"
 source "package/wipe/Config.in"
 source "package/xfsprogs/Config.in"
 endmenu
diff --git a/package/v86d/Config.in b/package/v86d/Config.in
new file mode 100644
index 0000000..ba1baca
--- /dev/null
+++ b/package/v86d/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_V86D
+	bool "v86d"
+	depends on (BR2_i386 || BR2_x86_64)
+	help
+	  v86d is the userspace helper that runs x86 code in an emulated
+	  environment. uvesafb will not work without v86d. v86d currently
+	  supports the x86 and amd64 (x86-64) architectures.
+
+	  http://dev.gentoo.org/~spock/projects/uvesafb/
diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
new file mode 100644
index 0000000..f381787
--- /dev/null
+++ b/package/v86d/v86d.mk
@@ -0,0 +1,37 @@
+############################################
+#
+# v86d
+# 
+############################################
+
+V86D_VERSION = 0.1.10
+V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
+V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
+V86D_LICENSE = GPLv2
+
+# The configure script autodetects the host architecture, 
+# and assumes the target architecture to be the same as the host,
+# so we must use the target architecture flags provided 
+# by Buildroot for proper cross-compilation. The x86emu 
+# configure option should be 'n' for i386, and 'y' for x86-64.
+
+X86EMU = $(if $(BR2_i386),n,y)
+
+# v86d's configure script is not autoconf-based.
+# GENTARGETS macro will be used rather than AUTOTARGETS.
+
+define V86D_CONFIGURE_CMDS
+	(cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(X86EMU))
+endef
+
+# It is necessary to define __i386__ explicitly for successful compilation.
+
+define V86D_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
+endef
+
+define V86D_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/v86d $(TARGET_DIR)/sbin/v86d	
+endef
+
+$(eval $(gentargets-package))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-07-17  8:01 ` Thomas Petazzoni
@ 2012-07-17  9:38   ` Dmitry Golubovsky
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Golubovsky @ 2012-07-17  9:38 UTC (permalink / raw)
  To: buildroot

Thomas,

On Tue, Jul 17, 2012 at 4:01 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Le Mon, 16 Jul 2012 23:17:03 -0400,
> Dmitry <golubovsky@gmail.com> a ?crit :
>
>> +define V86D_BUILD_CMDS
>> +     $(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
>> +endef
>
> Can you try using $(TARGET_CONFIGURE_OPTS) instead, so that CFLAGS and
> al. are also passed?

This patch some was discussed some time ago:

http://lists.busybox.net/pipermail/buildroot/2012-May/053825.html
http://lists.busybox.net/pipermail/buildroot/2012-May/053790.html
etc.

and other discussion in May. My initial patch missed installation
instructions, but that was fixed.

and I thouhgt we reached agreement.

>
> Something like:
>
>         $(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D__i386__" -C $(@D) all
>
> I'm a bit surprised by the -D__i386__, because this is normally defined
> by the compiler. Why is it needed?

Because of manually-written Makefile which somehow does not let these
flags through. I tried many ways.

I submitted this patch in May after many iterations, and I believe it
was just lost in space because of preparations for the May release.

http://lists.busybox.net/pipermail/buildroot/2012-May/053824.html

I am just resubmitting it again.

Thanks.

-- 
Dmitry Golubovsky

Anywhere on the Web

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-07-17  3:17 Dmitry
@ 2012-07-17  8:01 ` Thomas Petazzoni
  2012-07-17  9:38   ` Dmitry Golubovsky
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2012-07-17  8:01 UTC (permalink / raw)
  To: buildroot

Le Mon, 16 Jul 2012 23:17:03 -0400,
Dmitry <golubovsky@gmail.com> a ?crit :

> +define V86D_BUILD_CMDS
> +	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
> +endef

Can you try using $(TARGET_CONFIGURE_OPTS) instead, so that CFLAGS and
al. are also passed?

Something like:

	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D__i386__" -C $(@D) all

I'm a bit surprised by the -D__i386__, because this is normally defined
by the compiler. Why is it needed?

See:

thomas at skate:/tmp$ cat toto.c 
#ifdef __i386__
#error "You are on x86"
#elif defined(__x86_64__)
#error "You are on x86-64"
#elif defined(__arm__)
#error "You are on ARM"
#endif
thomas at skate:/tmp$ ~/x-tools/ia32-2012.03/bin/i686-pc-linux-gnu-gcc -c toto.c 
toto.c:3:2: error: #error "You are on x86"
thomas at skate:/tmp$ ~/x-tools/ia32-2012.03/bin/i686-pc-linux-gnu-gcc -m64 -c toto.c 
toto.c:5:2: error: #error "You are on x86-64"
thomas at skate:/tmp$ ~/x-tools/arm-2011.03/bin/arm-none-linux-gnueabi-gcc -c toto.c 
toto.c:7:2: error: #error "You are on ARM"

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
@ 2012-07-17  3:17 Dmitry
  2012-07-17  8:01 ` Thomas Petazzoni
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry @ 2012-07-17  3:17 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Dmitry <golubovsky@gmail.com>
---
 package/Config.in      |    1 +
 package/v86d/Config.in |    9 +++++++++
 package/v86d/v86d.mk   |   36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100644 package/v86d/Config.in
 create mode 100644 package/v86d/v86d.mk

diff --git a/package/Config.in b/package/Config.in
index 99257b4..23583d2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -238,6 +238,7 @@ source "package/unionfs/Config.in"
 source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
 source "package/usbutils/Config.in"
+source "package/v86d/Config.in"
 source "package/wipe/Config.in"
 source "package/xfsprogs/Config.in"
 endmenu
diff --git a/package/v86d/Config.in b/package/v86d/Config.in
new file mode 100644
index 0000000..ba1baca
--- /dev/null
+++ b/package/v86d/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_V86D
+	bool "v86d"
+	depends on (BR2_i386 || BR2_x86_64)
+	help
+	  v86d is the userspace helper that runs x86 code in an emulated
+	  environment. uvesafb will not work without v86d. v86d currently
+	  supports the x86 and amd64 (x86-64) architectures.
+
+	  http://dev.gentoo.org/~spock/projects/uvesafb/
diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
new file mode 100644
index 0000000..59187fc
--- /dev/null
+++ b/package/v86d/v86d.mk
@@ -0,0 +1,36 @@
+############################################
+#
+# v86d
+# 
+############################################
+
+V86D_VERSION = 0.1.10
+V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
+V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
+
+# The configure script autodetects the host architecture, 
+# and assumes the target architecture to be the same as the host,
+# so we must use the target architecture flags provided 
+# by Buildroot for proper cross-compilation. The x86emu 
+# configure option should be 'n' for i386, and 'y' for x86-64.
+
+X86EMU = $(if $(BR2_i386),n,y)
+
+# v86d's configure script is not autoconf-based.
+# GENTARGETS macro will be used rather than AUTOTARGETS.
+
+define V86D_CONFIGURE_CMDS
+	(cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(X86EMU))
+endef
+
+# It is necessary to define __i386__ explicitly for successful compilation.
+
+define V86D_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
+endef
+
+define V86D_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/v86d $(TARGET_DIR)/sbin/v86d	
+endef
+
+$(eval $(call GENTARGETS))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
@ 2012-05-14  3:50 Dmitry
  0 siblings, 0 replies; 18+ messages in thread
From: Dmitry @ 2012-05-14  3:50 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Dmitry <golubovsky@gmail.com>
---
 package/Config.in      |    1 +
 package/v86d/Config.in |    9 +++++++++
 package/v86d/v86d.mk   |   36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100644 package/v86d/Config.in
 create mode 100644 package/v86d/v86d.mk

diff --git a/package/Config.in b/package/Config.in
index fb1b08f..ddb55cf 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -230,6 +230,7 @@ source "package/unionfs/Config.in"
 source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
 source "package/usbutils/Config.in"
+source "package/v86d/Config.in"
 source "package/wipe/Config.in"
 source "package/xfsprogs/Config.in"
 endmenu
diff --git a/package/v86d/Config.in b/package/v86d/Config.in
new file mode 100644
index 0000000..ba1baca
--- /dev/null
+++ b/package/v86d/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_V86D
+	bool "v86d"
+	depends on (BR2_i386 || BR2_x86_64)
+	help
+	  v86d is the userspace helper that runs x86 code in an emulated
+	  environment. uvesafb will not work without v86d. v86d currently
+	  supports the x86 and amd64 (x86-64) architectures.
+
+	  http://dev.gentoo.org/~spock/projects/uvesafb/
diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
new file mode 100644
index 0000000..59187fc
--- /dev/null
+++ b/package/v86d/v86d.mk
@@ -0,0 +1,36 @@
+############################################
+#
+# v86d
+# 
+############################################
+
+V86D_VERSION = 0.1.10
+V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
+V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
+
+# The configure script autodetects the host architecture, 
+# and assumes the target architecture to be the same as the host,
+# so we must use the target architecture flags provided 
+# by Buildroot for proper cross-compilation. The x86emu 
+# configure option should be 'n' for i386, and 'y' for x86-64.
+
+X86EMU = $(if $(BR2_i386),n,y)
+
+# v86d's configure script is not autoconf-based.
+# GENTARGETS macro will be used rather than AUTOTARGETS.
+
+define V86D_CONFIGURE_CMDS
+	(cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(X86EMU))
+endef
+
+# It is necessary to define __i386__ explicitly for successful compilation.
+
+define V86D_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
+endef
+
+define V86D_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/v86d $(TARGET_DIR)/sbin/v86d	
+endef
+
+$(eval $(call GENTARGETS))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-12  5:01   ` Dmitry Golubovsky
@ 2012-05-12 14:30     ` Arnout Vandecappelle
  0 siblings, 0 replies; 18+ messages in thread
From: Arnout Vandecappelle @ 2012-05-12 14:30 UTC (permalink / raw)
  To: buildroot

On 05/12/12 07:01, Dmitry Golubovsky wrote:
> Arnout,
>
> On Fri, May 11, 2012 at 6:39 PM, Arnout Vandecappelle<arnout@mind.be>  wrote:
[snip]
>>   When you use GENTARGETS, you must also specify the install commands.
>
> And if I don't then standard "cd $(@D); make install" or anything
> similar will be used? Somehow it works without explicit install
> command specification.

  No, with GENTARGETS the install commands are empty by default.  Or you sure
it's not the old binary from a previous compilation that you see in your
target dir?

  I tried it with a clean build and there's no v86d or testvbe in the target
dir.


>> However, you can probably keep using AUTOTARGETS.  Even when you use
>> AUTOTARGETS, it is possible to override the CONFIGURE_CMDS and BUILD_CMDS.
>
> Due to the way v86d configure is written GENTARGETS seems to be more
> proper - I got convinced.

  The non-existent MAKETARGETS would be even better :-)


>> But you don't even need to override the BUILD_CMDS.  Instead, you can
>> pass additional options to the MAKE call, by defining
>>
>> V86D_MAKE_OPT += CC="$(TARGET_CC) -D__i386__"
>
> What I have in the patch I provided, was tested build-wise on i386 and
> x86-64 targets (but the program itself was only tested in 32bit mode).
> I tried that Thomas suggested (redefine CFLAGS), it did not work. I
> don't see much sense in changing the working command from what is in
> my patch.

  Sure, it's OK as it is (except for the install target of course).
Merely pointing out an alternative.

  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-11 22:39 ` Arnout Vandecappelle
@ 2012-05-12  5:01   ` Dmitry Golubovsky
  2012-05-12 14:30     ` Arnout Vandecappelle
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Golubovsky @ 2012-05-12  5:01 UTC (permalink / raw)
  To: buildroot

Arnout,

On Fri, May 11, 2012 at 6:39 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 05/09/12 12:41, Dmitry wrote:
> [snip]
>
>> +# This flag to configure should be per target architecture rather than
>> +# autodetected (or it will be per host architecture which may be
>> +# not the same as target).
>> +
>> +X86EMU = $(if $(BR2_i386),n,y)
>
>
> ?This comment was not very clear to me. ?I guess you mean
> # The configure script autodetects the host architecture, so we must
> # pass the target architecture explicitly.

Thanks for your feedback. Indeed, the configure script calls uname -m
by default, that is, assumes host architecture is same as target's.

>
> ?When you use GENTARGETS, you must also specify the install commands.

And if I don't then standard "cd $(@D); make install" or anything
similar will be used? Somehow it works without explicit install
command specification.

> However, you can probably keep using AUTOTARGETS. ?Even when you use
> AUTOTARGETS, it is possible to override the CONFIGURE_CMDS and BUILD_CMDS.

Due to the way v86d configure is written GENTARGETS seems to be more
proper - I got convinced.

> But you don't even need to override the BUILD_CMDS. ?Instead, you can
> pass additional options to the MAKE call, by defining
>
> V86D_MAKE_OPT += CC="$(TARGET_CC) -D__i386__"

What I have in the patch I provided, was tested build-wise on i386 and
x86-64 targets (but the program itself was only tested in 32bit mode).
I tried that Thomas suggested (redefine CFLAGS), it did not work. I
don't see much sense in changing the working command from what is in
my patch.

Thanks.

-- 
Dmitry Golubovsky

Anywhere on the Web

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-09 10:41 Dmitry
@ 2012-05-11 22:39 ` Arnout Vandecappelle
  2012-05-12  5:01   ` Dmitry Golubovsky
  0 siblings, 1 reply; 18+ messages in thread
From: Arnout Vandecappelle @ 2012-05-11 22:39 UTC (permalink / raw)
  To: buildroot

On 05/09/12 12:41, Dmitry wrote:
[snip]
> +# This flag to configure should be per target architecture rather than
> +# autodetected (or it will be per host architecture which may be
> +# not the same as target).
> +
> +X86EMU = $(if $(BR2_i386),n,y)

  This comment was not very clear to me.  I guess you mean
# The configure script autodetects the host architecture, so we must
# pass the target architecture explicitly.

> +
> +# v86d's configure script is not autoconf-based.
> +# GENTARGETS macro will be used rather than AUTOTARGETS.
> +
> +define V86D_CONFIGURE_CMDS
> +	(cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(X86EMU))
> +endef
> +
> +# It is necessary to define __i386__ explicitly for successful compilation.
> +
> +define V86D_BUILD_CMDS
> +	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
> +endef

  When you use GENTARGETS, you must also specify the install commands.
However, you can probably keep using AUTOTARGETS.  Even when you use
AUTOTARGETS, it is possible to override the CONFIGURE_CMDS and BUILD_CMDS.
But you don't even need to override the BUILD_CMDS.  Instead, you can
pass additional options to the MAKE call, by defining

V86D_MAKE_OPT += CC="$(TARGET_CC) -D__i386__"

  (As Thomas mentioned, if you assign twice on the command line it is only
the last one that counts.)

  I can't guarantee that what I'm saying is correct, though, so be sure to
test with a clean build before resending.

  Regards,
  Arnout


> +
> +$(eval $(call GENTARGETS))

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
@ 2012-05-09 10:41 Dmitry
  2012-05-11 22:39 ` Arnout Vandecappelle
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry @ 2012-05-09 10:41 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Dmitry <golubovsky@gmail.com>
---
 package/Config.in      |    1 +
 package/v86d/Config.in |    9 +++++++++
 package/v86d/v86d.mk   |   30 ++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 package/v86d/Config.in
 create mode 100644 package/v86d/v86d.mk

diff --git a/package/Config.in b/package/Config.in
index 34c0280..208e66f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -230,6 +230,7 @@ source "package/unionfs/Config.in"
 source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
 source "package/usbutils/Config.in"
+source "package/v86d/Config.in"
 source "package/wipe/Config.in"
 source "package/xfsprogs/Config.in"
 endmenu
diff --git a/package/v86d/Config.in b/package/v86d/Config.in
new file mode 100644
index 0000000..ba1baca
--- /dev/null
+++ b/package/v86d/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_V86D
+	bool "v86d"
+	depends on (BR2_i386 || BR2_x86_64)
+	help
+	  v86d is the userspace helper that runs x86 code in an emulated
+	  environment. uvesafb will not work without v86d. v86d currently
+	  supports the x86 and amd64 (x86-64) architectures.
+
+	  http://dev.gentoo.org/~spock/projects/uvesafb/
diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
new file mode 100644
index 0000000..c909061
--- /dev/null
+++ b/package/v86d/v86d.mk
@@ -0,0 +1,30 @@
+############################################
+#
+# v86d
+# 
+############################################
+
+V86D_VERSION = 0.1.10
+V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
+V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
+
+# This flag to configure should be per target architecture rather than
+# autodetected (or it will be per host architecture which may be 
+# not the same as target).
+
+X86EMU = $(if $(BR2_i386),n,y)
+
+# v86d's configure script is not autoconf-based.
+# GENTARGETS macro will be used rather than AUTOTARGETS.
+
+define V86D_CONFIGURE_CMDS
+	(cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(X86EMU))
+endef
+
+# It is necessary to define __i386__ explicitly for successful compilation.
+
+define V86D_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
+endef
+
+$(eval $(call GENTARGETS))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-09 10:32 Dmitry
@ 2012-05-09 10:35 ` Baruch Siach
  0 siblings, 0 replies; 18+ messages in thread
From: Baruch Siach @ 2012-05-09 10:35 UTC (permalink / raw)
  To: buildroot

Hi Dmitry,

On Wed, May 09, 2012 at 06:32:14AM -0400, Dmitry wrote: 
> +# It is necessary to define __i386__ explicitly in CFLAGS for successful compilation.

No CFLAGS.

baruch

> +
> +define V86D_BUILD_CMDS
> +	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
> +endef
> +
> +$(eval $(call GENTARGETS))

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
@ 2012-05-09 10:32 Dmitry
  2012-05-09 10:35 ` Baruch Siach
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry @ 2012-05-09 10:32 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Dmitry <golubovsky@gmail.com>
---
 package/Config.in      |    1 +
 package/v86d/Config.in |    9 +++++++++
 package/v86d/v86d.mk   |   30 ++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 package/v86d/Config.in
 create mode 100644 package/v86d/v86d.mk

diff --git a/package/Config.in b/package/Config.in
index 34c0280..208e66f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -230,6 +230,7 @@ source "package/unionfs/Config.in"
 source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
 source "package/usbutils/Config.in"
+source "package/v86d/Config.in"
 source "package/wipe/Config.in"
 source "package/xfsprogs/Config.in"
 endmenu
diff --git a/package/v86d/Config.in b/package/v86d/Config.in
new file mode 100644
index 0000000..ba1baca
--- /dev/null
+++ b/package/v86d/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_V86D
+	bool "v86d"
+	depends on (BR2_i386 || BR2_x86_64)
+	help
+	  v86d is the userspace helper that runs x86 code in an emulated
+	  environment. uvesafb will not work without v86d. v86d currently
+	  supports the x86 and amd64 (x86-64) architectures.
+
+	  http://dev.gentoo.org/~spock/projects/uvesafb/
diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
new file mode 100644
index 0000000..643734a
--- /dev/null
+++ b/package/v86d/v86d.mk
@@ -0,0 +1,30 @@
+############################################
+#
+# v86d
+# 
+############################################
+
+V86D_VERSION = 0.1.10
+V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
+V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
+
+# This flag to configure should be per target architecture rather than
+# autodetected (or it will be per host architecture which may be 
+# not the same as target).
+
+X86EMU = $(if $(BR2_i386),n,y)
+
+# v86d's configure script is not autoconf-based.
+# GENTARGETS macro will be used rather than AUTOTARGETS.
+
+define V86D_CONFIGURE_CMDS
+	(cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(X86EMU))
+endef
+
+# It is necessary to define __i386__ explicitly in CFLAGS for successful compilation.
+
+define V86D_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
+endef
+
+$(eval $(call GENTARGETS))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-09  3:47   ` Dmitry Golubovsky
@ 2012-05-09  4:32     ` Baruch Siach
  0 siblings, 0 replies; 18+ messages in thread
From: Baruch Siach @ 2012-05-09  4:32 UTC (permalink / raw)
  To: buildroot

Hi Dmitry,

On Tue, May 08, 2012 at 11:47:57PM -0400, Dmitry Golubovsky wrote:
> Baruch,
> 
> On Tue, May 8, 2012 at 11:45 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> > Hi Dmitry,
> >
> > Two more comments.
> >> +
> >> +ifeq ($(BR2_i386),y)
> >> + ? ? x86emu = n
> >> +endif
> >> +
> >> +ifeq ($(BR2_x86_64),y)
> >> + ? ? x86emu = y
> >> +endif
> >
> > We generally use capitals for variable names. Also, this can be shortened to
> >
> > ? ?X86EMU = $(if $(BR2_i386),n,y)
> 
> This is a local variable - still uppercase?

Yes.

baruch

> > But you don't used the CFLAGS variable. Please correct the comment.
> 
> Right, I'll correct this.
> 
> Thanks.
> 
> -- 
> Dmitry Golubovsky

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-09  3:45 ` Baruch Siach
@ 2012-05-09  3:47   ` Dmitry Golubovsky
  2012-05-09  4:32     ` Baruch Siach
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Golubovsky @ 2012-05-09  3:47 UTC (permalink / raw)
  To: buildroot

Baruch,

On Tue, May 8, 2012 at 11:45 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> Hi Dmitry,
>
> Two more comments.
>> +
>> +ifeq ($(BR2_i386),y)
>> + ? ? x86emu = n
>> +endif
>> +
>> +ifeq ($(BR2_x86_64),y)
>> + ? ? x86emu = y
>> +endif
>
> We generally use capitals for variable names. Also, this can be shortened to
>
> ? ?X86EMU = $(if $(BR2_i386),n,y)

This is a local variable - still uppercase?

>
> But you don't used the CFLAGS variable. Please correct the comment.

Right, I'll correct this.

Thanks.

-- 
Dmitry Golubovsky

Anywhere on the Web

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
  2012-05-09  1:19 Dmitry
@ 2012-05-09  3:45 ` Baruch Siach
  2012-05-09  3:47   ` Dmitry Golubovsky
  0 siblings, 1 reply; 18+ messages in thread
From: Baruch Siach @ 2012-05-09  3:45 UTC (permalink / raw)
  To: buildroot

Hi Dmitry,

Two more comments.

On Tue, May 08, 2012 at 09:19:27PM -0400, Dmitry wrote:
> Signed-off-by: Dmitry <golubovsky@gmail.com>
> ---
>  package/Config.in      |    1 +
>  package/v86d/Config.in |    9 +++++++++
>  package/v86d/v86d.mk   |   36 ++++++++++++++++++++++++++++++++++++
>  3 files changed, 46 insertions(+), 0 deletions(-)
>  create mode 100644 package/v86d/Config.in
>  create mode 100644 package/v86d/v86d.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 34c0280..208e66f 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -230,6 +230,7 @@ source "package/unionfs/Config.in"
>  source "package/usb_modeswitch/Config.in"
>  source "package/usbmount/Config.in"
>  source "package/usbutils/Config.in"
> +source "package/v86d/Config.in"
>  source "package/wipe/Config.in"
>  source "package/xfsprogs/Config.in"
>  endmenu
> diff --git a/package/v86d/Config.in b/package/v86d/Config.in
> new file mode 100644
> index 0000000..ba1baca
> --- /dev/null
> +++ b/package/v86d/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_V86D
> +	bool "v86d"
> +	depends on (BR2_i386 || BR2_x86_64)
> +	help
> +	  v86d is the userspace helper that runs x86 code in an emulated
> +	  environment. uvesafb will not work without v86d. v86d currently
> +	  supports the x86 and amd64 (x86-64) architectures.
> +
> +	  http://dev.gentoo.org/~spock/projects/uvesafb/
> diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
> new file mode 100644
> index 0000000..a0d3ed2
> --- /dev/null
> +++ b/package/v86d/v86d.mk
> @@ -0,0 +1,36 @@
> +############################################
> +#
> +# v86d
> +# 
> +############################################
> +
> +V86D_VERSION = 0.1.10
> +V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
> +V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
> +
> +# This flag to configure should be per target architecture rather than
> +# autodetected (or it will be per host architecture which may be 
> +# not the same as target).
> +
> +ifeq ($(BR2_i386),y)
> +	x86emu = n
> +endif
> +
> +ifeq ($(BR2_x86_64),y)
> +	x86emu = y
> +endif

We generally use capitals for variable names. Also, this can be shortened to

    X86EMU = $(if $(BR2_i386),n,y)

> +
> +# v86d's configure script is not autoconf-based.
> +# GENTARGETS macro will be used rather than AUTOTARGETS.
> +
> +define V86D_CONFIGURE_CMDS
> +	(cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(x86emu))
> +endef
> +
> +# It is necessary to define __i386__ explicitly in CFLAGS for successful compilation.

But you don't used the CFLAGS variable. Please correct the comment.

Thanks for your persistence.

baruch

> +
> +define V86D_BUILD_CMDS
> +	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
> +endef
> +
> +$(eval $(call GENTARGETS))

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver.
@ 2012-05-09  1:19 Dmitry
  2012-05-09  3:45 ` Baruch Siach
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry @ 2012-05-09  1:19 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Dmitry <golubovsky@gmail.com>
---
 package/Config.in      |    1 +
 package/v86d/Config.in |    9 +++++++++
 package/v86d/v86d.mk   |   36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100644 package/v86d/Config.in
 create mode 100644 package/v86d/v86d.mk

diff --git a/package/Config.in b/package/Config.in
index 34c0280..208e66f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -230,6 +230,7 @@ source "package/unionfs/Config.in"
 source "package/usb_modeswitch/Config.in"
 source "package/usbmount/Config.in"
 source "package/usbutils/Config.in"
+source "package/v86d/Config.in"
 source "package/wipe/Config.in"
 source "package/xfsprogs/Config.in"
 endmenu
diff --git a/package/v86d/Config.in b/package/v86d/Config.in
new file mode 100644
index 0000000..ba1baca
--- /dev/null
+++ b/package/v86d/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_V86D
+	bool "v86d"
+	depends on (BR2_i386 || BR2_x86_64)
+	help
+	  v86d is the userspace helper that runs x86 code in an emulated
+	  environment. uvesafb will not work without v86d. v86d currently
+	  supports the x86 and amd64 (x86-64) architectures.
+
+	  http://dev.gentoo.org/~spock/projects/uvesafb/
diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
new file mode 100644
index 0000000..a0d3ed2
--- /dev/null
+++ b/package/v86d/v86d.mk
@@ -0,0 +1,36 @@
+############################################
+#
+# v86d
+# 
+############################################
+
+V86D_VERSION = 0.1.10
+V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
+V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
+
+# This flag to configure should be per target architecture rather than
+# autodetected (or it will be per host architecture which may be 
+# not the same as target).
+
+ifeq ($(BR2_i386),y)
+	x86emu = n
+endif
+
+ifeq ($(BR2_x86_64),y)
+	x86emu = y
+endif
+
+# v86d's configure script is not autoconf-based.
+# GENTARGETS macro will be used rather than AUTOTARGETS.
+
+define V86D_CONFIGURE_CMDS
+	(cd $(@D) ; ./configure --with-debug=n --with-klibc=n --with-x86emu=$(x86emu))
+endef
+
+# It is necessary to define __i386__ explicitly in CFLAGS for successful compilation.
+
+define V86D_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
+endef
+
+$(eval $(call GENTARGETS))
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-07-18 21:17 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07  3:29 [Buildroot] [PATCH] Added package v86d which provides a real-mode helper for uvesafb driver Dmitry
2012-05-07  3:58 ` Baruch Siach
2012-05-07 10:31   ` Dimitry Golubovsky
2012-05-09  1:19 Dmitry
2012-05-09  3:45 ` Baruch Siach
2012-05-09  3:47   ` Dmitry Golubovsky
2012-05-09  4:32     ` Baruch Siach
2012-05-09 10:32 Dmitry
2012-05-09 10:35 ` Baruch Siach
2012-05-09 10:41 Dmitry
2012-05-11 22:39 ` Arnout Vandecappelle
2012-05-12  5:01   ` Dmitry Golubovsky
2012-05-12 14:30     ` Arnout Vandecappelle
2012-05-14  3:50 Dmitry
2012-07-17  3:17 Dmitry
2012-07-17  8:01 ` Thomas Petazzoni
2012-07-17  9:38   ` Dmitry Golubovsky
2012-07-18 21:17 Dmitry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.