Jump to content

Udev

Shí Wikipedia, njikotá édémédé nke onyobulạ

     

udev
Developer(s) Greg Kroah-Hartman and Kay Sievers
Initial release November 2003; 19 years ago (2003-11)
Repository Page Templeeti:Plainlist/styles.css has no content.
  • github.com/systemd/systemdEdit this at Wikidata
Edere ya C
Usoro ịrụ ọrụ kernel Linux
Ụdị Ngwunye ngwaọrụ
Ikike Ikike GPLv2
Ebe nrụọrụ weebụ Ebe nrụọrụ weebụ gọọmentị

udev (userspace /dev) bụ onye njikwa ngwaọrụ maka kernel Linux. Dị ka onye nọchiri devfsd na hotplug, udev na-ejikwa nodes ngwaọrụ na /dev directory. N'otu oge ahụ, udev na-ejikwa ihe omume niile nke ohere onye ọrụ na-ebuli mgbe a na-agbakwunye ngwaọrụ ngwaike n'ime usoro ma ọ bụ wepụ ya, gụnyere ntinye ngwaike dịka ngwaọrụ ụfọdụ chọrọ.

Ihe kpatara ya

[dezie | dezie ebe o si]

Ọ bụ kernel nke sistemụ arụmọrụ nke na-ahụ maka inye interface abstract nke ngwaike na ngwanrọ ndị ọzọ. N'ịbụ kernel monolithic, kernel Linux na-eme kpọmkwem nke ahụ: ndị ọkwọ ụgbọala ngwaọrụ bụ akụkụ nke kernel Linux, ma mejupụtara ihe karịrị ọkara nke koodu isi ya.[1] Enwere ike ịnweta ngwaike site na oku sistemụ ma ọ bụ site na nodes ngwaọrụ ha.

Iji nwee ike imeso ngwaọrụ ndị ọzọ nwere ike ịba na hotplug n'ụzọ enyi na enyi, e nyefere akụkụ nke ijikwa ngwaọrụ ngwaike ndị a niile nwere ike ịkwaga na kernel na daemon na-agba ọsọ na oghere onye ọrụ. Ịgba ọsọ na oghere onye ọrụ na-eje ozi nchebe na nkwụsi ike.

Ndị ọkwọ ụgbọala ngwaọrụ bụ akụkụ nke kernel Linux, nke ọrụ ha bụ isi gụnyere nchọpụta ngwaọrụ, ịchọpụta mgbanwe ọnọdụ ngwaọrụ, na ọrụ ngwaike dị ala. Mgbe etinyechara onye ọkwọ ụgbọala ngwaọrụ n'ime ebe nchekwa site na kernel, a na-eziga ihe omume ndị a chọpụtara na ndị ọrụ daemon udevd. Ọ bụ onye njikwa ngwaọrụ, , na-ejide ihe omume ndị a niile wee kpebie ihe ga-eme ọzọ. Maka nke a, nwere usoro nhazi zuru oke, nke onye nchịkwa kọmputa nwere ike idozi, dịka mkpa ha si dị.

  • Ọ bụrụ na ejikọta ngwaọrụ nchekwa ọhụrụ na USB, kernel na-agwa ma n'onwe ya na-agwa udisksd-daemon. Daemon ahụ nwere ike itinye usoro faịlụ ahụ.
  • Ọ bụrụ na etinye eriri Ethernet ọhụrụ n'ime Ethernet NIC, kernel na-agwa ma n'onwe ya na-agwa NetworkManager-daemon. NetworkManager-daemon nwere ike ịmalite dhclient maka NIC ahụ, ma ọ bụ hazie dịka ụfọdụ nhazi aka.

Mgbagwoju anya nke ime nke a na-amanye ndị na-ede akwụkwọ ngwa iji weghachite usoro nkwado ngwaike. Ụfọdụ ngwaọrụ ngwaike na-achọkwa mmemme enyemaka pụrụ iche iji kwadebe ha maka ojiji. A ghaghị ịkpọtụrụ ndị a n'ụzọ ndị nwere ike ịbụ ihe na-adịghị mma iji gosipụta na ụdị ikikere Unix (dịka ọmụmaatụ, ikwe ka ndị ọrụ sonye na netwọk wireless naanị ma ọ bụrụ na etinye ha na njikwa vidiyo). Ndị na-ede akwụkwọ na-eji binaries setuid ma ọ bụ na-agba ọsọ ọrụ daemons iji nye ha njikwa ohere na nkewa nke ihe ùgwù, nke nwere ike iwebata oghere nchebe oge ọ bụla.

E kere HAL iji dozie nke a, mana a na-eleghara ya anya ugbu a n'ọtụtụ nkesa Linux.

Nchịkọta

[dezie | dezie ebe o si]

