[PATCH 3/3] ARM: boards: Add MyirTech MYD-YA15XC-T development board support

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Sep 11 09:09:46 PDT 2023


Hi,

On 30.08.23 16:41, Ahmad Fatoum wrote:
> On 30.08.23 12:47, Alexander Shiyan wrote:
>> +
>> +	len = (eeprom.sn[0] - '0');
>> +	if ((len < 8) || (len > 64)) {
>> +		pr_err("Unable to get product serial\n");
>> +		return -EINVAL;
>> +	}
>> +
>> +	strncpy(str, &eeprom.sn[1], len);
>> +	str[len] = '\0';
>> +	pr_info("Product serial: %s\n", str);
> 
> Would barebox_set_serial_number() work for you?
> 
>> +	machine_id_set_hashable(str, len);
> 
> Any particular reason why not to just use the SoC serial?

We had a discussion two years ago[1], where it turned out that the unique
ID on STM32MP1 SoCs wasn't randomized, so it's probably better board vendors
indeed set their own if that would have more entropy. The ugly thing about
that is that the last call to machine_id_set_hasable wins, so I wanted to
change it to be set in device tree instead, e.g.:

  /chosen { barebox,machine-id-path = &bsec; }.

Alas I never sent a v2. Anyways, existing users will have to be grandfathered
in, so it's fine for me if you choose to call machine_id_set_hashable from
your board code.

[1]: https://lore.barebox.org/barebox/dad3cc59-5a25-9889-88a5-58467f576d8e@pengutronix.de/

>> +ENTRY_FUNCTION(start_stm32mp15x_myir, r0, r1, r2)
>> +{
>> +	void *fdt;
>> +
>> +	stm32mp_cpu_lowlevel_init();
>> +
>> +	if (IS_ENABLED(CONFIG_DEBUG_LL))
>> +		setup_uart();
>> +
>> +	fdt = __dtb_z_stm32mp15x_myirtech_myd_start + get_runtime_offset();
>> +
>> +	stm32mp1_barebox_entry(fdt);
> 
> Same question: Do you use an old TF-A or why do you need a specific entry
> point instead of barebox-stm32mp-generic-bl33.img?

Rethinking this, such an image is the only way to chainload barebox over
the network. So you may want to keep it until barebox can boot FIP images..

Cheers,
Ahmad



-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list