Following the advice of drm-kmod pkg leads to unbootable system

Yet in /boot/kernel i have:
radeon.ko and drm.ko
These can only come from compiling the kernel I think.
Because normally i delete /boot/kernel before make installkernel.
 
I think radeon needs the following options in the kernel.
COMPAT_FREEBSD32 # Compatible with i386 binaries
COMPAT_FREEBSD11 # Compatible with FreeBSD11
COMPAT_FREEBSD12 # Compatible with FreeBSD12
 
Even with that, I fail to see how something that is clearly part of graphics/drm-kmod would be included in FreeBSD's kernel sources (src.txz). These options, best I understand, will allow binary compatibility between the kernel and radeonkms.ko, but they will not pull the radeonkms.ko file in - that is done by the drm-kmod port. My theory on this is that
  1. graphics/drm-kmod is installed, pulling in radeonkms.ko, which initially gets installed to /boot/modules/ directory.
  2. Apparently enabling compatibility in the kernel's makefile (as described by Alain De Vos ) means checking the /boot/modules/ directory for compatible modules.
  3. When compiling the kernel (after steps 1 and 2 are done): If a module is indeed compatible, it gets copied over to /boot/kernel/ directory, because it's safe to do that (no memory leaks or other illegal address pointers).
Looks like a kernel dev may need to weigh in and confirm or deny my theory.
 
Code:
% uname -KrU
14.0-CURRENT 1400024 1400024
% pkg provides radeonkms.ko
Name    : drm-devel-kmod-5.4.92.g20210526
Desc    : DRM modules for the linuxkpi-based KMS components (development version)
Repo    : FreeBSD
Filename: boot/modules/radeonkms.ko

Name    : drm-current-kmod-5.4.92.g20210526
Desc    : DRM modules for the linuxkpi-based KMS components
Repo    : FreeBSD
Filename: boot/modules/radeonkms.ko
%

In my case, the module is installed when I make installkernel …

Code:
% pkg query '%o %v %R' drm-devel-kmod
graphics/drm-devel-kmod 5.4.92.g20210526 unknown-repository
% grep drm-devel-kmod /etc/src.conf
PORTS_MODULES= graphics/drm-devel-kmod graphics/gpu-firmware-kmod
%

Yet in /boot/kernel i have:
radeon.ko and drm.ko
These can only come from compiling the kernel I think.

They're not present for me.

Does a sorted view offer a clue?

ls -hlrt /boot/kernel/
 
Like I said... I only compiled the installed src.txz that was available to me. No ports or packages even bootstrapped. I'm flabbergasted how people miss that, it's a key point.
 
ls -hlrt output,
Code:
...
-r-xr-xr-x  1 root  wheel    94K Jun 27 19:20 xz.ko
-r-xr-xr-x  1 root  wheel    37M Jun 27 19:20 zfs.ko
-r-xr-xr-x  1 root  wheel   296K Jun 27 19:20 zlib.ko
-r-xr-xr-x  1 root  wheel   1.5M Jun 27 19:20 linuxkpi_gplv2.ko
-r-xr-xr-x  1 root  wheel   1.9M Jun 27 19:20 ttm.ko
-r-xr-xr-x  1 root  wheel    14M Jun 27 19:20 drm.ko
-r-xr-xr-x  1 root  wheel    99M Jun 27 19:20 amdgpu.ko
-r-xr-xr-x  1 root  wheel    33M Jun 27 19:20 radeonkms.ko
-r-xr-xr-x  1 root  wheel    51M Jun 27 19:20 i915kms.ko
-rw-r--r--  1 root  wheel   254K Jun 27 19:20 linker.hints
The end
HOST:x: /boot/kernel >
 
