Date: Wed, 23 Feb 2022 11:52:56 +0100 From: Emmanuel Vadot <manu@bidouilliste.com> To: Archimedes Gaviola <archimedes.gaviola@gmail.com> Cc: Peter Jeremy <peterj@freebsd.org>, freebsd-arm@freebsd.org Subject: Re: Raspberry Pi Serial Number Message-ID: <20220223115256.6d67ebda1b8a7ddb52105d98@bidouilliste.com> In-Reply-To: <CAJFbk7FEp4%2BhJBZ9qmgJJZyDGp723jk5LR6CLma4cJMj8fer4A@mail.gmail.com> References: <CAJFbk7GZu3wTGmfKPO-EizVMb%2B%2BmS43M08UAry3Gv50D0Cbfqg@mail.gmail.com> <YhYJGeIPqVcQy6mK@server.rulingia.com> <CAJFbk7FEp4%2BhJBZ9qmgJJZyDGp723jk5LR6CLma4cJMj8fer4A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220223115256.6d67ebda1b8a7ddb52105d98>