mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] X.org on mini2440
@ 2012-01-24 18:39 Guillermo Rodriguez
  2012-01-24 19:24 ` Juergen Beisert
  0 siblings, 1 reply; 5+ messages in thread
From: Guillermo Rodriguez @ 2012-01-24 18:39 UTC (permalink / raw)
  To: ptxdist

Dear all,

I am playing with ptxdist (2011.12.0) on a mini2440 board and wanted to test X.org on it.

After some tweaking I have managed to successfully run X, but wanted to share some issues I've found along the way.

I enabled X.org with the framebuffer driver, evdev for touchscreen input, and "void" for keyboard input. I also added the xinit package (for startx and xinit), built everything, and booted the target. I then tried startx, but got an error message saying that a cookie could not be generated.

Upon inspecting /usr/bin/startx I see that the following has leaked through:

mcookie=`/home/grodriguez/work/ptxdist/OSELAS.BSP-Pengutronix-Mini2440-2011.12.0/platform-mini2440/sysroot-host/bin/mcookie`

Not sure whether this is a bug in the configure script in the xinit package, and/or something that can be fixed in ptxdist itself.
In my case, I fixed this by manually editing the startx script and replacing the above with a pregenerated mcookie value.

Next thing was that X.org would not start if the kernel is not compiled with support for virtual terminals. While obvious in retrospect, I wonder whether it is possible for ptxdist to detect this kind of dependencies (e.g. detect that a required kernel option is not set in the current kernel configuration). While this wouldn't help when ptxdist is used to generate a rootfs only, it would certainly be useful if ptxdist is also generating the kernel for the target platform. Rebuilt and reflashed the kernel and the problem went away.

Finally I found that even when I had configured X.org to use the "void" driver for the keyboard, it would keep complaining about keymaps and keyboard initialisation until I added xkeyboard-config (presumably for /usr/lib/X11/xkb/rules/base) and xkbcomp (for the latter I had to enable the "Keyboard mappings" option in ptxdist). Not sure whether these two are actually required for all X.org installations but I could not find any other way around. If this is really a requirement perhaps these dependencies should be forced.

After this I could run X on the target device. Used fluxbox as a WM.

I can provide more information on any of the above issues if required.

Thanks and best regards,

Guillermo Rodriguez


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] X.org on mini2440
  2012-01-24 18:39 [ptxdist] X.org on mini2440 Guillermo Rodriguez
@ 2012-01-24 19:24 ` Juergen Beisert
  2012-01-25  9:29   ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Beisert @ 2012-01-24 19:24 UTC (permalink / raw)
  To: ptxdist; +Cc: Olbrich, Michael, Guillermo Rodriguez

Hi Guillermo,

Guillermo Rodriguez wrote:
> I am playing with ptxdist (2011.12.0) on a mini2440 board and wanted to
> test X.org on it.
>
> After some tweaking I have managed to successfully run X, but wanted to
> share some issues I've found along the way.
>
> I enabled X.org with the framebuffer driver, evdev for touchscreen input,
> and "void" for keyboard input. I also added the xinit package (for startx
> and xinit), built everything, and booted the target. I then tried startx,
> but got an error message saying that a cookie could not be generated.
>
> Upon inspecting /usr/bin/startx I see that the following has leaked
> through:
>
> 
mcookie=`/home/grodriguez/work/ptxdist/OSELAS.BSP-Pengutronix-Mini2440-2011.12.0/platform-mini2440/sysroot-host/bin/mcookie`

This should help:

$ ptxdist menuconfig
  Shell & Console Tools --->
       util-linux-ng -----> 
          [*] mcookie

> Not sure whether this is a bug in the configure script in the xinit
> package, and/or something that can be fixed in ptxdist itself. In my case,
> I fixed this by manually editing the startx script and replacing the above
> with a pregenerated mcookie value.

Maybe a missing dependency from the xinit package into the util-linux-ng 
package.

@Michael: what do you think?

> Next thing was that X.org would not start if the kernel is not compiled
> with support for virtual terminals. While obvious in retrospect, I wonder
> whether it is possible for ptxdist to detect this kind of dependencies
> (e.g. detect that a required kernel option is not set in the current kernel
> configuration). While this wouldn't help when ptxdist is used to generate a
> rootfs only, it would certainly be useful if ptxdist is also generating the
> kernel for the target platform. Rebuilt and reflashed the kernel and the
> problem went away.

No, PTXdist cannot detect it automatically. The Kernel is part of the 
platform, Xorg is part of the userland. It's up to you as the developer to 
get the configuration in a way that matches your requirements.

Our Mini2440 BSP can only act as a template for you. I did not configure it 
for maximum features, because I cannot test everything ;-)

