Hi, I have installed FreeBSD on an amd64 laptop, and the only issue with it is an apparently long-standing bug in support for eMMC storage (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211705#c3), which I would like to investigate. But I'm stuck even getting an unmodified but locally compiled GENERIC amd64 kernel to work.
I'm experienced with kernel development but less so with FreeBSD specifically. I'm not totally new though; I've successfully cross-compiled and booted some modified 14-CURRENT RISC-V kernels (working on driver support for a board) from a different computer.
I figured I should start work on this issue by making sure I could locally build and boot an amd64 kernel without any modifications, before actually trying any changes, but so far each kernel I have built locally fails to mount the ZFS root, with
I get a mountroot prompt, but trying to specify the root again manually (or the default boot environment) has the same issue.
I happen to be using a zfs boot environment for testing, after creating it, mounting it, and using DESTDIR with installkernel to put the new kernel in place. It's not specific to this particular boot environment: I've also just done installkernel into the default and observed the same failure (then rolled back). I can see zfs.ko being loaded right at the start of the boot process (it's the first module loaded) so I know that's not getting lost.
Using a stock kernel works fine, no issues with zfs root (except the waking-from-sleep bug I want to eventually investigate).
The main thing I can think of is that I may not have the right version of the source tree, but I'm not sure what other versions to try. I neglected to install source when I first set up this system. bsdconfig just hangs when I try to use that to get the source, so I manually cloned the git repo. I'm running 13.2 (with the latest patches). I've tried doing this with the 13.2-STABLE branch and the releng/13.2 branch, but both yield the same results after clean builds. Can anyone point me in the right direction here, whether it's finding a more correct source branch for my system, or something I may be overlooking in the build process that might cause this problem? I mentioned earlier that I've been working with 14-CURRENT on another project, but that source is on a different machine, there are no 13.2 vs 14 mix-ups here.[/code]
I'm experienced with kernel development but less so with FreeBSD specifically. I'm not totally new though; I've successfully cross-compiled and booted some modified 14-CURRENT RISC-V kernels (working on driver support for a board) from a different computer.
I figured I should start work on this issue by making sure I could locally build and boot an amd64 kernel without any modifications, before actually trying any changes, but so far each kernel I have built locally fails to mount the ZFS root, with
Code:
Trying to mount root from zfs:zroot/ROOT/testkern []...
Mounting from zfs:zroot/ROOT/testkern failed with error 2: unknown file system
I happen to be using a zfs boot environment for testing, after creating it, mounting it, and using DESTDIR with installkernel to put the new kernel in place. It's not specific to this particular boot environment: I've also just done installkernel into the default and observed the same failure (then rolled back). I can see zfs.ko being loaded right at the start of the boot process (it's the first module loaded) so I know that's not getting lost.
Using a stock kernel works fine, no issues with zfs root (except the waking-from-sleep bug I want to eventually investigate).
The main thing I can think of is that I may not have the right version of the source tree, but I'm not sure what other versions to try. I neglected to install source when I first set up this system. bsdconfig just hangs when I try to use that to get the source, so I manually cloned the git repo. I'm running 13.2 (with the latest patches). I've tried doing this with the 13.2-STABLE branch and the releng/13.2 branch, but both yield the same results after clean builds. Can anyone point me in the right direction here, whether it's finding a more correct source branch for my system, or something I may be overlooking in the build process that might cause this problem? I mentioned earlier that I've been working with 14-CURRENT on another project, but that source is on a different machine, there are no 13.2 vs 14 mix-ups here.[/code]