N'adịghị ka usoro Unix ọdịnala, ebe nodes ngwaọrụ dị na / directory bụ faịlụ kwụ otu ebe, onye njikwa ngwaọrụ Linux udev na-enye naanị nodes maka ngwaọrụ ndị dị na sistemụ. Ọ bụ ezie na devfs na-enye ọrụ yiri nke ahụ, Greg Kroah-Hartman kwuru ọtụtụ ihe kpatara ya maka ịhọrọ udev karịa devfs:[2]

  • udev na-akwado aha ngwaọrụ na-adịgide adịgide, nke na-adabereghị, dịka ọmụmaatụ, usoro a na-etinye ngwaọrụ n'ime usoro ahụ. Ntọala udev ndabara na-enye aha na-adịgide adịgide maka ngwaọrụ nchekwa. A na-amata diski ike ọ bụla site na id faịlụ ya pụrụ iche, aha diski na ọnọdụ anụ ahụ na ngwaike ọ jikọtara ya.
  • udev na-arụ ọrụ kpamkpam na oghere onye ọrụ, n'adịghị ka oghere kernel nke devfs. Otu nsonaazụ bụ na udev wepụrụ iwu aha site na kernel ma nwee ike ịme mmemme ọ bụla iji mepụta aha maka ngwaọrụ ahụ site na njirimara ngwaọrụ ahụ, tupu e mepụta node ahụ; n'ebe ahụ, usoro ahụ dum nwekwara ike ịkwụsị ma ọ na-agba ọsọ na obere ihe.

Udev, n'ozuzu ya, kewara n'akụkụ atọ:

  • Library libudev nke na-enye ohere ịnweta ozi ngwaọrụ; a na-etinye ya n'ime usoro ngwanrọ 183.[3]
  • Oghere onye ọrụ daemon nke na-elekọta /dev.
  • na-ahụ maka iwu nchịkwa maka nchọpụta.

Usoro ahụ na-enweta oku site na kernel site na netlink socket. Nsụgharị ndị gara aga jiri hotplug, na-agbakwunye njikọ na /etc/hotplug.d/default na ebumnuche a.

e webatara udev na sistemụ 183[3]

udev bụ onye njikwa ngwaọrụ na-agba ọsọ dị ka daemon na usoro Linux ma na-ege ntị (site na netlink socket) na ihe omume kernel na-eziga ma ọ bụrụ na a malitere ngwaọrụ ọhụrụ ma ọ bụ wepụ ngwaọrụ na usoro ahụ. Ngwongwo udev na-abịa na usoro iwu dị ukwuu nke kwekọrọ na ụkpụrụ mbupụ nke ihe omume ahụ na ihe onwunwe nke ngwaọrụ ahụ achọpụtara. Iwu kwekọrọ na ya ga-enwe ike ịkpọ aha ma mepụta eriri ngwaọrụ ma na-agba ọsọ mmemme a haziri ahazi iji guzobe ma hazie ngwaọrụ ahụ.

Iwu udev nwere ike dabara na njirimara dịka subsystem kernel, aha ngwaọrụ kernel, ọnọdụ anụ ahụ nke ngwaọrụ ahụ, ma ọ bụ njirimara dịka nọmba usoro ngwaọrụ ahụ. Iwu nwekwara ike ịrịọ ozi site na mmemme mpụga iji kpọọ ngwaọrụ aha ma ọ bụ kọwaa aha omenala nke ga-abụ otu mgbe niile, n'agbanyeghị usoro ahụ chọpụtara ngwaọrụ.

N'oge gara aga, ụzọ a na-ejikarị udev na usoro Linux bụ ikwe ka o zipụ ihe omume site na oghere na HAL, nke ga-eme ihe ndị ọzọ gbasara ngwaọrụ. Dịka ọmụmaatụ, HAL ga-agwa ngwanrọ ndị ọzọ na-agba ọsọ na sistemụ ahụ na ngwaike ọhụrụ ahụ abịala site n'inye ozi mgbasa ozi na usoro D-Bus IPC na usoro niile nwere mmasị. N'ụzọ dị otú a, desktọọpụ ndị dị ka GNOME ma ọ bụ K Desktop Environment 3 nwere ike ịmalite ihe nchọgharị faịlụ iji nyochaa usoro faịlụ nke draịvụ USB flash ọhụrụ na kaadị SD.

