Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253554 - sys-boot/grub:2 - 915resolution patch (eeepc-701's framebuffer and others)
Summary: sys-boot/grub:2 - 915resolution patch (eeepc-701's framebuffer and others)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal with 2 votes (vote)
Assignee: Mike Gilbert
URL: http://bzr.savannah.gnu.org/lh/grub-e...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-03 14:16 UTC by niogic
Modified: 2017-09-01 18:47 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Includes 915resolution support directly into grub2-alpha (grub-1.96-915resolution-0.5.2-3.patch,25.19 KB, patch)
2009-01-03 14:20 UTC, niogic
Details | Diff
diff against current ebuild to apply i915resolution patch (grub-1.96.ebuild.diff,255 bytes, patch)
2009-04-17 17:04 UTC, Luca Lesinigo
Details | Diff
915resolution patch with updated conf/common.mk (grub-1.96-915resolution-0.5.2-3.patch,28.47 KB, patch)
2009-04-17 19:18 UTC, Luca Lesinigo
Details | Diff
base 915resolution patch (includes common.mk generated by piping the .rmk through genmk.rb) (grub_1.98_915resolution_010.patch,32.39 KB, patch)
2010-04-13 01:50 UTC, Zac Medico
Details | Diff
fix to compile with >=grub-1.97 (grub_1.98_915resolution_020_cmd.patch,560 bytes, patch)
2010-04-13 01:52 UTC, Zac Medico
Details | Diff
add support for GMA 500 chipset (tested with Dell Inspiron Mini 10) (grub_1.98_915resolution_030_gma500.patch,1.37 KB, patch)
2010-04-13 01:55 UTC, Zac Medico
Details | Diff
915resolution patch from grub-extras (grub-1.9.9-915resolution.patch,62.77 KB, patch)
2011-10-06 19:18 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description niogic 2009-01-03 14:16:28 UTC
"The eeepc's bios have its resolutions listed incorrectly. This prevents us from using the console with a framebuffer at the resolution of 800×480. That is unless we use the 915resolution tool. Now I've seen guides that say to use 915resolution + klibc and, v86d using the userspace, kernelspace linker. However I found this buggy, though lucky for there is an alternative. Nathan Coulson wrote a patch for Grub2 that lets us use 915resolution before we load our kernel. This eliminates the need for klibc ,v86d, and the kernel linker. It also appears to a lot more stable." (from: http://wiki.eeeuser.com/howto:installgentoo )

Sorry if I copied-paste the website (it's creative common) but I'd like to suggest you to introduce that patch in grub-1.96.ebuild
Comment 1 niogic 2009-01-03 14:20:05 UTC
Created attachment 177222 [details, diff]
Includes 915resolution support directly into grub2-alpha

This solution is more straight forward than kernel patches supported by userspace drivers.
Comment 2 Luca Lesinigo 2009-04-17 17:04:04 UTC
Created attachment 188697 [details, diff]
diff against current ebuild to apply i915resolution patch

Here is a modified ebuild that successfully applies the patch to the source, as suggested on eeeuser.com. I used an 'i915' USE flag to conditionally apply the patch.

It still needs some work since there isn't any 915resolution.mod file after the build.
Comment 3 Luca Lesinigo 2009-04-17 19:18:19 UTC
Created attachment 188712 [details, diff]
915resolution patch with updated conf/common.mk

Nathan Coulson's patch modified conf/common.rmk, so conf/common.mk needs to be re-generated. This requires ruby and is not done during a normal compile/make.

This patch includes an updated conf/common.mk and will result in correctly emerging grub with 915resolution.mod included.
Comment 4 Xake 2010-02-02 11:49:57 UTC
Is this still needed with 1.97.x?
Comment 5 Zac Medico gentoo-dev 2010-04-13 01:50:30 UTC
Created attachment 227545 [details, diff]
base 915resolution patch (includes common.mk generated by piping the .rmk through genmk.rb)

I'm currently using this to get native resolution framebuffer (and X with fbdev) on my Dell Inspiron Mini 10, without using proprietary drivers. I'll post the patches here in case anyone is interested. If anyone wants more info about the Mini 10 then see here: http://en.gentoo-wiki.com/wiki/Dell_Inspiron_Mini_10_(1010)
Comment 6 Zac Medico gentoo-dev 2010-04-13 01:52:10 UTC
Created attachment 227547 [details, diff]
fix to compile with >=grub-1.97
Comment 7 Zac Medico gentoo-dev 2010-04-13 01:55:00 UTC
Created attachment 227551 [details, diff]
add support for GMA 500 chipset (tested with Dell Inspiron Mini 10)

This is a rebased version of the patch from here:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543917
Comment 8 SpanKY gentoo-dev 2011-10-06 19:00:00 UTC
not sure how Tomas feels about this ...
Comment 9 Zac Medico gentoo-dev 2011-10-06 19:18:20 UTC
Created attachment 289019 [details, diff]
915resolution patch from grub-extras

I patch it src_prepare like this:

	epatch "$FILESDIR"/grub-1.9.9-915resolution.patch
	# Include grub-extras/915resolution in the build:
	# GRUB_CONTRIB must be the name of single directory for autogen.sh
	# to include $GRUB_CONTRIB/* subdirectories (exactly 1 level deep).
	export GRUB_CONTRIB=grub-extras
	sed -i -e '/^autoreconf/s:^:e:' autogen.sh || die
	( . ./autogen.sh )
Comment 10 Tomáš Chvátal (RETIRED) gentoo-dev 2011-11-11 13:34:31 UTC
I would recommend going ahead with this patch as upstream is not exactly responsive so we should keep this working.
Comment 11 Martijn Schmidt 2012-03-24 16:30:05 UTC
(In reply to comment #9)
> Created attachment 289019 [details, diff] [details, diff]
> 915resolution patch from grub-extras
> 
> I patch it src_prepare like this:
> 
> 	epatch "$FILESDIR"/grub-1.9.9-915resolution.patch
> 	# Include grub-extras/915resolution in the build:
> 	# GRUB_CONTRIB must be the name of single directory for autogen.sh
> 	# to include $GRUB_CONTRIB/* subdirectories (exactly 1 level deep).
> 	export GRUB_CONTRIB=grub-extras
> 	sed -i -e '/^autoreconf/s:^:e:' autogen.sh || die
> 	( . ./autogen.sh )

Since the GRUB ebuild contains epatch_user you should simply place the patch in:

/etc/portage/patches/sys-boot/grub/yourpatchgoeshere.patch

Which means you won't have to edit the ebuild every time a new grub comes out. :)
Comment 12 Martijn Schmidt 2012-03-24 17:10:29 UTC
(In reply to comment #9)
> 	epatch "$FILESDIR"/grub-1.9.9-915resolution.patch
> 	# Include grub-extras/915resolution in the build:
> 	# GRUB_CONTRIB must be the name of single directory for autogen.sh
> 	# to include $GRUB_CONTRIB/* subdirectories (exactly 1 level deep).
> 	export GRUB_CONTRIB=grub-extras
> 	sed -i -e '/^autoreconf/s:^:e:' autogen.sh || die
> 	( . ./autogen.sh )

Also too bad the ebuild edit doesn't work anymore:

./autogen.sh: line 9: autogen: command not found

Where would I get the autogen.sh script from, is it included with grub-extras or just taken out of grub-2.00-beta2-r1?
Comment 13 Martijn Schmidt 2012-03-24 18:07:35 UTC
(In reply to comment #12)
> (In reply to comment #9)
> > 	epatch "$FILESDIR"/grub-1.9.9-915resolution.patch
> > 	# Include grub-extras/915resolution in the build:
> > 	# GRUB_CONTRIB must be the name of single directory for autogen.sh
> > 	# to include $GRUB_CONTRIB/* subdirectories (exactly 1 level deep).
> > 	export GRUB_CONTRIB=grub-extras
> > 	sed -i -e '/^autoreconf/s:^:e:' autogen.sh || die
> > 	( . ./autogen.sh )
> 
> Also too bad the ebuild edit doesn't work anymore:
> 
> ./autogen.sh: line 9: autogen: command not found
> 
> Where would I get the autogen.sh script from, is it included with
> grub-extras or just taken out of grub-2.00-beta2-r1?

Fixed it for <sys-devel/grub-9999:

- For minimal ebuild editing, place the patch in /etc/portage/patches/sys-boot/grub/patchgoeshere.patch
- Add the following lines to the "else" code of "if [[ ${PV} == "9999" ]]" near the start of the ebuild:

	export GRUB_CONTRIB=grub-extras
	DO_AUTORECONF=true

I'll try to create a modified ebuild with i915 USE flag and upload.
Comment 14 Dirk Best 2013-08-02 11:35:13 UTC
> Fixed it for <sys-devel/grub-9999:
> 
> - For minimal ebuild editing, place the patch in
> /etc/portage/patches/sys-boot/grub/patchgoeshere.patch
> - Add the following lines to the "else" code of "if [[ ${PV} == "9999" ]]"
> near the start of the ebuild:
> 
> 	export GRUB_CONTRIB=grub-extras
> 	DO_AUTORECONF=true
> 
> I'll try to create a modified ebuild with i915 USE flag and upload.

Any progress on this? I tried it but no 915resolution.mod file was compiled.
Comment 15 Jory A. Pratt gentoo-dev 2013-09-08 20:25:01 UTC
add to /etc/portage/env/grub-video 

AUTOTOOLS_AUTORECONF=1 GRUB_CONTRIB=grub-extras

add to /etc/portage/package.env/grub-video
sys-boot/grub grub-video.conf

Throw patch into /etc/portage/patches/sys-boot/grub and compile all done :)
Comment 16 Till Schäfer 2013-09-25 23:05:01 UTC
the patch does not work anymore for the current versions grub-2.00-r4 and grub-2.00_p5107-r1. Any progress in making this availible in the portage tree?
Comment 17 Till Schäfer 2013-09-25 23:08:44 UTC
cat /var/tmp/portage/sys-boot/grub-2.00_p5107-r1/temp/grub-2.00_p5107-r1-915resolution.patch.out
***** grub-2.00_p5107-r1-915resolution.patch *****
PWD: /var/tmp/portage/sys-boot/grub-2.00_p5107-r1/work/grub-2.00

==================================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//sys-boot/grub/grub-2.00_p5107-r1-915resolution.patch'

==================================================

patch program exited with status 1
==================================================

PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//sys-boot/grub/grub-2.00_p5107-r1-915resolution.patch'

==================================================

patch program exited with status 1
==================================================

PATCH COMMAND:  patch -p2 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//sys-boot/grub/grub-2.00_p5107-r1-915resolution.patch'

==================================================

patch program exited with status 1
==================================================

PATCH COMMAND:  patch -p3 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//sys-boot/grub/grub-2.00_p5107-r1-915resolution.patch'

==================================================

patch program exited with status 1
==================================================

PATCH COMMAND:  patch -p4 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches//sys-boot/grub/grub-2.00_p5107-r1-915resolution.patch'

==================================================

patch program exited with status 1
Comment 18 Dirk Best 2014-01-19 13:04:31 UTC
I've successfully applied the patch to grub-2.00_p5107-r2 now. You need to set these env options:

AUTOTOOLS_AUTORECONF=1
GRUB_AUTOGEN=1
GRUB_CONTRIB=grub-extras

In addition, you need to emerge autogen first.

A proper ebuild with support for the patch would be great.
Comment 19 Mike Gilbert gentoo-dev 2017-09-01 18:47:34 UTC
It seems strange to me that this module has not been merged upstream. It's not something that I really want to officially support.