Src.conf
Code:
WITH_BHYVE=yes
WITH_CCACHE_BUILD=yes
WITH_GPIO=yes
WITH_LIB32=yes
WITH_LLVM_TARGET_X86=yes
WITH_NIS=yes
WITH_NTP=yes
WITH_SVN=yes
WITH_ZFS=yes
make.conf
Code:
DISABLE_LICENSES=yes
MAKE_JOBS_UNSAFE=yes
BATCH=yes
CPUTYPE?=core-avx-i
MAKE_JOBS_NUMBER=20
CCACHE_DIR=/ccache
WITH_CCACHE_BUILD=yes
WITHOUT_MANCOMPRESS=YES
uname -a
Code:
FreeBSD  mail.ala
13.0-RELEASE-p2 FreeBSD
13.0-RELEASE-p2 #0
releng/13.0-n244746-b74cdf1ecea: Sat Jul  3 22:00:35 CEST 2021
After a test i confirm radeon is an integer part of the 13 kernel .
 
Yeah, based on that, I see that radeonkms.ko is actually blacklisted in /boot/loader.conf, as well as amdgpu.ko. But neither is present in freebsd-src (the stuff that gets packaged into src.txz that I install and compile before any packages and ports are present on the system). Besides,
-r-xr-xr-x 1 root wheel 99M Jun 27 19:20 amdgpu.ko
-r-xr-xr-x 1 root wheel 33M Jun 27 19:20 radeonkms.ko
With sizes like that, small wonder they're available only as a separate port (graphics/drm-kmod).
 
… sizes like that, …

Made me curious.

Code:
root@mowa219-gjp4-8570p:~ # zfs get compression copperbowl/ROOT
NAME             PROPERTY     VALUE           SOURCE
copperbowl/ROOT  compression  zstd            inherited from copperbowl
root@mowa219-gjp4-8570p:~ # du -h /boot/modules/radeonkms.ko
677K    /boot/modules/radeonkms.ko
root@mowa219-gjp4-8570p:~ # ls -hl /boot/modules/radeonkms.ko
-r-xr-xr-x  1 root  wheel   2.3M Jun 26 04:51 /boot/modules/radeonkms.ko
root@mowa219-gjp4-8570p:~ # file /boot/modules/radeonkms.ko
/boot/modules/radeonkms.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), BuildID[sha1]=9902e3db94ffdf3a4745c254d39cf0b1e1b5e3ab, not stripped
root@mowa219-gjp4-8570p:~ # du -h /boot/modules
 27M    /boot/modules
