Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2022 19:31:22 +0800
From:      Archimedes Gaviola <archimedes.gaviola@gmail.com>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        Peter Jeremy <peterj@freebsd.org>, freebsd-arm@freebsd.org
Subject:   Re: Raspberry Pi Serial Number
Message-ID:  <CAJFbk7Hq_ZU8EREKVx8d7u%2BUx8HsxAm5tx_ZMEThJ4Fv-BGniA@mail.gmail.com>
In-Reply-To: <20220223115256.6d67ebda1b8a7ddb52105d98@bidouilliste.com>
References:  <CAJFbk7GZu3wTGmfKPO-EizVMb%2B%2BmS43M08UAry3Gv50D0Cbfqg@mail.gmail.com> <YhYJGeIPqVcQy6mK@server.rulingia.com> <CAJFbk7FEp4%2BhJBZ9qmgJJZyDGp723jk5LR6CLma4cJMj8fer4A@mail.gmail.com> <20220223115256.6d67ebda1b8a7ddb52105d98@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000cf050a05d8adce3e
Content-Type: text/plain; charset="UTF-8"

On Wed, Feb 23, 2022 at 6:52 PM Emmanuel Vadot <manu@bidouilliste.com>
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 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 <manu@bidouilliste.com> <manu@freebsd.org>
>

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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Wed, Feb 23, 2022 at 6:52 PM Emman=
uel Vadot &lt;<a href=3D"mailto:manu@bidouilliste.com">manu@bidouilliste.co=
m</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
>On Wed, 23 Feb 2022 18:42:45 +0800<br>
Archimedes Gaviola &lt;<a href=3D"mailto:archimedes.gaviola@gmail.com" targ=
et=3D"_blank">archimedes.gaviola@gmail.com</a>&gt; wrote:<br>
<br>
&gt; On Wed, Feb 23, 2022 at 6:14 PM Peter Jeremy &lt;<a href=3D"mailto:pet=
erj@freebsd.org" target=3D"_blank">peterj@freebsd.org</a>&gt; wrote:<br>
&gt; <br>
&gt; &gt; On 2022-Feb-23 17:48:18 +0800, Archimedes Gaviola &lt;<br>
&gt; &gt; <a href=3D"mailto:archimedes.gaviola@gmail.com" target=3D"_blank"=
>archimedes.gaviola@gmail.com</a>&gt; wrote:<br>
&gt; &gt; &gt;How to obtain the RPi serial number? I&#39;m checking sysctl =
info but there<br>
&gt; &gt; &gt;seems to be none with FreeBSD-13.0-RELEASE and 14.0-CURRENT o=
r I just<br>
&gt; &gt; &gt;missed it somewhere? In CentOS it is reflected in the /proc/c=
puinfo such<br>
&gt; &gt; as:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;Hardware=C2=A0 =C2=A0 =C2=A0 =C2=A0 : BCM2835<br>
&gt; &gt; &gt;Revision=C2=A0 =C2=A0 =C2=A0 =C2=A0 : b03112<br>
&gt; &gt; &gt;Serial=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 : 10000000bc8a56a3<b=
r>
&gt; &gt; &gt;Model=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: Raspberry Pi =
4 Model B Rev 1.2<br>
&gt; &gt;<br>
&gt; &gt; I don&#39;t have a RPi4 but at least on my RPi2, the data appears=
 to<br>
&gt; &gt; be in sysctl:<br>
&gt; &gt; hw.board.serial: 00000000d206f16c<br>
&gt; &gt; hw.board.revision: 10620993<br>
&gt; &gt; hw.platform: bcm2836<br>
&gt; &gt;<br>
&gt; <br>
&gt; Thanks Peter, I&#39;m wondering why there&#39;s no such output in sysc=
tl with RPi4?<br>
&gt; <br>
&gt; Archimedes<br>
<br>
=C2=A0Because those sysctls are only added on armv7 if u-boot passed some<b=
r>
linux boot argument, see<br>
<a href=3D"https://cgit.freebsd.org/src/tree/sys/arm/arm/machdep_boot.c#n91=
" rel=3D"noreferrer" target=3D"_blank">https://cgit.freebsd.org/src/tree/sy=
s/arm/arm/machdep_boot.c#n91</a><br>
<br>
=C2=A0The proper way to handle those is to add them under hw.fdt like I did=
<br>
for model and compatible property in<br>
<a href=3D"https://cgit.freebsd.org/src/commit/?id=3D50e0dc0c4b46ee62b898ce=
2d92e52be4f77383d9" rel=3D"noreferrer" target=3D"_blank">https://cgit.freeb=
sd.org/src/commit/?id=3D50e0dc0c4b46ee62b898ce2d92e52be4f77383d9</a><br>
=C2=A0but I don&#39;t think that those are standard properties.<br>
<br>
-- <br>
Emmanuel Vadot &lt;<a href=3D"mailto:manu@bidouilliste.com" target=3D"_blan=
k">manu@bidouilliste.com</a>&gt; &lt;<a href=3D"mailto:manu@freebsd.org" ta=
rget=3D"_blank">manu@freebsd.org</a>&gt;<br></blockquote><div><br></div><di=
v>Oh I see, that explains thanks Emmanuel! It&#39;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&#39;m already satisfied. For some reason, I need the serial number f=
or system identification.</div><div><br></div><div>Thanks,</div><div>Archim=
edes=C2=A0 <br></div></div></div>

--000000000000cf050a05d8adce3e--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJFbk7Hq_ZU8EREKVx8d7u%2BUx8HsxAm5tx_ZMEThJ4Fv-BGniA>