[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grub2 efi compiling
From: |
Mario |
Subject: |
Re: Grub2 efi compiling |
Date: |
Tue, 30 Dec 2014 20:56:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 |
On 12/30/2014 04:22 AM, Andrei Borzenkov wrote:
В Mon, 29 Dec 2014 19:22:42 +0100
address@hidden пишет:
Hi,
I use grub from debian on my tablet and it works fine (altough it need
external keyboard to select menu entries).
I'm trying to recompile grub-1.99 from debian source. I'd like add
tablet keys up/down to select grub menu items.
I made my changes to grub-core/menu.c and I done:
./configure --disable-werror
output ends with:
*******************************************************
GRUB2 will be compiled with following components:
Platform: i386-pc
This is default platform on x86 (legacy BIOS).
With devmapper support: No (need libdevmapper header)
With memory debugging: No
efiemu runtime: Yes
grub-mkfont: No (need freetype2 library)
*******************************************************
but debian original file
/boot/grub/normal.mod: ELF 64-bit LSB relocatable, x86-64, version 1
(SYSV), not stripped
I executed make (for test) and normal.mod was 32bit. Grub failed to start.
I tryed:
./configure --with-platform=x86_64-pc --disable-werror
This does not exist. "pc" platform is always 32 bit, so only i386-pc is
available. Also your subject says "EFI" so you probably want
--with-platform=efi
It will default to 64 bit if you build on 64 bit system.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
configure: error: platform "x86_64-pc" is not supported for target CPU
"i386"
I also tried ftp://ftp.gnu.org/gnu/grub/grub-2.00.tar.xz with the same
results.
How can I configure grub soure for x86_64?
Thanks in advance
_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub
_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub
Thanks
--with-platform=efi worked.
Below is my workaround for tablet side buttons vol up/down.
Problems:
Tablet has only three physical buttons, which are power, vol-up and
vol-down.
1) Power has no effect on edit screen of grub so I can't use it.
2) Vol-up and vol-down move cursor up and down with speed
uncontrollably. I think uefi firmware is bugged and stroke delay and
repeat are too short and too fast.
Solutions:
2) After you get character wait not less of 150mS before parse another.
1) Only for arrow keys (tablet vol-up, vol-down send arrow keys codes)
GRUB timeout is not interrupted, so you can select item and at timeout
start without use of another key.
Now I can start android or debian without external keyboard.
PACKAGE_VERSION=1.99-27+deb7u2
diff grub-core/normal/menu.c.orig grub-core/normal/menu.c
495c495
< grub_uint64_t saved_time;
---
> grub_uint64_t saved_time,lastkey_time;
497c497
< int timeout;
---
> int timeout,arrowskeys=0;
516a517
> lastkey_time = grub_get_time_ms ();
553,555c554,565
< *auto_boot = 1;
< menu_fini ();
< return default_entry;
---
> if (!arrowskeys)
> {
> *auto_boot = 1;
> menu_fini ();
> return default_entry;
> }
> else
> {
> menu_fini ();
> *auto_boot = 0;
> return current_entry;
> }
562c572
< if (timeout >= 0)
---
> if (timeout >= 0 )
564,566c574,581
< grub_env_unset ("timeout");
< grub_env_unset ("fallback");
< clear_timeout ();
---
> if (c==GRUB_TERM_KEY_UP||c==GRUB_TERM_KEY_DOWN) arrowskeys=1;
> else
> {
> arrowskeys=0;
> grub_env_unset ("timeout");
> grub_env_unset ("fallback");
> clear_timeout ();
> }
568c583,587
<
---
> grub_uint64_t current_time;
> current_time = grub_get_time_ms ();
> if (current_time - lastkey_time > 150)
> {
> lastkey_time = grub_get_time_ms ();
660a680
> }