Ka ọ na-erule n'etiti afọ 2011, ọtụtụ nkesa Linux na gburugburu desktọọpụ KDE, GNOME na Xfce[4], n'etiti ndị ọzọ, emeela ka HAL ghara ịdị mma.[5] A na-etinye ọrụ nke a na-etinye na HAL n'ime udev n'onwe ya, ma ọ bụ kwaga na ngwanrọ dị iche iche dị ka udisks na upower.

  • udev na-enye ohere dị ala na osisi ngwaọrụ linux. Na-enye ohere mmemme ịgụpụta ngwaọrụ na ihe onwunwe ha ma nweta ọkwa mgbe ngwaọrụ na-abịa ma na-aga.
  • dbus bụ usoro iji nye ohere ka mmemme na ibe ha kwurịta okwu, n'enweghị nsogbu, nke a pụrụ ịdabere na ya, yana interface mmemme dị elu.
  • udisks (nke a maara n'oge gara aga dị ka DeviceKit-disks) bụ daemon nke na-anọdụ n'elu libudev na interface kernel ndị ọzọ ma na-enye interface dị elu na ngwaọrụ nchekwa ma nwee ike ịnweta site na dbus na ngwa.
  • upower (nke a maara n'oge gara aga dị ka DeviceKit-ike) bụ daemon nke na-anọdụ n'elu libudev na interface kernel ndị ọzọ ma na-enye interface dị elu maka njikwa ike ma nwee ike ịnweta site na dbus maka ngwa.
  • NetworkManager bụ daemon nke na-anọdụ n'elu libudev na interface kernel ndị ọzọ (na daemons ndị ọzọ) ma na-enye interface dị elu maka nhazi na nhazi netwọk ma nwee ike ịnweta site na dbus na ngwa.[6]

udev na-enweta ozi site na kernel, ma na-enyefe ha na subsystem daemons dị ka Network Manager. Ngwa na-agwa Network Manager okwu na D-Bus.

HAL bụ ihe mgbe ochie ma jiri ya mee ihe naanị site na koodu ihe nketa. Ubuntu 10.04 buuru na-enweghị HAL. Na mbido, a haziri DeviceKit ọhụrụ iji dochie akụkụ ụfọdụ nke HAL, mana na Machị 2009, e wepụrụ DeviceKit iji gbakwunye otu koodu ahụ na udev dị ka ngwugwu: udev-extras, na ọrụ ụfọdụ agafeela ugbu a na udev kwesịrị ekwesị.

Akụkọ ihe mere eme

[dezie | dezie ebe o si]

e webatara udev na Linux 2.5. Linux kernel version 2.6.13 webatara ma ọ bụ melite ụdị ọhụrụ nke interface uevent. Usoro na-eji ụdị ọhụrụ nke u agaghị amalite na kernels karịrị 2.6.13 ọ gwụla ma e nwere nkwarụ udev ma jiri ndekọ ọdịnala /dev maka ịnweta ngwaọrụ.   N'afọ 2012, ọrụ Gentoo Linux mepụtara fork nke sistemd's udev codebase iji zere ịdabere na usoro sistemd. A na-akpọ fork a na-enweta eudev ma ọ na-eme ka ọrụ udev dị na-enweghị sistemụ. Ebumnuche ekwupụtara nke ọrụ ahụ bụ iji mee ka eudev ghara ịnwe onwe ya na nkesa Linux ọ bụla ma ọ bụ usoro init.[7] Ọrụ Gentoo na-akọwa eudev dị ka ndị a:[8]   Na Mee 29, 2014, e wepụrụ nkwado maka ntinye ngwa ngwa site na udev site na systemd, ebe ọ bụ na e kpebiri na ọ bụ ọrụ kernel ibudata ngwa ngwa.[9] Ụbọchị abụọ ka e mesịrị, Lennart Poettering tụrụ aro ka e yigharịa patch a ruo mgbe udev malitere iji kdbus mee ihe; n'oge ahụ, atụmatụ ahụ bụ ịgbanwe udev iji kdbus dị ka usoro ozi dị n'okpuru, na iwepụ ụgbọ njem netlink dabeere na onye ọrụ.[10]

Ndị dere ya

[dezie | dezie ebe o si]

Greg Kroah-Hartman na Kay Sievers mepụtara udev, site na enyemaka dị ukwuu site na Dan Stekloff, na ndị ọzọ.

Ihe odide

[dezie | dezie ebe o si]
  1. Marti. Are top Linux developers losing the will to code? (en-GB). ComputerworldUK. Retrieved on 2016-06-19.
  2. Greg Kroah-Hartman. udev and devfs - The final word (Plain text). Archived from the original on 2011-07-09. Retrieved on 2008-01-24.
  3. 3.0 3.1 systemd/systemd. GitHub. Retrieved on 2016-08-21. Kpọpụta njehie: Invalid <ref> tag; name ":0" defined multiple times with different content
  4. Thunar-volman and the deprecation of HAL in Xfce (2010-01-17). Archived from the original on 2017-12-26. Retrieved on 2017-12-25.
  5. HALRemoval (2011-06-28). Retrieved on 2011-09-13.
  6. Lennart Poettering (2010-04-25). Relationship between udev, hal, Dbus and DeviceKit?.
  7. gentoo/eudev – README.md. GitHub. Retrieved on 2017-12-25.
  8. Gentoo Linux Projects – Gentoo eudev project. Archived from the original on 2015-09-04. Retrieved on 2017-12-25.
  9. [systemd-devel [PATCH] Drop the udev firmware loader] (2014-05-29).
  10. [systemd-devel [PATCH] Drop the udev firmware loader] (2014-05-31).

Njikọ mpụga

[dezie | dezie ebe o si]

 

  • Official website

Templeeti:Linux kernel