sf4k, multi-core edition

Show-off, reference material & tools.

sf4k, multi-core edition

Postby tbp » 18 Dec 2007, 10:01

Ah! The wonders of boredom. I must say making calls to sys_clone inlinable proved to be rather, hmm, interesting; i've wisely used the saved bytes to add a progress bar. Yay.

Now the question is does this really work anywhere but one my boxen. Hence the post. As a true color framebuffer is required, at least in the 'release' mode, and dimensions are hardcoded (but automatically), i've bundled a small thingy to probe.
While demo binary should work on any kernel >=2.4, you'll most certainly have to recompile the prober.

Code: Select all
# ls -la sf4k
-rwxr-xr-x 1 tbp tbp 3861 2007-12-18 09:58 sf4k
# ./fbinfo
./fbinfo: going for /dev/fb0...
FBIOGET_FSCREENINFO
        id      [        VESA VGA]
        type    FB_TYPE_PACKED_PIXELS
        visual  FB_VISUAL_TRUECOLOR /* True color       */
        smem_start 0xf5000000
        smem_len 10485760 / 10.000M
FBIOGET_VSCREENINFO
        res             (1280, 1024)
        res virtual     (1280, 1024)
        offset          (   0,    0)
        bits per pixel  32
        components (offset, len, msb_right)
        red     (16, 8, 0)
        green   ( 8, 8, 0)
        blue    ( 0, 8, 0)
        transp  (24, 8, 0)
Attachments
snap.jpg
JPEG doesn't cope too well with this one.
snap.jpg (259.18 KiB) Viewed 1519 times
sf4k.dist.20071218.tar.bz2
src + x86-64 binaries
(39.85 KiB) Downloaded 64 times
Press any key to continue: _
radius | ompf | stuff | tokaspt
User avatar
tbp
Overlord
 
Posts: 1445
Location: France

Re: sf4k, multi-core edition

Postby Ho Ho » 18 Dec 2007, 13:15

I doubt you care but I can't run it in virtual machine as it doesn't have /dev/fb* :)
Also fbinfo is 64bit so it cannot run on 32bit machines.

Will try later at home on 64bit box.
In theory, there is no difference between theory and practice. But, in practice, there is.
Jan L.A. van de Snepscheut
User avatar
Ho Ho
 
Posts: 351
Location: Estonia

Re: sf4k, multi-core edition

Postby tbp » 18 Dec 2007, 13:26

Oh but i do care, that was the reason for posting :)

sf4k is wired to 32bit mode, for size reasons, but the 'prober' - fbinfo - isn't (either to 32 or 64) . But then it needs, unlike sf4k, a c/c++ lib etc... and it's not statically linked (btw source is of course bundled).

About the VM, you may get away with prehistoric vga emulation + fb module. Hmm.

Note: it compiles at least with g++ 4.2, but 4.3 gives better results.
Press any key to continue: _
radius | ompf | stuff | tokaspt
User avatar
tbp
Overlord
 
Posts: 1445
Location: France

Re: sf4k, multi-core edition

Postby Guest » 18 Dec 2007, 16:11

Unfortunately it seems my kernel doesn't have FB support and I doubt I will recompile it any time soon. Sorry, cannot check your program :(
Guest
 

Re: sf4k, multi-core edition

Postby tbp » 19 Dec 2007, 10:47

Ho Ho wrote:I doubt you care but I can't run it in virtual machine as it doesn't have /dev/fb* :)

QEmu + Knoppix = success.

sf4k.dist.20071219.tar.bz2
24bits depth handling
(43.46 KiB) Downloaded 35 times

knop1.png
knoppix to the rescue
knop1.png (96.93 KiB) Viewed 1254 times

knop5.png
a progress bar, no less
knop5.png (20.47 KiB) Viewed 1243 times
Press any key to continue: _
radius | ompf | stuff | tokaspt
User avatar
tbp
Overlord
 
Posts: 1445
Location: France


Return to Tools, demos & sources

Who is online

Users browsing this forum: No registered users and 1 guest