# src component not installed error blocking freebsd update installation.



## Sivan! (Jul 4, 2022)

```
/usr/ports/graphics/gpu-firmware-amd-kmod$ doas make install clean
===>  Building for gpu-firmware-amd-kmod-banks-20220511
make[1]: "/usr/ports/graphics/gpu-firmware-amd-kmod/work-banks/drm-kmod-firmware-20220511/Makefile" line 4: Cannot open /usr/src/sys/conf/kern.opts.mk
make[1]: Fatal errors encountered -- cannot continue
make[1]: stopped in /usr/ports/graphics/gpu-firmware-amd-kmod/work-banks/drm-kmod-firmware-20220511
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
```

This is the relevant section of the Makefile:


```
# $FreeBSD$

SYSDIR?=/usr/src/sys
.include "${SYSDIR}/conf/kern.opts.mk"

_VALID_KMODS=   amdgpukmsfw i915kmsfw radeonkmsfw

DEFAULT_KMODS=  amdgpukmsfw radeonkmsfw

.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
DEFAULT_KMODS+= i915kmsfw
.endif
```

My firmware works fine, but I had to run `portmaster -af` because I had encountered errors while installing new applications.  Portmaster finds 1300+ packages to update, but stopped every time with an error related to kmod.


----------



## SirDice (Jul 4, 2022)

Building a kernel module requires that the FreeBSD source tree (with the correct version) is present in /usr/src/.


----------



## Sivan! (Jul 5, 2022)

SirDice said:


> Building a kernel module requires that the FreeBSD source tree (with the correct version) is present in /usr/src/.



The directory /usr/src is empty.  What should I do?


----------



## Geezer (Jul 5, 2022)

`bsdinstall`


----------



## Sivan! (Jul 5, 2022)

Thank you.  I have done that.

1.  `bsdinstall` takes me to the installer, which shows zfs with the disk unselected, when I select there is a warning that the contents of the disk will be destroyed. With the disk unselected, the program does not proceed. I don't have such as serious problem that requires the disk to be wiped out.  Is there a different way of installing /usr/src ?

After `postmaster -af` I went on to 
`freebsd-update install`

Says:

```
src component not installed, skipped
Updates cannot be installed when the system securelevel
is greater than zero.
```

One error related to src component being not installed, or missing due to some strange reason.  

2. The other hurdle to update relates to that of securelevel being 3.  Is the securelevel setting also the reason why apache24 and php that I installed a day ago does not bring up the localhost on my browser?


```
syslogd_flags="-ss"
sendmail_enable="NONE"
sendmail_submint_enable="NONE"
sendmail_outbound_enable="NONE"
sendmail_msp_queue_enable="NONE"
hostname="BSD.turiya.company"
ddclient_enable="YES"
keymap="us.kbd"
ifconfig_re0="DHCP"
ifconfig_re0_ipv6="inet6 accept_rtadv"
defaultroute_delay="1"  # Don't wait for a default route in the foreground
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="auto"
moused_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
dbus_enable="YES"
kdm5_enable="YES"
kld_list="amdgpu"
nginx_enable="NO"
apache_enable="YES"
sddm_enable="yes"
clear_tmp_enable="YES"
syslogd_flags="-ss"
pf_enable="yes"
pflog_enable="yes"
pflog_logfile="/var/log/pflog"  # where pflogd should store the logfile
pflog_flags=""                  # additional flags for pflogd startup
nfs_reserved_port_only="NO"
linux_enable="YES"
kern_securelevel_enable="Yes"
kern_securelevel="3"
altlog_proglist="named"
apache24_enable="YES"
mysql_enable="YES"
```

3.  What I have is an AMD processor with built in Radeon gpu, the settings that I have is "amdgpu" which works. Postmaster -a finds several unrelated and irrelevant firmware to be installed.  What are the irrelevant entries that I could delete, how, and where?  In the make file under gpu firmware in the ports directory, so as to make the portmaster automatically exclude the irrelevant firmware?


