--- v86d-0.1.10.orig/debian/README.Debian +++ v86d-0.1.10/debian/README.Debian @@ -0,0 +1,61 @@ +README for v86d in Debian +========================= + +1. Using v86d +2. v86d and Debian kernels +3. v86d and custom kernels +4. v86d and initrd/initramfs +5. supported modes/resolutions + + +1. Using v86d +------------- +v86d is not designed to be run by the user. The uvesafb kernel module +will start and use it as needed. +If you have an uvesafb enabled kernel (CONFIG_FB_UVESA is set), using +uvesafb is easy. + +First remove any "vga=X" options from your kernel. +Then, if you have uvesafb built as a module, modprobe it like this: +modprobe uvesafb mode_option=YOURMODE +where YOURMODE is something like 1400x1050 or 1400x1050-16 (or any mode +you want to use). +If you have found the perfect mode for you, add the following line to +your /etc/modules: +uvesafb mode_option=YOURMODE + +But when you have uvesafb statically compiled into your kernel (please +read 3.), you'll need to add the following to your kernel parameters: +video=uvesafb:mode_option=YOURMODE + +2. v86d and Debian kernels +-------------------------- +Debian kernels have support for modular uvesafb since 2.6.26. + +3. v86d and custom kernels +-------------------------- +I would suggest not to build uvesafb into the kernel, but as a module. +If you build it into the kernel, it will be initialized to early +(when / is not mounted yet) and won't be able to start v86d. +This can be workarounded by using a initrd, see 4. + +4. v86d and initrd/initramfs +---------------------------- +v86d is automatically integrated into your initrd. +The only thing you'll need is to load uvesafb by adding +video=uvesafb:mode_option=YOURMODE +to your boot parameters. + +5. supported modes/resolutions +------------------------------ +uvesafb and v86d support all modes your video BIOS announces. However, +it often does not announce every possible mode. For example the BIOS of +my ATI Mobility Radeon X1400 announces modes only up to 1400x1050, but +will run at 1680x1050 as soon Xorg is up. +You can check the possible modes of your card by looking at the file +/sys/class/graphics/fb0/modes +after you have loaded uvesafb. +If a mode is not listed in that file, it cannot be used with uvesafb and +v86d. + + -- Evgeni Golov Thu, 23 Apr 2009 21:57:44 +0200 --- v86d-0.1.10.orig/debian/README.source +++ v86d-0.1.10/debian/README.source @@ -0,0 +1,8 @@ +Upstream distributes v86d source as a bzipped tarball. +Such tarballs are not (yet) accepted by the Debian archive. +Thus one needs to repack the tarball with the following command +bzip2 -dc v86d-0.1.5.tar.bz2 |gzip -9 > v86d_0.1.5.orig.tar.gz +(the 0.1.5 needs to be replaced by the real version of course). + +This package uses quilt for patch management, for more information see +the file /usr/share/doc/quilt/README.source in the quilt package. --- v86d-0.1.10.orig/debian/changelog +++ v86d-0.1.10/debian/changelog @@ -0,0 +1,70 @@ +v86d (0.1.10-1build1) bionic; urgency=high + + * No change rebuild to pick up -fPIE compiler default + + -- Balint Reczey Tue, 03 Apr 2018 12:49:15 +0000 + +v86d (0.1.10-1) unstable; urgency=low + + * New upstream release + + Fixes CVE-2011-1070: failure to validate netlink message sender + + Closes: #619404 + * Droping patches imported from upstream: + + 02_fix-parsing-of-OEM-descriptions.patch + + 03_map-BIOS-with-PROT_WRITE.patch + * Standards-Version: 3.9.2 + * Source Format 1.0. + * Do not include random kernel headers in CFLAGS. + + Adding 02_dont-include-kernel.patch. + + Closes: #525415 + * Add manual_add_modules uvesafb to the initramfs-hook (thanks Ubuntu!) + + -- Evgeni Golov Tue, 26 Apr 2011 10:00:06 +0200 + +v86d (0.1.9-1) unstable; urgency=low + + * New upstream release. (Closes: #507325) + * debian/rules: + + Install misc/initramfs to /u/s/v86d (as requested by Dave Witbrodt). + + Use dh_clean instead of rm -f in the clean target. + + Use $(QUILT_STAMPFN) instead of patch, so configure isn't run twice. + + Add $(CURDIR) to the direct install calls. + * debian/patches: + + Refresh 01_use-external-libx86.patch as upstream has changed the + Makefile a bit. + + Add 02_fix-parsing-of-OEM-descriptions.patch and + 03_map-BIOS-with-PROT_WRITE.patch from upstream git. + * debian/README.Debian: + + Note that uvesafb is in Debian's default kernels now. + + Correctly document initrd usage. + + uvesafb from recent kernels wants mode_option instead of mode. + * debian/control: + + Update my e-mail address. + + Bump Standards-Version to 3.8.1. + + -- Evgeni Golov Thu, 23 Apr 2009 21:58:45 +0200 + +v86d (0.1.5.2-1) unstable; urgency=low + + * New upstream release. + * debian/control, debian/rules, debian/README.source: + + Added quilt for patch managing. + * debian/patches/01_use-external-libx86.patch, debian/patches/series: + Added a patch for linking against libx86 (Closes: #489415). + Patch by Guillem Jover , thanks! + * debian/lintian-overrides, debian/rules: + + Remove lintian override, it was never used and will never be. + * debian/control, debian/initramfs-hook, debian/postinst, debian/postrm, + debian/rules: + + Added initramfs hook, inspired by the Ubuntu patch, thanks! + * debian/control: + + Removed reference to glibc, it's okay to build v86d against it. + + -- Evgeni Golov Wed, 23 Jul 2008 20:50:55 +0200 + +v86d (0.1.5-1) unstable; urgency=low + + * Initial release (Closes: #473176) + + -- Evgeni Golov Thu, 26 Jun 2008 00:32:00 +0200 + --- v86d-0.1.10.orig/debian/compat +++ v86d-0.1.10/debian/compat @@ -0,0 +1 @@ +5 --- v86d-0.1.10.orig/debian/control +++ v86d-0.1.10/debian/control @@ -0,0 +1,20 @@ +Source: v86d +Section: utils +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Evgeni Golov +Build-Depends: debhelper (>= 5), quilt (>= 0.40), libx86-dev +Standards-Version: 3.9.2 +Homepage: http://dev.gentoo.org/~spock/projects/uvesafb/ + +Package: v86d +Architecture: i386 amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: initramfs-tools +Description: daemon to run x86 code in an emulated environment + v86d provides a backend for kernel drivers that need to execute + x86 BIOS code. The code is executed in a controlled environment + and the results are passed back to the kernel via the netlink + interface. + . + v86d is needed by the uvesafb kernel module. --- v86d-0.1.10.orig/debian/copyright +++ v86d-0.1.10/debian/copyright @@ -0,0 +1,60 @@ +This package was downloaded from http://dev.gentoo.org/~spock/projects/uvesafb/ + +Files: * +Copyright: © 2007-2008 Michal Januszewski +License: GPL-2 + +Files: debian/* +Copyright: © 2008 Evgeni Golov +License: GPL-any + +Files: libs/lrmi-0.10/* +Copyright: © 1998 by Josh Vanderhoof +License: MIT + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: +. + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. +. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL JOSH VANDERHOOF BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + +Files: libs/lrmi-0.10/{vbe.h,vbetest.c} +Copyright: none +License: PD + +Files: libs/x86emu/* +Copyright: © 1996-1999 SciTech Software, Inc, © David Mosberger-Tang, + © 1999 Egbert Eich +License: other + Permission to use, copy, modify, distribute, and sell this software and + its documentation for any purpose is hereby granted without fee, + provided that the above copyright notice appear in all copies and that + both that copyright notice and this permission notice appear in + supporting documentation, and that the name of the authors not be used + in advertising or publicity pertaining to distribution of the software + without specific, written prior permission. The authors makes no + representations about the suitability of this software for any purpose. + It is provided "as is" without express or implied warranty. +. + THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF + USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + +On Debian systems, the complete text of the GNU General +Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. --- v86d-0.1.10.orig/debian/initramfs-hook +++ v86d-0.1.10/debian/initramfs-hook @@ -0,0 +1,23 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +[ -x /sbin/v86d ] || exit 0 + +. /usr/share/initramfs-tools/hook-functions + +manual_add_modules uvesafb + +copy_exec /sbin/v86d --- v86d-0.1.10.orig/debian/patches/01_use-external-libx86.patch +++ v86d-0.1.10/debian/patches/01_use-external-libx86.patch @@ -0,0 +1,115 @@ +From: Guillem Jover +Date: Sat, 5 Jul 2008 17:50:58 +0300 +Subject: [PATCH] Use external libx86 instead of embedded lrmi and x86emu + +--- a/Makefile 2008-10-04 02:08:30.000000000 +0200 ++++ b/Makefile 2009-01-06 14:12:26.000000000 +0100 +@@ -1,6 +1,6 @@ + config_opt = $(shell if [ -e config.h -a -n "`egrep '^\#define[[:space:]]+$(1)([[:space:]]+|$$)' config.h 2>/dev/null`" ]; then echo true ; fi) + +-.PHONY: clean install install_testvbe x86emu lrmi ++.PHONY: clean install install_testvbe + + INSTALL = install + KDIR ?= /lib/modules/$(shell uname -r)/source +@@ -12,19 +12,8 @@ + CFLAGS ?= -Wall -g -O2 + CFLAGS += -I$(KDIR)/include + +-ifeq ($(call config_opt,CONFIG_X86EMU),true) +- CFLAGS += -Ilibs/x86emu +- LDFLAGS += -Llibs/x86emu +- LDLIBS += -lx86emu +- V86OBJS = v86_x86emu.o v86_mem.o v86_common.o +- V86LIB = x86emu +-else +- CFLAGS += -Ilibs/lrmi-0.10 +- LDFLAGS += -Llibs/lrmi-0.10 -static -Wl,--section-start,vm86_ret=0x9000 +- LDLIBS += -llrmi +- V86OBJS = v86_lrmi.o v86_common.o +- V86LIB = lrmi +-endif ++LDLIBS += -lx86 ++V86OBJS = v86_lrmi.o v86_common.o + + DEBUG_BUILD = + DEBUG_INSTALL = +@@ -34,7 +23,7 @@ + DEBUG_INSTALL += install_testvbe + endif + +-all: $(V86LIB) v86d $(DEBUG_BUILD) ++all: v86d $(DEBUG_BUILD) + + %.o: %.c v86.h + $(CC) $(CFLAGS) -c -o $@ $< +@@ -45,16 +34,8 @@ + testvbe: $(V86OBJS) $(V86LIB) testvbe.o + $(CC) $(LDFLAGS) $(V86OBJS) testvbe.o $(LDLIBS) -o $@ + +-x86emu: +- $(MAKE) -w -C libs/x86emu +- +-lrmi: +- $(MAKE) -e -w -C libs/lrmi-0.10 liblrmi.a +- + clean: + rm -rf *.o v86d testvbe +- $(MAKE) -w -C libs/lrmi-0.10 clean +- $(MAKE) -w -C libs/x86emu clean + + distclean: clean + rm -rf config.h +diff --git a/README b/README +index 178c004..c1b02f8 100644 +--- a/README ++++ b/README +@@ -38,9 +38,6 @@ software-emulated environment (x86emu) or a virtualized + environment (vm86) supported by the CPU. On other arches + or 64-bit systems, the code is always run by x86emu. + +-To choose the x86emu backend on a x86 system, run ./configure +---with-x86emu. +- + 4. Installation & Usage + ----------------------- + To configure, build and install v86d with the default settings, +diff --git a/configure b/configure +index cbbd6b3..3a6b926 100755 +--- a/configure ++++ b/configure +@@ -17,23 +17,6 @@ copt_debug_desc="Use additional debugging features" + copt_debug_type="bool" + copt_debug_def=n + +-copt_x86emu=CONFIG_X86EMU +-copt_x86emu_desc="Use x86emu for BIOS calls" +-copt_x86emu_type="bool" +-copt_x86emu_def=auto +-copt_x86emu_test() +-{ +- local m=`uname -m` +- if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then +- echo "n"; +- elif [ "$m" = "x86_64" ]; then +- echo "y"; +- else +- echo "It looks like your architecture '$m' isn't supported by this version of v86d." >&2 +- exit 1 +- fi +-} +- + options=`set | grep '^copt_' | sed -re 's/copt_([^_=]+)[_=].*/\1/' | uniq` + + write_conf() +diff --git a/v86_lrmi.c b/v86_lrmi.c +index 61f6bf5..ea5fafe 100644 +--- a/v86_lrmi.c ++++ b/v86_lrmi.c +@@ -1,5 +1,5 @@ + #include +-#include ++#include + #include "v86.h" + + /* Memory access functions */ --- v86d-0.1.10.orig/debian/patches/02_dont-include-kernel.patch +++ v86d-0.1.10/debian/patches/02_dont-include-kernel.patch @@ -0,0 +1,25 @@ +From: Evgeni Golov +Date: 2011-04-26 +Bug-Debian: http://bugs.debian.org/525415 +Subject: Don't include random kernel headers in CFLAGS + These are not needed for building and may have random results + +Index: v86d-0.1.10/Makefile +=================================================================== +--- v86d-0.1.10.orig/Makefile 2011-04-26 09:35:16.724564809 +0200 ++++ v86d-0.1.10/Makefile 2011-04-26 09:35:46.804572140 +0200 +@@ -3,14 +3,12 @@ + .PHONY: clean install install_testvbe + + INSTALL = install +-KDIR ?= /lib/modules/$(shell uname -r)/source + + ifeq ($(call config_opt,CONFIG_KLIBC),true) + export CC = klcc + endif + + CFLAGS ?= -Wall -g -O2 +-CFLAGS += -I$(KDIR)/include + + LDLIBS += -lx86 + V86OBJS = v86_lrmi.o v86_common.o --- v86d-0.1.10.orig/debian/patches/series +++ v86d-0.1.10/debian/patches/series @@ -0,0 +1,2 @@ +01_use-external-libx86.patch +02_dont-include-kernel.patch --- v86d-0.1.10.orig/debian/postinst +++ v86d-0.1.10/debian/postinst @@ -0,0 +1,12 @@ +#!/bin/sh -e + +#DEBHELPER# + +case "$1" in + configure) + if [ -x /usr/sbin/update-initramfs \ + -a -e /etc/initramfs-tools/initramfs.conf ]; then + update-initramfs -u + fi + ;; +esac --- v86d-0.1.10.orig/debian/postrm +++ v86d-0.1.10/debian/postrm @@ -0,0 +1,12 @@ +#!/bin/sh -e + +#DEBHELPER# + +case "$1" in + remove) + if [ -x /usr/sbin/update-initramfs \ + -a -e /etc/initramfs-tools/initramfs.conf ]; then + update-initramfs -u + fi + ;; +esac --- v86d-0.1.10.orig/debian/rules +++ v86d-0.1.10/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +config: config-stamp +config-stamp: $(QUILT_STAMPFN) configure + dh_testdir + ./configure --default + touch $@ + +build: build-stamp +build-stamp: config + dh_testdir + + CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) + + touch $@ + +clean: clean-patched unpatch +clean-patched: + dh_testdir + dh_testroot + + $(MAKE) distclean + + dh_clean build-stamp config-stamp + +install: build + dh_testdir + dh_testroot + dh_clean -k + + $(MAKE) DESTDIR=$(CURDIR)/debian/v86d install + + install -D -m755 debian/initramfs-hook \ + $(CURDIR)/debian/v86d/usr/share/initramfs-tools/hooks/v86d + install -D -m644 misc/initramfs \ + $(CURDIR)/debian/v86d/usr/share/v86d/initramfs + + +# Build architecture-independent files here. +binary-indep: build install + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs README + dh_installman debian/v86d.8 + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean clean-patched binary-indep binary-arch binary install --- v86d-0.1.10.orig/debian/source/format +++ v86d-0.1.10/debian/source/format @@ -0,0 +1 @@ +1.0 --- v86d-0.1.10.orig/debian/v86d.8 +++ v86d-0.1.10/debian/v86d.8 @@ -0,0 +1,17 @@ +.TH V86D 8 "June 2008" "v86d" "Manual" +.SH NAME +v86d \- daemon to run x86 code in an emulated environment +.SH SYNOPSIS +.B v86d +.SH DESCRIPTION +v86d provides a backend for kernel drivers that need to execute +x86 BIOS code. The code is executed in a controlled environment +and the results are passed back to the kernel via the netlink +interface. +.PP +v86d should \fBNOT\fR be run by the user, the kernel will call it, when it is needed. +.SH AUTHOR +v86d is written by Michal Januszewski. +.PP +This manual page was written by Evgeni Golov , +for the Debian project (but may be used by others). --- v86d-0.1.10.orig/debian/watch +++ v86d-0.1.10/debian/watch @@ -0,0 +1,3 @@ +version=3 +http://dev.gentoo.org/~spock/projects/uvesafb/archive/ v86d-(.*)\.tar\.bz2 +