In case one want to use usb serial console, we need to pack the usb serial driver into kdump initramfs so that one can see the console output on the usb console.
I only handled ttyUSB0, this is like a hard code, but it should be enough for most cases. Also only install the driver for the ttyUSB0 device.
Tested with adding "console=ttyUSB0" in 2nd kernel commandline. Tested latest F22 kernel, there's CONFIG_USB_SERIAL_CONSOLE=y, kdump work ok.
Signed-off-by: Dave Young dyoung@redhat.com --- dracut-module-setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
--- kexec-tools.orig/dracut-module-setup.sh +++ kexec-tools/dracut-module-setup.sh @@ -626,4 +626,12 @@ installkernel() { [ "$wdt" = "iTCO_wdt" ] && instmods lpc_ich instmods $wdt fi + + if [ -c /dev/ttyUSB0 ]; then + _majmin=$(get_maj_min /dev/ttyUSB0) + + _driver=$(readlink /sys/dev/char/$_majmin/device/driver) + _driver=$(basename $_driver) + instmods $_driver + fi }
On 01/26/15 at 05:41pm, Dave Young wrote:
In case one want to use usb serial console, we need to pack the usb serial driver into kdump initramfs so that one can see the console output on the usb console.
I only handled ttyUSB0, this is like a hard code, but it should be enough for most cases. Also only install the driver for the ttyUSB0 device.
Tested with adding "console=ttyUSB0" in 2nd kernel commandline. Tested latest F22 kernel, there's CONFIG_USB_SERIAL_CONSOLE=y, kdump work ok.
Signed-off-by: Dave Young dyoung@redhat.com
dracut-module-setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
--- kexec-tools.orig/dracut-module-setup.sh +++ kexec-tools/dracut-module-setup.sh @@ -626,4 +626,12 @@ installkernel() { [ "$wdt" = "iTCO_wdt" ] && instmods lpc_ich instmods $wdt fi
Hi Vivek,
I remember you raised this issue. Could you ack this patch if it's OK to you? Then I can merge it.
Thanks Baoquan
- if [ -c /dev/ttyUSB0 ]; then
_majmin=$(get_maj_min /dev/ttyUSB0)
- _driver=$(readlink /sys/dev/char/$_majmin/device/driver)
- _driver=$(basename $_driver)
instmods $_driver
- fi
} _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
Vivek, ping.
Bao would like you to review the patch, any objections or comments?
On 02/25/15 at 03:48pm, Baoquan He wrote:
On 01/26/15 at 05:41pm, Dave Young wrote:
In case one want to use usb serial console, we need to pack the usb serial driver into kdump initramfs so that one can see the console output on the usb console.
I only handled ttyUSB0, this is like a hard code, but it should be enough for most cases. Also only install the driver for the ttyUSB0 device.
Tested with adding "console=ttyUSB0" in 2nd kernel commandline. Tested latest F22 kernel, there's CONFIG_USB_SERIAL_CONSOLE=y, kdump work ok.
Signed-off-by: Dave Young dyoung@redhat.com
dracut-module-setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
--- kexec-tools.orig/dracut-module-setup.sh +++ kexec-tools/dracut-module-setup.sh @@ -626,4 +626,12 @@ installkernel() { [ "$wdt" = "iTCO_wdt" ] && instmods lpc_ich instmods $wdt fi
Hi Vivek,
I remember you raised this issue. Could you ack this patch if it's OK to you? Then I can merge it.
Thanks Baoquan
- if [ -c /dev/ttyUSB0 ]; then
_majmin=$(get_maj_min /dev/ttyUSB0)
- _driver=$(readlink /sys/dev/char/$_majmin/device/driver)
- _driver=$(basename $_driver)
instmods $_driver
- fi
} _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
Hi Dave,
You once sent a patch to install usb serial driver for ttyUSB0 in dracut-module-setup:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/...
Actually, we can achieve this without any patch by a delicate configuration.
One can use extra_modules configuration entry in /etc/kdump.conf to add USB serial drivers, e.g:
extra_modules pl2303
And enable the console by making sure 'console=ttyUSB0' is contained in kdump kernel cmdline. You may want to take a loot at KDUMP_COMMANDLINE_APPEND in /etc/sysconf/kdump.conf if current cmdline includes no 'console=ttyUSB0'.
I suppose we should let the configuration do the job. What do you think?
All the best! Freeman
Hi, Freeman
The patch just auto detect and install drivers.
But I think I'm fine with using extra_modules in kdump.conf though.
----- Original Message ----- From: "Freeman Zhang" zhezhang@redhat.com To: "Dave Young" dyoung@redhat.com Cc: kexec@lists.fedoraproject.org, "Baoquan He" bhe@redhat.com Sent: Friday, May 27, 2016 3:20:21 PM Subject: Re: [PATCH RFC] module-setup.sh: install usb serial driver for ttyUSB0
Hi Dave,
You once sent a patch to install usb serial driver for ttyUSB0 in dracut-module-setup:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/...
Actually, we can achieve this without any patch by a delicate configuration.
One can use extra_modules configuration entry in /etc/kdump.conf to add USB serial drivers, e.g:
extra_modules pl2303
And enable the console by making sure 'console=ttyUSB0' is contained in kdump kernel cmdline. You may want to take a loot at KDUMP_COMMANDLINE_APPEND in /etc/sysconf/kdump.conf if current cmdline includes no 'console=ttyUSB0'.
I suppose we should let the configuration do the job. What do you think?
All the best! Freeman _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/admin/lists/kexec@lists.fedoraproject.org