screen rotation, os hardening

466 views
Skip to first unread message

Fundu

unread,
Jul 27, 2010, 3:24:01 AM7/27/10
to mini

## Rotation
1) has anyone tried rotating the bootscreen. i.e. the logo and text are in
320x240 instead of 240x320.

2) can the kernel logo cover the fullscreen ?

I have got my app to work with rotated screen 320x240 (X,Y or landscaped) but
now i want the boot screen to also be rotated

any idea what this FRAMEBUFFER_CONSOLE_ROTATION is ??

setup :
bootloader : supervivi
kernel : 2.6.32
rootfs : rootfs_qtopia_128M.img

## hardening
1) how do i setup a password for root ?
2) how do i disable telnet and enable ssh ?
3) run my qt app from non root user ?

thanks



Paul Jones

unread,
Jul 27, 2010, 3:29:27 AM7/27/10
to mini...@googlegroups.com
> -----Original Message-----
> From: mini...@googlegroups.com [mailto:mini...@googlegroups.com]
> On Behalf Of Fundu
> Sent: Tuesday, 27 July 2010 5:24 PM
> To: mini
> Subject: screen rotation, os hardening
>
>
>
> ## Rotation
> 1) has anyone tried rotating the bootscreen. i.e. the logo and text are in
> 320x240 instead of 240x320.


No, and I've never seen an option to do that. I'm guessing that modifying
the framebuffer driver to swap the coordinates shouldn't be too hard.
You could try just rotating the boot logo and make it full screen



> 2) can the kernel logo cover the fullscreen ?

I've never tried it, but I've done about 90%

>
> I have got my app to work with rotated screen 320x240 (X,Y or landscaped)
> but now i want the boot screen to also be rotated
>
> any idea what this FRAMEBUFFER_CONSOLE_ROTATION is ??
>
> setup :
> bootloader : supervivi
> kernel : 2.6.32
> rootfs : rootfs_qtopia_128M.img
>
> ## hardening
> 1) how do i setup a password for root ?

Login as root, and run passwd

Fundu

unread,
Jul 27, 2010, 3:40:47 AM7/27/10
to mini...@googlegroups.com
Hey Paul, as usual thanks for a quick reply.

>No, and I've never seen an option to do that. I'm guessing that modifying
>the framebuffer driver to swap the coordinates shouldn't be too hard.
>You could try just rotating the boot logo and make it full screen


hmm, interesting thought wouldn't this make the rest of the application rotated.
right now i'm using QT to do the rotation for me.


>> 2) can the kernel logo cover the fullscreen ?
>I've never tried it, but I've done about 90%

this something i would like to try. how did you manage to get 90% screen
coverage ??

>> 1) how do i setup a password for root ?
>Login as root, and run passwd

yeah i know that's the simplest. my goal is to bake it in the image somehow.
after setting passwd would just copying /etc/passwd file work ?

>> 3) run my qt app from non root user ?

Any idea about his Guys.

TIA


Paul Jones

unread,
Jul 27, 2010, 4:23:07 AM7/27/10
to mini...@googlegroups.com
> -----Original Message-----
> From: mini...@googlegroups.com [mailto:mini...@googlegroups.com]
> On Behalf Of Fundu
> Sent: Tuesday, 27 July 2010 5:41 PM
> To: mini...@googlegroups.com
> Subject: Re: screen rotation, os hardening
>
> Hey Paul, as usual thanks for a quick reply.
>
> >No, and I've never seen an option to do that. I'm guessing that
> >modifying the framebuffer driver to swap the coordinates shouldn't be too
> hard.
> >You could try just rotating the boot logo and make it full screen
>
>
> hmm, interesting thought wouldn't this make the rest of the application
> rotated.
> right now i'm using QT to do the rotation for me.

Yes, you would have to undo the QT rotation if you rotate the frame buffer.
If you just rotate to boot logo image, you don't.


>
> >> 2) can the kernel logo cover the fullscreen ?
> >I've never tried it, but I've done about 90%
> this something i would like to try. how did you manage to get 90% screen
> coverage ??

Change the kernel file drivers/video/logo/logo_linux_clut224.ppm
It's just an asci PNG image.

>
> >> 1) how do i setup a password for root ?
> >Login as root, and run passwd
> yeah i know that's the simplest. my goal is to bake it in the image
somehow.
> after setting passwd would just copying /etc/passwd file work ?

I think so, you may need to copy /etc/shadow as well.


inbedded bloke

