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
cbec120b
Kaydet (Commit)
cbec120b
authored
Şub 28, 2021
tarafından
Your Name
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
systemd-udev support added
üst
31134ec5
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
53 additions
and
19 deletions
+53
-19
02-glibc.sh
src/addons/02-glibc.sh
+2
-2
04-udev.sh
src/addons/04-udev.sh
+4
-1
50-debug.sh
src/addons/50-debug.sh
+6
-0
98-busybox.sh
src/addons/98-busybox.sh
+0
-1
build-functions.sh
src/build-functions.sh
+13
-1
00-clear.sh
src/scripts/00-clear.sh
+2
-2
01-dmesg.sh
src/scripts/01-dmesg.sh
+2
-0
02-modules.sh
src/scripts/02-modules.sh
+19
-8
03-fsck.sh
src/scripts/03-fsck.sh
+5
-1
96-fsmount.sh
src/scripts/96-fsmount.sh
+0
-1
99-fsswitch.sh
src/scripts/99-fsswitch.sh
+0
-2
No files found.
src/addons/02-glibc.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -26,9 +26,9 @@ copy_binary(){
install
$i
${
WORKDIR
}
/lib/
$lib
||
true
done
msg
"Install"
"
$(
which
$bins
)
"
install
$(
which
$bins
)
${
WORKDIR
}
/xbin/
$
bins
install
$(
which
$bins
)
${
WORKDIR
}
/xbin/
$
(
basename
$bins
)
else
inf
"Not found"
"
$bins
"
warn
"Not found"
"
$bins
"
fi
done
}
src/addons/04-udev.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -17,7 +17,10 @@ if [ "$skipglibc" != "true" ] && [ "$skipudev" != "true" ] ; then
done
touch
${
WORKDIR
}
/etc/modprobe.d/modprobe.conf
#copy binaries
copy_binary udevadm udevd tmpfiles
copy_binary udevadm udevd tmpfiles /lib/systemd/systemd-udevd
if
[
-f
${
WORKDIR
}
/xbin/systemd-udevd
]
&&
[
!
-f
${
WORKDIR
}
/xbin/udevd
]
;
then
ln
-s
systemd-udevd
${
WORKDIR
}
/xbin/udevd
fi
else
warn
"udev will not install"
fi
src/addons/50-debug.sh
0 → 100644
Dosyayı görüntüle @
cbec120b
if
[
"
$debug
"
==
"true"
]
;
then
copy_binary nano ldd strace
ln
-s
/busybox
${
WORKDIR
}
/xbin/bash
fi
echo
"/busybox ash"
>
${
WORKDIR
}
/autorun/00-pause.sh
\ No newline at end of file
src/addons/98-busybox.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -3,7 +3,6 @@ if [ -f "/lib/initrd/busybox" ] ; then
else
bb
=
"
$(
which busybox
)
"
fi
msg
"
$bb
"
if
[
-f
"
$bb
"
]
;
then
set
+e
bbdyn
=
$(
LANG
=
"C"
ldd
$bb
|
grep
"not a dynamic executable"
)
...
...
src/build-functions.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -60,7 +60,19 @@ parse_args(){
generate_workdir
(){
msg
"Creating workdir"
"
$WORKDIR
"
rm
-f
$WORKDIR
mkdir
-p
$WORKDIR
mkdir
-p
$WORKDIR
/autorun
mkdir
-p
$WORKDIR
/lib
# Debian support (multiarch not supported)
ln
-s
lib
$WORKDIR
/lib23
ln
-s
lib
$WORKDIR
/lib64
ln
-s
../
$WORKDIR
/lib/
$(
uname
-m
)
-linux-gnu
# create fake /usr directory
mkdir
-p
$WORKDIR
/usr
ln
-s
../lib
$WORKDIR
/usr/lib
ln
-s
../lib
$WORKDIR
/usr/lib32
ln
-s
../lib
$WORKDIR
/usr/lib64
ln
-s
../bin
$WORKDIR
/usr/bin
ln
-s
../xbin
$WORKDIR
/usr/xbin
cp
-prf
$src
/scripts
$WORKDIR
/scripts
for
file
in
functions vars common init
do
...
...
src/scripts/00-clear.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -4,5 +4,4 @@ msg "Starting" "GNU/Linux"
if
[
!
-n
$quiet
]
;
then
exec
>
/dev/null
exec
2>/dev/null
fi
fi
\ No newline at end of file
src/scripts/01-dmesg.sh
Dosyayı görüntüle @
cbec120b
inf
"Starting"
"dmesg"
/busybox dmesg
-n
1
||
true
[
-n
$debug
]
||
dmesg
-w
&
\ No newline at end of file
src/scripts/02-modules.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -2,24 +2,34 @@
msg
"Loading filesystem drivers"
ls
/lib/modules/
*
/fs/ |
sed
"s/^/modprobe /g"
|
sed
"s/
$/
&/g"
>
/fs
sh /fs &>/dev/null
msg
"Loading crypto drivers"
ls
/lib/modules/
*
/crypto/ |
sed
"s/^/modprobe /g"
|
sed
"s/
$/
&/g"
>
/crypto
sh /crypto &>/dev/null
load_modules
(){
debug
"Listing kernel modules"
cd
/lib/modules/
*
find crypto lib block ata md firewire scsi
\
message pcmcia virtio host storage
\
-type
f 2> /dev/null |
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
}
if
[
-x
/xbin/udevd
-a
-x
/xbin/udevadm
]
&&
[
"
$noudev
"
!=
"true"
]
;
then
msg
"Triggering udev"
mdev
-s
{
/xbin/udevd
--daemon
/xbin/udevadm trigger
--action
=
add
--type
=
subsystems
/xbin/udevadm trigger
--action
=
add
--type
=
devices
/xbin/udevadm trigger
--action
=
change
--type
=
devices
/xbin/udevadm settle
}
||
load_modules
vgscan
--mknodes
--ignorelockingfailure
>
/dev/null 2>&1
vgchange
--sysinit
--activate
y
>
/dev/null 2>&1
else
warn
"Eudev not found or disabled"
debug
"Listing kernel modules"
cd
/lib/modules/
*
find crypto lib block ata md firewire scsi
\
message pcmcia virtio host storage
\
-type
f 2> /dev/null |
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
fi
load_modules
fi
\ No newline at end of file
src/scripts/03-fsck.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -4,7 +4,11 @@ if [ -f /xbin/fsck ] ; then
inf
"Running"
"fsck"
touch
/etc/mtab
touch
/etc/fstab
/xbin/fsck.
$rootfstype
"
$root
"
&>/dev/null
if
[
"
${
fsck_force
}
"
==
"true"
]
;
then
/xbin/fsck
"
$root
"
-y
-f
&>/dev/null
else
/xbin/fsck
"
$root
"
-y
&>/dev/null
fi
else
warn
"fsck not found"
fi
src/scripts/96-fsmount.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -152,7 +152,6 @@ msg "Waiting for $device"
umount
-lf
$tmp
}
if
[
"
$boot
"
==
"live"
]
;
then
live_boot
||
fallback_shell
msg
"Booting from live-media"
"(
$root
)"
...
...
src/scripts/99-fsswitch.sh
Dosyayı görüntüle @
cbec120b
...
...
@@ -13,8 +13,6 @@ if [ -f /rootfs/$subdir/etc/initrd.local ]; then
inf
"Running local initrd scripts"
.
/rootfs/
$subdir
/etc/initrd.local
||
true
fi
msg
"Checking init"
[
-f
"/rootfs/
$subdir
/
$init
"
]
||
fallback_shell
debug
"Switching root"
exec env
-i
\
"TERM=
$TERM
"
\
...
...
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