All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] Added package v86d which provides a real-mode helper for uvesafb driver.
@ 2012-05-07 10:28 Dmitry
  2012-05-07 10:28 ` [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method Dmitry
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry @ 2012-05-07 10:28 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] 11+ messages in thread

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 10:28 [Buildroot] [PATCH 1/2] Added package v86d which provides a real-mode helper for uvesafb driver Dmitry
@ 2012-05-07 10:28 ` Dmitry
  2012-05-07 11:00   ` Baruch Siach
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry @ 2012-05-07 10:28 UTC (permalink / raw)
  To: buildroot

 * git source URL -> http source URL
 * AUTOTARGETS -> GENTARGETS

Signed-off-by: Dmitry <golubovsky@gmail.com>
---
 package/v86d/v86d.mk |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
index 035797e..5147a2d 100644
--- a/package/v86d/v86d.mk
+++ b/package/v86d/v86d.mk
@@ -4,23 +4,22 @@
 # 
 ############################################
 
-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_VERSION = 0.1.10
+V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
+V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
 
 # 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
+define V86D_CONFIGURE_CMDS
 	(cd $(@D) ; ./configure --default)
 endef
 
-$(eval $(call AUTOTARGETS))
+# 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] 11+ messages in thread

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 10:28 ` [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method Dmitry
@ 2012-05-07 11:00   ` Baruch Siach
  2012-05-07 12:47     ` Dimitry Golubovsky
  0 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2012-05-07 11:00 UTC (permalink / raw)
  To: buildroot

Hi Dmitry,

Please squash this patch into the previous one, and send a single fixed patch.

A couple more comments below.

On Mon, May 07, 2012 at 06:28:58AM -0400, Dmitry wrote:
>  * git source URL -> http source URL
>  * AUTOTARGETS -> GENTARGETS
> 
> Signed-off-by: Dmitry <golubovsky@gmail.com>
> ---
>  package/v86d/v86d.mk |   23 +++++++++++------------
>  1 files changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/package/v86d/v86d.mk b/package/v86d/v86d.mk
> index 035797e..5147a2d 100644
> --- a/package/v86d/v86d.mk
> +++ b/package/v86d/v86d.mk
> @@ -4,23 +4,22 @@
>  # 
>  ############################################
>  
> -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_VERSION = 0.1.10
> +V86D_SOURCE = v86d-$(V86D_VERSION).tar.bz2
> +V86D_SITE = http://dev.gentoo.org/~spock/projects/uvesafb/archive
>  
>  # v86d's configure script is not autoconf-based: parameters
>  # supplied by Buildroot cause it to produce no result; explicit
>  # invocation is needed.

Since you don't use Buildroot's autoconf support, this comment is no longer 
relevant.

>  
> -define V86D_REALLY_RUN_CONFIGURE
> +define V86D_CONFIGURE_CMDS
>  	(cd $(@D) ; ./configure --default)
>  endef
>  
> -$(eval $(call AUTOTARGETS))
> +# 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

You can used $(TARGET_CONFIGURE_OPTS) here as well.

baruch

> +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] 11+ messages in thread

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 11:00   ` Baruch Siach
@ 2012-05-07 12:47     ` Dimitry Golubovsky
  2012-05-07 12:59       ` Baruch Siach
  2012-05-07 13:45       ` Thomas Petazzoni
  0 siblings, 2 replies; 11+ messages in thread
From: Dimitry Golubovsky @ 2012-05-07 12:47 UTC (permalink / raw)
  To: buildroot

Baruch,

On Mon, May 7, 2012 at 7:00 AM, Baruch Siach <baruch@tkos.co.il> wrote:

>> ?# v86d's configure script is not autoconf-based: parameters
>> ?# supplied by Buildroot cause it to produce no result; explicit
>> ?# invocation is needed.
>
> Since you don't use Buildroot's autoconf support, this comment is no longer
> relevant.

Well, I thought this would be the explanation why there is a configure
script, yet it is a GENTARGET.

