Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 356167 - keymap=<...> on kernelcmd does not change keymap
Summary: keymap=<...> on kernelcmd does not change keymap
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 06:41 UTC by Xake
Modified: 2011-03-16 14:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
0001-Fix-typo.patch (0001-Fix-typo.patch,779 bytes, patch)
2011-02-23 06:41 UTC, Xake
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2011-02-23 06:41:21 UTC
There is a minor typo in initrd.scripts that breaks keymap=<...> unless you also specify dokeymap. The documentation however says dokeymap should not be needed.
Attaching patch to fix it.
Comment 1 Xake 2011-02-23 06:41:56 UTC
Created attachment 263603 [details, diff]
0001-Fix-typo.patch
Comment 2 Sebastian Pipping gentoo-dev 2011-03-05 15:45:51 UTC
Does using dokeymap alone (without keymap=foo) make sense?
If not, please go ahead.  If yes, maybe we need a different fix.
Comment 3 Xake 2011-03-05 20:26:49 UTC
(In reply to comment #2)
> Does using dokeymap alone (without keymap=foo) make sense?
> If not, please go ahead.  If yes, maybe we need a different fix.
> 

Yes it does make sense, if you want the keymap chooser to show up like it does on the liveCDs.

However, according to documentation currently you can have the initramfs handle keymaps in two ways: either do "dokeymap" and get the chooser, or do "keymap=<...>" and skip the chooser. I think it even states that you should not need both at the same time.

I am confident this patch is the right fix.
The function I alter, cmdline_hwopts does the following: if option "keymap" is specified in HWOPTS in initrd.defaults is scans for either "dokeymap" or "nokeymap" on the kernel cmd, and if "dokeymap" is on the kernelcmd, "keymap" is added to MY_HWOPTS, if "nokeymap" is found, the there is a sed done, trying to remove "keymap" from MY_HWOPTS.

The current bug is that the current logic adds "dokeymap" to MY_HWOPTS. However the keymap function later correctly expects "keymap" in MY_HWOPTS to even run the keymap chooser function. And since it is the chooser that looks for "keymap=<...>" in kernelcmd that option will never even be considered if "keymap" (not "dokeymap") is never added to MY_HWOPTS.
So clearly this function adds the wrong option to MY_HWOPTS.

I have tested this patch, and it works both with only "dokeymap" and only "keymap=<...>", current git only works with "dokeymap" or both at the same time.


Any questions? What branches may I add it to?
Comment 4 Sebastian Pipping gentoo-dev 2011-03-05 21:19:37 UTC
(In reply to comment #3)
> I have tested this patch, and it works both with only "dokeymap" and only
> "keymap=<...>", current git only works with "dokeymap" or both at the same
> time.

While your previous details nearly made my head explode, I trust you on testing and that you really understanding the issue yourself.


> Any questions? What branches may I add it to?

Please add it to experimental and extend the change log using echangelog.

After that I plan to:
- make a new 3.x release from experimental
- merge exp into master
- make a new branch "stable" off master
Comment 5 Sebastian Pipping gentoo-dev 2011-03-16 14:46:53 UTC
(In reply to comment #4)
> Please add it to experimental and extend the change log using echangelog.
> 
> After that I plan to:
> - make a new 3.x release from experimental
> - merge exp into master
> - make a new branch "stable" off master

All done, closing.