From nobody Wed Feb 23 10:52:56 2022 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 6079F19DC295 for ; Wed, 23 Feb 2022 10:53:05 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.blih.net [212.83.155.74]) (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 (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K3Xv36b0Qz4qV6; Wed, 23 Feb 2022 10:53:03 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1645613576; 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=NW0hfXQToIgOgLkXVvBsuIWMNweiU1UMicV11b+xy+s=; b=tZYQ3MzEUVulmegOFQdMgIxVD43+4OPxc4+4NEJnzQ/ISMcP7sM8YSZ1cdjpDmQ+WUGu2p gzx7c7x93ZrBcZTTfGpBlOH3ptaec1JIEfuQUAoxEG+vyD6YobkHhRkmaM8baeGJg6rm4m pcjpwoRgSkc6z2F4DabVYQdLSV5n140= Received: from skull.home.blih.net (lfbn-idf2-1-1209-14.w90-92.abo.wanadoo.fr [90.92.34.14]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 3e213c6b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 23 Feb 2022 10:52:56 +0000 (UTC) Date: Wed, 23 Feb 2022 11:52:56 +0100 From: Emmanuel Vadot To: Archimedes Gaviola Cc: Peter Jeremy , freebsd-arm@freebsd.org Subject: Re: Raspberry Pi Serial Number Message-Id: <20220223115256.6d67ebda1b8a7ddb52105d98@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4K3Xv36b0Qz4qV6 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=tZYQ3MzE; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-arm]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 23 Feb 2022 18:42:45 +0800 Archimedes Gaviola wrote: > On Wed, Feb 23, 2022 at 6:14 PM Peter Jeremy wrote: > > > On 2022-Feb-23 17:48:18 +0800, Archimedes Gaviola < > > archimedes.gaviola@gmail.com> wrote: > > >How to obtain the RPi serial number? I'm checking sysctl info but there > > >seems to be none with FreeBSD-13.0-RELEASE and 14.0-CURRENT or I just > > >missed it somewhere? In CentOS it is reflected in the /proc/cpuinfo such > > as: > > > > > >Hardware : BCM2835 > > >Revision : b03112 > > >Serial : 10000000bc8a56a3 > > >Model : Raspberry Pi 4 Model B Rev 1.2 > > > > I don't have a RPi4 but at least on my RPi2, the data appears to > > be in sysctl: > > hw.board.serial: 00000000d206f16c > > hw.board.revision: 10620993 > > hw.platform: bcm2836 > > > > Thanks Peter, I'm wondering why there's no such output in sysctl with RPi4? > > Archimedes Because those sysctls are only added on armv7 if u-boot passed some linux boot argument, see https://cgit.freebsd.org/src/tree/sys/arm/arm/machdep_boot.c#n91 The proper way to handle those is to add them under hw.fdt like I did for model and compatible property in https://cgit.freebsd.org/src/commit/?id=50e0dc0c4b46ee62b898ce2d92e52be4f77383d9 but I don't think that those are standard properties. -- Emmanuel Vadot