[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howtos:misc:kernel_development [2023/05/12 13:02 (UTC)] – created lockywolfhowtos:misc:kernel_development [2023/05/12 13:06 (UTC)] (current) – [Sources] lockywolf
Line 1: Line 1:
 ====== Using Slackware for Linux Kernel development ====== ====== Using Slackware for Linux Kernel development ======
  
-So, hello from Lockywolf.+So, hello from [[user:lockywolf]].
  
 At some point I needed to hack some network-related kernel code. Since it is not 1993, not 2003, and not even 2013, I, naturally, wanted to do "fast development using QEMU", instead of painstakingly booting two machines with new kernels (it's network code, after all, so there needs to be a network of at least two machines). At some point I needed to hack some network-related kernel code. Since it is not 1993, not 2003, and not even 2013, I, naturally, wanted to do "fast development using QEMU", instead of painstakingly booting two machines with new kernels (it's network code, after all, so there needs to be a network of at least two machines).
Line 11: Line 11:
 Before you start, you should decide for yourself the following things: Before you start, you should decide for yourself the following things:
  
-1. where you keep the kernel tree (called /home/username/path/to/net-next-tree/net-next/ on this page) +  - where you keep the kernel tree (called /home/username/path/to/net-next-tree/net-next/ on this page) 
-2. where you keep iproute2 tools (called /home/username/path/to/iproute2-tree/iproute2/ on this page) +  where you keep iproute2 tools (called /home/username/path/to/iproute2-tree/iproute2/ on this page) 
-3. what userspace software you need to test your kernel (called /whatever/userspace/software/you/need here) +  what userspace software you need to test your kernel (called /whatever/userspace/software/you/need here) 
-4. which module you want to test (called mymodule here (whithout .ko !)) +  which module you want to test (called mymodule here (whithout .ko !)) 
-5. which packages you want to have in your VMs+  which packages you want to have in your VMs
  
 Below I am using the following packages from stock slackware 15.0 (kept in /var/cache/packages/): Below I am using the following packages from stock slackware 15.0 (kept in /var/cache/packages/):
  
-1. openssh-9.2p1-x86_64-1_slack15.0.txz +  - openssh-9.2p1-x86_64-1_slack15.0.txz 
-2. openssl-solibs-1.1.1t-x86_64-1_slack15.0.txz +  openssl-solibs-1.1.1t-x86_64-1_slack15.0.txz 
-3. libevent-2.1.12-x86_64-3.txz +  libevent-2.1.12-x86_64-3.txz 
-4. ncurses-6.3-x86_64-1.txz +  ncurses-6.3-x86_64-1.txz 
-5. tmux-3.2a-x86_64-1.txz +  tmux-3.2a-x86_64-1.txz 
-6. libmnl-1.0.4-x86_64-5.txz +  libmnl-1.0.4-x86_64-5.txz 
-7. iproute2-5.16.0-x86_64-1.txz +  iproute2-5.16.0-x86_64-1.txz 
-8. screen-4.9.0-x86_64-1.txz +  screen-4.9.0-x86_64-1.txz 
-9. libnl3-3.5.0-x86_64-3.txz +  libnl3-3.5.0-x86_64-3.txz 
-10. tcpdump-4.99.1-x86_64-1.txz+  tcpdump-4.99.1-x86_64-1.txz
  
  
 And the following packages built from SlackBuilds.org (kept in /var/sbopkg-built-packages): And the following packages built from SlackBuilds.org (kept in /var/sbopkg-built-packages):
  
-1. dropbear-2022.83-x86_64-1_SBo.tgz +  - dropbear-2022.83-x86_64-1_SBo.tgz 
-2. lksctp-tools-1.0.17-x86_64-3_SBo.tgz +  lksctp-tools-1.0.17-x86_64-3_SBo.tgz 
-3. iperf3-3.12-x86_64-2_SBo.tgz +  iperf3-3.12-x86_64-2_SBo.tgz 
-4. wireshark-4.0.4-x86_64-1_SBo.tgz +  wireshark-4.0.4-x86_64-1_SBo.tgz 
-5. libpcap-1.10.3-x86_64-1.txz +  libpcap-1.10.3-x86_64-1.txz 
-6. socat-noopenssl-1.7.4.4-x86_64-1.txz +  socat-noopenssl-1.7.4.4-x86_64-1.txz 
-7. netsniff-ng-0.6.8-x86_64-1_SBo.tgz +  netsniff-ng-0.6.8-x86_64-1_SBo.tgz 
-8. jq-1.6-x86_64-2_SBo.tgz+  jq-1.6-x86_64-2_SBo.tgz
  
 The VMs do not have any fake HDD, they are booting into their initrds, which are created using Slackware's standard mkinitrd. The VMs do not have any fake HDD, they are booting into their initrds, which are created using Slackware's standard mkinitrd.
Line 222: Line 222:
 ====== Sources ====== ====== Sources ======
  
-Kernel development with qemu [[https://blog.elastocloud.org/2015/06/rapid-linux-kernel-devtest-with-qemu.html]] +  - Kernel development with qemu [[https://blog.elastocloud.org/2015/06/rapid-linux-kernel-devtest-with-qemu.html]] 
-Using tap devices for communicating with virtual machines [[https://blog.elastocloud.org/2015/07/qemukvm-bridged-network-with-tap.html]]+  Using tap devices for communicating with virtual machines [[https://blog.elastocloud.org/2015/07/qemukvm-bridged-network-with-tap.html]]
  
  
  
 howtos:misc:kernel_development ()