Video for lin­ux (v4l) emu­la­tion com­ing to the lin­ux­u­la­tor

I am in the process of prepar­ing the import of code which makes v4l devices usable in the lin­ux­u­la­tor. Basi­cal­ly this means you can use your web­cam in skype (test­ed by the sub­mit­ter of the patch on amd64).

This is not a “apply patch and com­mit” thing, because the orig­i­nal videodev.h (with some mod­i­fi­ca­tions) is used. I was seek­ing the OK from core@ for this. As there is no license in the head­er, and the orig­i­nal author (Alan Cox, the lin­ux one, not our FreeB­SD one) gave per­mis­sions to use it, core@ is OK with the import.

I intent to do a ven­dor import of the lin­ux head­er (pre­pared today, togeth­er with some readme which explains where it comes from and some stuff to show that we are on the safe side regard­ing legal stuff), and then I want to copy this over to the lin­ux­u­la­tor as linux_videodev.h and com­mit the patch (prob­a­bly a lit­tle bit mod­i­fied in a few places). My plan is to com­mit it this week. Peo­ple which already want to play around with it now can have a look at the emu­la­tion mail­inglist, a link to the patch is post­ed there.

With the head­er being in a ven­dor branch, inter­est­ed peo­ple could then start to sub­mit new BSD licensed dri­vers or mod­i­fy exist­ing dri­vers which make use of the v4l inter­face, but I let the import of the head­er into the FreeB­SD include direc­to­ry up to the per­son which wants to com­mit the first native FreeBSD-v4l sup­port.

When such native FreeBSD-v4l sup­port is com­mit­ted, the lin­ux­u­la­tor code needs to be revised.

Send to Kin­dle

Lin­ux­u­la­tor in ‑cur­rent ready for test­ing the 2.6.16 emu­la­tion

Today I com­mit­ted two patch­es which fix the last two pan­ics we know about in the 2.6.16 emu­la­tion. Now we need testers. Here’s the text of the mail I did send to current@ a few moments ago:

Hi,

today I com­mit­ted the last fix­es for the show­stop­per prob­lems (pan­ics) in the lin­ux 2.6.16 emu­la­tion. I intend to switch the default ver­sion to 2.6.16 on i386 “soon” (see below), so please help test­ing it.

More recent lin­ux dis­tri­b­u­tions (e.g. FC5) require a 2.6 ker­nel and don’t work with 2.4.2 any­more. And because FC4 is “abandon-ware” (no secu­ri­ty fix­es from fedo­rale­ga­cy any­more), get­ting 2.6.16 emu­la­tion up an run­ning is very impor­tant.

If you use a lin­ux pro­gram, please add compat.linux.osrelease=2.6.16 to /etc/sysctl.conf (my desk­top is run­ning with 2.6.16 emu­la­tion since some days already). After the next boot (or after run­ning “sysctl compat.linux.osrelease=2.6.16”, please make sure no lin­ux pro­gram is run­ning already) any lin­ux pro­gram will start with a lin­ux ker­nel ver­sion of 2.6.16 instead of 2.4.2. The default lin­ux base port (FC4) will then use dif­fer­ent code paths (e.g. with­in glibc). In case you want to switch back to the 2.4.2 emu­la­tion with­out a reboot, please make sure no lin­ux pro­gram is run­ning any­more.

So far we fixed all known/repeatable prob­lems with acrore­ad, realplay­er, skype and lin­ux fire­fox. If you encounter strange behav­ior with any lin­ux pro­gram, please tell us (emulation@freebsd.org) which pro­gram you used, how to repeat the prob­lem, what the prob­lem is, and if it only is vis­i­ble with 2.6.16 or with 2.4.2 too. You should also watch out for mes­sages in the dmesg (unim­ple­ment­ed sys­tem calls or oth­er stuff, this is used to deter­mine the pri­or­i­ty of miss­ing syscalls). Please also have a look at http://wiki.FreeBSD.org/linux-kernel, I intend to doc­u­ment the known prob­lems there. If you find your prob­lem there, please tell us about it if you are will­ing to test fix­es.