root@mowa219-gjp4-8570p:~ # ls -hlS /boot/modules
total 27059
-r-xr-xr-x  1 root  wheel   5.2M Jun 26 04:51 amdgpu.ko
-rwxr-xr-x  1 root  wheel   5.0M Jun 26 08:08 openzfs.ko
-r-xr-xr-x  1 root  wheel   2.3M Jun 26 04:51 i915kms.ko
-r-xr-xr-x  1 root  wheel   2.3M Jun 26 04:51 radeonkms.ko
-r-xr-xr-x  1 root  wheel   886K Jun 26 04:51 drm.ko
-r-xr-xr-x  1 root  wheel   475K Jun 15 11:27 vboxdrv.ko
-r-xr-xr-x  1 root  wheel   459K Jun 26 04:52 amdgpu_renoir_vcn_bin.ko
-r-xr-xr-x  1 root  wheel   396K Jun 26 04:51 amdgpu_navi10_vcn_bin.ko
-r-xr-xr-x  1 root  wheel   396K Jun 26 04:51 amdgpu_navi12_vcn_bin.ko
-r-xr-xr-x  1 root  wheel   396K Jun 26 04:51 amdgpu_navi14_vcn_bin.ko
-r-xr-xr-x  1 root  wheel   387K Jun 26 04:52 amdgpu_vega20_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   384K Jun 26 04:52 amdgpu_vega10_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   384K Jun 26 04:52 amdgpu_vega12_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   379K Jun 26 04:51 amdgpu_polaris10_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   379K Jun 26 04:51 amdgpu_polaris11_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   379K Jun 26 04:51 amdgpu_polaris12_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   379K Jun 26 04:52 amdgpu_vegam_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   367K Jun 26 04:51 amdgpu_picasso_vcn_bin.ko
-r-xr-xr-x  1 root  wheel   367K Jun 26 04:51 amdgpu_raven2_vcn_bin.ko
-r-xr-xr-x  1 root  wheel   367K Jun 26 04:52 amdgpu_raven_vcn_bin.ko
-r-xr-xr-x  1 root  wheel   330K Jun 26 04:52 amdgpu_tonga_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   283K Jun 26 04:52 amdgpu_stoney_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   278K Jun 26 04:51 amdgpu_carrizo_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   275K Jun 26 04:51 amdgpu_navi14_mec2_wks_bin.ko
-r-xr-xr-x  1 root  wheel   275K Jun 26 04:51 amdgpu_navi14_mec_wks_bin.ko
-r-xr-xr-x  1 root  wheel   275K Jun 26 04:51 amdgpu_navi10_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   275K Jun 26 04:51 amdgpu_navi12_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   275K Jun 26 04:51 amdgpu_navi14_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   275K Jun 26 04:51 amdgpu_navi10_mec_bin.ko
-r-xr-xr-x  1 root  wheel   275K Jun 26 04:51 amdgpu_navi12_mec_bin.ko
-r-xr-xr-x  1 root  wheel   275K Jun 26 04:51 amdgpu_navi14_mec_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:51 amdgpu_picasso_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:51 amdgpu_picasso_mec_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:51 amdgpu_raven2_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_renoir_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_vega10_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_vega12_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_vega20_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:51 amdgpu_raven2_mec_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_raven_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_renoir_mec_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_vega10_mec_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_vega12_mec_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_vega20_mec_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:52 amdgpu_raven_mec_bin.ko
-r-xr-xr-x  1 root  wheel   274K Jun 26 04:51 amdgpu_navi10_smc_bin.ko
-r-xr-xr-x  1 root  wheel   273K Jun 26 04:51 amdgpu_fiji_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   271K Jun 26 04:51 amdgpu_navi12_smc_bin.ko
-r-xr-xr-x  1 root  wheel   271K Jun 26 04:51 amdgpu_navi14_smc_bin.ko
-r-xr-xr-x  1 root  wheel   270K Jun 26 04:51 amdgpu_navi14_pfp_wks_bin.ko
-r-xr-xr-x  1 root  wheel   270K Jun 26 04:51 amdgpu_navi14_me_wks_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi10_pfp_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi12_pfp_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi14_pfp_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi10_me_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi12_me_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi14_me_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi14_ce_wks_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi10_ce_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi12_ce_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_navi14_ce_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_vega10_acg_smc_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris10_mec2_2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris11_mec2_2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris12_mec2_2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris10_mec_2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris11_mec_2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris12_mec_2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_vega10_smc_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_vega12_smc_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_vega20_smc_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris10_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris11_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris12_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris10_mec_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris11_mec_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_polaris12_mec_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_carrizo_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_tonga_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_vegam_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_fiji_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_tonga_mec_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_vegam_mec_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_carrizo_mec_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:51 amdgpu_fiji_mec_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_stoney_mec_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_topaz_mec2_bin.ko
-r-xr-xr-x  1 root  wheel   269K Jun 26 04:52 amdgpu_topaz_mec_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:51 amdgpu_bonaire_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:51 amdgpu_mullins_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:52 radeon_bonaire_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:52 radeon_mullins_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:51 amdgpu_hawaii_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:51 amdgpu_kabini_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:51 amdgpu_kaveri_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:52 radeon_hawaii_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:52 radeon_kabini_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   240K Jun 26 04:52 radeon_kaveri_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   239K Jun 26 04:52 radeon_BONAIRE_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   227K Jun 26 04:51 amdgpu_pitcairn_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   227K Jun 26 04:52 amdgpu_tahiti_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   227K Jun 26 04:51 amdgpu_oland_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   227K Jun 26 04:52 amdgpu_verde_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   227K Jun 26 04:52 radeon_TAHITI_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   226K Jun 26 04:51 i915_kbl_huc_ver02_00_bin.ko
-r-xr-xr-x  1 root  wheel   212K Jun 26 04:52 radeon_SUMO_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   204K Jun 26 04:51 amdgpu_navi12_sos_bin.ko
-r-xr-xr-x  1 root  wheel   192K Jun 26 04:51 amdgpu_navi10_sos_bin.ko
-r-xr-xr-x  1 root  wheel   192K Jun 26 04:51 amdgpu_navi14_sos_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:51 amdgpu_picasso_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:51 amdgpu_navi10_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:51 amdgpu_navi12_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:51 amdgpu_navi14_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:51 amdgpu_raven2_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:52 amdgpu_renoir_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:52 amdgpu_vega10_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:52 amdgpu_vega12_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:52 amdgpu_vega20_asd_bin.ko
-r-xr-xr-x  1 root  wheel   189K Jun 26 04:51 amdgpu_raven_asd_bin.ko
-r-xr-xr-x  1 root  wheel   184K Jun 26 04:51 amdgpu_carrizo_vce_bin.ko
-r-xr-xr-x  1 root  wheel   183K Jun 26 04:52 amdgpu_vega20_sos_bin.ko
-r-xr-xr-x  1 root  wheel   182K Jun 26 04:52 amdgpu_vega10_vce_bin.ko
-r-xr-xr-x  1 root  wheel   182K Jun 26 04:52 amdgpu_vega12_vce_bin.ko
-r-xr-xr-x  1 root  wheel   182K Jun 26 04:52 amdgpu_vega20_vce_bin.ko
-r-xr-xr-x  1 root  wheel   175K Jun 26 04:51 amdgpu_polaris10_vce_bin.ko
-r-xr-xr-x  1 root  wheel   175K Jun 26 04:51 amdgpu_polaris11_vce_bin.ko
-r-xr-xr-x  1 root  wheel   175K Jun 26 04:51 amdgpu_polaris12_vce_bin.ko
-r-xr-xr-x  1 root  wheel   175K Jun 26 04:52 amdgpu_stoney_vce_bin.ko
-r-xr-xr-x  1 root  wheel   175K Jun 26 04:52 amdgpu_vega10_sos_bin.ko
-r-xr-xr-x  1 root  wheel   175K Jun 26 04:52 amdgpu_vega12_sos_bin.ko
-r-xr-xr-x  1 root  wheel   175K Jun 26 04:52 amdgpu_vegam_vce_bin.ko
-r-xr-xr-x  1 root  wheel   169K Jun 26 04:52 amdgpu_tonga_vce_bin.ko
-r-xr-xr-x  1 root  wheel   169K Jun 26 04:51 amdgpu_fiji_vce_bin.ko
-r-xr-xr-x  1 root  wheel   163K Jun 26 04:51 i915_bxt_huc_ver01_07_bin.ko
-r-xr-xr-x  1 root  wheel   156K Jun 26 04:51 i915_skl_guc_ver9_33_bin.ko
-r-xr-xr-x  1 root  wheel   152K Jun 26 04:51 i915_kbl_guc_ver9_14_bin.ko
-r-xr-xr-x  1 root  wheel   150K Jun 26 04:51 i915_skl_huc_ver01_07_bin.ko
-r-xr-xr-x  1 root  wheel   150K Jun 26 04:51 i915_bxt_guc_ver8_7_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 amdgpu_vegam_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_bonaire_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 radeon_bonaire_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_hawaii_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 radeon_hawaii_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_bonaire_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 radeon_bonaire_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_hawaii_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 radeon_hawaii_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 radeon_BONAIRE_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 radeon_HAWAII_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_polaris12_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 amdgpu_tonga_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_polaris12_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:52 amdgpu_tonga_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_polaris10_k2_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_polaris10_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel   140K Jun 26 04:51 amdgpu_polaris11_k2_smc_bin.ko
-r-xr-xr-x  1 root  wheel   139K Jun 26 04:51 amdgpu_polaris11_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel   139K Jun 26 04:51 amdgpu_polaris10_smc_sk_bin.ko
-r-xr-xr-x  1 root  wheel   139K Jun 26 04:51 amdgpu_polaris11_smc_sk_bin.ko
-r-xr-xr-x  1 root  wheel   139K Jun 26 04:51 amdgpu_polaris10_smc_bin.ko
-r-xr-xr-x  1 root  wheel   139K Jun 26 04:51 amdgpu_polaris11_smc_bin.ko
-r-xr-xr-x  1 root  wheel   139K Jun 26 04:51 amdgpu_fiji_smc_bin.ko
-r-xr-xr-x  1 root  wheel   138K Jun 26 04:51 i915_skl_guc_ver6_1_bin.ko
-r-xr-xr-x  1 root  wheel   128K Jun 26 04:52 amdgpu_renoir_dmcub_bin.ko
-r-xr-xr-x  1 root  wheel   126K Jun 26 04:52 radeon_RV710_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   125K Jun 26 04:52 radeon_CYPRESS_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:51 amdgpu_bonaire_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:51 amdgpu_mullins_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:52 radeon_bonaire_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:52 radeon_mullins_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:51 amdgpu_hawaii_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:51 amdgpu_kabini_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:51 amdgpu_kaveri_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:52 radeon_hawaii_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:52 radeon_kabini_vce_bin.ko
-r-xr-xr-x  1 root  wheel   111K Jun 26 04:52 radeon_kaveri_vce_bin.ko
-r-xr-xr-x  1 root  wheel   109K Jun 26 04:51 ttm.ko
-r-xr-xr-x  1 root  wheel   101K Jun 26 04:52 radeon_RV770_uvd_bin.ko
-r-xr-xr-x  1 root  wheel   100K Jun 26 04:52 radeon_RS780_uvd_bin.ko
-r-xr-xr-x  1 root  wheel    95K Jun 26 04:51 linuxkpi_gplv2.ko
-r-xr-xr-x  1 root  wheel    93K Jun 26 04:52 amdgpu_vega20_ta_bin.ko
-r-xr-xr-x  1 root  wheel    91K Jun 26 04:52 amdgpu_topaz_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    91K Jun 26 04:52 amdgpu_topaz_smc_bin.ko
-r-xr-xr-x  1 root  wheel    89K Jun 26 04:52 radeon_BONAIRE_vce_bin.ko
-r-xr-xr-x  1 root  wheel    85K Jun 26 04:52 radeon_R600_uvd_bin.ko
-rw-r--r--  1 root  wheel    79K Jun 28 09:12 linker.hints
-r-xr-xr-x  1 root  wheel    75K Jun 26 04:52 amdgpu_tahiti_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    75K Jun 26 04:52 radeon_tahiti_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    75K Jun 26 04:52 amdgpu_tahiti_smc_bin.ko
-r-xr-xr-x  1 root  wheel    75K Jun 26 04:52 radeon_tahiti_smc_bin.ko
-r-xr-xr-x  1 root  wheel    75K Jun 26 04:52 amdgpu_verde_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    75K Jun 26 04:52 radeon_verde_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:51 amdgpu_oland_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:52 radeon_oland_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:52 radeon_TAHITI_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:51 amdgpu_oland_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:52 radeon_oland_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:51 amdgpu_banks_k_2_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:51 amdgpu_hainan_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:52 radeon_hainan_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:51 amdgpu_pitcairn_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:52 radeon_pitcairn_k_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:52 amdgpu_verde_smc_bin.ko
-r-xr-xr-x  1 root  wheel    73K Jun 26 04:52 radeon_verde_smc_bin.ko
-r-xr-xr-x  1 root  wheel    72K Jun 26 04:51 amdgpu_hainan_smc_bin.ko
-r-xr-xr-x  1 root  wheel    72K Jun 26 04:52 radeon_hainan_smc_bin.ko
-r-xr-xr-x  1 root  wheel    72K Jun 26 04:51 amdgpu_pitcairn_smc_bin.ko
-r-xr-xr-x  1 root  wheel    72K Jun 26 04:52 radeon_pitcairn_smc_bin.ko
-r-xr-xr-x  1 root  wheel    71K Jun 26 04:52 radeon_VERDE_smc_bin.ko
-r-xr-xr-x  1 root  wheel    71K Jun 26 04:52 radeon_PITCAIRN_smc_bin.ko
-r-xr-xr-x  1 root  wheel    70K Jun 26 04:52 radeon_OLAND_smc_bin.ko
-r-xr-xr-x  1 root  wheel    70K Jun 26 04:52 radeon_HAINAN_smc_bin.ko
-r-xr-xr-x  1 root  wheel    61K Jun 26 04:52 amdgpu_vega20_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    60K Jun 26 04:52 radeon_TAHITI_vce_bin.ko
-r-xr-xr-x  1 root  wheel    55K Jun 26 04:51 amdgpu_navi10_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    55K Jun 26 04:51 amdgpu_navi12_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    54K Jun 26 04:51 amdgpu_navi14_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    51K Jun 26 04:51 amdgpu_raven_kicker_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    51K Jun 26 04:51 amdgpu_picasso_rlc_am4_bin.ko
-r-xr-xr-x  1 root  wheel    50K Jun 26 04:51 amdgpu_picasso_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    50K Jun 26 04:52 amdgpu_raven_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    50K Jun 26 04:52 amdgpu_renoir_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    50K Jun 26 04:51 amdgpu_raven2_rlc_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_navi10_sdma1_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_navi12_sdma1_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_navi14_sdma1_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_navi10_sdma_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_navi12_sdma_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_navi14_sdma_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_picasso_ta_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_raven2_ta_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:52 amdgpu_renoir_ta_bin.ko
-r-xr-xr-x  1 root  wheel    45K Jun 26 04:51 amdgpu_polaris11_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:51 amdgpu_polaris10_k_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:51 amdgpu_polaris11_k_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:51 amdgpu_polaris12_k_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:51 amdgpu_hawaii_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:52 radeon_hawaii_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:51 amdgpu_polaris10_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:51 amdgpu_polaris12_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:52 amdgpu_si58_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:52 radeon_HAWAII_mc2_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:51 amdgpu_bonaire_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:52 radeon_bonaire_mc_bin.ko
-r-xr-xr-x  1 root  wheel    44K Jun 26 04:52 amdgpu_topaz_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 amdgpu_verde_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_verde_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:51 amdgpu_hainan_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_hainan_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:51 amdgpu_oland_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_oland_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_BONAIRE_mc2_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 amdgpu_tahiti_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_tahiti_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_HAWAII_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:51 amdgpu_pitcairn_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_pitcairn_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_VERDE_mc2_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_BONAIRE_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_HAINAN_mc2_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_HAINAN_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_OLAND_mc2_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_OLAND_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 amdgpu_tonga_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_TAHITI_mc2_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_CAYMAN_smc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_PITCAIRN_mc2_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_PITCAIRN_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_TAHITI_mc_bin.ko
-r-xr-xr-x  1 root  wheel    43K Jun 26 04:52 radeon_VERDE_mc_bin.ko
-r-xr-xr-x  1 root  wheel    41K Jun 26 04:51 amdgpu_navi10_ta_bin.ko
-r-xr-xr-x  1 root  wheel    41K Jun 26 04:51 amdgpu_navi12_ta_bin.ko
-r-xr-xr-x  1 root  wheel    41K Jun 26 04:51 amdgpu_navi14_ta_bin.ko
-r-xr-xr-x  1 root  wheel    41K Jun 26 04:52 amdgpu_raven_ta_bin.ko
-r-xr-xr-x  1 root  wheel    40K Jun 26 04:52 amdgpu_vega12_rlc_bin.ko
…
root@mowa219-gjp4-8570p:~ #
 
