| Submitter | Mr Dash Four |
|---|---|
| Date | Dec. 3, 2011, 4:37 p.m. |
| Message ID | <4EDA504E.7070304@googlemail.com> |
| Download | mbox | patch |
| Permalink | /patch/16149/ |
| State | Not Applicable |
| Headers | show |
Comments
On Sat, Dec 03, 2011 at 04:37:34PM +0000, Mr Dash Four wrote: > > > Instead of trying to edit the file manually, try "make xconfig" in the > > directory where the kernel is extracted(something like work/htcdream*/linux- > > leviathan*/git/ ) and do it manually trough the GUI, then save back the > > resulting defconfig, increase PR in the recipe and rebuild your console-image. > > > That as a very good advice, thank you! The versioning "magic" is > something I didn't know about (I always used to delete all related files > in the tmp/stamp directory in the futile hope that the process/steps > will be repeated at the next run). > > OK, since I use rm_work, the git directory is no longer there, but I've > had the git tar archive, so unpacked it, copied defconfig, renamed it to > .config and ran "make ARCH=arm menuconfig" (I prefer ncurses myself), then you will like: bitbake -c menuconfig virtual/kernel and to save defconfig you can use -c savedefconfig (not 100% sure it's available in linux-leviathan in OE-classic). > then switched the appropriate option on and saved the new file. I wasn't > sure whether I should also switch the FRAMEBUFFER_CONSOLE_DETECT_PRIMARY > option as I was not sure of its meaning and whether I actually need > this, so left it as the default (empty/No). When I ran diff to see what > has been changed the following has been altered: > > --- defconfig 2011-11-19 16:35:46.000000000 +0000 > +++ .config 2011-12-03 15:42:13.123656047 +0000 > @@ -1,7 +1,7 @@ > # > # Automatically generated make config: don't edit > # Linux kernel version: 2.6.32.9 > -# Fri Aug 27 19:32:05 2010 > +# Sat Dec 3 15:42:13 2011 > # > CONFIG_ARM=y > CONFIG_SYS_SUPPORTS_APM_EMULATION=y > @@ -1199,7 +1199,12 @@ > # > # CONFIG_VGA_CONSOLE is not set > CONFIG_DUMMY_CONSOLE=y > -# CONFIG_FRAMEBUFFER_CONSOLE is not set > +CONFIG_FRAMEBUFFER_CONSOLE=y > +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set > +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y > +# CONFIG_FONTS is not set > +CONFIG_FONT_8x8=y > +CONFIG_FONT_8x16=y > # CONFIG_LOGO is not set > CONFIG_SOUND=y > CONFIG_SOUND_OSS_CORE=y > @@ -1233,11 +1238,9 @@ > CONFIG_SND_SOC=y > > # > -# MSM SoC Audio support > +# SoC Audio support Qualcomm > # > CONFIG_SND_MSM_SOC=y > -CONFIG_SND_MSM_DAI_SOC=y > -CONFIG_SND_MSM_SOC_MSM7K=y > CONFIG_SND_SOC_I2C_AND_SPI=y > # CONFIG_SND_SOC_ALL_CODECS is not set > # CONFIG_SOUND_PRIME is not set > > > Interesting! In addition to a few extra options, the two SND_MSM_* > options shown above are now gone - don't know why. > > Anyway, I copied this back to the appropriate directory and bumped the > version number, then ran bitbake again. No problems and I've had my new > image, kernel modules (recompiled) and a few other things. Installed it > and fastbooted my phone. The screen appeared this time - rotated as well > - and I've had my login prompt. Brilliant! > > Duly logged in, but there were a few further problems: > > 1. The keyboard I now have is completely unusable as the "alt" register > (the blue row of keys) is completely unusable/inaccessible with the > exception of the top row (where the numbers are). That means I cannot > type/use vital keys like the pipe symbol ('|'), dash ('-') etc. There is > also no "repeat" - i.e. when I press a key and keep pressing it, it > doesn't continue typing the same key. is there any way I could fix this? You need to add right keymap to keymaps recipe and check that it's in /etc/keymap-2.6.map and then /etc/init.d/keymap.sh should load it for you during boot. > 2. My ssh login is also problematic - when I try to log in from the PC > host (via usb) this time I get the following error on that (PC) end: > "PTY allocation request failed on channel 0". Don't know why that is, > any ideas? This usually means that /dev/pts wasn't mounted during boot, I don't remember if htcdream was doing something weird but for palmpre GarthPS needed this: http://git.openembedded.org/openembedded/commit/?id=fcb43100609fcb955cfac6ad6b92d3b5ddf08c20 and I'm not sure if somebody tested htcdream since then.. so check order of mountdevsubfs.sh and udev init if htcdream is using udev (not devtmpfs) > I cannot properly scroll/see what is happening on the phone system and > neither can I see any of the log files as the keyboard is all screwed > up, so I can't post any of these file in order to further help resolve > the above issues.
> then you will like: > bitbake -c menuconfig virtual/kernel > Indeed! > and to save defconfig you can use -c savedefconfig (not 100% sure it's > available in linux-leviathan in OE-classic). > Nope, this doesn't seem available - it tells me "Nothing to do" and to run "bitbake world" if I want something done (I like that attitude :-) ), so I had to copy the new file myself. > You need to add right keymap to keymaps recipe and check that it's in > /etc/keymap-2.6.map and then /etc/init.d/keymap.sh should load it for > you during boot. > Hmm, in my rootfs I do have /etc/init.d/keymap and I just looked at that script - it looks for either /etc/keymap-*something* or /etc/keymap-extension-*something*. I have neither! In the recipe directory (keymaps/files) there is a directory called "htcuniversal" which has a single file called keymap-2.6.map: #altgr keycode 18 = euro altgr keycode 15 = tilde altgr keycode 24 = slash altgr keycode 25 = backslash altgr keycode 32 = pound altgr keycode 37 = quotedbl altgr keycode 38 = apostrophe altgr keycode 50 = question altgr keycode 51 = semicolon altgr keycode 52 = colon Now, I have four questions: 1) how do I "activate" this keymap (provided it is the one I want); 2) it seems that in this file I could redefine *any* key I want. If so, is there any man/doc page I can look at to educate myself, because I am almost 100% certain that I would need to redefine some of the keys in the "standard" setting. 3) How do I find the "keycode" numbers - is there a tool I could execute (probably on my phone) to find a certain keycode when I press it so that I could redefine it later (presumably in a similar file as the keymap-2.6.map I listed above)? 4) When I do all the changes, do I just do the versioning "magic" (bump up the keymaps PR) in order to trigger a re-make of the stuff I changed (great trick that!)? > This usually means that /dev/pts wasn't mounted during boot, I don't > remember if htcdream was doing something weird but for palmpre GarthPS > needed this: > http://git.openembedded.org/openembedded/commit/?id=fcb43100609fcb955cfac6ad6b92d3b5ddf08c20 > and I'm not sure if somebody tested htcdream since then.. so check order > of mountdevsubfs.sh and udev init if htcdream is using udev (not > devtmpfs) > Hmm, I don't know what OE commit I have, but just checked my /etc/rcS.d on the phone's rootfs - it seems that I have the (buggy) "S04mountdevsubfs.sh" instead of "S05mountdevsubfs.sh". How do I alter/change this (presumably by altering some of the recipes)?
On Sat, Dec 03, 2011 at 05:47:01PM +0000, Mr Dash Four wrote: > > > then you will like: > > bitbake -c menuconfig virtual/kernel > > > Indeed! > > > and to save defconfig you can use -c savedefconfig (not 100% sure it's > > available in linux-leviathan in OE-classic). > > > Nope, this doesn't seem available - it tells me "Nothing to do" and to > run "bitbake world" if I want something done (I like that attitude :-) > ), so I had to copy the new file myself. You haven't specify target I guess.. bitbake -c savedefconfig virtual/kernel > > You need to add right keymap to keymaps recipe and check that it's in > > /etc/keymap-2.6.map and then /etc/init.d/keymap.sh should load it for > > you during boot. > > > Hmm, in my rootfs I do have /etc/init.d/keymap and I just looked at that > script - it looks for either /etc/keymap-*something* or > /etc/keymap-extension-*something*. I have neither! > > In the recipe directory (keymaps/files) there is a directory called > "htcuniversal" which has a single file called keymap-2.6.map: > #altgr keycode 18 = euro > altgr keycode 15 = tilde > altgr keycode 24 = slash > altgr keycode 25 = backslash > altgr keycode 32 = pound > altgr keycode 37 = quotedbl > altgr keycode 38 = apostrophe > altgr keycode 50 = question > altgr keycode 51 = semicolon > altgr keycode 52 = colon > > Now, I have four questions: > 1) how do I "activate" this keymap (provided it is the one I want); copy htcuniversal file to match MACHINE (so htcdream) and rebuild keymaps recipe, don't know if htcuniversal is using same layout.. > 2) it seems that in this file I could redefine *any* key I want. If so, > is there any man/doc page I can look at to educate myself, because I am > almost 100% certain that I would need to redefine some of the keys in > the "standard" setting. Yes there definetely are some man and doc pages as this is not really OE or embedded specific and also there is google you know.. :). > 3) How do I find the "keycode" numbers - is there a tool I could execute > (probably on my phone) to find a certain keycode when I press it so that > I could redefine it later (presumably in a similar file as the > keymap-2.6.map I listed above)? dtto > 4) When I do all the changes, do I just do the versioning "magic" (bump > up the keymaps PR) in order to trigger a re-make of the stuff I changed > (great trick that!)? yes 1) add file 2) bump PR, 3) rebuild 4) test it on device, 5) update it on device if it's not 100% correct and then sync keymap-2.6.map with htcdream in OE 6) send patch to OE ML > > This usually means that /dev/pts wasn't mounted during boot, I don't > > remember if htcdream was doing something weird but for palmpre GarthPS > > needed this: > > http://git.openembedded.org/openembedded/commit/?id=fcb43100609fcb955cfac6ad6b92d3b5ddf08c20 > > and I'm not sure if somebody tested htcdream since then.. so check order > > of mountdevsubfs.sh and udev init if htcdream is using udev (not > > devtmpfs) > > > Hmm, I don't know what OE commit I have, but just checked my /etc/rcS.d And I cannot run commands (git log even) in your checkout so I don't know it too :). > on the phone's rootfs - it seems that I have the (buggy) > "S04mountdevsubfs.sh" instead of "S05mountdevsubfs.sh". How do I > alter/change this (presumably by altering some of the recipes)? Yes this is in initscripts-shr which are used only when you're building SHR and shr-images, if you're still playing with fso- or default console- iamges then IIRC normal initscript recipe is used and you have to apply similar fix there..
> You haven't specify target I guess.. > bitbake -c savedefconfig virtual/kernel > Noted, thanks as always! I did try this but this time I am getting a make error from linux-leviathan_git recipe - "make savedefconfig" -> No rules to make target savedefconfig, so it is obviously not defined. Nevermind, I copied the file myself. >> 1) how do I "activate" this keymap (provided it is the one I want); >> > > copy htcuniversal file to match MACHINE (so htcdream) and rebuild > keymaps recipe, don't know if htcuniversal is using same layout.. > Noted, though what I did in the meantime is I logged in via ssh (see below :-) ), called nano, cut-and-paste job from my PC's htcuniversal keymap file, saved this as /etc/keymap-2.6.map (on the phone) and then executed /etc/init.d/keymap - the layout has changed somewhat but it is not what I need, so I am going to see if I could make the corrections I need so that this file matches the htcdream layout exactly. There are quite a few "non-standard" keys (like "home", "back", two different "alt" keys, one "search" key etc) which I am hoping to capture with this layout config - will search google for the tool to use to see what scan codes they transmit (provided this is how the "keycode" works, that is). What baffles me though is that I've had a very good layout on my shr-image (full GUI), but I can't see any keyboard map layouts there either - maybe the gui terminal I've been using there defines its own layouts in some different way? >> 4) When I do all the changes, do I just do the versioning "magic" (bump >> up the keymaps PR) in order to trigger a re-make of the stuff I changed >> (great trick that!)? >> > > yes > 1) add file > 2) bump PR, > 3) rebuild > 4) test it on device, > 5) update it on device if it's not 100% correct and then sync keymap-2.6.map > with htcdream in OE > 6) send patch to OE ML > Noted, will do! >> Hmm, I don't know what OE commit I have, but just checked my /etc/rcS.d >> > > And I cannot run commands (git log even) in your checkout so I don't know it too :). > It turns out that correcting this error (which is what I did do) fixes this as I am now able to use ssh and log in remotely. One other annoying thing - I don't seem to have "/var/log/messages" anywhere on this phone - everything is shown on the screen - is this something I could alter as well? > Yes this is in initscripts-shr which are used only when you're building > SHR and shr-images, if you're still playing with fso- or default > console- iamges then IIRC normal initscript recipe is used and you have > to apply similar fix there.. > I just did a grep on the entire recipes directory and apart from the shr-initscript recipe nothing else is there, so I altered that recipe (and bumped the version number to trigger a rebuild).
> Noted, though what I did in the meantime is I logged in via ssh (see > below :-) ), called nano, cut-and-paste job from my PC's htcuniversal > keymap file, saved this as /etc/keymap-2.6.map (on the phone) and then > executed /etc/init.d/keymap - the layout has changed somewhat but it > is not what I need, so I am going to see if I could make the > corrections I need so that this file matches the htcdream layout exactly. > > There are quite a few "non-standard" keys (like "home", "back", two > different "alt" keys, one "search" key etc) which I am hoping to > capture with this layout config - will search google for the tool to > use to see what scan codes they transmit (provided this is how the > "keycode" works, that is). Not having much luck with this at the moment! I dumped the entire key-mapping configuration to a separate file using dumpkeys and tried, as a test, to reconfigure a non-standard key (called 'menu') to emit the letter 'z' when pressed - at least that was the idea. When I ran "showkeys -s" (to see what was the scan code of that key) I noted it as "0xe0 0x5e", so I then did the following: "setkeycodes e05e 44" (44 in the already-dumped keymap is defined as "keycode 44 = +z +Z +z Control_z Control_z Meta_z Meta_Control_z"). After doing that, I pressed the "menu" key a couple of times, but nothing happened. I then tried to remap another "non-standard" key - my "Back" key on the actual phone, but again nothing happens (when I press it, it emits '?' *regardless* of whether this key is re-defined by me or not). Lastly, I tried to do this trick on a "known" key - '1' (scancode 2): no problem, it emits the letter 'z' as it should. I don't know if I am doing this wrong and why it doesn't work with "non-standard" keys, maybe the kernel keyboard driver is somehow "stopping" these - I have no idea at this point!
Patch
--- defconfig 2011-11-19 16:35:46.000000000 +0000 +++ .config 2011-12-03 15:42:13.123656047 +0000 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.9 -# Fri Aug 27 19:32:05 2010 +# Sat Dec 3 15:42:13 2011 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -1199,7 +1199,12 @@ # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y CONFIG_SOUND_OSS_CORE=y @@ -1233,11 +1238,9 @@ CONFIG_SND_SOC=y # -# MSM SoC Audio support +# SoC Audio support Qualcomm # CONFIG_SND_MSM_SOC=y -CONFIG_SND_MSM_DAI_SOC=y -CONFIG_SND_MSM_SOC_MSM7K=y CONFIG_SND_SOC_I2C_AND_SPI=y # CONFIG_SND_SOC_ALL_CODECS is not set # CONFIG_SOUND_PRIME is not set