> Finally I found that even when I had configured X.org to use the "void"
> driver for the keyboard, it would keep complaining about keymaps and
> keyboard initialisation until I added xkeyboard-config (presumably for
> /usr/lib/X11/xkb/rules/base) and xkbcomp (for the latter I had to enable
> the "Keyboard mappings" option in ptxdist). Not sure whether these two are
> actually required for all X.org installations but I could not find any
> other way around. If this is really a requirement perhaps these
> dependencies should be forced.

Same here: @Michael: what do you think?

> After this I could run X on the target device. Used fluxbox as a WM.
>
> I can provide more information on any of the above issues if required.

If you know what dependencies should be met (if the user want them), patches 
are welcome at the PTXdist mailing list.
I cannot comment on this, as its long time ago, that I worked with Xorg on any 
kind of embedded device.

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] X.org on mini2440
  2012-01-24 19:24 ` Juergen Beisert
@ 2012-01-25  9:29   ` Guillermo Rodriguez Garcia
  2012-01-25 13:10     ` Olbrich, Michael
  0 siblings, 1 reply; 5+ messages in thread
From: Guillermo Rodriguez Garcia @ 2012-01-25  9:29 UTC (permalink / raw)
  To: Juergen Beisert; +Cc: Olbrich, Michael, ptxdist

Hi Juergen,

2012/1/24 Juergen Beisert <jbe@pengutronix.de>:
[...]
>> Upon inspecting /usr/bin/startx I see that the following has leaked
>> through:
>>
>>
> mcookie=`/home/grodriguez/work/ptxdist/OSELAS.BSP-Pengutronix-Mini2440-2011.12.0/platform-mini2440/sysroot-host/bin/mcookie`
>
> This should help:
>
> $ ptxdist menuconfig
>  Shell & Console Tools --->
>       util-linux-ng ----->
>          [*] mcookie

No, this is already selected (it is automatically brought in when you
select the xinit package, so the dependencies are setup properly). And
in fact the mcookie command is available in the target, and works:

root@mini2440:~ mcookie
1b82325e2a4a0187fe4f59ffaa118194
root@mini2440:~ which mcookie
/usr/bin/mcookie

The problem is that the startx script that is copied to the target's
rootfs has a hardcoded path to the mcookie binary on the host.

I tried "ptxconfig clean xorg-app-xinit; ptxconfig go", and the output
from configure shows this:

[...]
checking for mcookie...
/home/grodriguez/work/ptxdist/OSELAS.BSP-Pengutronix-Mini2440-2011.12.0/platform-mini2440/sysroot-host/bin/mcookie
[...]

And indeed the generated /usr/bin/startx script uses this path:

root@mini2440:~ /usr/bin/startx
/usr/bin/startx: line 183:
/home/grodriguez/work/ptxdist/OSELAS.BSP-Pengutronix-Mini2440-2011.12.0/platform-mini2440/sysroot-host/bin/mcookie:
not found
Couldn't create cookie

>
>> Not sure whether this is a bug in the configure script in the xinit
>> package, and/or something that can be fixed in ptxdist itself. In my case,
>> I fixed this by manually editing the startx script and replacing the above
>> with a pregenerated mcookie value.
>
> Maybe a missing dependency from the xinit package into the util-linux-ng
> package.
>
> @Michael: what do you think?
>
>> Next thing was that X.org would not start if the kernel is not compiled
>> with support for virtual terminals. While obvious in retrospect, I wonder
>> whether it is possible for ptxdist to detect this kind of dependencies
>> (e.g. detect that a required kernel option is not set in the current kernel
>> configuration). While this wouldn't help when ptxdist is used to generate a
>> rootfs only, it would certainly be useful if ptxdist is also generating the
>> kernel for the target platform. Rebuilt and reflashed the kernel and the
>> problem went away.
>
> No, PTXdist cannot detect it automatically. The Kernel is part of the
> platform, Xorg is part of the userland. It's up to you as the developer to
> get the configuration in a way that matches your requirements.

OK. I thought that maybe ptxdist had a way to know since it has access
to both the kernel config and the userland config.

>
> Our Mini2440 BSP can only act as a template for you. I did not configure it
> for maximum features, because I cannot test everything ;-)

That's perfect :) It is nice the way it is. I'd rather start from
minimal and add features incrementally than the opposite.

>
>> Finally I found that even when I had configured X.org to use the "void"
>> driver for the keyboard, it would keep complaining about keymaps and
>> keyboard initialisation until I added xkeyboard-config (presumably for
>> /usr/lib/X11/xkb/rules/base) and xkbcomp (for the latter I had to enable
>> the "Keyboard mappings" option in ptxdist). Not sure whether these two are
>> actually required for all X.org installations but I could not find any
>> other way around. If this is really a requirement perhaps these
>> dependencies should be forced.
>
> Same here: @Michael: what do you think?
>
>> After this I could run X on the target device. Used fluxbox as a WM.
>>
>> I can provide more information on any of the above issues if required.
>
> If you know what dependencies should be met (if the user want them), patches
> are welcome at the PTXdist mailing list.
> I cannot comment on this, as its long time ago, that I worked with Xorg on any
> kind of embedded device.

I was hoping that some X.org guru could confirm whether
keyboard/keymap support is always required (and then it's just a
matter of checking the required dependencies and get them into
ptxdist) or whether it is just a configuration problem on my side.

Thanks,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] X.org on mini2440
  2012-01-25  9:29   ` Guillermo Rodriguez Garcia