There is also
/usr/src/tools/tools/drm/radeon/firmwares
Yeah, that's just tools to handle imported firmwares, accoding to the README. This does mean that the firmwares have to be imported first, as in, installed via graphics/drm-kmod. And that, as we know, installs to /boot/modules/ directory. If you don't install graphics/drm-kmod (I did not), those tools have no firmwares to work with, so nothing will get copied to /boot/kernel/ directory.
 
But the files on my computer must come from somewhere.
Maybe you compiled WITHOUT_MODULES ?
Dunno, I did not mess with the makefile at all... just ran # make buildkernel in /usr/src/. I did not install any packages or even the ports tree, just compiled the kernel BEFORE doing anything on a cleanly installed system. I think you can find the default makefile in FreeBSD's github repo. Your files clearly came from graphics/drm-kmod... FWIW, I did get the zfs.ko module in my compilation, so it looks like the WITHOUT_MODULES option is not turned on by default.
 
I modified every file, including kernel conf, make conf , src conf etc ... Maybe it's that somewhere.
Makes me think that you first modified make.conf, compiled a few ports, including graphics/drm-kmod, and afterwards, compiled the kernel.

Try compiling the kernel with full, complete knowledge that you did not install graphics/drm-kmod.
To verify anything, eliminate uncertainties as much as possible. That is an ironclad rule among engineers.
 
