Video4Linux2 sup­port in FreeBSD (linuxu­lator)

I com­mit­ted the v4l2 sup­port into the lin­ux­u­la­tor (in 9–cur­rent). Part of this was the im­port of the v4l2 header from linux. We have the per­mis­sion to use it (like the v4l one), it is not li­censed via GPL. This means we can use it in FreeBSD nat­ive dri­vers, and they are even al­lowed to be com­piled into GENERIC (but I doubt we have a dri­ver which could pro­vide the v4l2 inter­face in GENERIC).

The code I com­mit­ted is “just” the glue-​code which al­lows to use FreeBSD nat­ive devices which pro­vide a v4l2 inter­face (e.g. multimedia/​pwcbsd or multimedia/​webcamd) from linux pro­grams.

Thanks to nox@ for writ­ing the glue code.

StumbleUponXINGBalatarinBox.netDiggGoogle GmailNetvouzPlurkSiteJotTypePad PostYahoo BookmarksVKSlashdotPocketHacker NewsDiigoBuddyMarksRedditLinkedInBibSonomyBufferEmailHatenaLiveJournalNewsVinePrintViadeoYahoo MailAIMBitty BrowserCare2 NewsEvernoteMail.RuPrintFriendlyWaneloYahoo MessengerYoolinkWebnewsStumpediaProtopage BookmarksOdnoklassnikiMendeleyInstapaperFarkCiteULikeBlinklistAOL MailTwitterGoogle+PinterestTumblrAmazon Wish ListBlogMarksDZoneDeliciousFlipboardFolkdJamespotMeneameMixiOknotiziePushaSvejoSymbaloo FeedsWhatsAppYouMobdiHITTWordPressRediff MyPageOutlook.comMySpaceDesign FloatBlogger PostApp.netDiary.RuKindle ItNUjijSegnaloTuentiWykopTwiddlaSina WeiboPinboardNetlogLineGoogle BookmarksDiasporaBookmarks.frBaiduFacebookGoogle ClassroomKakaoQzoneSMSTelegramRenrenKnownYummlyShare/​Save

Video4Linux sup­port in FreeBSD

Yes­ter­day I com­mit­ted the v4l sup­port into the linuxu­lator (in 9–cur­rent). Part of this was the im­port of the v4l header from linux. We have the per­mis­sion to use it, it is not li­censed via GPL. This means we can use it in FreeBSD nat­ive drivers, and they are even al­lowed to be com­piled into GENERIC (but I doubt we have a driver which could provide the v4l in­ter­face in GENERIC).

The code I com­mit­ted is “just” the glue-​code which al­lows to use FreeBSD nat­ive devices which provide a v4l in­ter­face (e.g. multimedia/​pwcbsd) from linux pro­grams.

If someone is will­ing to write the glue-​code for the v4l2 in­ter­face please con­tact me. We have the per­mis­sion to use the v4l2 header too, we just need someone do­ing the cod­ing.

In a sim­ilar way, if someone is will­ing to add v4l2 in­ter­face sup­port to FreeBSD nat­ive drivers (I do not know any FreeBSD driver which provides a v4l2 in­ter­face) , just tell me and I im­port the v4l2 header into FreeBSD.

And if someone wants to add v4l sup­port to FreeBSD nat­ive drivers but does not know where to start, feel free to con­tact me too.

Re­gard­ing the code which is in FreeBSD ATM: it is not com­pletely fin­ished yet (some clip­ping re­lated stuff is be­ing worked on), but the not fin­ished part can not even be tested, as we do not know about a FreeBSD device which provides this func­tion­al­ity.

There is no MFC planned yet, but the more suc­cess stor­ies and test scen­arios are be­ing told about on the emu­la­tion or mul­ti­me­dia mailing­lists, the more likely I will do a MFC sooner than later.

Pro­gress in the linux 2.6.x com­pat­ib­il­ity

Since my call for test­ing the ex­ten­ded linuxu­lator in FreeBSD–cur­rent we got not much neg­at­ive re­sponses. Ping doesn’t work on the linux side (fixed in p4), or­din­ary net­work con­nec­tions (e.g. down­load­ing some stuff) works fine. There seems to be a dead­lock on SMP sys­tems when com­pil­ing a lot of stuff in par­al­lel (e.g. us­ing emerge in a gentoo–ch­root with MAKEFLAGS=-j4), this is be­ing un­der in­vest­ig­a­tion by Ro­man. Com­pil­ing stuff seri­ally on an UP sys­tem works just fine so far.

I’m won­der­ing if the lack of re­sponses means that everything is run­ning just fine, or that nobody is giv­ing it a try. So far the daily use of linux pro­grams (acror­ead, linux-​firefox, …) with 2.6.16 com­pat­ib­il­ity seems to just work fine on UP and SMP sys­tems and cur­rently I don’t see a reason to not switch the de­fault in i386 in a week.

Jung-​uk Kim is work­ing on the linux-​TLS on amd64 part. ATM he is chas­ing bugs. It looks we can get fea­ture par­ity between i386/​linux and amd64/​linux32 soon.

In­tron did send in a patch for the linux-​aio stuff. Now I just need to get time to have a look at it.

linuxolator SoC work com­mit­ted

I com­mit­ted most of Ro­mans work in the linuxolator to cur­rent. The new sy­scalls aren’t used un­til you run

sy­sctl com­pat.linux.osrelease=2.6.16

to switch back (after ex­it­ing all linux pro­grams) you just have to run

sy­sctl compat.linux.osrelease=2.4.2

But you have to do this on i386. Amd64 sup­port is not com­plete (and be­sides this, amd64 is still broken and nobody provided the nec­cessary de­bug­ging info to jhb@).

There are some known prob­lems with osrelease=2.6.16, e.g., prob­lems with fu­texes (vis­ible in acror­ead, real­play and skype), but some pro­grams already run without ob­vi­ous prob­lems (linux-​firefox, linux-​opera).

Any re­ports about new prob­lems to netchild@ and rdivacky@ please. Re­views, de­bug­ging info and patches are wel­come too.