How to find missing ppp commands? - linux

I made my own linux distribution with buildroot. In "make menuconfig" and "make linux-menuconfig" I checked all options related to "ppp" and "pppd". Unfortunately, after building my distribution I can't use the commands "pon", "poff", "plog" and probably others. The system cannot see them. I looked and they are not in "/ usr / bin" or "/ usr / sbin". What could be causing this? I found out somewhere that these are debian-only commands, but how can I enable the pppd daemon?

ppd, pppd, pon, and etc are userland applications you need to install them using buildroot. So far you have enabled support in the kernel for ppp but you have not installed the actual application that manages the ppp connections which is pppd
If build root doesn't already have a package for ppp/pppd, you can make a recipe to do that. The official website is: https://ppp.samba.org/
pon, poff, and plog can be found in the scripts directory of the sources code.

Related

missing Linux /sys/kernel/debug/dynamic_debug , how to enable?

tl;dr I want to use Linux "Dynamic Debug" but the path /sys/kernel/debug/dynamic_debug/ is not found.
I want to use the "Dynamic Debug" feature of Linux to enable debug messages for a particular kernel module (wireguard). To enable a kernel module kernel debug messages requires writing instructions to file /sys/kernel/debug/dynamic_debug/control,
echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control
But there is no directory /sys/kernel/debug/dynamic_debug/ and thus no file /sys/kernel/debug/dynamic_debug/control.
The debugfs is mounted to /sys/kernel/debug/ (as is typical) and it has other files (so it's not like debugfs is mounted unexpectedly). Nor does alternative path /proc/dynamic_debug/ exist.
Running Linux kernel 5.15.
Enabling "Dynamic Debug" requires setting Linux compilation option CONFIG_DYNAMIC_DEBUG. In my case, I'm using Raspbian, and that project decided not to enable CONFIG_DYNAMIC_DEBUG during Linux builds.
I could "roll my own" (compile Raspbian with CONFIG_DYNAMIC_DEBUG) but that's a lot of work and likely will upset the apt package management.
🙁

Adding kernel module to Debian

I have imx6-quad and Debian Jessie installed on it. Here is the full info about (uname -a):
Linux linaro-alip 4.1.15-g5599520 #1 SMP PREEMPT Sun Jan 8 13:03:20 IST 2017 armv7l GNU/Linux
I'm trying to run tunslip application for CC1350 Launchpad, but there is no kernel module "tun" in my OS. When I run command modprobe tun, I given an error:
modprobe: FATAL: Module tun not found.
At this point, I don't know how to install tun module to my Debian. I even don't know where to start. Is it possible to add tun module to running operation system or should I compile whole kernel from scratch? If I can add kernel module, how could I add to running OS?
Any help is too precious for me.
So, to sum up the discussion in the comments in case someone else will come here with the same problem:
Unfortunately, the precompiled kernel image provided by Variscite here doesn't come with tun support at all. Neither in modules nor compiled into the kernel.
If you want tun support, you will have to compile the kernel in your own. Sources can be found here on github.
Previous Answer:
Since I'm not allowed to comment yet, please take this less as an answer but more as a suggestion where to look for a solution.
What does the following command give you?
cat /boot/config-4.1.15-g5599520 | grep CONFIG_TUN
It should say CONFIG_TUN=m. If it doesn't, it may be that your kernel already supports tun devices.
Have you tried searching for tunmodules in /lib/modules? If not, run
find /lib/modules/ -name '*tun.ko*'
and let us know what it gives you.
as you are building your kernel. there are a couple of methods one is to compile the module separately and to install it on the existing image. The other is to create the tun module along with the kernel and the sdcard image creation will take care of your module.
TO build tun module. use menuconfig from the kernel folder. search for something matching to CONFIG_TUN if its is a module change its value to m. Rebuild and create the sdcard again. This is the easy way.
You can also craete the module separately and then bring the module to your filesystem but that can be more error prone.

XRUSB raspberry pi

I'm working with a raspberry pi connected with xrusb to a controller using python.I use make file to Compile and install the common usb serial driver module and it works fine. After reboot i have problem. The driver is lost. I have to install the module again using this
modprobe usbserial
insmod ./xr_usb_serial_common.ko
Any idea?
Now my answer might be off because of the way you say "install the driver". I bet the make script most likely just loaded the driver just like you did via modprobe.
In order to get the module to be loaded at boot time, you need to tell udev what to load/do during bootup. And tell the kernel to load your driver.. Otherwise it assumes you don't want it to be loaded at boot time.
Either you can do a automatic module handling via:
#nano /etc/modules-load.d/usbserial.conf
usbserial
or, you can specify options:
#nano /etc/modprobe.d/usbserial.conf
options usbserial parameter_name=parameter_value
Here's some documentation on how this works:
http://man7.org/linux/man-pages/man5/modules-load.d.5.html
https://wiki.archlinux.org/index.php/kernel_modules
(Even if you're not running Arch on your RPi, they still have one of the best documentation websites for Linux out there. User friendly, in depth etc. So apply the information there to your Distribution, they should be very much the same this day and age)
I found maybe a temporary solution so i can finish my project and look for the best way later.
I make a script to run after reboot to load the driver.
use:
sudo crontab -e
then go to the bottom and write
#reboot bash /your/path/script/script.sh
`

How to disable the autoloading of a specific module in Linux

I compiled my Linux kernel according to the Linux Device Driver Chapter 4: Debugging Techniques. After I loaded my first hello world module and then checked the output by dmesg, however, all I can see is evbug: ........
I know I can turn off evbug's output by execute sudo rmmod evbug. But, obviously, it is inconvenient to execute this command after each reboot.
How could I disable this module's autoloading? I just want to load it manually when I need it.
You need to blacklist the module. For debian systems see https://wiki.debian.org/KernelModuleBlacklisting. For redhat systems see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/rescuemode_drivers-blacklisting.html

Disable snmpd log in BSD?

I can disable SNMP log using snmpd.options in RHEL or CentOS, but I can't find any solution in BSDs. Does anyone knows how to disable it or change the log location? The SNMP message is fillng up my /var directory always, and it's annoying.
You can configure the options to pass to daemons, but how you can configure it is depends on BSDs (much like it differ between Linux distributions). So, you better refer to documentation.
For FreeBSD 9.x + net-snmp installed via ports, you can configure such in /usr/local/etc/rc.conf as variable snmpd_flags. Check /usr/local/etc/rc.d/snmpd how it is used.

Resources