Commit 7f77e0b3 authored by Tuan M. Hoang's avatar Tuan M. Hoang
Browse files

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
parent 9e1b4727
......@@ -48,7 +48,9 @@ CONF_FILES := mkinitfs.conf \
features.d/xfs.files \
features.d/xfs.modules \
features.d/zfs.files \
features.d/zfs.modules
features.d/zfs.modules \
features.d/qeth.modules \
features.d/dasd_mod.modules
SCRIPTS := mkinitfs bootchartd initramfs-init
IN_FILES := $(addsuffix .in,$(SCRIPTS))
......@@ -71,6 +73,9 @@ SED_REPLACE := -e 's:@VERSION@:$(FULL_VERSION):g' \
-e 's:@datadir@:$(datadir):g'
DEFAULT_FEATURES ?= ata base cdrom ext2 ext4 keymap kms mmc raid scsi usb virtio
ifeq ($(shell uname -m), s390x)
DEFAULT_FEATURES += qeth dasd_mod
endif
all: $(SBIN_FILES) $(SCRIPTS) $(CONF_FILES)
......
kernel/drivers/s390/block/dasd*
kernel/drivers/s390/net/qeth*
......@@ -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"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment