All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Acer arcade instantOn and grub
@ 2007-07-23 14:02 whites11
  2007-07-23 21:38 ` Implentation of password and lock commands Julien RANC
  2007-08-02 17:48 ` Acer arcade instantOn and grub adrian15
  0 siblings, 2 replies; 4+ messages in thread
From: whites11 @ 2007-07-23 14:02 UTC (permalink / raw)
  To: grub-devel

"whites11\@inwind\.it" <whites11@inwind.it> writes:

Hi,

> i have a nice question for you :)
> in many acer laptops there is a second poweron button which is called "arcade button".
> this is a normal power on button, as you can see:
>
> # more /proc/bus/input/devices
> I: Bus=0019 Vendor=0000 Product=0002 Version=0000
> N: Name="Power Button (FF)"
> P: Phys=button_power/button/input0
> S: Sysfs=/class/input/input0
> U: Uniq=
> H: Handlers=kbd event0
> B: EV=3
> B: KEY=100000 0 0 0
>
> ...
>
> I: Bus=0019 Vendor=0000 Product=0001 Version=0000
> N: Name="Power Button (CM)"
> P: Phys=PNP0C0C/button/input0
> S: Sysfs=/class/input/input2
> U: Uniq=
> H: Handlers=kbd event2
> B: EV=3
> B: KEY=100000 0 0 0
>
> when laptop is new (read "when you haven't overridden window's bootloader"), pressing the normal power on button causes a normal boot sequence, but pressing the arcade button causes a different boot sequence.
>
> i don't really want to restore windows boot loader, so: is there a way to replicate this job with grub or grub2?
>
> for any further info please ask.

Is this information stored somehow?  So how can the bootloader
determine what is done?  In that case you can use scripting in GRUB 2
to make use of this information.  It can't be done yet, but surely
GRUB 2 can be modified to use this.

--
Marco

thanks for you answer, marco

follows a more deep description of the system

the original system uses a modified grub 0.93 chainloaded by ntldr.
the modifications of grub are released, but i can't replicate them on grub 0.97.

in short, in stage2 is addedd a function called console_getshift() which is this (following lines added in stage2/asm.S) :

/* 2004-12-01 CyberLink Corp. <http://www.gocyberlink.com> */
/*
 * int console_getshift (void)
 * BIOS call "INT 16H Function 02H" to shift flags from keyboard
 *	Call with	%ah = 0x2
 *	Return:		%ah = destroyed by many BIOSes
 *			%al = shift flags
 */

ENTRY(console_getshift)
	push	%ebp

	call	EXT_C(prot_to_real)
	.code16

	movb	$0x2, %ah
	int	$0x16

	movb	%al, %dl		/* real_to_prot uses %eax */

	DATA32	call	EXT_C(real_to_prot)
	.code32

	movb	%dl, %al
	and	$0xf, %eax

	pop	%ebp
	ret

then, a few references are added in other files:

stage2/term.h :

#ifndef STAGE1_5
/* 2004-12-01 CyberLink Corp. <http://www.gocyberlink.com> */
int console_getshift (void);


stage2/stage2.c :
   /* If SHOW_MENU is false, don't display the menu until ESC is pressed.  */
   if (! show_menu)
     {
/* 2004-12-01 CyberLink Corp. <http://www.gocyberlink.com> */
#ifndef GRUB_UTIL
        if(console_getshift() & 0x3)
            ++entryno;
#endif
        goto boot_entry;


stage2/asm.S :

while compiling grub 0.97 with these patches added, there are no problems, but it seems that GRUB_UTIL is always defined, so the new code is never compiled.
trying to remove the ifndef directive, compilation fails with a "no console_getshift() defined" error.

can anybody help me with this?




------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it/




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

end of thread, other threads:[~2007-08-02 17:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23 14:02 Acer arcade instantOn and grub whites11
2007-07-23 21:38 ` Implentation of password and lock commands Julien RANC
2007-07-24 14:09   ` Robert Millan
2007-08-02 17:48 ` Acer arcade instantOn and grub adrian15

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.