```
gpu-firmware-amd-kmod-banks-20220511 
        gpu-firmware-amd-kmod-bonaire-20220511
        gpu-firmware-amd-kmod-carrizo-20220511
        gpu-firmware-amd-kmod-fiji-20220511
        gpu-firmware-amd-kmod-hainan-20220511
        gpu-firmware-amd-kmod-hawaii-20220511
        gpu-firmware-amd-kmod-kabini-20220511
        gpu-firmware-amd-kmod-kaveri-20220511
        gpu-firmware-amd-kmod-mullins-20220511
        gpu-firmware-amd-kmod-navi10-20220511
        gpu-firmware-amd-kmod-navi12-20220511
        gpu-firmware-amd-kmod-navi14-20220511
        gpu-firmware-amd-kmod-oland-20220511
        gpu-firmware-amd-kmod-picasso-20220511
        gpu-firmware-amd-kmod-pitcairn-20220511
        gpu-firmware-amd-kmod-polaris10-20220511
        gpu-firmware-amd-kmod-polaris11-20220511
        gpu-firmware-amd-kmod-polaris12-20220511
        gpu-firmware-amd-kmod-raven-20220511
        gpu-firmware-amd-kmod-raven2-20220511
        gpu-firmware-amd-kmod-renoir-20220511
        gpu-firmware-amd-kmod-si58-20220511
        gpu-firmware-amd-kmod-stoney-20220511
        gpu-firmware-amd-kmod-tahiti-20220511
        gpu-firmware-amd-kmod-tonga-20220511
        gpu-firmware-amd-kmod-topaz-20220511
        gpu-firmware-amd-kmod-vega10-20220511
        gpu-firmware-amd-kmod-vega12-20220511
        gpu-firmware-amd-kmod-vega20-20220511
        gpu-firmware-amd-kmod-vegam-20220511
        gpu-firmware-amd-kmod-verde-20220511
        gpu-firmware-intel-kmod-broxton-20220511
        gpu-firmware-intel-kmod-coffeelake-20220511
        gpu-firmware-intel-kmod-elkhartlake-20220511
        gpu-firmware-intel-kmod-geminilake-20220511
        gpu-firmware-intel-kmod-icelake-20220511
        gpu-firmware-intel-kmod-kabylake-20220511
        gpu-firmware-intel-kmod-rocketlake-20220511
        gpu-firmware-intel-kmod-skylake-20220511
        gpu-firmware-intel-kmod-tigerlake-20220511
        gpu-firmware-radeon-kmod-aruba-20220511
        gpu-firmware-radeon-kmod-barts-20220511
        gpu-firmware-radeon-kmod-bonaire-20220511
        gpu-firmware-radeon-kmod-btc-20220511
        gpu-firmware-radeon-kmod-caicos-20220511
        gpu-firmware-radeon-kmod-cayman-20220511
        gpu-firmware-radeon-kmod-cedar-20220511
        gpu-firmware-radeon-kmod-cypress-20220511
        gpu-firmware-radeon-kmod-hainan-20220511
        gpu-firmware-radeon-kmod-hawaii-20220511
        gpu-firmware-radeon-kmod-juniper-20220511
        gpu-firmware-radeon-kmod-kabini-20220511
        gpu-firmware-radeon-kmod-kaveri-20220511
        gpu-firmware-radeon-kmod-mullins-20220511
        gpu-firmware-radeon-kmod-oland-20220511
        gpu-firmware-radeon-kmod-palm-20220511
        gpu-firmware-radeon-kmod-pitcairn-20220511
        gpu-firmware-radeon-kmod-r100-20220511
        gpu-firmware-radeon-kmod-r200-20220511
        gpu-firmware-radeon-kmod-r300-20220511
        gpu-firmware-radeon-kmod-r420-20220511
        gpu-firmware-radeon-kmod-r520-20220511
        gpu-firmware-radeon-kmod-r600-20220511
        gpu-firmware-radeon-kmod-r700-20220511
        gpu-firmware-radeon-kmod-redwood-20220511
        gpu-firmware-radeon-kmod-rs600-20220511
        gpu-firmware-radeon-kmod-rs690-20220511
        gpu-firmware-radeon-kmod-rs780-20220511
        gpu-firmware-radeon-kmod-rv610-20220511
        gpu-firmware-radeon-kmod-rv620-20220511
        gpu-firmware-radeon-kmod-rv630-20220511
        gpu-firmware-radeon-kmod-rv635-20220511
        gpu-firmware-radeon-kmod-rv670-20220511
        gpu-firmware-radeon-kmod-rv710-20220511
        gpu-firmware-radeon-kmod-rv730-20220511
        gpu-firmware-radeon-kmod-rv740-20220511
        gpu-firmware-radeon-kmod-rv770-20220511
        gpu-firmware-radeon-kmod-sumo-20220511
        gpu-firmware-radeon-kmod-sumo2-20220511
        gpu-firmware-radeon-kmod-tahiti-20220511
        gpu-firmware-radeon-kmod-turks-20220511
        gpu-firmware-radeon-kmod-verde-20220511
```

Thank you.


----------



## bsduck (Jul 7, 2022)

Sivan! said:


> Is there a different way of installing /usr/src ?


The easiest way is to get it through git. See https://docs.freebsd.org/en/books/handbook/cutting-edge/#updating-src-obtaining-src


----------



## Sivan! (Jul 7, 2022)

bsduck said:


> The easiest way is to get it through git. See https://docs.freebsd.org/en/books/handbook/cutting-edge/#updating-src-obtaining-src



*Do I start here?*  Do I have to specify my current version or locate the relevant git branch?



> # cd /usr/src
> # git remote --v
> origin  https://git.freebsd.org/src.git (fetch)
> origin  https://git.freebsd.org/src.git (push)



/usr/home/sivan/poudriere/src
/usr/src/
/usr/ports/sysutils/etcupdate/src
/usr/ports/ports-mgmt/portlint/src
/usr/ports/ports-mgmt/portupdate-scan/src

However, the error is peristent:

`# freebsd-update install`


> src component not installed, skipped




Thank you.


----------

