From: Tom Rini Date: Tue, 27 Feb 2018 17:03:29 -0500 Subject: [U-Boot] [PATCH] board: am335x: Set serial# variable In-Reply-To: References: <20180227200543.2367-1-semen.protsenko@linaro.org> <20180227200847.GY4311@bill-the-cat> Message-ID: <20180227220329.GB4311@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Feb 28, 2018 at 12:02:13AM +0200, Sam Protsenko wrote: > On 27 February 2018 at 22:08, Tom Rini wrote: > > On Tue, Feb 27, 2018 at 10:05:43PM +0200, Sam Protsenko wrote: > > > >> serial# variable is needed to show device correctly in "fastboot > >> devices" output. It's useful when we have several devices (in fastboot > >> mode) connected to single host and want to choose which one to flash. > >> > >> Reuse board_serial variable (obtained from EEPROM in > >> set_board_info_env() function) to set serial#. We can't use > >> omap_die_id_serial(), because AM335x lacks DIE_ID, as can be seen from > >> AM335x TRM. The other available option would be to reuse ethaddr > >> variable, but using board_serial seems more reasonable for this purpose. > >> > >> Signed-off-by: Sam Protsenko > > > > Does fastboot handle things better or worse than before with > > board_serial set to "unknown" ? That's a quite likely thing to happen > > as while serial should be set, but I'm sure there's boards in the wild > > other than just mine that I might have broken, that do not have the > > serial field set. > > > > Didn't think that on some boards the board_serial can be set to > "unknown" (though I saw it in the code). I can see two ways how the > patch can be reworked: > 1. If board_serial was set to "unknown", reuse ethaddr variable value > for serial#; otherwise use board_serial for serial# > 2. Always reuse ethaddr variable value for serial# > > Which one seems the best for you? Or maybe I'm missing some better way > to set serial#? I think a fall-back to ethaddr is best, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: