Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2019-11-07,master
>---------------------------------------------------------------
commit 0c00ee543f2b01bc0fde4b722e494e2d65c1c671
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun Nov 3 17:10:50 2019 +0000
doc: open-mesh/Kernel_hacking_Debian_image: use hvc0 for booting debian virtual machine
>---------------------------------------------------------------
0c00ee543f2b01bc0fde4b722e494e2d65c1c671
open-mesh/Kernel_hacking_Debian_image.textile | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/open-mesh/Kernel_hacking_Debian_image.textile b/open-mesh/Kernel_hacking_Debian_image.textile
index 323d65b..3b7b078 100644
--- a/open-mesh/Kernel_hacking_Debian_image.textile
+++ b/open-mesh/Kernel_hacking_Debian_image.textile
@@ -27,7 +27,7 @@ sudo debootstrap buster debian
sudo chroot debian apt update
sudo chroot debian apt install --no-install-recommends build-essential vim openssh-server less \
pkg-config libnl-3-dev libnl-genl-3-dev libcap-dev tcpdump \
- trace-cmd flex bison libelf-dev libdw-dev binutils-dev libunwind-dev libssl-dev libslang2-dev liblzma-dev
+ trace-cmd flex bison libelf-dev libdw-dev binutils-dev libunwind-dev libssl-dev libslang2-dev liblzma-dev libperl-dev
sudo mkdir debian/root/.ssh/
ssh-add -L | sudo tee debian/root/.ssh/authorized_keys
@@ -60,8 +60,8 @@ sudo sed -i 's/^root:[^:]*:/root::/' debian/etc/shadow
# sudo sed -i 's/^UsePAM.*/UsePAM no/' debian/etc/ssh/sshd_config
## optionally: enable autologin for user root
-#sudo mkdir debian/etc/systemd/system/serial-getty(a)ttyS0.service.d/
-#sudo sh -c 'cat > debian/etc/systemd/system/serial-getty(a)ttyS0.service.d/autologin.conf << EOF
+#sudo mkdir debian/etc/systemd/system/serial-getty(a)hvc0.service.d/
+#sudo sh -c 'cat > debian/etc/systemd/system/serial-getty(a)hvc0.service.d/autologin.conf << EOF
#[Service]
#ExecStart=
#ExecStart=-/sbin/agetty --autologin root -s %I 115200,38400,9600 vt102
@@ -164,8 +164,6 @@ CONFIG_BLK_DEV=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_TTY=y
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_HW_RANDOM=y
CONFIG_VHOST_RING=y
CONFIG_GENERIC_ALLOCATOR=y
@@ -335,7 +333,8 @@ The BASE_IMG is of course no longer the same because a new image "debian.img" wa
BASE_IMG=debian.img
BOOTARGS+=("-bios" "qboot/bios.bin")
BOOTARGS+=("-kernel" "linux-next/arch/x86/boot/bzImage")
-BOOTARGS+=("-append" "root=/dev/vda rw console=ttyS0,115200,8n1 nokaslr tsc=reliable no_timer_check noreplace-smp rootfstype=ext4 rcupdate.rcu_expedited=1 reboot=t pci=lastbus=0")
+BOOTARGS+=("-append" "root=/dev/vda rw console=hvc0 nokaslr tsc=reliable no_timer_check noreplace-smp rootfstype=ext4 rcupdate.rcu_expedited=1 reboot=t pci=lastbus=0 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1")
+BOOTARGS+=("-device" "virtconsole,chardev=charconsole0,id=console0")
</code></pre>
It is also recommended to use <code>linux-next/vmlinux</code> instead of <code>bzImage</code> with qemu 4.0.0 (or later)