Skip to contentSkip to conversation

Added package v86d which provides a real-mode helper for uvesafb driver.

PATCH New Dmitry 2 participants 3 messages Jul 17, 2012

lore
Share & tools
lore

Dmitry

author
#0 lore raw

PATCH 1/1 Added package v86d which provides a real-mode helper for uvesafb driver.

---
 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
package/Config.in +1 -0
index 99257b4..23583d2 100644
@@ -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
package/v86d/Config.in new file +9 -0
new file mode 100644
index 0000000..ba1baca
@@ -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/
package/v86d/v86d.mk new file +36 -0
new file mode 100644
index 0000000..59187fc
@@ -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))
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/1 Added package v86d which provides a real-mode helper for uvesafb driver.

Le Mon, 16 Jul 2012 23:17:03 -0400,
Dmitry <[email protected]> a ?crit :

package/v86d/v86d.mk line 30

Quoted 3 lines
package/v86d/v86d.mk new file +3 -0
+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

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 Added package v86d which provides a real-mode helper for uvesafb driver.

Thomas,

Quoted 9 lines · Thomas Petazzoni

Le Mon, 16 Jul 2012 23:17:03 -0400,
Dmitry <[email protected]> a ?crit :

package/v86d/v86d.mk line 30

Quoted 3 lines
package/v86d/v86d.mk new file +3 -0
+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.

Quoted 7 lines

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.

Signature · 3 lines
Dmitry Golubovsky

Anywhere on the Web