View previous topic :: View next topic |
Author |
Message |
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Mon Mar 07, 2022 8:41 am Post subject: |
|
|
Enabling CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT in your kernel removes the need to do this. True on any architecture, not just m68k |
|
Back to top |
|
|
fthain n00b
Joined: 10 Apr 2020 Posts: 6
|
Posted: Mon Mar 07, 2022 11:41 pm Post subject: |
|
|
Chewi wrote: | Enabling CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT in your kernel removes the need to do this. True on any architecture, not just m68k |
Yes, I was aware of that. I am also aware of the kernel command line option devtmpfs.mount=1 which is preferable IMO.
Unpacking the stage3 tar file is a given, so why not make better use of it? A few bytes of dev files would remove the need to have a special kernel configuration requirement. It would permit the use of existing vmlinux files, a shorter installation manual, less chance for user error, one less problem report, one less forum discussion, time saved for you and me. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22730
|
Posted: Tue Mar 08, 2022 3:55 pm Post subject: |
|
|
fthain wrote: | I am also aware of the kernel command line option devtmpfs.mount=1 which is preferable IMO. | Why is this preferable? The Kconfig option ensures the kernel will mount devtmpfs unless told not to, which seems safer than expecting the user to explicitly instruct the kernel to perform the mount. fthain wrote: | Unpacking the stage3 tar file is a given, so why not make better use of it? A few bytes of dev files would remove the need to have a special kernel configuration requirement. It would permit the use of existing vmlinux files, a shorter installation manual, less chance for user error, one less problem report, one less forum discussion, time saved for you and me. | I disagree that CONFIG_DEVTMPFS_MOUNT is a special configuration requirement. It appears to be =y in every defconfig for every architecture, as is CONFIG_DEVTMPFS. CONFIG_DEVTMPFS_MOUNT only changes the default value of a global, so it adds no code of its own to systems that already have CONFIG_DEVTMPFS=y. How did you get a vmlinux that did not have DEVTMPFS enabled? |
|
Back to top |
|
|
fthain n00b
Joined: 10 Apr 2020 Posts: 6
|
Posted: Tue Mar 08, 2022 10:37 pm Post subject: |
|
|
Quote: | The Kconfig option ensures the kernel will mount devtmpfs unless told not to, which seems safer than expecting the user to explicitly instruct the kernel to perform the mount. |
No command line option would be needed for a Gentoo stage3. The point was to make use of functionality already part of tar, btrfs, extfs, reiserfs, xfs etc. and thereby populate a few files in /dev at the cost of a few hundred bytes in the stage3.
Quote: | I disagree that CONFIG_DEVTMPFS_MOUNT is a special configuration requirement. It appears to be =y in every defconfig for every architecture, as is CONFIG_DEVTMPFS. |
Take a look at drivers/base/Kconfig and you'll see that the default is not Y. The usual disposition of kernel developers is that stuff gets disabled by default unless there is a reason to enable it. The defconfigs have many purposes, including build testing for code coverage. You should not assume that they are best for end users.
Quote: | How did you get a vmlinux that did not have DEVTMPFS enabled? |
Actually, CONFIG_DEVTMPFS is enabled here. That's why the Gentoo init scripts are able to mount /dev. (They do that by default!)
This is the same kernel config that I always use. I built the vmlinux and published it for the benefit of Debian, LFS and Gentoo users, among others, same as I've been doing since 2016.
https://sourceforge.net/projects/linux-mac68k/files/
That build is intended to be flexible. So it doesn't presume to mount any filesystems. If it did take that step it would have to guess at the correct mount options. Are you aware of this patch, which will appear in v5.17?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=28f0c335dd4a1a4b44b3e6c6402825a93132e1a4
I believe that the command line option devtmpfs.mount is ideal because it makes the vmlinux binary more flexible. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Tue Mar 08, 2022 11:49 pm Post subject: |
|
|
I'll spare myself from arguing over this as I didn't write Catalyst and I'm not responsible for building the regular stages anyway. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|