[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Acer arcade instantOn and grub
From: |
address@hidden |
Subject: |
Re: Acer arcade instantOn and grub |
Date: |
Mon, 23 Jul 2007 16:02:10 +0200 |
"address@hidden" <address@hidden> 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/