@ 2012-01-25 13:10     ` Olbrich, Michael
  2012-01-25 16:43       ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Olbrich, Michael @ 2012-01-25 13:10 UTC (permalink / raw)
  To: ptxdist

On Wed, Jan 25, 2012 at 10:29:21AM +0100, Guillermo Rodriguez Garcia wrote:
> Hi Juergen,
> 
> 2012/1/24 Juergen Beisert <jbe@pengutronix.de>:
> [...]
> >> Upon inspecting /usr/bin/startx I see that the following has leaked
> >> through:
> >>
> >>
> > mcookie=`/home/grodriguez/work/ptxdist/OSELAS.BSP-Pengutronix-Mini2440-2011.12.0/platform-mini2440/sysroot-host/bin/mcookie`
> >
> > This should help:
> >
> > $ ptxdist menuconfig
> >  Shell & Console Tools --->
> >       util-linux-ng ----->
> >          [*] mcookie
> 
> No, this is already selected (it is automatically brought in when you
> select the xinit package, so the dependencies are setup properly). And
> in fact the mcookie command is available in the target, and works:
> 
> root@mini2440:~ mcookie
> 1b82325e2a4a0187fe4f59ffaa118194
> root@mini2440:~ which mcookie
> /usr/bin/mcookie
> 
> The problem is that the startx script that is copied to the target's
> rootfs has a hardcoded path to the mcookie binary on the host.
> 
> I tried "ptxconfig clean xorg-app-xinit; ptxconfig go", and the output
> from configure shows this:
> 
> [...]
> checking for mcookie...
> /home/grodriguez/work/ptxdist/OSELAS.BSP-Pengutronix-Mini2440-2011.12.0/platform-mini2440/sysroot-host/bin/mcookie
> [...]

I see the problem. It "works for me" because this check finds
/usb/bin/mcookie on my build system... Try adding
"ac_cv_path_MCOOKIE=/usr/bin/mcookie" to XORG_APP_XINIT_ENV in
rules/xorg-app-xinit.make.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] X.org on mini2440
  2012-01-25 13:10     ` Olbrich, Michael
@ 2012-01-25 16:43       ` Guillermo Rodriguez Garcia
  0 siblings, 0 replies; 5+ messages in thread
From: Guillermo Rodriguez Garcia @ 2012-01-25 16:43 UTC (permalink / raw)
  To: ptxdist

Hello Michael,

2012/1/25 Olbrich, Michael <mol@pengutronix.de>:
> On Wed, Jan 25, 2012 at 10:29:21AM +0100, Guillermo Rodriguez Garcia wrote:
[...]
>>
>> The problem is that the startx script that is copied to the target's
>> rootfs has a hardcoded path to the mcookie binary on the host.
>>
>> I tried "ptxconfig clean xorg-app-xinit; ptxconfig go", and the output
>> from configure shows this:
>>
>> [...]
>> checking for mcookie...
>> /home/grodriguez/work/ptxdist/OSELAS.BSP-Pengutronix-Mini2440-2011.12.0/platform-mini2440/sysroot-host/bin/mcookie
>> [...]
>
> I see the problem. It "works for me" because this check finds
> /usb/bin/mcookie on my build system... Try adding
> "ac_cv_path_MCOOKIE=/usr/bin/mcookie" to XORG_APP_XINIT_ENV in
> rules/xorg-app-xinit.make.

Yep! This fixes the problem.

Thanks,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-25 16:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-24 18:39 [ptxdist] X.org on mini2440 Guillermo Rodriguez
2012-01-24 19:24 ` Juergen Beisert
2012-01-25  9:29   ` Guillermo Rodriguez Garcia
2012-01-25 13:10     ` Olbrich, Michael
2012-01-25 16:43       ` Guillermo Rodriguez Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox