Re: HFS endianness

2009-08-10 Thread Colin Watson
On Tue, Aug 11, 2009 at 01:15:54AM +0200, Vladimir 'phcoder' Serbinenko wrote: > Hello I was looking which FS were little and which are big-endian. > This attracted my attention in hfs.c: > /* Adjust len so it we can't read past the end of the file. */ > if (len > grub_le_to_cpu32 (data->size)

Re: HFS endianness

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
On Tue, Aug 11, 2009 at 1:15 AM, Vladimir 'phcoder' Serbinenko wrote: > Hello I was looking which FS were little and which are big-endian. > This attracted my attention in hfs.c: >  /* Adjust len so it we can't read past the end of the file.  */ >  if (len > grub_le_to_cpu32 (data->size)) >    len

HFS endianness

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
Hello I was looking which FS were little and which are big-endian. This attracted my attention in hfs.c: /* Adjust len so it we can't read past the end of the file. */ if (len > grub_le_to_cpu32 (data->size)) len = grub_le_to_cpu32 (data->size); Which looks suspicious for big-endian FS. Ca

Re: [PATCH] ntldr support

2009-08-10 Thread Christian Franke
Vladimir 'phcoder' Serbinenko wrote: grub4dos checks for ntldr as follows: - file starts with 0xe9, 0x??, 0x01, - first sector does not end with bootsector signature 0x55,0xaa, - file size exceeds 0x3. For me it sounds like a heuristic. I would prefer to trust user rather than introduci

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
On Mon, Aug 10, 2009 at 10:16 PM, Colin Watson wrote: > On Mon, Aug 10, 2009 at 10:01:06PM +0200, Vladimir 'phcoder' Serbinenko wrote: >> If these numbers are still needed it needs to be uniform between >> gfxpayload=1024x768 or gfxpayload=keep + gfxmode=1024x768. Derive the >> number from video mo

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Colin Watson
On Mon, Aug 10, 2009 at 10:01:06PM +0200, Vladimir 'phcoder' Serbinenko wrote: > If these numbers are still needed it needs to be uniform between > gfxpayload=1024x768 or gfxpayload=keep + gfxmode=1024x768. Derive the > number from video mode information if you really need it I couldn't find terri

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> > Hmm. You seem to be right, on investigation (I'd missed the fact that > the 32-bit boot protocol skips a whole bunch of initialisation code), > but in that case I'm thoroughly confused about why setting it made any > difference at all in my tests. Back to the drawing board, I guess. > > (It's n

Re: [PATCH] ntldr support

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> grub4dos checks for ntldr as follows: > - file starts with 0xe9, 0x??, 0x01, > - first sector does not end with bootsector signature 0x55,0xaa, > - file size exceeds 0x3. For me it sounds like a heuristic. I would prefer to trust user rather than introducing heuristics to check file type. > >

Re: RFC: 1.97 roadmap

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> > What is the state of graphics on EFI? in efi/linux.c there is a stub with a mixture of UGA and direct access. I would prefer to switch to own drivers since EFI tries to "abstract" video. Bean has GOP patch but only few mobos support it. > > Thanks > > Michal > > > __

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> I would like a video_fb function like > grub_video_fb_create_render_target_from_buffer(void * buffer, int > allocated, const grub_video_mode_info_t * mode_info) Well this is pretty much what we do directly. New fields can be added to fbrender_target with no problem. (btw currently driver manages

Re: [PATCH] ntldr support

2009-08-10 Thread Christian Franke
Robert Millan wrote: It probably would make sense that the 'ntldr' command does simple signature checks and fail on unknown files unless '--force' is specified. You mean checking for the PE signature? Yes, this would be nice too. A check of the first byte (jmp, 0xe9) and some file

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-08-10 Thread Michal Suchanek
2009/8/10 Vladimir 'phcoder' Serbinenko : > On Mon, Aug 10, 2009 at 4:38 PM, Michal Suchanek wrote: >> Yes, but set_viewport works on the active target. You create an >> offscreen target and set it as the active target and want to set the >> viewport on it. Depending on its size this function eithe

Re: RFC: 1.97 roadmap

2009-08-10 Thread Michal Suchanek
2009/8/10 Robert Millan : > > Hi, > > I think it's time we begin the discussion on GRUB 1.97.  What do we want to > see in it, and a rough schedule.  1.97 is meant to be a point release, without > any major changes (I mean, except for those we already have ;-)), and it > should > happen soon (like

Re: RFC: 1.97 roadmap

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
On Mon, Aug 10, 2009 at 6:10 PM, Robert Millan wrote: > > Hi, > > I think it's time we begin the discussion on GRUB 1.97.  What do we want to > see in it, and a rough schedule.  1.97 is meant to be a point release, without > any major changes (I mean, except for those we already have ;-)), and it

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Colin Watson
On Mon, Aug 10, 2009 at 06:27:04PM +0200, Vladimir 'phcoder' Serbinenko wrote: > Framebuffer console works just fine with no KMS if video mode is > already set and video parameters passed. At least technically. Feel free to show me what I'm doing wrong, but it demonstrably does not work right now

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> > I don't think it's relevant to Matthew's argument what GRUB happens to > use to implement the graphical mode. The only way that Linux can write > text to the screen in graphical mode is if it has a framebuffer driver > to do so, which needs some kind of substrate (be that VESA or something > sm

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Colin Watson
On Mon, Aug 10, 2009 at 05:27:25PM +0200, Robert Millan wrote: > On Mon, Aug 10, 2009 at 02:05:15PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > What is the linux behaviour with 0x0F04? Does it just keep the mode? > > What if the same mode is passed as a value? Does linux redoes the > > modesett

RFC: 1.97 roadmap

2009-08-10 Thread Robert Millan
Hi, I think it's time we begin the discussion on GRUB 1.97. What do we want to see in it, and a rough schedule. 1.97 is meant to be a point release, without any major changes (I mean, except for those we already have ;-)), and it should happen soon (like this month or so). Here's what I'd like

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Colin Watson
On Mon, Aug 10, 2009 at 05:15:41PM +0200, Robert Millan wrote: > On Mon, Aug 10, 2009 at 12:58:35PM +0100, Colin Watson wrote: > > It also seems that doing this right is tricky on the kernel side (see > > https://lists.ubuntu.com/archives/kernel-team/2009-August/006773.html > > and thread), so I pr

Re: [PATCH] fix usability problem in FreeBSD loader

2009-08-10 Thread Robert Millan
Committed. On Sat, Aug 01, 2009 at 04:28:52PM +0200, Robert Millan wrote: > On Sat, Aug 01, 2009 at 03:49:15PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > On Sat, Aug 1, 2009 at 3:40 PM, Robert Millan wrote: > > > > > > There's a minor usability problem with FreeBSD loader.  E.g. if user runs

Re: [PATCH] use UUID to map system devices to grub devices

2009-08-10 Thread Robert Millan
On Mon, Aug 10, 2009 at 02:58:39PM +0200, Felix Zielcke wrote: > > Oh and it's limited to 2 TiB on 32bit systems, so I think it would be > good if we find an alternative to it. > Western Digital and Seagate sell now 2 TB disks. Does BLKGETSIZE64 help? -- Robert Millan The DRM opt-in fallacy:

Re: Should the website still say that GRUB 2 is currently under development?

2009-08-10 Thread Robert Millan
On Mon, Aug 10, 2009 at 03:25:26PM +0200, Felix Zielcke wrote: > Am Freitag, den 31.07.2009, 18:19 +0200 schrieb Robert Millan: > > On Thu, Jul 30, 2009 at 11:45:35AM -0400, Pavel Roskin wrote: > > > On Thu, 2009-07-30 at 15:05 +0200, adrian15 wrote: > > > > Felix Zielcke escribió: > > > > > I thin

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Robert Millan
On Mon, Aug 10, 2009 at 02:05:15PM +0200, Vladimir 'phcoder' Serbinenko wrote: > What is the linux behaviour with 0x0F04? Does it just keep the mode? > What if the same mode is passed as a value? Does linux redoes the > modesetting? If 0x0F04 works ok I would prefer to always pass it when > kernel

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Robert Millan
On Mon, Aug 10, 2009 at 12:58:35PM +0100, Colin Watson wrote: > On Mon, Aug 10, 2009 at 01:49:40PM +0200, Robert Millan wrote: > > On Mon, Aug 10, 2009 at 12:01:02PM +0100, Colin Watson wrote: > > > If the user set "keep" in gfxpayload, as I understand it, that indicates > > > that they want the gr

Re: [PATCH] Integrate hiddenmenu

2009-08-10 Thread Robert Millan
On Mon, Aug 10, 2009 at 12:55:05PM +0100, Colin Watson wrote: > > If we default to verbose, we could also have an option to turn it off from > > /etc/default/grub, if that makes life easier for you. > > Slightly, I suppose. I thought there were some feelings against > excessive numbers of options

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
On Mon, Aug 10, 2009 at 4:38 PM, Michal Suchanek wrote: > Yes, but set_viewport works on the active target. You create an > offscreen target and set it as the active target and want to set the > viewport on it. Depending on its size this function either needlessly > limits you to the current screen

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-08-10 Thread Michal Suchanek
2009/8/10 Vladimir 'phcoder' Serbinenko : >> >> >> 2009/8/10 Vladimir 'phcoder' Serbinenko : As I understand it the code checks the bounds against the active videomode and then sets the viewport on the active render target. Since the active render target can be arbitrarily set b

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> > > 2009/8/10 Vladimir 'phcoder' Serbinenko : >>> >>> As I understand it the code checks the bounds against the active >>> videomode and then sets the viewport on the active render target. >>> Since the active render target can be arbitrarily set by the user (to, >>> say an offscreen bitmap for r

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-08-10 Thread Michal Suchanek
2009/8/10 Vladimir 'phcoder' Serbinenko : > On Sun, Aug 9, 2009 at 1:55 PM, Michal Suchanek wrote: >> Hello, >> >> both in the previous complete patch and Vladimir's git repository >> introduce a grub_video_rect_t type. > This is from Collin's double buffering patch. OK, let's drop rectangles from

Re: Should the website still say that GRUB 2 is currently under development?

2009-08-10 Thread Felix Zielcke
Am Freitag, den 31.07.2009, 18:19 +0200 schrieb Robert Millan: > On Thu, Jul 30, 2009 at 11:45:35AM -0400, Pavel Roskin wrote: > > On Thu, 2009-07-30 at 15:05 +0200, adrian15 wrote: > > > Felix Zielcke escribió: > > > > I think the currently under development part can be now removed. > > > > Or wou

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Colin Watson
On Mon, Aug 10, 2009 at 02:38:42PM +0200, Vladimir 'phcoder' Serbinenko wrote: > Colin Watson wrote: > > Yes, it completely skips modesetting. > > > >> What if the same mode is passed as a value? Does linux redoes the > >> modesetting? > > > > Yes, which permits it to display text since now it's se

Re: [PATCH] use UUID to map system devices to grub devices

2009-08-10 Thread Felix Zielcke
Am Montag, den 10.08.2009, 14:46 +0200 schrieb Felix Zielcke: > Am Montag, den 10.08.2009, 13:31 +0200 schrieb Robert Millan: > > On Sat, Aug 08, 2009 at 07:13:20AM +0200, Felix Zielcke wrote: > > > Am Freitag, den 07.08.2009, 21:22 +0200 schrieb Robert Millan: > > > > On Fri, Aug 07, 2009 at 04:29

Re: [PATCH] use UUID to map system devices to grub devices

2009-08-10 Thread Felix Zielcke
Am Montag, den 10.08.2009, 13:31 +0200 schrieb Robert Millan: > On Sat, Aug 08, 2009 at 07:13:20AM +0200, Felix Zielcke wrote: > > Am Freitag, den 07.08.2009, 21:22 +0200 schrieb Robert Millan: > > > On Fri, Aug 07, 2009 at 04:29:00PM +0200, Felix Zielcke wrote: > > > > Am Freitag, den 07.08.2009,

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> Yes, it completely skips modesetting. > >> What if the same mode is passed as a value? Does linux redoes the >> modesetting? > > Yes, which permits it to display text since now it's set up a linear > framebuffer. Why can't linux use linear framebuffer for its framebuffer console? > >> If 0x0F04 w

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
On Sun, Aug 9, 2009 at 1:55 PM, Michal Suchanek wrote: > Hello, > > both in the previous complete patch and Vladimir's git repository > introduce a grub_video_rect_t type. This is from Collin's double buffering patch. > The other thing that bothers me is that the video drivers fill in the > render

Re: Fwd: [PATCH 1/2] Framebuffer split

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> > As I understand it the code checks the bounds against the active > videomode and then sets the viewport on the active render target. > Since the active render target can be arbitrarily set by the user (to, > say an offscreen bitmap for rendering the terminal text) I do not see > how these two p

Re: [PATCH] Integrate hiddenmenu

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
On Mon, Aug 10, 2009 at 1:44 PM, Robert Millan wrote: > On Mon, Aug 10, 2009 at 11:38:11AM +0100, Colin Watson wrote: >> I'd like to integrate http://grub.enbug.org/Hiddenmenu as a >> grub-mkconfig option so that we can use it by default in Ubuntu. How >> does the attached patch look? I dropped the

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Colin Watson
On Mon, Aug 10, 2009 at 02:05:15PM +0200, Vladimir 'phcoder' Serbinenko wrote: > Colin Watson wrote: > > This doesn't quite work perfectly yet. It's better than before - I've > > tested this, and if everything works properly then the result is a > > smooth zero-flicker transition, which is wonderfu

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> I think I'll remove GRUB_ASSUME_LINUX_HAS_FB_SUPPORT.  It seems that nobody > is going to use it, so all it does is add complexity.  This will also make > your patch simpler. > > Is there any objection to that? I'm ok with that. Generally I think that whenever we have the same configuration avail

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Vladimir 'phcoder' Serbinenko
> This doesn't quite work perfectly yet. It's better than before - I've > tested this, and if everything works properly then the result is a > smooth zero-flicker transition, which is wonderful. However, if > something goes wrong before the kernel starts a framebuffer then it has > no way to displa

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Colin Watson
On Mon, Aug 10, 2009 at 01:49:40PM +0200, Robert Millan wrote: > On Mon, Aug 10, 2009 at 12:01:02PM +0100, Colin Watson wrote: > > If the user set "keep" in gfxpayload, as I understand it, that indicates > > that they want the graphical mode set by GRUB to persist through to the > > kernel. In orde

Re: [PATCH] Integrate hiddenmenu

2009-08-10 Thread Colin Watson
On Mon, Aug 10, 2009 at 01:44:50PM +0200, Robert Millan wrote: > On Mon, Aug 10, 2009 at 11:38:11AM +0100, Colin Watson wrote: > > I'd like to integrate http://grub.enbug.org/Hiddenmenu as a > > grub-mkconfig option so that we can use it by default in Ubuntu. How > > does the attached patch look? I

Re: [PATCH] ntldr support

2009-08-10 Thread Robert Millan
On Sat, Aug 08, 2009 at 11:57:48PM +0200, Christian Franke wrote: > Vladimir 'phcoder' Serbinenko wrote: >>> About the command, i think that it will be simpler for the user if we have >>> only one command: chainloader (like in grub4dos) that will try to detect the >>> type of the bootloader. This i

Re: [PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Robert Millan
On Mon, Aug 10, 2009 at 12:01:02PM +0100, Colin Watson wrote: > If the user set "keep" in gfxpayload, as I understand it, that indicates > that they want the graphical mode set by GRUB to persist through to the > kernel. In order for this to actually work with Linux, we need to set up > the vid_mod

Re: [PATCH] Integrate hiddenmenu

2009-08-10 Thread Robert Millan
On Mon, Aug 10, 2009 at 11:38:11AM +0100, Colin Watson wrote: > I'd like to integrate http://grub.enbug.org/Hiddenmenu as a > grub-mkconfig option so that we can use it by default in Ubuntu. How > does the attached patch look? I dropped the --verbose from the wiki page > since I personally prefer i

Re: Report: compil error on OSX for target=i386

2009-08-10 Thread Robert Millan
On Sat, Aug 08, 2009 at 10:44:25PM +0800, Bean wrote: > Hi, > > I also encounter this problem with apple gcc 4.0, the fix is to replace: > > asm volatile ("jmp *%2" : : "b" (0), "S" (real_mode_mem), "g" > (params->code32_start)); > > With: > asm volatile ("movl %0, %%ecx" : : "m" (params->code

Re: How to call dban fron grub ?

2009-08-10 Thread Robert Millan
On Sat, Aug 08, 2009 at 11:25:57AM +0530, J. Bakshi wrote: > On Fri, 07 Aug 2009 19:35:09 +0200 > Felix Zielcke wrote: > [..] > > > > > > Does anyone of you have the luck to call dban from grub2 ? > > > > > > > > > > Try with the old linux loader with linux16 and initrd16 > [

Re: [PATCH] make 10_linux' test_gt() a bit more generic

2009-08-10 Thread Robert Millan
On Sat, Aug 08, 2009 at 01:38:43AM -0400, Pavel Roskin wrote: > On Fri, 2009-08-07 at 14:05 +0200, Robert Millan wrote: > > > > Committed. Also moved those functions to grub-mkconfig_lib.in. > > When comparing vmlinuz-2.6.31-rc4-wl and vmlinuz-2.6.31-rc5-wl, > version_test_gt() ends up comparing

Re: Solving the grub-pe2elf problem

2009-08-10 Thread Robert Millan
On Sat, Aug 08, 2009 at 12:49:27AM -0400, Pavel Roskin wrote: > On Fri, 2009-08-07 at 22:39 +0200, Robert Millan wrote: > > > I don't understand this. Why is a requirement to install GNU binutils > > unreasonable, whereas a requirement to install objconv is not? > > Installing binutils can break

Re: [PATCH] use UUID to map system devices to grub devices

2009-08-10 Thread Robert Millan
On Sat, Aug 08, 2009 at 07:13:20AM +0200, Felix Zielcke wrote: > Am Freitag, den 07.08.2009, 21:22 +0200 schrieb Robert Millan: > > On Fri, Aug 07, 2009 at 04:29:00PM +0200, Felix Zielcke wrote: > > > Am Freitag, den 07.08.2009, 13:27 +0200 schrieb Robert Millan: > > > > On Wed, Aug 05, 2009 at 08:

Re: [PATCH] RFT: Rename local labels with a macro from boot/i386/pc/boot.S

2009-08-10 Thread Robert Millan
On Sat, Aug 08, 2009 at 04:48:32PM +0200, Yves Blusseau wrote: > diff --git a/include/grub/symbol.h b/include/grub/symbol.h > index 68d9f00..5fba549 100644 > --- a/include/grub/symbol.h > +++ b/include/grub/symbol.h > @@ -21,6 +21,8 @@ > > #include > > +#define LOCAL(X) L_##X > + > /* Ad

[PATCH] Improve handling of "keep" in gfxpayload

2009-08-10 Thread Colin Watson
If the user set "keep" in gfxpayload, as I understand it, that indicates that they want the graphical mode set by GRUB to persist through to the kernel. In order for this to actually work with Linux, we need to set up the vid_mode boot parameter to indicate that it should keep the current video mod

[PATCH] Integrate hiddenmenu

2009-08-10 Thread Colin Watson
I'd like to integrate http://grub.enbug.org/Hiddenmenu as a grub-mkconfig option so that we can use it by default in Ubuntu. How does the attached patch look? I dropped the --verbose from the wiki page since I personally prefer it to be silent, although obviously this could be patched in or out as