Good thing I keep a sort of a 'Diary' of what I did under FreeBSD. Complete with action dates, package names, versions, timestamps, hashes, and the order in which I did it. That was a suggestion I picked up way back in 2002 for messing with Linux, but it still helps for working with FreeBSD. With that background, I took a look at my notes.

Turns out that when you compile graphics/drm-kmod, the port will offer you to install kernel module sources. Being in the habit of turning on as many options as I can, I would say yes to that. It looks like Alain De Vos said yes to that same option, and afterwards, compiled the kernel. This is how he ended up with those graphics drivers in /boot/kernel/ directory.

The order in which you do stuff on FreeBSD matters to a bigger extent than many realize. It is a headache to do my planning with that in mind, but that's the secret sauce I use.
 
OK, I guess i will need to post a walk-through:
  1. 1625422012525.png
    Yes, as per freshports.org, there will be 'No options to configure'. But wait - this port will pull in a dependency: graphics/drm-fbsd13-kmod. This is where you get the option to install kernel modules, as shown in next screenshot.
  2. 1625422465517.png
    If you say yes to installing kernel module sources, then the graphics drivers will be added to /usr/src/, which is where kernel sources are supposed to live. If you don't say yes to the SOURCES option, then the graphics drivers will not be added. Alain De Vos said yes there, which is why he ended up with sources for graphics drivers in /usr/src/, they got detected by Make and compiled, and thus deposited into /boot/kernel/ directory.
