Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
initrd
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
initrd
Commits
bd2fbbc0
Kaydet (Commit)
bd2fbbc0
authored
May 26, 2020
tarafından
Ali Rıza KESKİN
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
udev adaptation
üst
7cf7f5e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
11 deletions
+45
-11
04-udev.sh
src/addons/04-udev.sh
+26
-0
02-modules.sh
src/scripts/02-modules.sh
+13
-6
03-fsck.sh
src/scripts/03-fsck.sh
+1
-1
50-networking.sh
src/scripts/50-networking.sh
+5
-4
No files found.
src/addons/04-udev.sh
0 → 100755
Dosyayı görüntüle @
bd2fbbc0
if
[
"
$skipglibc
"
!=
"true"
]
&&
[
"
$skipudev
"
!=
"true"
]
;
then
#generate module stuff
cp
${
MODDIR
}
/modules.
{
builtin
,order
}
${
WORKDIR
}
/
${
MODDIR
}
depmod
-b
${
WORKDIR
}
${
KERNELVER
}
#creating dirs
mkdir
-p
${
WORKDIR
}
/etc/udev/
mkdir
-p
${
WORKDIR
}
/etc/modprobe.d/
# copy rules and files
if
[
-d
/lib/udev
]
;
then
cp
-a
/lib/udev
${
WORKDIR
}
/lib
fi
if
[
-d
/lib/systemd
]
;
then
cp
-a
/lib/systemd
${
WORKDIR
}
/lib
fi
if
[
-f
/etc/udev/udev.conf
]
;
then
cp
/etc/udev/udev.conf
${
WORKDIR
}
/etc/udev/udev.conf
fi
for
file
in
$(
find /etc/udev/rules.d/
-type
f
)
;
do
cp
$file
$WDIR
/etc/udev/rules.d
done
touch
${
WORKDIR
}
/etc/modprobe.d/modprobe.conf
#copy binaries
copy_binary udevadm udevd
else
warn
"udev will not install"
fi
src/scripts/02-modules.sh
Dosyayı görüntüle @
bd2fbbc0
#!/busybox sh
debug
"Listing kernel modules"
find /lib/modules/ |
sed
"s/.*
\/
//g"
|
grep
"
\.
ko$"
|
sed
"s/.ko
$/
&/g"
|
sed
"s/^/modprobe /g"
>
/load_modules.sh
msg
"Trying to load kernel modules"
sh /load_modules.sh &>/dev/null
msg
"Waiting for kernel modules"
sleep
3
if
[
-x
/xbin/udevd
-a
-x
/xbin/udevadm
]
;
then
msg
"Triggering udev"
/xbin/udevd
--daemon
/xbin/udevadm trigger
--action
=
add
/xbin/udevadm settle
--timeout
=
10
else
debug
"Listing kernel modules"
find /lib/modules/ |
sed
"s/.*
\/
//g"
|
grep
"
\.
ko"
|
sed
"s/.ko.*/ &/g"
|
sed
"s/^/modprobe /g"
>
/load_modules.sh
msg
"Trying to load kernel modules"
sh /load_modules.sh &>/dev/null
msg
"Waiting for kernel modules"
sleep
2
fi
src/scripts/03-fsck.sh
Dosyayı görüntüle @
bd2fbbc0
...
...
@@ -4,7 +4,7 @@ if [ -f /xbin/fsck ] ; then
inf
"Running"
"fsck"
touch
/etc/mtab
touch
/etc/fstab
/xbin/fsck.
$rootfstype
-f
-y
"
$root
"
||
true
/xbin/fsck.
$rootfstype
"
$root
"
&>/dev/null
else
warn
"fsck not found"
fi
src/scripts/50-networking.sh
Dosyayı görüntüle @
bd2fbbc0
#Thanks for mll: https://github.com/ivandavidov/minimal
msg
"Trying to connect network"
for
DEVICE
in
/sys/class/net/
*
;
do
inf
"Found network device"
"
${
DEVICE
##*/
}
"
||
true
ip
link set
${
DEVICE
##*/
}
up
||
true
[
${
DEVICE
##*/
}
!=
lo
]
&&
udhcpc
-b
-i
${
DEVICE
##*/
}
-s
/etc/05_rc.dhcp
||
true
for
DEVICE
in
/sys/class/net/
*
;
do
inf
"Network device"
$DEVICE
ip
link set
${
DEVICE
##*/
}
up
||
true
[
${
DEVICE
##*/
}
!=
lo
]
&&
udhcpc
-b
-i
${
DEVICE
##*/
}
-s
/etc/05_rc.dhcp
||
true
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment