* 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
* Implentation of password and lock commands
2007-07-23 14:02 Acer arcade instantOn and grub whites11
@ 2007-07-23 21:38 ` Julien RANC
2007-07-24 14:09 ` Robert Millan
2007-08-02 17:48 ` Acer arcade instantOn and grub adrian15
1 sibling, 1 reply; 4+ messages in thread
From: Julien RANC @ 2007-07-23 21:38 UTC (permalink / raw)
To: The development of GRUB 2
Hi everyone,
I am currently trying to get involved actively in the Grub 2
development. I decided to start by (re)implementing the commands
"password" and "lock" from Grub Legacy, that are currently missing in
Grub 2.
For now, I can successfully set a password in the grub.cfg file, read
it, retrieve it, and block access to command line and edition mode until
the password is verified. This seems to me a good start :)
I hope I will have a first patch to propose in the weeks to come. As I
am in the beginning of this implementation, I was wondering if there was
anything more than what was implemented in Grub Legacy that was
required, wished, or though about concerning this matter ? All comments
and suggestions are indeed welcomed.
--
Julien RANC
julien.ranc@gmail.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Implentation of password and lock commands
2007-07-23 21:38 ` Implentation of password and lock commands Julien RANC
@ 2007-07-24 14:09 ` Robert Millan
0 siblings, 0 replies; 4+ messages in thread
From: Robert Millan @ 2007-07-24 14:09 UTC (permalink / raw)
To: The development of GRUB 2
On Mon, Jul 23, 2007 at 11:38:16PM +0200, Julien RANC wrote:
> Hi everyone,
>
> I am currently trying to get involved actively in the Grub 2
> development. I decided to start by (re)implementing the commands
> "password" and "lock" from Grub Legacy, that are currently missing in
> Grub 2.
>
> For now, I can successfully set a password in the grub.cfg file, read
> it, retrieve it, and block access to command line and edition mode until
> the password is verified. This seems to me a good start :)
>
> I hope I will have a first patch to propose in the weeks to come.
Nice. Perhaps you could send what you have now so that others (esp the
maintainers) can comment on it?
> As I
> am in the beginning of this implementation, I was wondering if there was
> anything more than what was implemented in Grub Legacy that was
> required, wished, or though about concerning this matter ? All comments
> and suggestions are indeed welcomed.
Debian has a list of things that are needed to replace GRUB Legacy as the
default bootloader:
http://wiki.debian.org/GrubTransition
There's also this command list comparison, which may provide some indication:
http://grub.enbug.org/CommandList
--
Robert Millan
My spam trap is honeypot@aybabtu.com. Note: this address is only intended
for spam harvesters. Writing to it will get you added to my black list.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Acer arcade instantOn and grub
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-08-02 17:48 ` adrian15
1 sibling, 0 replies; 4+ messages in thread
From: adrian15 @ 2007-08-02 17:48 UTC (permalink / raw)
To: The development of GRUB 2
whites11@inwind.it escribió:
>> 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.
A different boot sequence.
>>
>> i don't really want to restore windows boot loader,
When you said before a different boot sequence did you mean that it
restores the windows boot loader or that it loads it from nowhere
instead of reading the disk... or what?
>> so: is there a way to replicate this job with grub or grub2?
I do not know.
>>
>> 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.
When you talk about this original system... this has nothing to do with
the arcade button, isn't it ?
Or is this code supposed to activate a fallback option (not the default
option but default+1 option) ?
Can you send a patch (differences from grub 0.93 and grub 0.93-modified)
so that I can try to apply to my own fork of grub 0.97?
Thank you.
adrian15
^ 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.