LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   raspberry pi kernel (https://www.linuxquestions.org/questions/slackware-arm-108/raspberry-pi-kernel-4175692667/)

rasp 03-26-2021 04:28 AM

raspberry pi kernel
 
not 100% slackware-arm, but since I like compiling the kernel myself:
in the default config btrfs and configs (/proc/config.gz) are built as modules.
I want to have / on a btrfs, if I change both from M to * (builtin), no modules are built,
but there's no /proc/config.gz and a btrfs partition is a "unknown filesystem".
Any idea why these are not working, when compiled into the kernel ?
(pi 4b/4gig)

regards
-rasp

mralk3 03-28-2021 07:56 AM

Are you certain all of module dependencies are built in? Checking out modinfo it seems there are more deps:

Code:

[root@fourb ~]# modinfo btrfs
filename:      /lib/modules/5.10.25-v7l-sarpi4/kernel/fs/btrfs/btrfs.ko
softdep:        pre: blake2b-256
softdep:        pre: sha256
softdep:        pre: xxhash64
softdep:        pre: crc32c
license:        GPL
alias:          devname:btrfs-control
alias:          char-major-10-234
alias:          fs-btrfs
srcversion:    162E1F9C0DFCC812FBA5DFF
depends:        zstd_compress,raid6_pq,xor
intree:        Y
name:          btrfs
vermagic:      5.10.25-v7l-sarpi4 SMP mod_unload modversions ARMv7 p2v8

If you attach your kernel configuration, I can take a look too.

Edit: On my Pi 4 I do see a /proc/config.gz. Did you use the sarpi kernel sources to build your kernel? Are you running 14.2 or -current?

For example, scroll down a bit and you will find the kernel source. Try rebuilding with that.

https://sarpi.penthux.net/index.php?...etarmv7current

rasp 03-28-2021 02:38 PM

1 Attachment(s)
[QUOTE=mralk3;6234986]Are you certain all of module dependencies are built in? Checking out modinfo it seems there are more deps:

Code:


depends:        zstd_compress,raid6_pq,xor
intree:        Y
name:          btrfs
vermagic:      5.10.25-v7l-sarpi4 SMP mod_unload modversions ARMv7 p2v8

you may have a point here.
my config attached.
I'm on -current, kernel source and original config from https://github.com/raspberrypi/linux
I just changed btrfs and config to y

(yes they're at 25, or something now....)
(config has a txt extension...)

mralk3 03-28-2021 06:26 PM

Are you certain you made a btrfs file system when you formatted the disk?
Did you point your /boot/cmdline.txt to the right partition?
Did you change the kernel file name when you installed it?
Did you tell your /boot/config.txt about the kernel file name?

I do not plan on installing a BTRFS root on my Pi 4. I need more information to help you.

rasp 03-29-2021 03:24 AM

Quote:

Originally Posted by mralk3 (Post 6235101)
Are you certain you made a btrfs file system when you formatted the disk?

I do not plan on installing a BTRFS root on my Pi 4. I need more information to help you.


I didn't change the cmdline.txt and used the standard kernel7l.img name.
rootfs is still a ext4.
BUT, my 4TB /data disk definitely is a btrfs which Icannot mount with the compiled kernel.
(as btrfs is "unkown")
with the original kernel (btrfs as a module) my mounts look like this :
/dev/sdb2 on / type ext4 (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1826948k,nr_inodes=97603,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=32768k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,relatime,size=8192k,mode=755)
cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
blkio on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
devices on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
freezer on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
net_cls on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
perf_event on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
net_prio on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
pids on /sys/fs/cgroup/pids type cgroup (rw,relatime,pids)
/dev/sdb1 on /boot type vfat (rw,relatime,fmask=0133,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/sda1 on /usr/local/flux/storage type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=32768k,mode=755)
nfsd on /proc/fs/nfs type nfsd (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)





I think I might miss some other kernel option, although I never had this problem on x86_64.....
also configs depends on nothing, still it doesn't show /proc/config.gz when changed from M to Y....

Exaga 03-29-2021 07:39 AM

Quote:

Originally Posted by rasp (Post 6235173)
I think I might miss some other kernel option, although I never had this problem on x86_64.....
also configs depends on nothing, still it doesn't show /proc/config.gz when changed from M to Y....

Did you take a look at the kernel .config 'CONFIG_BTRFS_FS=' setting and https://github.com/torvalds/linux/bl.../btrfs/Kconfig at all?

Sorry if this is wasting your time.

rasp 03-30-2021 02:05 AM

Quote:

Originally Posted by Exaga (Post 6235203)
Did you take a look at the kernel .config 'CONFIG_BTRFS_FS=' setting and https://github.com/torvalds/linux/bl.../btrfs/Kconfig at all?

Sorry if this is wasting your time.

yes, of course. This is the same text as in selecting [help] in menuconfig, it selects some other Options.
Still no clue why neither configs nor btrfs are working when selected as Y (builtin).
But, both are working if selected as M (module).

-rasp

Exaga 03-30-2021 04:30 AM

Quote:

Originally Posted by rasp (Post 6235415)
yes, of course. This is the same text as in selecting [help] in menuconfig, it selects some other Options.

I wouldn't be referring it if it wasn't. :p

Quote:

Originally Posted by rasp (Post 6235415)
Still no clue why neither configs nor btrfs are working when selected as Y (builtin).
But, both are working if selected as M (module).

Sometimes drivers and their settings need to be part of the kernel, other times loaded as modules, in order to work as expected. The 'make menuconfig' method is often helpful with offering advice in this respect, but not always. As I'm sure you're already aware.

I've never played around with btrfs because ext4 just works flawlessly with Slackware ARM. So, I'm unable to be of much help I'm afraid. If you manage to find a solution to your issue(s) be sure to document and share the knowledge. :D

mralk3 03-30-2021 05:36 AM

I believe in this case btrfs does need to be built into the kernel due to it being used as the rootfs.

With brief web searches I did find: https://wiki.gentoo.org/wiki/Btrfs/System_Root_Guide

That guide is likely your best bet, but you will have to "translate" the process to Slackware. I don't think you will need a ramdisk on ARM if you build it all into the kernel.

rasp 03-30-2021 05:59 AM

Quote:

Originally Posted by mralk3 (Post 6235445)
That guide is likely your best bet, but you will have to "translate" the process to Slackware. I don't think you will need a ramdisk on ARM if you build it all into the kernel.

Well, exactly this is what I'm trying yo do, that's why I selected Y _not_ M, just like in the x86 slackware kernel
it says: CONFIG_BTRFS_FS=y

it simply doesn't work...

As I said before I'm aware that I hav to compile things _into_ the kernel to make them work.
the raspberry stock kernel also has CONFIG_EXT4_FS=y set.
this "magically" works, whereas CONFIG_BTRFS_FS=y _doesn't_
See the problem now ?
I cannot clarify further than that there's simply no logic in one Option working whilst 2 others don't
( CONFIG_IKCONFIG=y, CONFIG_BTRFS_FS=y) both _only_ work set to m not to y.....

(and yes, I've been over at the raspberry forums and await "approval by a moderator" for four weeks now....)

just thought that slackware users generally "dig deeper", that's why I'm here :-)

-rasp

Exaga 03-30-2021 07:05 AM

Quote:

Originally Posted by rasp (Post 6235451)
As I said before I'm aware that I hav to compile things _into_ the kernel to make them work.
the raspberry stock kernel also has CONFIG_EXT4_FS=y set.
this "magically" works, whereas CONFIG_BTRFS_FS=y _doesn't_
See the problem now ?

just thought that slackware users generally "dig deeper", that's why I'm here :-)

Whatever works is usually the best option. If you're trying to make btrfs work for a particular and/or specific reason (i.e. without it is a show-stopper) then it's understandable. Otherwise, I'd advise users to go with what "magically" works to save them time, effort, and ward off any headaches in the process.

rasp 03-30-2021 10:30 AM

1 Attachment(s)
Quote:

Originally Posted by Exaga (Post 6235465)
Otherwise, I'd advise users to go with what "magically" works to save them time, effort, and ward off any headaches in the process.

I had some issues with orphaned inodes on ext4. (which was a completely different issue, as the ssd occasionally seems to draw too much current :-P )
but anywayMagic is for religions not for computers.
and now for something completely different.....

eureka !
btrfs depends on xor, xor in turn wants xor-neon, which somehow does not get compiled, unless CONFIG_ASYNC_XOR is selected, which in turn is not selectable in menuconfig.
dragging in raid and raid6 (which is also used by btrfs, but not activated) solves that.
attached is a config which makes btrfs usable without loading a module..... (if anybody cares :-) )
oh, and /proc/config.gz magically appears as well after these changes.
(also connected to xor-neon I guess)

{edit}
so this looks like a menuconfig issue, (not) solving dependencies on ARM
{/edit}

mralk3 03-30-2021 04:17 PM

When I was refereing to dependencies, I meant the "dependencies" part of the modinfo command. I've been pretty busy, so I may have misread. I assumed you had seen the output of modinfo and enabled those modules, which btrfs depends on.

For example, in my first response:
Code:

depends:        zstd_compress,raid6_pq,xor
Glad you figured it out!

rasp 03-31-2021 01:35 AM

Quote:

Originally Posted by mralk3 (Post 6235650)
Code:

depends:        zstd_compress,raid6_pq,xor

hmm, the help text in menuconfig says it would select RAID6_PQ[Y], but for some reason I had to enable raid456[Y] explicitly.....

-rasp


All times are GMT -5. The time now is 12:53 AM.