>> +
>> +define V86D_BUILD_CMDS
>> + ? ? $(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
>
> You can used $(TARGET_CONFIGURE_OPTS) here as well.

I tried that, and it did not compile. -D__i386__ should be given
explicitly to cc.

Thanks.

-- 
Dimitry Golubovsky

Anywhere on the Web

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

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 12:47     ` Dimitry Golubovsky
@ 2012-05-07 12:59       ` Baruch Siach
  2012-05-07 13:45       ` Thomas Petazzoni
  1 sibling, 0 replies; 11+ messages in thread
From: Baruch Siach @ 2012-05-07 12:59 UTC (permalink / raw)
  To: buildroot

Hi Dimitry,

On Mon, May 07, 2012 at 08:47:10AM -0400, Dimitry Golubovsky wrote:
> On Mon, May 7, 2012 at 7:00 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> 
> >> ?# v86d's configure script is not autoconf-based: parameters
> >> ?# supplied by Buildroot cause it to produce no result; explicit
> >> ?# invocation is needed.
> >
> > Since you don't use Buildroot's autoconf support, this comment is no longer
> > relevant.
> 
> Well, I thought this would be the explanation why there is a configure
> script, yet it is a GENTARGET.

The comment needs to be reworded, then. Something like: "v86d's configure 
script is not autoconf-based, so we use GENTARGET".

> >> +
> >> +define V86D_BUILD_CMDS
> >> + ? ? $(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C $(@D) all
> >
> > You can used $(TARGET_CONFIGURE_OPTS) here as well.
> 
> I tried that, and it did not compile. -D__i386__ should be given
> explicitly to cc.

Ah, you're right. I haven't noticed the quotes delimiting the CC variable.

baruch

-- 
     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] 11+ messages in thread

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 12:47     ` Dimitry Golubovsky
  2012-05-07 12:59       ` Baruch Siach
@ 2012-05-07 13:45       ` Thomas Petazzoni
  2012-05-07 13:47         ` Dimitry Golubovsky
                           ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2012-05-07 13:45 UTC (permalink / raw)
  To: buildroot

Le Mon, 7 May 2012 08:47:10 -0400,
Dimitry Golubovsky <golubovsky@gmail.com> a ?crit :

> >> +define V86D_BUILD_CMDS
> >> + ? ? $(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C
> >> $(@D) all
> >
> > You can used $(TARGET_CONFIGURE_OPTS) here as well.
> 
> I tried that, and it did not compile. -D__i386__ should be given
> explicitly to cc.

This -D is rather a CFLAGS, so:

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

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] 11+ messages in thread

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 13:45       ` Thomas Petazzoni
@ 2012-05-07 13:47         ` Dimitry Golubovsky
  2012-05-07 13:55         ` Baruch Siach
  2012-05-08  3:39         ` Dmitry Golubovsky
  2 siblings, 0 replies; 11+ messages in thread
From: Dimitry Golubovsky @ 2012-05-07 13:47 UTC (permalink / raw)
  To: buildroot

OK Thanks, I'll try this way.

On Mon, May 7, 2012 at 9:45 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:

>> I tried that, and it did not compile. -D__i386__ should be given
>> explicitly to cc.
>
> This -D is rather a CFLAGS, so:
>
> ? ? ? ?$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D__i386__" -C $(@D) all


-- 
Dimitry Golubovsky

Anywhere on the Web

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

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 13:45       ` Thomas Petazzoni
  2012-05-07 13:47         ` Dimitry Golubovsky
@ 2012-05-07 13:55         ` Baruch Siach
  2012-05-07 14:04           ` Thomas Petazzoni
  2012-05-08  3:39         ` Dmitry Golubovsky
  2 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2012-05-07 13:55 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, May 07, 2012 at 03:45:41PM +0200, Thomas Petazzoni wrote:
> Le Mon, 7 May 2012 08:47:10 -0400,
> Dimitry Golubovsky <golubovsky@gmail.com> a ?crit :
> 
> > >> +define V86D_BUILD_CMDS
> > >> + ? ? $(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C
> > >> $(@D) all
> > >
> > > You can used $(TARGET_CONFIGURE_OPTS) here as well.
> > 
> > I tried that, and it did not compile. -D__i386__ should be given
> > explicitly to cc.
> 
> This -D is rather a CFLAGS, so:
> 
> 	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D__i386__" -C $(@D) all

But then you'll have CFLAGS defined twice. Is this OK?

baruch

-- 
     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] 11+ messages in thread

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 13:55         ` Baruch Siach
@ 2012-05-07 14:04           ` Thomas Petazzoni
  2012-05-08  5:15             ` Baruch Siach
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2012-05-07 14:04 UTC (permalink / raw)
  To: buildroot

Le Mon, 7 May 2012 16:55:19 +0300,
Baruch Siach <baruch@tkos.co.il> a ?crit :

> > 	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)
> > -D__i386__" -C $(@D) all
> 
> But then you'll have CFLAGS defined twice. Is this OK?

You'll have a first definition of CFLAGS in TARGET_CONFIGURE_OPTS,
overriden by the local redefinition. We do this in numerous places in
Buildroot already.

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] 11+ messages in thread

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 13:45       ` Thomas Petazzoni
  2012-05-07 13:47         ` Dimitry Golubovsky
  2012-05-07 13:55         ` Baruch Siach
@ 2012-05-08  3:39         ` Dmitry Golubovsky
  2 siblings, 0 replies; 11+ messages in thread
From: Dmitry Golubovsky @ 2012-05-08  3:39 UTC (permalink / raw)
  To: buildroot

Hi,

On Mon, May 7, 2012 at 9:45 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Le Mon, 7 May 2012 08:47:10 -0400,
> Dimitry Golubovsky <golubovsky@gmail.com> a ?crit :
>
>> >> +define V86D_BUILD_CMDS
>> >> + ? ? $(MAKE) CC="$(TARGET_CC) -D__i386__" LD="$(TARGET_LD)" -C
>> >> $(@D) all
>> >
>> > You can used $(TARGET_CONFIGURE_OPTS) here as well.
>>
>> I tried that, and it did not compile. -D__i386__ should be given
>> explicitly to cc.
>
> This -D is rather a CFLAGS, so:
>
> ? ? ? ?$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D__i386__" -C $(@D) all
>

No, it does not work this way. Value of $(CC) with -D__i386__ should
be passed deeper down to the lowest level Makefile in order for v86d
to compile.

/40G2/golubovsky/src/buildroot-patching/buildroot/output/host/usr/bin/i586-unknown-linux-uclibc-gcc
-D__i386__ -c -pipe -Os  -o fpu.o fpu.c
In file included from decode.c:41:0:
x86emu/x86emui.h:64:20: fatal error: x86emu.h: No such file or directory

(the way you proposed) does not work as local flags are lost.

But:

/40G2/golubovsky/src/buildroot-patching/buildroot/output/host/usr/bin/i586-unknown-linux-uclibc-gcc
-D__i386__ -c -I. -I../../include -I../../include/x86emu -o decode.o
decode.c
v86_x86emu.c: In function 'v86_init':
v86_x86emu.c:50:3: warning: initialization from incompatible pointer type
v86_x86emu.c:53:3: warning: initialization from incompatible pointer type
v86_x86emu.c:57:3: warning: initialization from incompatible pointer type
v86_x86emu.c:58:3: warning: initialization from incompatible pointer type
v86_x86emu.c:59:3: warning: initialization from incompatible pointer type
v86_x86emu.c:60:3: warning: initialization from incompatible pointer type
v86_x86emu.c:61:3: warning: initialization from incompatible pointer type
v86_x86emu.c:62:3: warning: initialization from incompatible pointer type

(my way) works as it is only $CC that is needed by the lower level Makefile.

I'll make other changes as recommended.

Thanks.
-- 
Dmitry Golubovsky

Anywhere on the Web

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

* [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method.
  2012-05-07 14:04           ` Thomas Petazzoni
@ 2012-05-08  5:15             ` Baruch Siach
  0 siblings, 0 replies; 11+ messages in thread
From: Baruch Siach @ 2012-05-08  5:15 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, May 07, 2012 at 04:04:06PM +0200, Thomas Petazzoni wrote:
> Le Mon, 7 May 2012 16:55:19 +0300,
> Baruch Siach <baruch@tkos.co.il> a ?crit :
> 
> > > 	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)
> > > -D__i386__" -C $(@D) all
> > 
> > But then you'll have CFLAGS defined twice. Is this OK?
> 
> You'll have a first definition of CFLAGS in TARGET_CONFIGURE_OPTS,
> overriden by the local redefinition. We do this in numerous places in
> Buildroot already.

Is this make behaviour documented? I couldn't find any mention of this in the 
manual.

baruch

-- 
     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] 11+ messages in thread

end of thread, other threads:[~2012-05-08  5:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 10:28 [Buildroot] [PATCH 1/2] Added package v86d which provides a real-mode helper for uvesafb driver Dmitry
2012-05-07 10:28 ` [Buildroot] [PATCH 2/2] Adjust v86d.mk per better source URL and build method Dmitry
2012-05-07 11:00   ` Baruch Siach
2012-05-07 12:47     ` Dimitry Golubovsky
2012-05-07 12:59       ` Baruch Siach
2012-05-07 13:45       ` Thomas Petazzoni
2012-05-07 13:47         ` Dimitry Golubovsky
2012-05-07 13:55         ` Baruch Siach
2012-05-07 14:04           ` Thomas Petazzoni
2012-05-08  5:15             ` Baruch Siach
2012-05-08  3:39         ` Dmitry Golubovsky

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.