unread,
Aug 9, 2010, 1:41:01 AM8/9/10
to mini2440
To get screen rotation, you just need to add fbcon=rotate:3 to the
kernel command line.
e.g. in uboot,

#setenv bootargs console=ttySAC0,115200 noinitrd init=/
linuxrc .................etc etc............ fbcon=rotate:3


fbcon=rotate:<n>

This option changes the orientation angle of the console display.
The
value 'n' accepts the following:
0 - normal orientation (0 degree)
1 - clockwise orientation (90 degrees)
2 - upside down orientation (180 degrees)
3 - counterclockwise orientation (270 degrees)


The angle can be changed anytime afterwards by 'echoing' the same
numbers to any one of the 2 attributes found in
/sys/class/graphics/fbcon

If you want to change the bootscreen you need to change the logo, then
recompile the kernel.
The actual file needed for mini2440 3.5" screen is in the kernel
source
./drivers/video/logo/logo_linux_clut224.ppm
--- BUT BEWAERE, using gimp to edit it doesnt work - gimp wont save
it as a text mode ppm, just a binary mode one
so need to use some linux utilities
Taking a .gif file,
>convert -compress none logo.gif logo.ppm --- compress makes it do
text mode output
>ppmquant 224 logo.ppm >newfile.ppm --- have to do this or it
bitches about number of colours >224
>cp newfile.ppm drivers/video/logo/logo_linux_clut224.ppm

On boot up, any space left over on the screen not taken by the logo
will be used to display the usual
boot-up messages.

Good luck

Mikko

unread,
Aug 9, 2010, 8:02:39 AM8/9/10
to mini2440


On Jul 27, 10:40 am, Fundu <fundu_1...@yahoo.com> wrote:

> ...
> hmm, interesting thought wouldn't this make the rest of the application rotated.
> right now i'm using QT to do the rotation for me.
> ...

How do you do the screen rotation using Qt?

Mikko

inbedded bloke

unread,
Aug 9, 2010, 11:02:57 AM8/9/10
to mini2440
note that the
fbcon=rotate:3
doesn't affect Qtopia's rotation
it only affects the boot up screen
(both text and graphics as linux
boots)

Mikko

unread,
Aug 9, 2010, 11:14:32 AM8/9/10
to mini2440
I got a little confused. I thought that Fundu was using Qt 4.6.3 and
not Qtopia at all. With Qtopia it is easy to rotate the screen with a
specific application. However, I was wondering how one could rotate an
Qt 4 application to landscape mode but I don't know does that belong
to this thread.

Mikko

On Aug 9, 6:02 pm, inbedded bloke <nothanksgoa...@googlemail.com>
wrote:

Pankaj Chawla

unread,
Aug 9, 2010, 3:23:50 PM8/9/10
to mini...@googlegroups.com
Mikko,

Build Qt/E 4.x.x with -qt-gfx-transformed flag. Then when you invoke your
application on mini you need to do:

appname -qws -display transformed:rot<angle>

where angle = 90, 180, 270 depending on how you want to rotate.

Cheers
-Pankaj

Mikko

unread,
Aug 10, 2010, 3:13:42 AM8/10/10
to mini2440
Thanks! I managed to rotate the screen. Have you experimented with
dynamic screen rotation? It seems i should configure with -dynamic-
rotation.

In the application something like this:

QtopiaServiceRequest svreq("RotationManager",
"setCurrentRotation(int)");
svreq << 270;
svreq.send();

Mikko

On Aug 9, 10:23 pm, Pankaj Chawla <pankaj...@gmail.com> wrote:
> Mikko,
>
> Build Qt/E 4.x.x with -qt-gfx-transformed flag. Then when you invoke your
> application on mini you need to do:
>
> appname -qws -display transformed:rot<angle>
>
> where angle = 90, 180, 270 depending on how you want to rotate.
>
> Cheers
> -Pankaj
>

Mikko

unread,
Aug 10, 2010, 3:29:17 AM8/10/10
to mini2440
Oops another confusion: -dynamic-rotation is for Qt Extended not Qt
Embedded.

Mikko

kushal tengli

unread,
Mar 11, 2013, 8:34:25 AM3/11/13
to mini...@googlegroups.com
Hi Fundu,

            I am working on mini2440 board and i am also using
supervivi, zimage and rootfs_qtopia_128M but 13pixels from the right are
missing. Could you please help me to solve this problem.
Reply all
Reply to author
Forward
0 new messages