From nobody Mon Sep 25 20:26:12 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvZCG0zlcz4v2Zd for ; Mon, 25 Sep 2023 20:26:18 +0000 (UTC) (envelope-from ronald@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvZCG0R9wz3ZZQ; Mon, 25 Sep 2023 20:26:18 +0000 (UTC) (envelope-from ronald@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695673578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yzYevcfY28vXzq90gV7iJKAYvtGhH1ftqIiDRCbLnfU=; b=YmlvUSu++Nx+t9Uu7zL09pYY3uuU5RnY3zpKZD/lnibzPNZLS8yKlZZbcYoLx/4eXZDTNd SYEK5XaB/d9oIn5JMidouXwGJQf2UlQQszMvgB8JamQfB3ABlJ2SWp2YN2o3I4PiFapzUc VaBMiUzFgIUAXSyHdr1Vh9jViCVt8RxE5g5wIMZ/1SToWkR1Tg6QxydjZAxAZcne8PjHiY duVn8PJUfbsOY3zI2FNjPz05m/DQdcBjmNR/9hym+eCHhu/zILezbEUh54VZtG45Xfr0j7 L2iXnfP4E9WDHwTMcXrodTBPSX/dxacn2wZrgS5gxoYMw2ar7f6dgSkHLYSHzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695673578; a=rsa-sha256; cv=none; b=MHyZOcVd/Y+g28DrI220G9BOaqM4N5m+9tVyWbaKjsrap4xmYATkyb7rRosre8cwP5Dl6l Zsn1Kn2i9gOpFA1l8G3QeKFXbnNn6cpNxEfimvQhoZouhc9dKn5lscBx9hgUbgwgE8yXba 3L0thVCoRFLPnRXrAlKe7+glQDO9FISUlPn9RKlwc3IezzpG+pGUr52EGF5Vc03tvo4ap3 z4yIzIvlV9dCsjv8/oEQyM4b4A8Z8ScO8dClu0MCaqaj5/KtxfNvSLCWkqHXkivnBGnAkV 6sI/HxkOlKhxRdRi1iKXNSvEQxy5BZGTjTG///a9H8HGoel/+yW7tiHXhgM64Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695673578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yzYevcfY28vXzq90gV7iJKAYvtGhH1ftqIiDRCbLnfU=; b=bWUe1gRUO29LMGbHgENwwSoTg5LdD07ZrWLtOZkMomhhQQy9VzGlChLumtxLxDoW1P49nL IdhARKdHwsQtygBC3FZ0lx7xnbS9dbtzc8YxFHFp9VJ7ejQY6IzpGkxXouKUABhl+QgXTb daYdtSoEUbHJ7YqIaht2dQHkn0YxDWXS5QkjA1W/Pt7OZ20AhGl6ENl/1rFfrKlfcLLl5n Sn5/dLb7nDIeUhOcPXWKgWjWCbhzKmg/hvyYBqrn2dpeQj6rsjA8gcuaw33SfThtYSmZRF gfiwhWhrYo6/M95BxQOFF77kHRu85yJ67sq9Zi+awnyEu2THWn2V2rL9uNYzXg== Received: from [192.168.1.109] (84-105-120-103.cable.dynamic.v4.ziggo.nl [84.105.120.103]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ronald/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RvZCF3mR2z1MP2; Mon, 25 Sep 2023 20:26:17 +0000 (UTC) (envelope-from ronald@FreeBSD.org) Message-ID: Date: Mon, 25 Sep 2023 22:26:12 +0200 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: Getting a stable MAC address for a RPI CM3+ with ue0 interface To: "Patrick M. Hausen" Cc: freebsd-arm References: <3C1032FF-B914-4863-8A03-759A8B4BE216@hausen.com> <77E70D30-8E7D-42DC-A041-3A783E1C6908@yahoo.com> <5205C76E-BAB4-4AB7-8A03-1E8A2D4353BB@hausen.com> <84C20AD4-1F37-414E-8808-60A2C9B621D9@karels.net> <4951c134-39be-43de-0aa7-430a136d8b36@FreeBSD.org> <2071C2B6-B61A-40E0-8DA2-1E23D463B2E9@hausen.com> <8305B36C-9DFE-4FF1-A836-80F2931A6A46@hausen.com> Content-Language: en-US From: Ronald Klop In-Reply-To: <8305B36C-9DFE-4FF1-A836-80F2931A6A46@hausen.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/25/23 19:10, Patrick M. Hausen wrote: > Hi all > >> Am 24.09.2023 um 23:05 schrieb Patrick M. Hausen : >> >> Hi all >> >>> Am 23.09.2023 um 21:28 schrieb Ronald Klop : >>> >>> Would this work? >>> >>> diff --git a/sys/dev/usb/net/if_smsc.c b/sys/dev/usb/net/if_smsc.c >>> index 0a0268bfa1a2..4a7983a20717 100644 >>> --- a/sys/dev/usb/net/if_smsc.c >>> +++ b/sys/dev/usb/net/if_smsc.c >>> [...] >> >> After building and installing the kernel with this patch and reboot I >> lost access to the node I used. I will try to set up console access >> somehow ... > > The development board I use for flashing etc. has got a serial port > connector and even a USB to serial converter so you can just plug in > USB to your laptop - I did not get any console output, though. > > https://www.waveshare.com/wiki/Compute_Module_PoE_Board#Serial_port > > I did get console output via HDMI, but my Apple keyboard seems not > to work when plugged in to USB so I could not really examine what > is wrong or boot into kernel.old - only diagonistic I can provide: > > The new kernel prints the "No MAC address found" message, then panics. > > I'm reflashing the module now ... > > From reading your source code, what are you really trying to achieve? > More diagnostic messages are a good thing, but from where are you > trying to read that MAC address? The method ether_gen_addr() generates a MAC address bases on hostuuid and interface name. Maybe not ideal, bu a lot better then a random MAC. sys/net/if_ethersubr.c: /* * Allocate an address from the FreeBSD Foundation OUI. This uses a * cryptographic hash function on the containing jail's name, UUID and the * interface name to attempt to provide a unique but stable address. * Pseudo-interfaces which require a MAC address should use this function to * allocate non-locally-administered addresses. */ void ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) It would be nice to see more information from the panic. Can you make a picture or movie of the screen while this happens? Or does the system make a kernel crashdump? See "dumpdev" in /etc/defaults/rc.conf. A crashdump is written to the swap partition and on reboot a summary is written in /var/crash from what is in the swap partition. This is all assuming the system has a large enough swap partition. Regards, Ronald. > As far as I understand for the Pi you are supposed to use the RPi > foundation OUI B8:27:EB plus the lower three octets of the Pi's > serial number - regardless of the Ethernet adapter plugged in. > > All Pis running Linux do this. > > Kind regards, > Patrick