aboutsummaryrefslogtreecommitdiffstats
path: root/initramfs-init.in
diff options
context:
space:
mode:
authorTuan M. Hoang <tmhoang@flatglobe.org>2018-05-14 10:14:29 -0500
committerTuan M. Hoang <tmhoang@flatglobe.org>2018-05-14 10:14:29 -0500
commit7f77e0b383330265be27f551b2e384a6a8648afa (patch)
tree8ab162ec9306e993e8db1b079a97b89cd44a66cf /initramfs-init.in
parent9e1b472701fa1785989f6757243a3d81e97944f2 (diff)
downloadmkinitfs-7f77e0b383330265be27f551b2e384a6a8648afa.tar.bz2
mkinitfs-7f77e0b383330265be27f551b2e384a6a8648afa.tar.xz
initramfs-init: add disk and network detection on s390x
- Allow including dasd and qeth modules when building initramfs - Add detection for dasd and qeth devices from cmdline in init
Diffstat (limited to 'initramfs-init.in')
-rwxr-xr-xinitramfs-init.in21
1 files changed, 20 insertions, 1 deletions
diff --git a/initramfs-init.in b/initramfs-init.in
index bf2d9bd..933c8c1 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -269,7 +269,7 @@ set -- $(cat /proc/cmdline)
myopts="alpine_dev autodetect autoraid chart cryptroot cryptdm cryptheader cryptoffset
cryptdiscards debug_init dma init_args keep_apk_new modules ovl_dev pkgs quiet
root_size root usbdelay ip alpine_repo apkovl alpine_start splash blacklist
- overlaytmpfs rootfstype rootflags nbd resume"
+ overlaytmpfs rootfstype rootflags nbd resume s390x_net dasd"
for opt; do
case "$opt" in
@@ -345,6 +345,25 @@ mount -t devpts -o gid=5,mode=0620,noexec,nosuid devpts /dev/pts
[ -d /dev/shm ] || mkdir /dev/shm
mount -t tmpfs -o nodev,nosuid,noexec shm /dev/shm
+if [ -n "$dasd" ]; then
+ for mod in dasd_mod dasd_eckd_mod dasd_fba_mod; do
+ modprobe $mod
+ done
+ for _dasd in $(echo "$dasd" | tr ',' ' ' ); do
+ echo 1 > /sys/bus/ccw/devices/"${_dasd%%:*}"/online
+ done
+fi
+
+if [ "${s390x_net%%,*}" = "qeth_l2" ]; then
+ for mod in qeth qeth_l2 qeth_l3; do
+ modprobe $mod
+ done
+ _channel="${s390x_net#*,}"
+ echo "$_channel" > /sys/bus/ccwgroup/drivers/qeth/group
+ echo 1 > /sys/bus/ccwgroup/drivers/qeth/"${_channel%%,*}"/layer2
+ echo 1 > /sys/bus/ccwgroup/drivers/qeth/"${_channel%%,*}"/online
+fi
+
# load available drivers to get access to modloop media
ebegin "Loading boot drivers"