From nobody Wed Feb 23 11:31:22 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 895D219E3BDD for ; Wed, 23 Feb 2022 11:31:41 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K3Ylc5z6Kz3D6W; Wed, 23 Feb 2022 11:31:40 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ed1-x52e.google.com with SMTP id g20so1790276edw.6; Wed, 23 Feb 2022 03:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NHK9km3Rje5xGoNOLNsEATG/RFQYbLQvjevZE/OgjTY=; b=KWQcffBZfQnam0n+5FMRwJ2cP5doVPp8nxvF3kW2vmOX3a5pEgBt38sLe6LpZY0rSV TjtYTLnp6MHO+99NXVsEJCtOpr0FybxEn2y6oxd3yihGdXXQ35Lsv+aPfA5HmWoMHvre ICGul4KThOG9v4B5G1r+X/twXxWpgaU97/L4L3teJXAfpMm9JUI6OHW9L3tROnSvtrie HRehd7Ks/qb7tptP0FLrqwRSfwUhw40aOgaGHNV2F0fkW9NlaxORgLixGVMuZWcwdgC9 S+v9CqP1MtnDgwyJ7AdBof6wMevznvfTvvHXzIYPGbQ059W3Qlssf0ZTZFSobMwEAaFX 9Svw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NHK9km3Rje5xGoNOLNsEATG/RFQYbLQvjevZE/OgjTY=; b=yHLVMJrBV/QtXP1EX005J5V/DBZX9bVlfoaLuUlxALpBbr4TVyphOmG0p+vI//Kpxc AUviY2QaIsLjHPXAkqIO5RnREXXY5FnYSHfpNE3K1wz9w4nA1VyRl0GXKQYXJt18eQ2c tUsjAEDTwTsotA4ajAFC4GObbTBxokpS0RCYE1CLc//YRd6sfoP6FC4kP9EcApva1uAF F40ie6ICr1MeXCUXMfdrW5rY8I4fvj6GdxjScxTADJOCZrDdjB7w7Yepi6jiSl1m6PZY eGjL0Yd6MhGBSO8ny1JD249EBWHi1VQ5Qb7RPax7xOD7WwI4m4nGkwMchOpOYbNKy1xL 3dFw== X-Gm-Message-State: AOAM532P7sXRCQEtKzTgeJ1sH99p2ybPVNU8/y1ZbXYIaC1U2r6b5lfB LFiyXgaXRWYMfQF2fE6R2zX3fWX8Ylzkbr0h6fKInFIE48Dt1A== X-Google-Smtp-Source: ABdhPJxiZq2KrbaV9UTNDwv1NtvCcbCSeMcB71WRdUJnuKVTHmbdQn752TzX5nZB6W7KOo6fkpJ8MVGrtN5KGLOosUs= X-Received: by 2002:aa7:d80f:0:b0:410:d5c3:f770 with SMTP id v15-20020aa7d80f000000b00410d5c3f770mr30975573edq.279.1645615894167; Wed, 23 Feb 2022 03:31:34 -0800 (PST) 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 References: <20220223115256.6d67ebda1b8a7ddb52105d98@bidouilliste.com> In-Reply-To: <20220223115256.6d67ebda1b8a7ddb52105d98@bidouilliste.com> From: Archimedes Gaviola Date: Wed, 23 Feb 2022 19:31:22 +0800 Message-ID: Subject: Re: Raspberry Pi Serial Number To: Emmanuel Vadot Cc: Peter Jeremy , freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000cf050a05d8adce3e" X-Rspamd-Queue-Id: 4K3Ylc5z6Kz3D6W X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=KWQcffBZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::52e as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52e:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-arm]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --000000000000cf050a05d8adce3e Content-Type: text/plain; charset="UTF-8" On Wed, Feb 23, 2022 at 6:52 PM Emmanuel Vadot wrote: > 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 > Oh I see, that explains thanks Emmanuel! It's alright just stick to the standard properties because in my case as long as I can obtain the serial number in any other way like the ofwdump tool I'm already satisfied. For some reason, I need the serial number for system identification. Thanks, Archimedes --000000000000cf050a05d8adce3e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Feb 23, 2022 at 6:52 PM Emman= uel Vadot <manu@bidouilliste.co= m> wrote:
On Wed, 23 Feb 2022 18:42:45 +0800
Archimedes Gaviola <archimedes.gaviola@gmail.com> wrote:

> On Wed, Feb 23, 2022 at 6:14 PM Peter Jeremy <peterj@freebsd.org> 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 o= r I just
> > >missed it somewhere? In CentOS it is reflected in the /proc/c= puinfo such
> > as:
> > >
> > >Hardware=C2=A0 =C2=A0 =C2=A0 =C2=A0 : BCM2835
> > >Revision=C2=A0 =C2=A0 =C2=A0 =C2=A0 : b03112
> > >Serial=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : 10000000bc8a56a3 > > >Model=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: 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 sysc= tl with RPi4?
>
> Archimedes

=C2=A0Because those sysctls are only added on armv7 if u-boot passed some linux boot argument, see
https://cgit.freebsd.org/src/tree/sy= s/arm/arm/machdep_boot.c#n91

=C2=A0The proper way to handle those is to add them under hw.fdt like I did=
for model and compatible property in
https://cgit.freeb= sd.org/src/commit/?id=3D50e0dc0c4b46ee62b898ce2d92e52be4f77383d9
=C2=A0but I don't think that those are standard properties.

--
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

Oh I see, that explains thanks Emmanuel! It's alright just stick to t= he standard properties because in my case as long as I can obtain the seria= l number in any other way like the ofwdump tool I'm already satisfied. For some reason, I need the serial number f= or system identification.

Thanks,
Archim= edes=C2=A0
--000000000000cf050a05d8adce3e--