From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Alexander Shiyan <eagle.alexander923@gmail.com>,
barebox@lists.infradead.org
Subject: Re: [PATCH 3/3] ARM: boards: Add MyirTech MYD-YA15XC-T development board support
Date: Mon, 11 Sep 2023 18:09:46 +0200 [thread overview]
Message-ID: <8fe43887-c444-870c-5d2d-f4b412e85d16@pengutronix.de> (raw)
In-Reply-To: <aa20d72f-8cb6-7b51-9ae6-2f8d15d6c690@pengutronix.de>
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 |
prev parent reply other threads:[~2023-09-11 16:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 10:47 [PATCH 1/3] memory: Add driver for FMC2 External Bus Interface on STM32MP SoCs Alexander Shiyan
2023-08-30 10:47 ` [PATCH 2/3] mtd: nand: Add driver for NAND controller " Alexander Shiyan
2023-08-30 10:47 ` [PATCH 3/3] ARM: boards: Add MyirTech MYD-YA15XC-T development board support Alexander Shiyan
2023-08-30 14:41 ` Ahmad Fatoum
2023-08-31 6:40 ` Alexander Shiyan
2023-09-04 7:17 ` Sascha Hauer
2023-08-31 9:41 ` Alexander Shiyan
2023-09-05 8:25 ` Ahmad Fatoum
2023-09-11 16:01 ` Ahmad Fatoum
2023-09-11 16:09 ` Ahmad Fatoum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8fe43887-c444-870c-5d2d-f4b412e85d16@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=eagle.alexander923@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox