Re: advice sought: workflow with -CURRENT and amd GPU [Re: -CURRENT hangs since at least 2022-04-04]

From: Paul Mather <paul_at_gromit.dlib.vt.edu>
Date: Tue, 19 Apr 2022 16:02:04 UTC
On Apr 19, 2022, at 4:49 AM, Michael Schuster <michaelsprivate@gmail.com> wrote:

> Hi,
> 
> I'm highjacking and re-purposing the previous thread, I hope that's OK
> (I did change the subject ;-)) - I'm keeping some of the previous
> contents for reference.
> 
> I have similar HW to OP (Ryzen 7 4700 w. Renoir Graphics), and have
> been using a similar approach to keep the machine up to date - or so I
> suspect. Still, after a while (several months), I end up with one or
> more of these:
> - I get some sort of panic in DRM (at startup or, currently, at shutdown)
> - when I boot into to a previous BE to attempt a fix and then again
> reboot into the current one, I get tons of messages like this
>     "... kernel: KLD iic.ko: depends on kernel - not available or
> version mismatch
>      ... kernel: linker_load_file: /boot/kernel/iic.ko - unsupported file type"
>   and computer refuses to accept input (let alone start X)
> 
> and some others I don't recall right now.
> 
> Before I ask for advice (see below), let me explain the approaches
> I've taken so far. I install with ZFS from the beginning, current boot
> env is "N". These are outlines, not exact commands:
> 
> I) never touch the current BE, always update a new one:
>  1) given current BE N, I create a new BE N+1 and mount it on /mnt,
>  2) 'cd /usr/src; git pull; sudo make DESTDIR=/mnt ... (build, install, etc)'
>  3) 'cd usr/ports/graphics/drm-devel-kmod; sudo make DESTDIR=/mnt install'
>  4) beadm activate BE N+1; reboot
> 
> II) keep a "new" BE as backup/fallback, update current BE:
>  1) given current BE N, I create a new BE N+1 (mounting not required)
> (this is the intended 'fallback')
>  2) 'cd /usr/src; git pull"; then "make" as described in the Handbook
> "24.6. Updating FreeBSD from Source"
>  3) 'cd usr/ports/graphics/drm-devel-kmod; sudo make install'
>  4) reboot
> 
> in both scenarios(sp?), I do "pkg update; pkg upgrade" from time to
> time (also following the resp. approach shown above).
> 
> I suspect that I'm missing something fundamental in my approaches -
> does anyone have a (for them) foolproof approach along these lines, or
> can someone show me what I'm missing in either of mine (in private, if
> you prefer)?


I don't know whether you're missing anything, but I wanted to mention I
recently found a tool useful in helping my own BE-based source
upgrades: /usr/src/tools/build/beinstall.sh

I've found it helps with the build/upgrade steps.  See man beinstall(8)
for details.

Cheers,

Paul.