From owner-freebsd-ports@freebsd.org Mon Apr 6 09:19:33 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CDF72A9766 for ; Mon, 6 Apr 2020 09:19:33 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from msa1.earth.yoonka.com (yoonka.com [88.98.225.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "msa1.earth.yoonka.com", Issuer "msa1.earth.yoonka.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48wlNh15bZz3GbR for ; Mon, 6 Apr 2020 09:19:31 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from [10.70.7.24] ([10.70.7.24]) (authenticated bits=0) by msa1.earth.yoonka.com (8.15.2/8.15.2) with ESMTPSA id 0369JTEO055627 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Mon, 6 Apr 2020 09:19:29 GMT (envelope-from list1@gjunka.com) Subject: Re: amdgpu panics To: freebsd-ports@freebsd.org References: <6b0092f3-8d90-f1bc-b2ae-cf2fa2f029e0@gjunka.com> <47774b7a-0a6d-8806-6dee-4f0036651ace@gjunka.com> <20200312163447.GB42880@phouka1.phouka.net> <8d8ae2c8-1ecd-5c8c-2437-4e47cf48bd60@gmx.de> <96c03c59-b28e-3af1-e98b-e95517c20010@gjunka.com> <83bfb6f7-0a84-2905-7849-e4e93d9f6fb1@selasky.org> <9426b9bb-4fe6-37ba-ecb4-13a1ade47f92@gjunka.com> <9bc766aa-b17f-e8bc-bea2-11431972cf5d@selasky.org> <2ddfe444-7a20-9835-0875-6f93aa0f6ab3@gmx.de> From: Grzegorz Junka Message-ID: <5fb0aa95-9aa1-e170-15fe-ba5ce77869db@gjunka.com> Date: Mon, 6 Apr 2020 10:19:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <2ddfe444-7a20-9835-0875-6f93aa0f6ab3@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Rspamd-Queue-Id: 48wlNh15bZz3GbR X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of list1@gjunka.com designates 88.98.225.149 as permitted sender) smtp.mailfrom=list1@gjunka.com X-Spamd-Result: default: False [-5.86 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:88.98.225.149:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; DMARC_NA(0.00)[gjunka.com]; IP_SCORE(-3.56)[ip: (-9.32), ipnet: 88.98.192.0/18(-4.66), asn: 56478(-3.73), country: GB(-0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:56478, ipnet:88.98.192.0/18, country:GB]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 09:19:33 -0000 On 06/04/2020 09:32, Matthias Andree wrote: > Am 06.04.20 um 09:37 schrieb Grzegorz Junka: >> On 06/04/2020 08:21, Hans Petter Selasky wrote: >>>> They don't match, and they can't. >>>> >>>> Files in /boot/modules have been installed by drm-fbsd12.0-kmod and >>>> files in /boot/kernel have been installed by >>>> FreeBSD-kernel-venus-12.1_3 (venus is the name I gave the kernel >>>> configuration). >>> Is drm-fbsd12.0-kmod built using the same sources as >>> FreeBSD-kernel-venus-12.1_3. Can you try this: >>> >>> 1) Build and install a fresh 12-stable kernel, not release kernel, >>> from /usr/src >>> 2) Build and install /usr/ports/graphics/gpu-firmware-kmod >>> 3) Build and install /usr/ports/graphics/drm-fbsd12.0-kmod >>> >>>> I built the ports and the kernel on the same system but at different >>>> times. First I updated all sources (/usr/src and /usr/ports) then I >>>> built packages. When that didn't work, few days later I built the >>>> kernel and world. No updates to the sources have been made between >>>> those two. >>>> >>>> kldload /boot/modules/drm.ko /boot/modules/amdgpu.ko  <- doesn't >>>> work, system halts after loading one of the vega10 modules. >>> --HPS >> >> I am not sure I understand your question. drm-fbsd12.0-kmod is a port >> so it's built from /usr/local/poudriere/ports whereas >> FreeBSD-kernel-venus-12.1_3 is one of base packages build from /usr/src. > AGAIN: > > Do *NOT* build kernel modules in poudriere unless you can guarantee it's > using the *EXACT SAME* kernel configuration and sources, you must solve > this discrepancy: Sorry, what discrepancy do you mean? How does FreeBSD build the drm-fbsd12.0-kmod on the FreeBSD pkg build server if not with poudriere? Does it have any specific configuration I don't know about, e.g. null mounted /usr/src to the host? Is it even possible to build a poudriere package with a non-generic kernel configuration in the poudriere jail? What if I create the poudriere build jail from the kernel / world I built on the host? Is that possible? >> If you are asking if /usr/src is the same when building ports and >> kernel then again, no, because when building ports the jail's /usr/src >> is used, whereas when building the kernel the host's /usr/src is used. >> >> But I verified that both are the same, i.e., >> >> diff -r /usr/src /usr/local/poudriere/jails/12rel1/usr/src >> >> doesn't return any differences, apart from the additional kernel >> configuration. They are both 12.1-RELEASE-p3 (checked the version >> against sources in Github and SVN). > ...and "additional kernel configuration" is the thing that MIGHT break > the module in build if the kernel config has any impact on sources that > the module uses. The issue was the same with a stock GENERIC 12.1-p3 kernel, which I would expect would be build from the EXACT same sources as the RELENG 12.1 branch https://github.com/freebsd/freebsd/tree/releng/12.1, which I would expect freebsd-update to fetch to both, my host and the poudriere jail after it updated both to 12.1-RELEASE-p3. At least I verified the /sys/conf/newvers.sh in my jail and host to match the file in that branch in Github. Of course I can recompile the kernel and world using GENERIC kernel config, that at least would compile all modules that aren't normally compiled with GENERIC. > I still haven't understood why you cannot boot without amdgpu, and then > built (a) kernel, (b) firmware, (c) amdgpu and DRM drivers all directly > from /usr/src and updated /usr/ports > *ON THE MACHINE WITH THE AMD VGA CARD*. There are way too many variables > in the mix. I can but I have more than one desktop and I don't want to recompile everything from sources on each one. That's why I have a central build server. Tell me how I should configure the build server to build the packages and/or kernel and/or world in a way that the graphics stack expects it to be build and it would be solved. Or what you are really saying is that if someone wants to use the new drm graphics stack they HAVE TO recompile (a) kernel, (b) firmware, (c) amdgpu from sources on the host every time? GrzegorzJ