We are spe­cial­ly inter­est­ed in reports (good or bad) on SMP sys­tems. Please beat the hell out of the lin­ux­u­la­tor!

On amd64 sys­tems we have not the same func­tion­al­i­ty as on i386, miss­ing are futex­es and TLS. In P4 we already have the futex part cov­ered, but the TLS part is still miss­ing (any­one with a clue about the ker­nel side of TLS on amd64 is wel­come to give a hint or two to jkim@ and rdivacky@). So if you get a mes­sage about miss­ing futex­es or TLS on amd64: we know about it (testers for the futex stuff are wel­come, but first you need to use a pro­gram which uses futex­es and com­plains).

As long as we get prob­lem reports with 2.6.16 I will not switch the default to 2.6.16. If we don’t get a report at all, I will switch the default on i386 to 2.6.16 in two weeks. If we get some prob­lem reports, we will push back the switch a lit­tle bit depend­ing on the sever­i­ty of the prob­lem.

Bye,
Alexan­der.

Send to Kin­dle

Try­ing to get some more soundsys­tem relat­ed progress

I start­ed a wiki page about improv­ing the soundsys­tem. The idea is sim­i­lar to the wiki page about improv­ing our lin­ux­o­la­tor. It’s a way to tell the peo­ple what is cur­rent­ly avail­able as patch­es (and where), what is bro­ken and needs to be fixed, which improve­ments we like to see and so on. It’s maybe also a good place to list docs for sound­chips. Cur­rent­ly the page about the soundsys­tem is a lit­tle bit low on con­tent. I hope a lot of peo­ple con­tribute with ideas, facts, sug­ges­tions, point­ers to help­ful stuff, (point­ers to) bugs, point­ing out lack of docs and so on (either by mod­i­fy­ing the page, or by mail­ing stuff to multimedia@FreeBSD.org).

With the lin­ux page I was able to gain some momen­tum and sev­er­al peo­ple are already help­ing with patch­es, run­ning tests and so on (even lit­tle help mat­ters). I hope the sound page will show a sim­i­lar ben­e­fit.

So dear read­er, do you play some music some­times? Do you play an instru­ment which can be con­nect­ed to some oth­er stuff (MIDI)? Do you use acrore­ad, skype, or some oth­er lin­ux soft­ware? If yes go to the wiki pages and read them please. When you’re fin­ished please donate 5 – 10 min­utes (I don’t mind if you sep­nd more) of your time and try to tell us at multimedia@FreeBSD.org or emulation@FreeBSD.org about stuff you think could be lis­tet there (instead of smok­ing a cig­a­rette, argue­ing about bad behav­ior of peo­ple around you, or sim­i­lar neg­a­tive stuff). Thanks in advance and trust me, you will earn good kar­ma when you do this!

Send to Kin­dle

lin­ux­o­la­tor SoC work com­mit­ted

I com­mit­ted most of Romans work in the lin­ux­o­la­tor to cur­rent. The new syscalls aren’t used until you run

sysctl com­pat.lin­ux.osrelease=2.6.16

to switch back (after exit­ing all lin­ux pro­grams) you just have to run

sysctl compat.linux.osrelease=2.4.2

But you have to do this on i386. Amd64 sup­port is not com­plete (and besides this, amd64 is still bro­ken and nobody pro­vid­ed the nec­ces­sary debug­ging info to jhb@).

There are some known prob­lems with osrelease=2.6.16, e.g., prob­lems with futex­es (vis­i­ble in acrore­ad, realplay and skype), but some pro­grams already run with­out obvi­ous prob­lems (linux-fire­fox, linux-opera).

Any reports about new prob­lems to netchild@ and rdivacky@ please. Reviews, debug­ging info and patch­es are wel­come too.

Send to Kin­dle