warped
Posts: 5
Joined: Tue Jun 12, 2018 8:30 am

why no /proc/sys/kernel/hotplug ?

Thu Jun 14, 2018 7:49 pm

Hi,

I'm compiling my custom kernel for aarch64 and can't get

Code: Select all

/proc/sys/kernel/hotplug
I looked over archlinux arm aarch64 in my rpi3 and there is also no /proc/sys/kernel/hotplug
Looking on kernel config (https://archlinuxarm.org/packages/aarch ... les/config) I see hotplug options are enabled (IMHO).

Can somebody hint me why kernel is not exposing no /proc/sys/kernel/hotplug with above config?
Alternatively - what options in kernel config are responsible for

Code: Select all

/proc/sys/kernel/hotplug
?

thx in advance!

asavah
Posts: 346
Joined: Thu Aug 14, 2014 12:49 am

Re: why no /proc/sys/kernel/hotplug ?

Thu Jun 14, 2018 10:00 pm

Why do you need it?
In modern systems udev handles hotplug , there is no need echoing binary path into /proc/sys/kernel/hotplug ,
unless you are trying to make an embedded os with eg. busybox.

CONFIG_HOTPLUG is on by default and there is no way to turn it off in modern kernels, I don't remember when they changed this, it was a few years ago.

Make sure you have /proc and /sys mounted.

Code: Select all

mount -t proc proc /proc
mount -t sysfs sysfs /sys
In my aarch64 build it's there.

Code: Select all

[email protected]_64:~# uname -a
Linux rpi3_64 4.14.41-v8 #1 SMP Sun May 20 19:24:13 EEST 2018 aarch64 GNU/Linux

[email protected]_64:~# ls -alh /proc/sys/kernel/hot*
-rw-r--r-- 1 root root 0 Jun 15 00:53 /proc/sys/kernel/hotplug

mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=490444k,nr_inodes=122611,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)


warped
Posts: 5
Joined: Tue Jun 12, 2018 8:30 am

Re: why no /proc/sys/kernel/hotplug ?

Sat Jun 16, 2018 9:45 am

asavah wrote:
Thu Jun 14, 2018 10:00 pm
Why do you need it?
In modern systems udev handles hotplug , there is no need echoing binary path into /proc/sys/kernel/hotplug ,
unless you are trying to make an embedded os with eg. busybox.
exactly. I'm building minimal os as runtime for mythtv app.
asavah wrote:
Thu Jun 14, 2018 10:00 pm
CONFIG_HOTPLUG is on by default and there is no way to turn it off in modern kernels, I don't remember when they changed this, it was a few years ago.

Make sure you have /proc and /sys mounted.

Code: Select all

mount -t proc proc /proc
mount -t sysfs sysfs /sys
For sure I have them.
Interesting is that looking on my kernel config (4.16.13) I can't find at all CONFIG_HOTPLUG
I have following entries:

Code: Select all

CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
CONFIG_HOTPLUG_CPU=y
there is no "CONFIG_HOTPLUG"
asavah wrote:
Thu Jun 14, 2018 10:00 pm
In my aarch64 build it's there.

Code: Select all

[email protected]_64:~# uname -a
Linux rpi3_64 4.14.41-v8 #1 SMP Sun May 20 19:24:13 EEST 2018 aarch64 GNU/Linux

[email protected]_64:~# ls -alh /proc/sys/kernel/hot*
-rw-r--r-- 1 root root 0 Jun 15 00:53 /proc/sys/kernel/hotplug

mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=490444k,nr_inodes=122611,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)

may You pls provide my your kernel config as reference?

asavah
Posts: 346
Joined: Thu Aug 14, 2014 12:49 am

Re: why no /proc/sys/kernel/hotplug ?

Sat Jun 16, 2018 9:54 am

I 've told you already - there is no way to disable CONFIG_HOTPLUG (that WAS the option), they've removed the option, it does not exist any longer.
It's ON. ALWAYS. You don't need to enable it.

https://github.com/raspberrypi/linux/bl ... _defconfig

Try enabling CONFIG_UEVENT_HELPER

Device drivers -> Generic driver options -> Support for uevent helper

Return to “Advanced users”

Who is online

Users browsing this forum: troy06 and 4 guests