Surprising what paying attention to the process and connecting the dots will uncover. Less crapshoot troubleshooting in random places.

Oh, and BTW - all this was done AFTER I compiled my kernel.
 
After a tour of the other BSDs on the machine in question with very mixed results, I changed my mind and decided to revisit this. I've found a workaround that seems to be reliable. I have no idea why it works, but so far, so good (perhaps like the old joke about the guy passing the 50th floor after jumping off the Empire State Building).

Using kld_list in /etc/rc.conf does not work. If you attempt to load radeonkms there, the system will crash when booting. The suggestion (by one of the contributors to this thread) to use "drm" instead of "radeonkms" in kld_list also does not work in my case. The system does not crash, but you get VGA resolution when X is started.

Prior to starting X, logging in as root and doing 'kldload radeonkms' seems to work reliably. I can then log in as myself, startx, and the resolution is correct. So I arranged
for sudo to allow me to do this command without a password and tried adding 'sudo /sbin/kldload radeonkms' to my .xinitrc at the very beginning. This crashes the system after 'startx'. But, if I issue the kldload prior to startx and then do the startx (with the kldload command removed from .xinitrc), it seems to work, though I have very few samples at this point. So there seems to be some sort of timing dependency here.

As I observed earlier, this is really a mess. The documentation is inaccurate and getting the kernel module loaded seems to be fragile. I will try to compose a bug report about this.

Other than this problem, the system seems to work well on this machine, though again, I don't have a lot of data yet.
 
Back
Top