mdev change no longer supporting v2.6.2x kernels by using /sys/dev

Denys Vlasenko vda.linux at googlemail.com
Wed Apr 5 09:56:30 UTC 2017


On Fri, Mar 24, 2017 at 11:25 AM, Richard Moore <rich at richud.com> wrote:
>>>>>>> "Richard" == Richard Moore <rich at richud.com> writes:
>>
>>  > Hi,
>>  > Would it be possible to please make the recent mdev change in v1.26 an
>>  > option?
>>
>>  > * mdev (mdev: create devices from /sys/dev) commit 20a3262 (Sep 7,
>> 2016)
>>
>>  > I am stuck with a v2.6.2x kernel and I am sure other people must be too
>>  > who have no /sys/dev support in their kernel ?
>>
>> /sys/dev support got added in 2.6.27-rc1 (July 2008), E.G. ~9 years ago:
>>
>> commit e105b8bfc769b0545b6f0f395179d1e43cbee822
>> Author: Dan Williams <dan.j.williams at intel.com>
>> Date:   Mon Apr 21 10:51:07 2008 -0700
>>
>>     sysfs: add /sys/dev/{char,block} to lookup sysfs path by major:minor
>>
>>     Why?:
>>     There are occasions where userspace would like to access sysfs
>>     attributes for a device but it may not know how sysfs has named the
>>     device or the path.  For example what is the sysfs path for
>>     /dev/disk/by-id/ata-ST3160827AS_5MT004CK?  With this change a call to
>>     stat(2) returns the major:minor then userspace can see that
>>     /sys/dev/block/8:32 links to /sys/block/sdc.
>>
>>     What are the alternatives?:
>>     1/ Add an ioctl to return the path: Doable, but sysfs is meant to
>> reduce
>>        the need to proliferate ioctl interfaces into the kernel, so this
>>        seems counter productive.
>>
>>     2/ Use udev to create these symlinks: Also doable, but it adds a
>>        udev dependency to utilities that might be running in a limited
>>        environment like an initramfs.
>>
>>     3/ Do a full-tree search of sysfs.
>>
>> Does it really make sense to mix such an ancient kernel with a modern
>> busybox? Why not just backport this kernel commit?
>>...

> Thank you for the reply and suggestion, I tried backporting above but too
> many code changes needed for my comfort level.
> (I have ended up just reversing the mdev patch, which worked ok if anyone
> needs to do it)
>
> I have stepped through many revisions of Busybox but this was the first
> one that left me with a bricked router (firmware) so I thought I really
> should post.
>
> Could there at least be a small warning on the main busybox.net page to
> make people aware to look at the changelog, perhaps something like ;
>
> 'Please note full support for 2.6.2x and older kernels is now being
> deprecated from 1.26 onwards'

I added a note on the website with the link to the patch.


More information about the busybox mailing list